From f980b5452f33539cd90011744971a2302b737b4e Mon Sep 17 00:00:00 2001 From: Yuxuan Lu Date: Sat, 11 Apr 2026 21:34:22 -0700 Subject: [PATCH] fix(ui): show 'Running commands' instead of 'Thinking' while bash tool executes --- packages/ui/src/components/session-turn.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx index e891a6febe2f..9fd3117d9646 100644 --- a/packages/ui/src/components/session-turn.tsx +++ b/packages/ui/src/components/session-turn.tsx @@ -346,6 +346,7 @@ export function SessionTurn( const assistantDerived = createMemo(() => { let visible = 0 let reason: string | undefined + let bash = false const show = showReasoningSummaries() for (const message of assistantMessages()) { for (const part of list(data.store.part?.[message.id], emptyParts)) { @@ -356,12 +357,20 @@ export function SessionTurn( const h = heading(part.text) if (h) reason = h } + if ( + part.type === "tool" && + part.tool === "bash" && + (part.state.status === "running" || part.state.status === "pending") + ) { + bash = true + } } } - return { visible, reason } + return { visible, reason, bash } }) const assistantVisible = createMemo(() => assistantDerived().visible) const reasoningHeading = createMemo(() => assistantDerived().reason) + const bashRunning = createMemo(() => assistantDerived().bash) const showThinking = createMemo(() => { if (!working() || !!error()) return false if (status().type === "retry") return false @@ -414,7 +423,11 @@ export function SessionTurn(
- +