KyongSik-Yoon/claude-mods/tree/main/smooth-stream
關於這個 mod
smooth-stream
Claude Code 外掛,以平滑的打字機效果揭示串流中的助手回覆,不會一次把每個區塊全部丟到畫面上。
- 每秒約 30 幀,每幀至少顯示幾個字元
- 在不到一秒的一小段時間內追上大量突發內容,因此不會遠遠落後模型
- 只有模型串流時抵達的回覆會播放動畫;調整大小或捲動時重新繪製的舊訊息會完整顯示
- 支援終端機與桌面應用程式的 Code 分頁
安裝
claude plugin marketplace add KyongSik-Yoon/claude-mods
claude plugin install smooth-stream@kyongsik-mods
接著執行 /reload-plugins 或開始新的工作階段。需要支援 mods 的 Claude Code 建置版本(已在 2.1.289 測試)。
選項
預設為 normal,不需要設定。要變更它,執行 /plugin configure smooth-stream@kyongsik-mods(或開啟 /config),再設定 Reveal speed。
運作方式
AssistantMessage 上的 ui.render hook 會把回覆文字的前綴交給引擎,33 ms 的 $.clock 計時器則透過 $.state 增長這個前綴。turn.step hook 會追蹤主迴圈是否正在串流。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add KyongSik-Yoon/claude-mods claude plugin install smooth-stream
原文 / README
smooth-stream
A Claude Code mod that reveals streaming assistant replies with a smooth typewriter effect, instead of dropping each chunk on screen at once.
- ~30 frames per second, at least a couple of characters per frame
- Catches up on large bursts within a fraction of a second, so it never falls far behind the model
- Only replies that arrive while the model is streaming are animated; old messages redrawn on resize or scroll show whole
- Works in the terminal and the desktop app's Code tab
Install
claude plugin marketplace add KyongSik-Yoon/claude-mods
claude plugin install smooth-stream@kyongsik-mods
Then run /reload-plugins or start a new session. Requires a Claude Code build with mods support (tested on 2.1.289).
Options
Defaults to normal; no setup needed. To change it, run /plugin configure smooth-stream@kyongsik-mods (or open /config) and set Reveal speed:
| Value | Feel |
| --- | --- |
| slow | 1+ char per frame, drains a burst in ~0.8 s |
| normal (default) | 2+ chars per frame, drains a burst in ~0.4 s |
| fast | 4+ chars per frame, drains a burst in ~0.2 s |
How it works
A ui.render hook on AssistantMessage hands the engine a prefix of the reply text, and a 33 ms $.clock timer grows that prefix through $.state, so each frame redraws only the message being typed. A turn.step hook tracks whether the main loop is streaming, which is how already-finished messages are left alone.
Develop
claude plugin validate .
claude plugin test .
