From 95cf5039be5e11b89c4264d8a3070c32ace864e8 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 1 Jul 2026 18:23:07 -0400 Subject: [PATCH] fix(tui): color prompt work counts --- packages/tui/src/component/prompt/index.tsx | 41 +++++++++++++++------ 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/packages/tui/src/component/prompt/index.tsx b/packages/tui/src/component/prompt/index.tsx index d02b3b16d1..71fb53e357 100644 --- a/packages/tui/src/component/prompt/index.tsx +++ b/packages/tui/src/component/prompt/index.tsx @@ -290,18 +290,23 @@ export function Prompt(props: PromptProps) { } }) - // Far-right footer cluster: live work counts lead, then context/cost usage, all dot-joined. + const subagentStatusLabel = createMemo(() => { + const agents = activeSubagents() + if (!agents) return undefined + return `${agents} subagent${agents === 1 ? "" : "s"}` + }) + const shellStatusLabel = createMemo(() => { + const shells = runningShells() + if (!shells) return undefined + return `${shells} shell${shells === 1 ? "" : "s"}` + }) + const liveWorkStatusVisible = createMemo(() => Boolean(subagentStatusLabel() || shellStatusLabel())) + + // Far-right footer cluster: live work counts lead, then context/cost usage. // When empty, the cluster falls back to the hotkey hints. const statusItems = createMemo(() => { - const agents = activeSubagents() - const shells = runningShells() const stats = usage() - return [ - agents ? `${agents} subagent${agents === 1 ? "" : "s"}` : undefined, - shells ? `${shells} shell${shells === 1 ? "" : "s"}` : undefined, - stats?.context, - stats?.cost, - ].filter(Boolean) + return [stats?.context, stats?.cost].filter(Boolean) }) const [store, setStore] = createStore<{ @@ -1683,9 +1688,23 @@ export function Prompt(props: PromptProps) { - 0}> + 0}> - {statusItems().join(" · ")} + + {(label) => {label()}} + + + · + + + {(label) => {label()}} + + 0}> + · + + 0}> + {statusItems().join(" · ")} +