dsh-smooth-stream 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -14,15 +14,17 @@ Left: default Web UI. Right: dsh-smooth-stream.
14
14
 
15
15
  ![Left: without the plugin. Right: with dsh-smooth-stream.](docs/compare.gif)
16
16
 
17
- ## What it does
18
-
19
- - **Reveal tracks the model.** Assistant text appears at a cadence that follows the arrival rate. Fast bursts do not dump a whole paragraph; a slow stream does not sit still and then jump.
20
- - **Markdown stays markdown.** Code, emphasis, and the rest render while the reply is still coming. There is no plain-text tail that later swaps into formatted markdown.
21
- - **Wraps glide in.** A new line or a growing tool card eases into view instead of snapping the transcript up by a line.
22
- - **You keep the scroll.** Scroll up to read earlier text and the overlay lets go. Follow resumes only when you return to the bottom — the to-bottom button counts.
23
- - **Think stays the built-in row.** Reasoning uses the usual disclosure. It opens while thinking is the live tail and closes when thinking ends; the chevron still toggles by hand.
24
- - **The rest of the turn moves with it.** Running tool cards, model retries, and workflow runs share the same follow, so the whole turn slides instead of only the assistant text.
25
- - **It backs off when it should.** `prefers-reduced-motion` shows the finished text at once and does not take follow. If the frame rate drops below 30 fps and the reply is off-screen, reveal pauses and catches up when the view is healthy again.
17
+ ## Current behavior
18
+
19
+ - **The whole Agent turn uses one extensible pipeline.** Assistant text, Think, Context, Retry, Command, Bash, Glob, Read, tool calls, and newly registered renderers all enter progressive reveal and bottom-follow through the same boundary, without a tool-name allowlist.
20
+ - **Reveal speed adapts to queue pressure.** Small updates keep a soft cadence while large or fast bursts catch up promptly. Once the producer completes, remaining source is committed immediately instead of continuing to type long after the Agent has stopped.
21
+ - **Markdown remains mounted throughout streaming.** Code blocks, tables, emphasis, and other formatting do not begin as plain text and later swap trees. Historical messages also do not replay their reveal animation when remounted.
22
+ - **Scroll room opens only when a wrap is actually likely.** The predictor combines buffered source with the current line's remaining width before opening its runway. Long replies still absorb line wraps smoothly, while a short same-line answer after Think does not pre-scroll and rebound.
23
+ - **Conversation chrome stays fixed.** `Deep diving...`, the composer, and the to-bottom button never ride the message transform. Fast output and low-frame-rate catch-up cannot paint through the status row or disappear behind the composer.
24
+ - **One continuous spring owns motion.** The engine carries velocity and displacement between frames instead of repeatedly starting native smooth-scroll calls. Line wraps, code, tables, and growing tool rows converge along the same trajectory; completion lands on the natural floor and retires temporary state without a flash or overshoot rebound.
25
+ - **Reader input wins immediately.** A small upward wheel, touch, or keyboard gesture releases automatic follow. Ownership returns only after the reader actually reaches the bottom again.
26
+ - **Think respects the user's preference.** With auto-expand enabled it keeps the Harness disclosure interaction and collapses when thinking ends. With it disabled, collapsed reasoning can keep updating without fake height motion, and a manual toggle is not wrestled back by stream state.
27
+ - **Performance guards preserve the final position.** `prefers-reduced-motion` shows complete content without taking follow. Off-screen DOM commits pause under low FPS, then catch up under control and still finish exactly at the bottom.
26
28
 
27
29
  ## Install
28
30
 
