From a738a6d711bc32a002dbd97c0a836ad2e5dd8646 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Thu, 9 Apr 2026 11:54:00 -0700 Subject: [PATCH] fix stream persistence --- .../components/chat-content/chat-content.tsx | 7 ++++++- apps/sim/lib/copilot/request/go/stream.ts | 8 -------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx index 3fe7dcd02e..218b34db84 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx @@ -207,7 +207,12 @@ export function ChatContent({ content, isStreaming = false, onOptionSelect }: Ch return (
:first-child]:mt-0 [&>:last-child]:mb-0')}> - + {rendered}
diff --git a/apps/sim/lib/copilot/request/go/stream.ts b/apps/sim/lib/copilot/request/go/stream.ts index f8a407d3f2..b0eb7284ef 100644 --- a/apps/sim/lib/copilot/request/go/stream.ts +++ b/apps/sim/lib/copilot/request/go/stream.ts @@ -277,14 +277,6 @@ export async function runStreamLoop( return } - if ( - streamEvent.type === MothershipStreamV1EventType.text && - typeof streamEvent.payload.text === 'string' - ) { - await options.onEvent?.(streamEvent) - return - } - if ( streamEvent.type === MothershipStreamV1EventType.tool && streamEvent.payload.phase === 'args_delta' &&