Skip to content

Commit be9e2d3

Browse files
committed
fix(ui): use streaming mode for Streamdown during active streams
mode='static' disables Remend (auto-closing incomplete markdown), incremental block splitting, and React Transitions. Switch to streaming mode while isStreaming is true so partial markdown renders correctly, without re-adding animation props.
1 parent 8b333cf commit be9e2d3

1 file changed

Lines changed: 5 additions & 2 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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ export function ChatContent({
305305
key={`inline-${i}`}
306306
className={cn(PROSE_CLASSES, '[&>:first-child]:mt-0 [&>:last-child]:mb-0')}
307307
>
308-
<Streamdown mode='static' components={MARKDOWN_COMPONENTS}>
308+
<Streamdown
309+
mode={isStreaming ? undefined : 'static'}
310+
components={MARKDOWN_COMPONENTS}
311+
>
309312
{group.markdown}
310313
</Streamdown>
311314
</div>
@@ -326,7 +329,7 @@ export function ChatContent({
326329

327330
return (
328331
<div className={cn(PROSE_CLASSES, '[&>:first-child]:mt-0 [&>:last-child]:mb-0')}>
329-
<Streamdown mode='static' components={MARKDOWN_COMPONENTS}>
332+
<Streamdown mode={isStreaming ? undefined : 'static'} components={MARKDOWN_COMPONENTS}>
330333
{content}
331334
</Streamdown>
332335
</div>

0 commit comments

Comments
 (0)