From 905d4216a5d7a5cd9686ee75c21fc773c50043d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Mon, 6 Apr 2026 22:45:07 +0800 Subject: [PATCH] fix: hide duplicate StreamingIndicator during thinking, fix plain text color in code blocks - StreamingIndicator now only shows during 'tool_executing' state (ThinkingBlock already animates during 'thinking') - Plain text code blocks force dark color (#24292f) instead of prism's default faded gray which was invisible on our beige background Co-Authored-By: Claude Opus 4.6 --- desktop/src/components/chat/CodeViewer.tsx | 15 +++++++++++---- desktop/src/components/chat/MessageList.tsx | 5 ++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/desktop/src/components/chat/CodeViewer.tsx b/desktop/src/components/chat/CodeViewer.tsx index 57abd7ed..ef9489a1 100644 --- a/desktop/src/components/chat/CodeViewer.tsx +++ b/desktop/src/components/chat/CodeViewer.tsx @@ -40,6 +40,7 @@ export function CodeViewer({ code, language, maxLines = 20, showLineNumbers = tr
               {tokens.map((line, i) => {
                 const lineProps = getLineProps({ line })
+                const hasLanguage = !!language && language !== 'text'
                 return effectiveShowLineNumbers ? (
                   
- - {line.map((token, key) => ( - - ))} + + {hasLanguage ? ( + line.map((token, key) => ( + + )) + ) : ( + line.map((token, key) => ( + + )) + )}
) diff --git a/desktop/src/components/chat/MessageList.tsx b/desktop/src/components/chat/MessageList.tsx index 430fb751..8c06b23e 100644 --- a/desktop/src/components/chat/MessageList.tsx +++ b/desktop/src/components/chat/MessageList.tsx @@ -117,7 +117,10 @@ export function MessageList() { )} - {chatState !== 'idle' && chatState !== 'streaming' && chatState !== 'permission_pending' && ( + {/* Only show StreamingIndicator for tool_executing state. + During 'thinking', the active ThinkingBlock already shows animation. + During 'streaming', the AssistantMessage shows the cursor. */} + {chatState === 'tool_executing' && ( )}