npm / @assistant-ui/react-streamdown
@assistant-ui/react-streamdown
What changed in @assistant-ui/react-streamdown 0.3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-11.
3 breaking5 new APIs and options4 performance34 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@assistant-ui/react-streamdown 0.346 changes
Breaking changes 3
Every PluginConfig slot is typed with its streamdown plugin interface instead of unknown.
Requires remend 1.4.
Requires streamdown 2.7.
New APIs and options 5
Preprocess helpers are available from this new subpath, and @assistant-ui/react-streamdown re-exports the same functions instead of carrying a copy.
The package re-exports remark-rehype's Options type as RemarkRehypeOptions.
Adds an option to turn off comparison-operator escapes reaching settled text without disabling incomplete-Markdown repair.
Adds an option to turn off single-tilde escapes reaching settled text without disabling incomplete-Markdown repair.
The code-fence contract, including CodeHeader and SyntaxHighlighter prop types, the by-language override entry, and the language-class parser, now lives on this subpath; react-streamdown re-exports the types from there.
Performance 4
Nested raw pre markup no longer causes quadratic rerender comparisons.
Memoization avoids parsing the same accumulated text twice per token, including when callers pass an inline remarkPlugins array.
The boundary scan is limited to each line, keeping the scan linear in the message rather than rescanning remaining text for every line.
When defer is off, streamed tokens no longer trigger a second render pass.
Fixes and other changes 34
Keeps the repair aligned with remend 1.4 code spans so a comparison after an escaped backtick still gets escaped.
Comparison escapes stay within each line without splitting settled prose or slowing down on blank lines.
Preprocessing now preserves currency and math delimiters inside HTML blocks.
Streaming repair now preserves raw HTML bodies inside list and blockquote containers.
Quoted code fences and $$ blocks now end at their own blockquote boundary, preventing deeper lines from closing them early and blank or shallower lines from leaving them open.
Changing the code header now updates already-rendered code blocks in place, without disturbing their DOM or state.
Changing the highlighter now updates already-rendered code blocks in place, without disturbing their DOM or state.
Changing a language-specific component entry now updates already-rendered code blocks in place, without disturbing their DOM or state.
Fences and $$ blocks opened on list marker lines are recognized, preventing escaped content and closing markers that disrupt subsequent streaming repair.
A rewrite to already-revealed text no longer restarts smooth streaming.
Streaming escapes stay out of fences and $$ blocks, including blocks opened after paragraph lines or nested in list items; interrupted paragraphs settle correctly.
Streaming $$ math now ends where remark-math ends it, preventing leaked escapes and stray closing markers.
Streaming repair no longer escapes text inside raw HTML blocks.
Streaming tail repair no longer runs after a message finishes.
An unmatched mid-line $$ no longer pairs with later display math.
Settled code blocks no longer rerun custom syntax highlighters on streamed tokens or when animated messages complete; changed fence metadata is passed to the highlighter.
Remend escapes are kept out of settled
~~~fences and$$math blocks.A backtick run is treated as a fence only when it starts a line, preventing an info string from closing a fenced block.
Rehype plugin markup is preserved in code blocks, and code headers receive the complete code text in both Markdown renderers.
Currency and math are preserved inside indented tilde fences.
Earlier blocks preserve text escapes and custom handler changes without completing or deleting unfinished Markdown; handlers receive earlier text and the final block separately.
Fenced display bodies stay inside their original list item or blockquote instead of rendering outside the container.
Memoized children update when their text or props change.
Sparse suggestions are compacted into a dense list before per-suggestion lookup, avoiding incorrect equality results from sparse-array holes.
The currency walker reads tilde fences, and an unclosed fence ends with its blockquote instead of consuming the rest of the input.
User pre and code components render through the code adapter without remounting code blocks on every render; raw pre elements without a code child retain their element.
Bracket-delimited math no longer swallows the rest of the message.
Code spans and fences remain inert when math delimiters are normalized.
Fenced code now updates when streamed content changes.
Moved to dependencies so published declarations reference hast by name instead of a broken store-relative path.
Preserves currency inside one- and two-backtick code spans that contain longer backtick runs.
User rehypePlugins are merged after the security hardening pipeline instead of being dropped.
Streamdown sanitization extensions are preserved when security is enabled.
Inline math that opens with a digit is kept out of currency escaping.