From fa691dfad0d0441ee65be10589449cabf3a7cad2 Mon Sep 17 00:00:00 2001 From: Mufeed VH Date: Wed, 25 Jun 2025 05:10:44 +0530 Subject: [PATCH] refactor(ui): clean up components and improve thinking widget design - Remove debug console.log from StreamMessage component - Simplify ThinkingWidget by removing unused signature parameter - Update ThinkingWidget color scheme from purple to gray for subtlety - Add italic styling to thinking content for better visual distinction - Trim whitespace from thinking content display - Streamline ThinkingWidget layout by removing unnecessary prose wrapper --- src/components/StreamMessage.tsx | 8 -------- src/components/ToolWidgets.tsx | 33 ++++++++++++++------------------ 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/components/StreamMessage.tsx b/src/components/StreamMessage.tsx index 9289ebf..28f1118 100644 --- a/src/components/StreamMessage.tsx +++ b/src/components/StreamMessage.tsx @@ -75,14 +75,6 @@ const StreamMessageComponent: React.FC = ({ message, classNa return toolResults.get(toolId) || null; }; - // Debug logging to understand message structure - console.log('[StreamMessage] Rendering message:', { - type: message.type, - hasMessage: !!message.message, - messageStructure: message.message ? Object.keys(message.message) : 'no message field', - fullMessage: message - }); - try { // Skip rendering for meta messages that don't have meaningful content if (message.isMeta && !message.leafUuid && !message.summary) { diff --git a/src/components/ToolWidgets.tsx b/src/components/ToolWidgets.tsx index de9c814..d8a2dc1 100644 --- a/src/components/ToolWidgets.tsx +++ b/src/components/ToolWidgets.tsx @@ -1877,43 +1877,38 @@ export const TaskWidget: React.FC<{ export const ThinkingWidget: React.FC<{ thinking: string; signature?: string; -}> = ({ thinking, signature }) => { +}> = ({ thinking }) => { const [isExpanded, setIsExpanded] = useState(false); + // Strip whitespace from thinking content + const trimmedThinking = thinking.trim(); + return ( -
+
{isExpanded && ( -
-
-
-              {thinking}
-            
-
- - {signature && ( -
- Signature: {signature.slice(0, 16)}... -
- )} +
+
+            {trimmedThinking}
+          
)}