From e3fb54880a328cc317bdef7a8ac727e79802caea Mon Sep 17 00:00:00 2001 From: kumarabhirup Date: Mon, 2 Mar 2026 18:34:49 -0800 Subject: [PATCH] feat(web): add subagent status labels to chat-message component --- apps/web/app/components/chat-message.tsx | 25 ++---------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/apps/web/app/components/chat-message.tsx b/apps/web/app/components/chat-message.tsx index b8b55e2028e..f7bcae520ce 100644 --- a/apps/web/app/components/chat-message.tsx +++ b/apps/web/app/components/chat-message.tsx @@ -118,6 +118,8 @@ function groupParts(parts: UIMessage["parts"]): MessageSegment[] { const statusLabels = [ "Preparing response...", "Optimizing session context...", + "Waiting for subagent results...", + "Waiting for subagents...", ]; const isStatus = statusLabels.some((l) => rp.text.startsWith(l), @@ -746,11 +748,6 @@ export const ChatMessage = memo(function ChatMessage({ message, isStreaming, onS ); } - // Find the last text segment index for streaming optimization - const lastTextIdx = isStreaming - ? segments.reduce((acc, s, i) => (s.type === "text" ? i : acc), -1) - : -1; - // Assistant: free-flowing text, left-aligned, NO bubble return (
@@ -812,24 +809,6 @@ export const ChatMessage = memo(function ChatMessage({ message, isStreaming, onS ); } - // During streaming, render the active text as plain text - // to avoid expensive ReactMarkdown re-parses on every token. - // Switch to full markdown once streaming ends. - if (index === lastTextIdx) { - return ( - - {segment.text} - - ); - } - return (