mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(copilot): allow sub-instructions companion text and restore streaming render
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user