From 26859e3fcbdb031512385718bc420a5e9bfee403 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Thu, 16 Apr 2026 20:27:06 -0500 Subject: [PATCH] fix(tui): keep the Thinking expander visible for the whole turn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously `hasThinking = !!cot || reasoningActive || (busy && !hasTools)` so the moment a tool started streaming (`hasTools` → true) the expander vanished mid-turn. If the model also produced no `reasoning.delta` events (reasoning-less models, or reasoning arriving after tools), the whole turn ran with no Thinking row — then `message.complete` populated `msg.thinking` from the payload's post-hoc reasoning trace and the expander suddenly appeared in the transcript AFTER the turn. Drop the `!hasTools` restriction. The Thinking row now anchors for the entire `busy` window; tools and thinking coexist as sibling sections (they already did — the exclusion was a UX mistake). Reasoning-less models show a dim empty header; streaming models show live content; tool-interleaved turns keep the anchor visible throughout. --- ui-tui/src/components/thinking.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-tui/src/components/thinking.tsx b/ui-tui/src/components/thinking.tsx index 76dbefe579d..8c57eeaad04 100644 --- a/ui-tui/src/components/thinking.tsx +++ b/ui-tui/src/components/thinking.tsx @@ -692,7 +692,7 @@ export const ToolTrail = memo(function ToolTrail({ const hasTools = groups.length > 0 const hasSubagents = subagents.length > 0 const hasMeta = meta.length > 0 - const hasThinking = !!cot || reasoningActive || (busy && !hasTools) + const hasThinking = !!cot || reasoningActive || busy const thinkingLive = reasoningActive || reasoningStreaming const tokenCount = reasoningTokens !== undefined ? reasoningTokens : reasoning ? estimateTokensRough(reasoning) : 0