KyongSik-Yoon/claude-mods/tree/main/smooth-stream
关于这个 mod
smooth-stream
一个 Claude Code mod,用平滑的打字机效果显示流式助手回复,而不是一次性把每个区块丢到屏幕上。
- 每秒约 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 .
