From 629fb4d3bb2732f5947ab545ad9eb06deade3a62 Mon Sep 17 00:00:00 2001 From: anvyle Date: Thu, 9 Apr 2026 12:27:05 +0200 Subject: [PATCH] fix(copilot): allow sub-instructions companion text and restore streaming render MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Revert ChatMessagesContainer streaming filter — decompose_goal now visible during stream - Remove text suppression in splitReasoningAndResponse — table message is allowed alongside sub-instructions box Co-Authored-By: Claude Sonnet 4.6 --- .../ChatMessagesContainer/ChatMessagesContainer.tsx | 7 +------ .../copilot/components/ChatMessagesContainer/helpers.ts | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx index 89cad821ed..205fa74bd0 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx @@ -214,12 +214,7 @@ export function ChatMessagesContainer({ message.role === "assistant" && !isCurrentlyStreaming; const { reasoning, response } = isFinalized ? splitReasoningAndResponse(message.parts) - : { - reasoning: [] as MessagePart[], - response: message.parts.filter( - (p) => p.type !== "tool-decompose_goal", - ), - }; + : { reasoning: [] as MessagePart[], response: message.parts }; const hasReasoning = reasoning.length > 0; // Note: when interactive tools are pinned from reasoning into response, diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/helpers.ts index 64425dd162..94113b0686 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/helpers.ts +++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/helpers.ts @@ -150,16 +150,9 @@ export function splitReasoningAndResponse(parts: MessagePart[]): { } } - const hasDecomposeGoal = pinnedParts.some( - (p) => p.type === "tool-decompose_goal", - ); - const filteredResponse = hasDecomposeGoal - ? rawResponse.filter((p) => p.type !== "text") - : rawResponse; - return { reasoning, - response: [...pinnedParts, ...filteredResponse], + response: [...pinnedParts, ...rawResponse], }; }