Repository navigation
Conversation
Contributor
|
@thedonmon is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
4 tasks done
|
Hi @farnabaz @haydenbleasel 👋 — a friendly +1 for this one. We're hitting exactly the case in the description: our chat relays an agent's answer in ~500 ms chunks, so on 2.6.0 it renders as a jump followed by a pause. |
Some providers and relays deliver text in bursts (for example ~150 characters every ~500 ms), which renders as a jump followed by a pause, with the caret jumping ahead. `smooth` measures the time between arrivals and reveals each chunk a word at a time so it finishes about when the next chunk is expected. - Off by default; rendering is unchanged when off. - Only appends are paced. Resets, edits and full-text replacements render immediately, as does content present on mount. - Words split across chunks are held until complete. CJK characters are their own units. - When `isAnimating` goes false the remainder drains within 250 ms, and Streamdown stays in streaming mode until then. - Hidden tabs render immediately, since animation frames are paused there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`smooth` already spaces words out as it reveals them. The animate plugin's default 40 ms per-word stagger then queued them a second time, so animated text trailed the reveal and left blank space (with the caret) where scheduled words had not faded in yet. Under `smooth`, `stagger` now defaults to 0; an explicit `stagger` is still honored. Also narrow `animated` by type instead of comparing the memo key to "true", since the key now includes `smooth`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repo reserves minor for marketing releases. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
thedonmon
force-pushed
the
feat/smooth-streaming
branch
from
October 2, 2026 02:02
bd68836 to
814dc00
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some providers and relays send text in bursts, for example ~150 characters every ~550 ms. Rendered as it arrives, the text jumps and then pauses, and the caret jumps with it.
smoothreveals each chunk a word at a time, at the rate chunks have been arriving.Type of Change
Changes Made
smoothprop, off by default. Only appended text is paced; any other change renders immediately.isAnimatinggoes false, the rest appears within 250 ms. Streamdown stays in streaming mode until then, even ifmodeswitches to"static".animated,staggerdefaults to 0 undersmooth, since pacing already spaces the words. An explicitstaggerstill applies.Testing
Screendrop_2026-09-19-09-37-30_CB5B1E.mp4
Replayed a captured stream (37 chunks, ~550 ms apart). The text now appears in ~700 steps of ~7 characters instead of 37 jumps of ~148. The cost is about one chunk interval of delay: median 583 ms before a chunk is fully shown.
Checklist
pnpm changeset)🤖 Generated with Claude Code