npm / @assistant-ui/react-markdown
@assistant-ui/react-markdown
What changed in @assistant-ui/react-markdown 0.12 to 0.14, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
1 breaking1 deprecations12 new APIs and options7 performance2 behavior and defaults31 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@assistant-ui/react-markdown 0.1453 changes
Deprecations 1
The existing unstable memoization API is deprecated in favor of the stable API.
New APIs and options 12
Preprocess helpers are now served from a dedicated subpath for direct imports.
Exported a markdown preprocessing helper that escapes currency values so single-dollar math does not consume them.
Exported a markdown preprocessing helper for normalizing math delimiters before remark-math parsing.
Exported a markdown preprocessing helper that rewrites LaTeX bracket delimiters into remark-math syntax.
Streamed markdown primitives can defer re-parsing growing messages to keep typing and scrolling responsive; intermediate states may be skipped, but final text renders.
The smooth prop now accepts boolean or SmoothOptions, enabling tunable streamed-text reveal behavior.
The smooth prop now accepts boolean or SmoothOptions, enabling tunable streamed-text reveal behavior.
SmoothOptions is now publicly exported for configuring streamed text reveal behavior.
useSmooth is now publicly exported, allowing developers to use the smoothing hook directly.
drainMs configures the backlog drain target for smooth text reveal, defaulting to 250.
maxCharIntervalMs configures the slowest reveal interval, defaulting to 5.
maxCharsPerFrame caps characters revealed per frame; the default is unlimited.
Performance 7
Keeps preprocessing linear for lines containing many triple-backtick or tilde runs.
Avoids quadratic scans on long tilde runs and display bodies.
Preprocessing no longer rescans to the paragraph end for every inline code span.
The package now re-exports the shared preprocess functions instead of carrying a separate copy.
Unchanged Markdown nodes are no longer serialized during streaming comparisons.
Parsing now occurs once per token with defer enabled, and inline remarkPlugins arrays no longer defeat renderer memoization.
When defer is off, streamed tokens no longer incur a second render pass.
Behavior and default changes 2
A stable API is now available for memoizing Markdown components.
The shadcn kit's markdown-text enables deferred markdown processing by default.
Fixes and other changes 31
Existing fenced code blocks refresh when components.pre, components.code, or other renderer overrides change.
Preserves multiline display math in nested blockquotes and list items, including prose after closing delimiters.
Keeps multiline display math inside same-line nested list items.
Preserves repeated list and quote prefixes while processing display math.
Keeps a second display opened on a closer's line inside its quoted list item.
Preserves multiline display math inside marker-only list items.
Keeps a math tag display opened on a bracket closer's line inside its quoted list item.
Keeps display math inside quoted list items and correctly rewrites display math containing code spans.
Keeps a $$ fence opened on a list item's marker line and the following paragraph inside that list item.
Preserves a list-item $$ fence when formula lines start with + or -, when nested in a blockquote, or when the body contains a code span.
Stops interpreting a list marker line inside an open $$ block as another math opener.
Headings, thematic breaks and HTML blocks inside nested list items are now recognized consistently.
Preprocess helpers no longer rewrite text inside indented code blocks.
A lone backtick no longer pairs with code in a later list item, heading or blockquote, preserving its dollar and LaTeX text.
Preserves currency and math delimiters inside HTML blocks during preprocessing.
Quoted code fences and $$ blocks now end at their own blockquote boundary, preventing deeper lines from closing them early or shallower lines from leaving them open.
preprocess no longer restarts smooth streaming when a rewrite changes already-revealed text.
A backtick run is treated as a fence only when it starts a line, preventing an info string from closing a fenced block.
The currency walker now reads tilde fences and ends unclosed fences with their blockquote instead of consuming the rest of the input.
Fenced display math now remains inside the list item or blockquote where it was written.
Currency and math are now preserved inside indented tilde fences.
Both Markdown renderers preserve rehype plugin markup in code blocks and pass complete code text to code headers.
Sparse suggestions lists now compact to dense lists before per-suggestion lookup, preventing sparse-array holes from comparing as equal.
Bracket-delimited math no longer swallows the rest of the message.
Code spans and fences remain inert when math delimiters are normalized.
Structural comparison preserves code-block memoization when componentsByLanguage contains inline objects.
Raw pre blocks without a code child now retain their pre element.
Preserves currency inside one- and two-backtick code spans containing longer backtick runs.
Custom highlighters now receive the raw fence language instead of "unknown".
Inline math opening with a digit is kept out of currency escaping.
The hook now preserves the part type for reasoning parts instead of always returning type text.
@assistant-ui/react-markdown 0.121 changes
Breaking changes 1
The aui-source export condition was removed from package.json exports, which may affect consumers relying on that condition.