GitShow/vercel/streamdown
vercel

streamdown

A drop-in replacement for react-markdown, designed for AI-powered streaming.

by vercel
aimarkdownstreaming
Star on GitHubForkWebsitenpm

TypeScript

5.5k stars281 forks65 contributorsActive · 20h agoSince 2025@streamdown/cjk@1.0.3

Meet the team

See all 65 on GitHub →
haydenbleasel
haydenbleasel459 contributions
sleitor
sleitor18 contributions
2hu12
2hu128 contributions
dependabot[bot]Bot
dependabot[bot]7 contributions
aradhyacp
aradhyacp5 contributions
FranciscoMoretti
FranciscoMoretti5 contributions
molebox
molebox4 contributions
ayhansipahi
ayhansipahi3 contributions

Languages

View on GitHub →
TypeScript83.8%
MDX12.5%
CSS2%
HTML1.4%
JavaScript0.3%

Commit activity

Last 12 weeks · 2 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
100
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 20h ago
See all on GitHub →
bendrucker
fix: rework remend code-region detectionOpenPR

Description This change comes out of an investigation in usage of that got me doing performance profiling of streamdown output and noticing poor frame rates with a lot of identifiers on screen. Wanted to contribute this back along with some of the testing techniques that helped detect a few bug cases as well as benchmark the performance. remend heals the full accumulated text on every streaming token, so it pays that cost per streamed token. Two problems were compounding on long responses: Handlers re-derived code-block state with a scan per candidate delimiter, so healing cost grew super-linearly with document size. At 133k characters a single healing call took ~945ms, per token. Double underscores were counted per raw occurrence. Identifiers containing double-underscore runs ( style, common in generated code and schema names) invented a closer or swallowed one that was needed, corrupting emphasis for the rest of the stream. This PR replaces the per-handler rescans with a single-pass region scanner and makes healing linear, CommonMark-aware, and idempotent. Type of Change [x] Bug fix (non-breaking change which fixes an issue) [ ] New feature (non-breaking change which adds functionality) [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) [ ] Documentation update [x] Performance improvement [ ] Refactoring (no functional changes) Related Issues None. Changes Made A single-pass region scanner () paints a region code for every position (prose, fence marker/info/body, complete span, open span), memoized per input string. Handlers query it in O(1), so healing is linear in input size regardless of delimiter count. Fence and span semantics follow CommonMark Intended behavior changes, each covered by updated or new tests: Word-internal double underscores () no longer invent or swallow emphasis delimiters. fences are recognized, so their content is no longer healed as prose. Multi-backtick spans complete with the right run length: heals to . Text-only link mode resolves every unmatched bracket in one call instead of one per call. A trailing space exposed by removing an incomplete image is stripped. Testing [x] All existing tests pass [x] Added new tests for the changes [x] Manually tested the changes Property-based tests (fast-check) assert streaming safety on every generated prefix: bounded loss against the input, idempotence, and no-op behavior on complete documents, plus a deterministic exhaustive prefix sweep over a fixed corpus. New unit suites cover fence semantics (list-indented and CRLF fences included), underscore runs, and dollar signs inside code. A manual pass drove growing prefixes of a mixed document through the rendered `Scalingpnpm benchScalingpnpm bench"Use snake__c""Use snake__c__""~~~\nt""~~~\nt~~""A `: old left it unchanged, new completes the double-backtick span to . : old left the exposed trailing space, new strips it so healed output re-heals to itself. Idempotence holds on all 460 prefixes. Checklist [x] My code follows the project's code style [x] I have performed a self-review of my own code [x] I have commented my code, particularly in hard-to-understand areas [ ] I have made corresponding changes to the documentation [x] My changes generate no new warnings or errors [x] I have added tests that prove my fix is effective or that my feature works [x] New and existing unit tests pass locally with my changes [x] I have created a changeset () Changeset [x] I have created a changeset for these changes

bendrucker · 11m ago
molebox
Update Geistdocs to 1.19.6OpenPR

Updates from 1.11.0 to 1.19.6. Adds (first-party) to pnpm's so fresh releases resolve. Renders `config` prop per the 1.19 API (it now reads config from the provider).

molebox · 20h ago
dr00-eth
mermaid remains a hard dependency in 2.5.0, contradicting the plugin docs (adds ~75 MB to every install)OpenIssue

Bug Description The docs at /docs/plugins and /docs/plugins/mermaid describe mermaid as an opt-in plugin that consumers install and wire up themselves via . The interface, the separate package, and an in-bundle "plugin missing" fallback all suggest the intended design is pluggable. However, as of , is listed in in the published , so it is installed unconditionally for every consumer — even ones that never render a diagram and never pass a plugin to `mermaidmermaidmermaidmermaidmermaidnode_modulesstreamdownmermaid@streamdown/mermaid"Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering."mermaid@^11.12.2dependenciespeerDependenciesdevDependenciespeerDependenciesMeta.optionalstreamdown@2.5.0package.jsonnpm install streamdownmermaidstreamdownmermaidstreamdowndist/chunk-BO2N2NFS.js'mermaid'reactrehype-remark-unifiedunist-util-hast-util-to-jsx-runtimehtml-url-attributesmarkedclsxtailwind-mergeremendreact-domreact/jsx-runtimeDiagramPlugindist/index.d.tsDiagramPlugin.getMermaid(config?: MermaidConfig)mermaidvercel/pkg@streamdown/mermaidmermaidDiagramPlugin@streamdown/mermaidpackage.jsonmermaiddependenciesmermaidstreamdownpackage.json@streamdown/mermaidMermaidConfig@streamdown/mermaidstreamdown.d.tsstreamdownmermaidmermaidpeerDependenciespeerDependenciesMeta: { mermaid: { optional: true } }import { MermaidConfig } from 'mermaid'@streamdown/mermaid@streamdown/dependencies[streamdown]dist/package.json`.

dr00-eth · 3d ago

Recent fixes

View closed PRs →
AVGVSTVS96
[Proposal]: Integrate react-shiki to handle syntax highlightingClosedIssue

Hi! Thanks for your excellent work on Streamdown, I've been wanting to build something just like this - a lib that provides a complete solution for rich markdown processing optimized for AI chat apps! I'm the author and maintainer of react-shiki, a flexible client focused Shiki integration for React. My goal for react-shiki is to serve as the best way to implement Shiki powered syntax highlighting in React, particularly for streaming scenarios in AI chat applications I think react-shiki is a natural fit to power syntax highlighting in Streamdown; centralizing the highlighting logic in react-shiki would keep Streamdown focused on tying everything together seamlessly, rather than building large chunks of the core logic from scratch. Contribution [x] I am willing to help implement this feature

AVGVSTVS96 · 6d ago
Structured data for AI agents

Repository: vercel/streamdown. Description: A drop-in replacement for react-markdown, designed for AI-powered streaming. Stars: 5493, Forks: 281. Primary language: TypeScript. Languages: TypeScript (83.8%), MDX (12.5%), CSS (2%), HTML (1.4%), JavaScript (0.3%). Homepage: https://streamdown.ai/ Topics: ai, markdown, streaming. Latest release: @streamdown/cjk@1.0.3 (4mo ago). Open PRs: 58, open issues: 47. Last activity: 20h ago. Community health: 100%. Top contributors: haydenbleasel, sleitor, 2hu12, dependabot[bot], aradhyacp, FranciscoMoretti, molebox, ayhansipahi, thatbeautifuldream, turbobot-temp and others.

·@ofershap

Replace github.com with gitshow.dev