dsh-smooth-stream 0.3.4 → 0.4.1
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 +14 -4
- package/README.md +14 -4
- package/lib/client.js +2130 -142
- package/lib/client.js.map +1 -1
- package/lib/index.js +123 -6
- package/package.json +9 -9
- package/src/client/DebugPanel.module.css +370 -0
- package/src/client/DebugPanel.tsx +248 -0
- package/src/client/SmoothStreamCard.module.css +8 -0
- package/src/client/SmoothStreamCard.tsx +42 -3
- package/src/client/auto-collapse-controller.ts +977 -0
- package/src/client/debugRuntime.ts +355 -0
- package/src/client/index.ts +121 -30
- package/src/client/locales.ts +122 -0
- package/src/client/smooth-stream-card-controller.ts +97 -14
- package/src/client/smooth-stream-settings-api.ts +53 -3
- package/src/client/teleprompterGlide.ts +117 -32
- package/src/client/useFpsGuard.ts +7 -0
- package/src/client/useProgressiveDomText.ts +99 -17
- package/src/client/useSmoothStreamContent.ts +20 -4
- package/src/plugin.ts +137 -7
- package/src/settings-api.ts +12 -0
- package/src/settings.ts +55 -0
package/README.en.md
CHANGED
|
@@ -6,6 +6,8 @@ English | [中文](README.md)
|
|
|
6
6
|
|
|
7
7
|
Project homepage: <https://laplace-bit.github.io/dsh-smooth-stream/>
|
|
8
8
|
|
|
9
|
+
[Install guide](https://laplace-bit.github.io/dsh-smooth-stream/install.html) · [How it works and reproducible benchmark](https://laplace-bit.github.io/dsh-smooth-stream/how-it-works.html)
|
|
10
|
+
|
|
9
11
|
## Preview
|
|
10
12
|
|
|
11
13
|
Left: default Web UI. Right: dsh-smooth-stream.
|
|
@@ -59,12 +61,20 @@ Legacy `mode`, `revealCharsPerSec`, `scrollSpeedPxPerSec`, and `maxScrollSpeedPx
|
|
|
59
61
|
|
|
60
62
|
## User settings
|
|
61
63
|
|
|
62
|
-
In the Web UI, open **Settings → Plugins → Plugin configuration** to find a **Smooth stream** card with
|
|
64
|
+
In the Web UI, open **Settings → Plugins → Plugin configuration** to find a **Smooth stream** card with:
|
|
65
|
+
|
|
66
|
+
- **Enable smooth streaming** (on by default): lets this plugin own reply and tool-row rendering and follow. Turn it off to return rendering completely to the built-in Harness UI.
|
|
67
|
+
- **Auto-expand thinking**: controls whether reasoning opens while it streams. This preference has no effect while the master toggle is off.
|
|
68
|
+
- **Collapse finished work** (on by default): once a turn finishes processing, its thinking, tool calls, context injection, and intermediate output fold behind one “已处理 X秒 / Processed” summary row so only the final answer shows. Click the summary any time to expand or re-collapse the full process.
|
|
69
|
+
- **Show render diagnostics** (off by default): opens a chat-side panel with live rendering, frame-rate, and scroll-follow measurements, plus controls for reveal and spring behavior.
|
|
70
|
+
|
|
71
|
+
With “Auto-expand thinking” on, reasoning blocks open while streaming and collapse when thinking ends. With it off, reasoning stays collapsed; you can still open a block by hand, and the stream state will not wrestle it back.
|
|
72
|
+
|
|
73
|
+
“Collapse finished work” never interferes while a reply streams — output expands live, and folding happens only after the turn settles with all work complete. The switch works independently of “Enable smooth streaming”: folding applies whether this plugin or the built-in renderer owns the conversation. Plain replies without thinking or tools get no summary row. Content embedded by other plugins through fully custom tool views (such as `dsh-pianist`'s piano card) is never folded — only calls rendered as native tool cards participate. This feature supersedes the standalone `dsh-auto-collapse` plugin; do not run both at once, or they will fight over the same DOM nodes and overlap text.
|
|
63
74
|
|
|
64
|
-
-
|
|
65
|
-
- **Off**: reasoning blocks stay collapsed; you can still open one by hand, and the stream state will not wrestle it back.
|
|
75
|
+
These are durable, user-level preferences that apply live without a restart, and are written to the DeepSeek Harness user-settings document rather than the plugin's composed configuration.
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
Diagnostics controls apply as you move them: reveal multiplier, queue pressure, maximum reveal rate, spring stiffness/damping/mass, predictive runway, runway response time, and minimum backpressure scale. The panel reports FPS, frame time, character backlog, effective reveal rate, progress, visual lag, scroll velocity, and available follow room. You can **Save** a combination, **Discard** unsaved edits, **Restore defaults**, or copy the current tuning and measurements. Turning diagnostics off immediately returns the renderer to its production defaults.
|
|
68
78
|
|
|
69
79
|
## About & updates
|
|
70
80
|
|
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
项目主页:<https://laplace-bit.github.io/dsh-smooth-stream/>
|
|
8
8
|
|
|
9
|
+
[安装指南](https://laplace-bit.github.io/dsh-smooth-stream/install.html) · [工作原理与可复现基准](https://laplace-bit.github.io/dsh-smooth-stream/how-it-works.html)
|
|
10
|
+
|
|
9
11
|
## 效果
|
|
10
12
|
|
|
11
13
|
左:默认 Web UI。右:dsh-smooth-stream。
|
|
@@ -59,12 +61,20 @@ Host 日志里应出现 `[dsh-smooth-stream] plugin loaded!`。
|
|
|
59
61
|
|
|
60
62
|
## 用户设置
|
|
61
63
|
|
|
62
|
-
在 Web 界面打开 **设置 → 插件 → 插件配置**,会看到一张 **丝滑流式(Smooth stream)**
|
|
64
|
+
在 Web 界面打开 **设置 → 插件 → 插件配置**,会看到一张 **丝滑流式(Smooth stream)** 卡片,其中包含:
|
|
65
|
+
|
|
66
|
+
- **启用丝滑流式渲染**(默认开启):开启时由本插件接管回复和工具行的渲染与跟随;关闭后会撤销接管,完整使用 Harness 内置渲染。
|
|
67
|
+
- **自动展开思考**:控制思考块在流式期间是否自动展开。主开关关闭时此选项不会生效。
|
|
68
|
+
- **完成后自动折叠**(默认开启):回合处理完成后,把思考过程、工具调用、上下文注入和中间输出折叠为一行“已处理 X秒”摘要,只展示最终回复;点击摘要可随时展开或收起完整工作过程。
|
|
69
|
+
- **显示渲染调试面板**(默认关闭):在聊天页右侧显示实时渲染、帧率和滚动跟随数据,并开放流式揭示与滚动弹簧参数。
|
|
70
|
+
|
|
71
|
+
“自动展开思考”开启时,思考块会在流式时自动展开、思考结束后收起;关闭后思考块保持折叠,仍可手动点开,且不会被流式状态抢回控制。
|
|
72
|
+
|
|
73
|
+
“完成后自动折叠”在流式期间不干预——回复实时展开输出;只有回合结束(出现结束标记且全部工作完成)才折叠。该开关独立于“启用丝滑流式渲染”:无论由本插件还是内置渲染器负责对话,折叠都照常工作。纯文本回复(无思考、无工具)不会生成摘要行。其他插件通过自定义工具视图嵌入的内容(如 `dsh-pianist` 的钢琴卡片)不会被折叠——只有渲染为原生工具卡样式的调用才参与折叠。此功能取代外挂的 `dsh-auto-collapse` 插件,二者不要同时安装,否则会互相抢夺同一批 DOM 节点造成文字重叠。
|
|
63
74
|
|
|
64
|
-
|
|
65
|
-
- **关**:思考块保持折叠;仍可手动点开,且不会被流式状态抢回控制。
|
|
75
|
+
这些设置是用户级的持久化偏好,改完即生效,无需重启;会写进 DeepSeek Harness 的用户设置文档,而不是插件的组合配置。
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
调试面板中的参数在拖动时实时生效,包括揭示倍率、队列压力、最大揭示速度、弹簧刚度/阻尼/质量、预测 runway、runway 响应时间和最低背压倍率。面板同时显示 FPS、帧耗时、积压字符、实际揭示速度、渲染进度、视觉滞后、滚动速度和可用跟随空间;可随时**保存**当前组合、**放弃**未保存修改、**恢复默认**,或复制当前参数与指标。关闭调试开关后,渲染引擎立即恢复正式默认参数。
|
|
68
78
|
|
|
69
79
|
## 关于与更新
|
|
70
80
|
|