diff --git a/src/components/chat/welcome-input-panel.tsx b/src/components/chat/welcome-input-panel.tsx index c7444b5..8268d05 100644 --- a/src/components/chat/welcome-input-panel.tsx +++ b/src/components/chat/welcome-input-panel.tsx @@ -932,7 +932,12 @@ export function WelcomeInputPanel({ overscan={10} /> - {showLive && } + {showLive && connStatus === "prompting" && ( + + )} Date.now() - message.startedAt) @@ -280,21 +284,23 @@ export function LiveTurnStats({ message }: LiveTurnStatsProps) { // Count tool calls from live content let toolCallCount = 0 - let isThinking = false + let hasThinkingBlock = false for (const block of message.content) { if (block.type === "tool_call") { toolCallCount++ } else if (block.type === "thinking") { - isThinking = true + hasThinkingBlock = true } } - // If the last block is thinking, mark as currently thinking + // Only active streams should show thinking/streaming state. const lastBlock = message.content[message.content.length - 1] - if (lastBlock?.type === "thinking") { - isThinking = true - } + const isThinking = + isStreaming && + hasThinkingBlock && + message.content.length <= 1 && + lastBlock?.type === "thinking" const elapsedLabel = elapsed >= 60_000 @@ -304,7 +310,7 @@ export function LiveTurnStats({ message }: LiveTurnStatsProps) { return (
- {isThinking && message.content.length <= 1 ? ( + {isThinking ? ( {t("thinking")} ) : ( {t("streaming")} diff --git a/src/components/message/message-list-view.tsx b/src/components/message/message-list-view.tsx index d6c299f..ad7ad3d 100644 --- a/src/components/message/message-list-view.tsx +++ b/src/components/message/message-list-view.tsx @@ -402,8 +402,11 @@ export function MessageListView({ overscan={10} /> - {showLiveMessage && liveMessage && ( - + {showLiveMessage && liveMessage && connStatus === "prompting" && ( + )}