dsh-smooth-stream 0.3.2 → 0.3.4
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 +10 -13
- package/README.md +10 -13
- package/lib/client.js +1315 -357
- package/lib/client.js.map +1 -1
- package/package.json +9 -2
- package/src/client/FollowHost.tsx +49 -4
- package/src/client/TypewriterAssistantNodeView.module.css +1 -0
- package/src/client/TypewriterAssistantNodeView.tsx +328 -21
- package/src/client/TypewriterToolNodeView.tsx +183 -8
- package/src/client/index.ts +25 -8
- package/src/client/teleprompterGlide.ts +814 -231
- package/src/client/useProgressiveDomText.ts +206 -0
- package/src/client/useSmoothStreamContent.ts +139 -73
- package/src/config.ts +3 -6
package/README.en.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.md)
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
|
|
7
|
-
**dsh-smooth-stream** is a [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) community plugin for **silky streaming** in the Web UI: arrival-tracking typewriter reveal, glide-in wraps, no flicker. It is not part of the official DeepSeek distribution.
|
|
5
|
+
**dsh-smooth-stream** brings fluid streaming rendering and silky scrolling to the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) Web UI. Text, Markdown, code blocks, tables, and tool results appear as the reply arrives; as the content grows, the page follows along in one continuous visual rhythm.
|
|
8
6
|
|
|
9
7
|
Project homepage: <https://laplace-bit.github.io/dsh-smooth-stream/>
|
|
10
8
|
|
|
@@ -14,15 +12,12 @@ Left: default Web UI. Right: dsh-smooth-stream.
|
|
|
14
12
|
|
|
15
13
|

