Skip to content

Commit c68263f

Browse files
committed
fix(ui): restore hydratedStreamingRef for reconnect path order-of-ops
1 parent 77f2b27 commit c68263f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ export function ChatContent({
246246
onWorkspaceResourceSelect,
247247
smoothStreaming = true,
248248
}: ChatContentProps) {
249+
const hydratedStreamingRef = useRef(isStreaming && content.trim().length > 0)
250+
249251
const onWorkspaceResourceSelectRef = useRef(onWorkspaceResourceSelect)
250252
onWorkspaceResourceSelectRef.current = onWorkspaceResourceSelect
251253

@@ -334,6 +336,7 @@ export function ChatContent({
334336
<Streamdown
335337
mode={isStreaming ? undefined : 'static'}
336338
isAnimating={isStreaming}
339+
animated={isStreaming && !hydratedStreamingRef.current}
337340
components={MARKDOWN_COMPONENTS}
338341
>
339342
{rendered}

0 commit comments

Comments
 (0)