wip: context-meter + model-label UI and provider/inference tweaks
Checkpoint of in-flight work so the orchestrator branch can rebase onto a clean main: ContextBar → ContextMeter, model-label helper, model/agent picker + provider-snapshot/registry changes, inference payload + message-columns.
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
useParams,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
import { ChevronRight, FolderTree, Menu, X } from 'lucide-react';
|
||||
import { ChevronRight, FolderTree, History, Menu, X } from 'lucide-react';
|
||||
import { api } from '@/api/client';
|
||||
import type { Project, Session as SessionType } from '@/api/types';
|
||||
import { sessionEvents } from '@/hooks/sessionEvents';
|
||||
@@ -57,12 +57,12 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
activePaneIdxRef,
|
||||
addSplitPane,
|
||||
removePane,
|
||||
openSessionHistory,
|
||||
removeChatFromPanes,
|
||||
initializeFirstChatIfEmpty,
|
||||
validatePanes,
|
||||
} = panesHook;
|
||||
const activePane = panes[activePaneIdx];
|
||||
const activeIsCoder = activePane?.kind === 'coder';
|
||||
|
||||
const openChatInActivePane = useCallback(
|
||||
(chatId: string) => openChatInPane(activePaneIdxRef.current, chatId),
|
||||
@@ -345,7 +345,7 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
className={cn(
|
||||
'border-b shrink-0 text-sm',
|
||||
isMobile
|
||||
? 'flex flex-col gap-1.5 px-3 py-2'
|
||||
? 'flex flex-col gap-1 px-3 py-1'
|
||||
: 'flex items-center gap-1.5 px-3 sm:px-4 py-2',
|
||||
)}
|
||||
style={{ paddingTop: 'max(0.5rem, env(safe-area-inset-top))' }}
|
||||
@@ -359,7 +359,7 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setDrawerOpen(true)}
|
||||
className="inline-flex items-center justify-center -ml-1 min-w-[44px] min-h-[44px] rounded text-muted-foreground hover:bg-muted hover:text-foreground shrink-0"
|
||||
className="inline-flex items-center justify-center -ml-1 min-w-[44px] min-h-[36px] rounded text-muted-foreground hover:bg-muted hover:text-foreground shrink-0"
|
||||
aria-label="Open sidebar"
|
||||
>
|
||||
<Menu className="size-5" />
|
||||
@@ -396,7 +396,7 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
<button
|
||||
type="button"
|
||||
onClick={toggleRightRail}
|
||||
className="relative inline-flex items-center justify-center -mr-1 min-w-[44px] min-h-[44px] rounded text-muted-foreground hover:bg-muted hover:text-foreground shrink-0"
|
||||
className="relative inline-flex items-center justify-center -mr-1 min-w-[44px] min-h-[36px] rounded text-muted-foreground hover:bg-muted hover:text-foreground shrink-0"
|
||||
aria-label="Toggle file browser"
|
||||
>
|
||||
<FolderTree className="size-5" />
|
||||
@@ -421,16 +421,25 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
onAddPane={addPaneAndSwitch}
|
||||
disabled={panes.length >= MAX_PANES}
|
||||
/>
|
||||
{activeIsCoder && activePane && panes.length > 1 && (
|
||||
{activePane && panes.length > 1 && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => removePane(activePaneIdx)}
|
||||
className="inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-full bg-muted/40 hover:bg-muted/70 text-foreground shrink-0"
|
||||
className="inline-flex items-center justify-center min-h-[36px] min-w-[44px] rounded-full bg-muted/40 hover:bg-muted/70 text-foreground shrink-0"
|
||||
aria-label="Close pane"
|
||||
>
|
||||
<X size={16} />
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => openSessionHistory(activePaneIdx)}
|
||||
className="inline-flex items-center justify-center min-h-[36px] min-w-[44px] rounded-full bg-muted/40 hover:bg-muted/70 text-foreground shrink-0"
|
||||
aria-label="Session history"
|
||||
title="Session history"
|
||||
>
|
||||
<History size={16} />
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user