|
|
16
14
|
|
|
17
|
-
##
|
|
15
|
+
## Core experience
|
|
18
16
|
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
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
|
+
- **Fluid rendering.** Text appears as it arrives while Markdown structure stays active, keeping headings, lists, code blocks, and tables readable throughout the stream.
|
|
18
|
+
- **Silky scrolling.** As the content grows, the page follows along one continuous scroll path and keeps the reader close to the generated output.
|
|
19
|
+
- **Consistent transitions.** Line wraps, code blocks, tables, and tool results use the same motion treatment, so text, reasoning, and tools flow together.
|
|
20
|
+
- **Adaptive cadence.** Reveal speed responds to arrival rate and pending content, staying measured for slow output and catching up with fast output.
|
|
26
21
|
|
|
27
22
|
## Install
|
|
28
23
|
|
|
@@ -60,7 +55,7 @@ The bundle installs with `preset: balanced`. Change it in the profile `cordis.pa
|
|
|
60
55
|
| `balanced` | Default |
|
|
61
56
|
| `silky` | More buffer, slower catch-up |
|
|
62
57
|
|
|
63
|
-
`
|
|
58
|
+
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
59
|
|
|
65
60
|
## User settings
|
|
66
61
|
|
|
@@ -87,7 +82,7 @@ dsh plugin --profile web update dsh-smooth-stream
|
|
|
87
82
|
## FAQ
|
|
88
83
|
|
|
89
84
|
**Is this an official DeepSeek plugin?**
|
|
90
|
-
No. It is
|
|
85
|
+
No. It is independently maintained, MIT-licensed software for the DeepSeek Harness (`dsh`) Web UI and is not affiliated with DeepSeek.
|
|
91
86
|
|
|
92
87
|
**How do I install a DeepSeek Harness plugin?**
|
|
93
88
|
Use the built-in plugin command: `dsh plugin --profile web add dsh-smooth-stream` from a dsh source checkout (see [Install](#install)).
|
|
@@ -98,6 +93,8 @@ Yes — `dsh-smooth-stream` is published to [npm](https://www.npmjs.com/package/
|
|
|
98
93
|
**Does it respect `prefers-reduced-motion`?**
|
|
99
94
|
Yes. With reduced motion enabled the finished text is shown at once and the plugin does not take over follow. If the frame rate drops below 30 fps while the reply is off-screen, reveal pauses and catches up later.
|
|
100
95
|
|
|
96
|
+
[](https://whyihaveyou.github.io/dsh-suite/)
|
|
97
|
+
|
|
101
98
|
## License
|
|
102
99
|
|
|
103
100
|
[MIT](LICENSE)
|
package/README.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.en.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**dsh-smooth-stream** 是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)的社区插件,给 Web 对话做**丝滑流式渲染**:字跟着模型走、换行滑入、不闪。不是官方发行的一部分。
|
|
5
|
+
**dsh-smooth-stream** 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)Web UI 带来流畅的流式渲染和丝滑滚动。文字、Markdown、代码块、表格以及工具结果会随着输出自然呈现;内容逐步增长时,页面平稳跟随,整轮回复保持连贯的视觉节奏。
|
|
8
6
|
|
|
9
7
|
项目主页:<https://laplace-bit.github.io/dsh-smooth-stream/>
|
|
10
8
|
|
|
@@ -14,15 +12,12 @@
|
|
|
14
12
|
|
|
15
13
|

|
|
16
14
|
|
|
17
|
-
##
|
|
15
|
+
## 核心体验
|
|
18
16
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- **思考仍是内置那一行。** 推理用原来的 disclosure。它是当前流式尾部时展开,思考一结束就收起;箭头仍可手动开关。
|
|
24
|
-
- **整轮一起动。** 运行中的工具卡片、模型重试、workflow run 共用同一套跟随,所以滑的是整轮回复,不只是助手正文。
|
|
25
|
-
- **该停的时候会停。** `prefers-reduced-motion` 会直接给出全文,也不接管跟随。帧率低于 30 fps 且回复在屏外时,揭示会暂停,画面恢复后再补上。
|
|
17
|
+
- **流畅渲染。** 文字边到边呈现,Markdown 结构持续更新,标题、列表、代码块和表格在流式过程中保持自然的阅读状态。
|
|
18
|
+
- **丝滑滚动。** 内容逐步变高时,页面沿连续的滚动轨迹平稳跟随,视线始终贴着正在生成的内容。
|
|
19
|
+
- **统一过渡。** 换行、代码块、表格和工具结果使用一致的过渡方式,正文、思考过程与工具输出衔接自然。
|
|
20
|
+
- **自适应节奏。** 渲染速度会根据输出速度和待显示内容调整,让慢速输出从容呈现,快速输出及时跟上。
|
|
26
21
|
|
|
27
22
|
## 安装
|
|
28
23
|
|
|
@@ -60,7 +55,7 @@ Host 日志里应出现 `[dsh-smooth-stream] plugin loaded!`。
|
|
|
60
55
|
| `balanced` | 默认 |
|
|
61
56
|
| `silky` | 缓冲更大,追上更慢 |
|
|
62
57
|
|
|
63
|
-
`maxScrollSpeedPxPerSec
|
|
58
|
+
旧版的 `mode`、`revealCharsPerSec`、`scrollSpeedPxPerSec` 和 `maxScrollSpeedPxPerSec` 字段仍可被加载,以兼容已有 profile;当前自适应引擎仅使用 `preset` 调整节拍。
|
|
64
59
|
|
|
65
60
|
## 用户设置
|
|
66
61
|
|
|
@@ -87,7 +82,7 @@ dsh plugin --profile web update dsh-smooth-stream
|
|
|
87
82
|
## 常见问题
|
|
88
83
|
|
|
89
84
|
**这是 DeepSeek 官方插件吗?**
|
|
90
|
-
|
|
85
|
+
不是。它是面向 DeepSeek Harness(`dsh`)Web UI 的独立维护项目,采用 MIT 许可证,和 DeepSeek 没有从属关系。
|
|
91
86
|
|
|
92
87
|
**dsh 插件怎么安装?**
|
|
93
88
|
用内置插件命令:在 dsh 源码目录运行 `dsh plugin --profile web add dsh-smooth-stream`(见[安装](#安装))。
|
|
@@ -98,6 +93,8 @@ dsh plugin --profile web update dsh-smooth-stream
|
|
|
98
93
|
**支持 `prefers-reduced-motion` 吗?**
|
|
99
94
|
支持。系统开启减少动态效果时直接显示完整文本、不接管跟随;帧率低于 30 fps 且回复在屏外时,揭示自动暂停、恢复后再补上。
|
|
100
95
|
|
|
96
|
+
[](https://whyihaveyou.github.io/dsh-suite/)
|
|
97
|
+
|
|
101
98
|
## 许可证
|
|
102
99
|
|
|
103
100
|
[MIT](LICENSE)
|