Skip to content

feat(markdown): streamdown style ownership, code plugin, chip-parse perf - #49

Open
rpvilo wants to merge 1 commit into
mainfrom
feature/markdown-rendering
Open

feat(markdown): streamdown style ownership, code plugin, chip-parse perf#49
rpvilo wants to merge 1 commit into
mainfrom
feature/markdown-rendering

Conversation

@rpvilo

@rpvilo rpvilo commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Takes full ownership of markdown styling and speeds up message text rendering.

  • Drop streamdown/styles.css and the @source scans — all Streamdown element styling now lives in our [data-streamdown] rules in globals.css
  • Add @streamdown/code plugin with shikiTheme={["github-light", "vesper"]} for syntax highlighting
  • parseChipSegments: fast-path includes() bail before the regex scan — the streaming row was re-scanning its full accumulated text per token (O(n²) over a long answer)
  • Message.Text: memoize the parse + segment tree on the text and renderers, so settled rows skip the work on unrelated re-renders
  • Composer/code-block style tweaks riding along

Known gap: with the @source scan removed, Shiki's token-color utilities (text-[var(--sdm-c)] etc.) no longer compile — highlighting needs a follow-up (either restore the @source line or add explicit token styles).

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
intentface-chat Ready Ready Preview, Comment Jul 14, 2026 7:28pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant