Mobile header is now two rows. Row 1: hamburger | project · branch indicator (live via GET /api/projects/:id/git, 30s poll) | ModelPicker | FolderTree. Row 2: pane-switcher pill (hand-rolled BottomSheet) + NewPaneMenu. Chat-within-pane navigation hidden on mobile; users switch panes via the sheet. Cross-tab status sync via chat_status frames published from inference.ts at working/idle/error transitions; StatusDot component renders amber-pulse/green/red/gray on each pane row and on desktop ChatTabBar tabs. Level 1 git awareness exposes a read-only git_status tool to the model, backed by services/git_meta.ts (execFile + 2s timeout + 30s cache). Workspace.tsx now receives panes/chats hooks as props (hoisted into Session.tsx) so the header pill shares state with the pane grid. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
import { Bot, MessageSquare, Plus, Terminal } from 'lucide-react';
|
|
import {
|
|
DropdownMenu,
|
|
DropdownMenuContent,
|
|
DropdownMenuItem,
|
|
DropdownMenuTrigger,
|
|
} from '@/components/ui/dropdown-menu';
|
|
|
|
interface Props {
|
|
onAddPane: (kind: 'chat' | 'terminal' | 'agent') => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
// v1.8 row-2 right cluster: mirrors the desktop Workspace.tsx Split dropdown.
|
|
// Terminal and Agent items pass through to addSplitPane which already shows
|
|
// "coming soon" toasts; rendering them here matches the Batch 3 workspace
|
|
// model so the UI is forward-compatible with BooTerm/BooCoder.
|
|
export function NewPaneMenu({ onAddPane, disabled }: Props) {
|
|
return (
|
|
<DropdownMenu>
|
|
<DropdownMenuTrigger asChild>
|
|
<button
|
|
type="button"
|
|
disabled={disabled}
|
|
className="inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-full bg-muted/40 hover:bg-muted/70 text-foreground disabled:opacity-40 disabled:cursor-not-allowed shrink-0"
|
|
aria-label="New pane"
|
|
>
|
|
<Plus size={16} />
|
|
</button>
|
|
</DropdownMenuTrigger>
|
|
<DropdownMenuContent align="end">
|
|
<DropdownMenuItem onSelect={() => onAddPane('chat')}>
|
|
<MessageSquare size={14} /> New chat
|
|
</DropdownMenuItem>
|
|
<DropdownMenuItem onSelect={() => onAddPane('terminal')}>
|
|
<Terminal size={14} /> New terminal
|
|
</DropdownMenuItem>
|
|
<DropdownMenuItem onSelect={() => onAddPane('agent')}>
|
|
<Bot size={14} /> New agent
|
|
</DropdownMenuItem>
|
|
</DropdownMenuContent>
|
|
</DropdownMenu>
|
|
);
|
|
}
|