@@ -60,7 +62,7 @@ The bundle installs with `preset: balanced`. Change it in the profile `cordis.pa
60
62
  | `balanced` | Default |
61
63
  | `silky` | More buffer, slower catch-up |
62
64
 
63
- `maxScrollSpeedPxPerSec` (default `1000`) is a ceiling so the first large lag does not teleport.
65
+ Legacy `mode`, `revealCharsPerSec`, `scrollSpeedPxPerSec`, and `maxScrollSpeedPxPerSec` fields are still accepted so existing profiles keep loading; the current adaptive engine uses only `preset` to tune cadence.
64
66
 
65
67
  ## User settings
66
68
 
package/README.md CHANGED
@@ -14,15 +14,17 @@
14
14
 
15
15
  ![左:未使用插件。右:使用 dsh-smooth-stream。](docs/compare.gif)
16
16
 
17
- ## 它做什么
18
-
19
- - **揭示跟着模型走。** 助手文本按到达速率出现。突发不会整段倒出来,慢流也不会停住再猛地补上。
20
- - **一直是 Markdown。** 代码、强调等在流式过程中就按格式渲染,没有先出纯文本再换成排版的交接。
21
- - **换行是滑进来的。** 新的一行或正在变高的工具卡片会滑入视野,而不是把整段记录往上顶一格。
22
- - **滚动条归你。** 往上翻看前文时 overlay 会松手。只有回到底部才会继续跟随——点「回到底部」也算。
23
- - **思考仍是内置那一行。** 推理用原来的 disclosure。它是当前流式尾部时展开,思考一结束就收起;箭头仍可手动开关。
24
- - **整轮一起动。** 运行中的工具卡片、模型重试、workflow run 共用同一套跟随,所以滑的是整轮回复,不只是助手正文。
25
- - **该停的时候会停。** `prefers-reduced-motion` 会直接给出全文,也不接管跟随。帧率低于 30 fps 且回复在屏外时,揭示会暂停,画面恢复后再补上。
17
+ ## 当前实现
18
+
19
+ - **整轮 Agent 输出统一接管。** 助手正文、Think、Context、Retry、Command、Bash、Glob、Read、工具调用以及后续注册的新渲染器,都通过同一个可扩展入口进入渐进揭示和底部跟随,不依赖工具名称白名单。
20
+ - **吐字速度会跟随积压自动变速。** 小批内容保持柔和节拍,大批或高速到达时及时追赶;完成信号到达后立即提交剩余正文,不让 Agent 已结束而文字还长时间继续输出。
21
+ - **流式过程始终使用 Markdown 渲染。** 代码块、表格、强调等不会先显示成纯文本再整体换树,历史消息也不会在重新挂载时重播动画。
22
+ - **换行前才准备滚动空间。** 引擎结合待揭示内容和当前行剩余宽度判断是否可能增高,只在真实换行风险出现时打开预测 runway。长回复仍能平滑吸收换行,Think 后的短同一行正文不会多滚再回弹。
23
+ - **状态区域保持稳定。** `Deep diving...`、输入框和「滚动到底部」按钮不参与消息 transform;高速输出或低帧率下,正文也不会越过状态区域或藏到输入框后面。
24
+ - **滚动使用持续弹簧而不是反复启动原生平滑滚动。** 每帧保留速度和位移状态,换行、代码块、表格及工具卡片增高都沿同一轨迹收敛;结束时落在自然底部并安静撤销临时状态,不闪烁、不越位回弹。
25
+ - **用户输入拥有最高优先级。** 向上滚轮、触控拖动或键盘滚动会在轻微手势时立即解除自动跟随;只有用户真正回到底部后才重新接管。
26
+ - **Think 尊重用户设置。** 自动展开开启时沿用 Harness 的 disclosure 交互并在思考结束后收起;关闭时折叠内容持续更新但不引发虚假高度和上下闪动,手动展开也不会被流状态抢回。
27
+ - **性能保护不会破坏最终状态。** `prefers-reduced-motion` 直接显示完整内容且不接管跟随;低帧率且回复在屏外时暂停 DOM 提交,恢复后受控追赶,最终仍准确停在底部。
26
28
 
27
29
  ## 安装
28
30
 
@@ -60,7 +62,7 @@ Host 日志里应出现 `[dsh-smooth-stream] plugin loaded!`。
60
62
  | `balanced` | 默认 |
61
63
  | `silky` | 缓冲更大,追上更慢 |
62
64
 
63
- `maxScrollSpeedPxPerSec`(默认 `1000`)是速度上限,避免第一次滞后过大时瞬移。
65
+ 旧版的 `mode`、`revealCharsPerSec`、`scrollSpeedPxPerSec` 和 `maxScrollSpeedPxPerSec` 字段仍可被加载,以兼容已有 profile;当前自适应引擎仅使用 `preset` 调整节拍。
64
66
 
65
67
  ## 用户设置
66
68