loading code fetching the highlighted snippet
The same code-heavy response streams into two SvelteMarkdown instances. Both use the engine-agnostic HighlightedCode renderer; each pane injects a different CodeHighlighter via context. Every highlight call is timed so you can see the per-engine cost as fences close.
HighlightedCode reads a CodeHighlighter from a prop, HIGHLIGHT_CONTEXT_KEY, or the setCodeHighlighter singleton. Swapping Shiki for TanStack is a one-line factory
change.streaming stays on. Completed fences are memoized — watch calls stop climbing once a block closes and prose keeps streaming.th-* classes; the theme is a stylesheet from createThemeCss, so light/dark
is a CSS toggle with no re-highlight.SvelteMarkdown bundle stays engine-free (enforced by the tree-shaking guard).