diff --git a/components/sub-agents-panel.tsx b/components/sub-agents-panel.tsx index ead8bb9..4e644e0 100644 --- a/components/sub-agents-panel.tsx +++ b/components/sub-agents-panel.tsx @@ -2,6 +2,7 @@ import { BotIcon, PenToolIcon, PlayIcon, SearchIcon } from "lucide-react"; import type { JobKind, JobRecord } from "@/src/core"; +import { useTreePanelMode } from "@/components/tree-panel"; /** * The sub-agents sidebar section (vision §2.5 live observability): what the @@ -20,9 +21,40 @@ const KIND_META: Record = { visual: { label: "Figure maker", Icon: PenToolIcon }, }; +/** The collapsed fleet: a quiet strip on the sidebar rail — bot icon + + * running count, exactly like the plan's node-count rail below it. Click + * expands the sidebar back to the full fleet list. */ +function SubAgentsRail({ count, onExpand }: { count: number; onExpand: () => void }) { + return ( +
+ + + {count} running + +
+ ); +} + export function SubAgentsPanel({ jobs }: { jobs: JobRecord[] }) { + const { mode, go } = useTreePanelMode(); const running = jobs.filter((j) => j.status === "running"); if (running.length === 0) return null; + if (mode === "rail") + return go("list")} />; return (