@jcy2387/dsh-conversation-ui 0.2.0-rc.2 → 0.2.1-rc.2
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 +27 -26
- package/README.md +27 -26
- package/cordis.patch.yml +1 -1
- package/lib/client.js +1156 -1879
- package/lib/client.js.map +1 -1
- package/lib/index.js +102 -28
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +34 -35
- package/src/channel-bridge.ts +8 -7
- package/src/client/ConversationCard.module.css +47 -0
- package/src/client/ConversationCard.tsx +57 -1
- package/src/client/DeliverablesCard.module.css +1 -5
- package/src/client/DeliverablesCard.tsx +67 -50
- package/src/client/NativeAssistantEnhancement.tsx +148 -0
- package/src/client/conversation-ui-card-controller.ts +15 -8
- package/src/client/conversation-ui-settings-api.ts +7 -3
- package/src/client/deliverables.ts +123 -27
- package/src/client/developer-tools.ts +51 -0
- package/src/client/index.ts +52 -147
- package/src/client/locales.ts +50 -2
- package/src/client/useConversationContent.ts +15 -2
- package/src/config.ts +1 -1
- package/src/package-meta.ts +3 -0
- package/src/plugin.ts +63 -16
- package/src/profile-installation.ts +22 -3
- package/src/settings-api.ts +3 -3
- package/src/settings.ts +17 -15
- package/src/client/AnimatedDisclosure.tsx +0 -89
- package/src/client/CodexTurnProcessNodeView.tsx +0 -127
- package/src/client/FollowHost.tsx +0 -31
- package/src/client/ToolActivityGroup.tsx +0 -303
- package/src/client/TranscriptViewBridge.tsx +0 -26
- package/src/client/TypewriterAssistantNodeView.module.css +0 -1226
- package/src/client/TypewriterAssistantNodeView.tsx +0 -422
- package/src/client/TypewriterToolNodeView.tsx +0 -831
- package/src/client/turnElapsed.ts +0 -23
- package/src/client/turnProcessFallback.ts +0 -91
- package/src/client/useChatSeatHidden.ts +0 -91
- package/src/client/useFpsGuard.ts +0 -84
- package/src/client/useSearchableHidden.ts +0 -23
package/README.en.md
CHANGED
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
# @jcy2387/dsh-conversation-ui
|
|
2
2
|
|
|
3
|
-
This release targets Harness `0.2.
|
|
3
|
+
This release targets Harness `0.2.1-rc.2`. The deliverables card uses an independent list entry; files defer to the native changed-files card when it is active, while the plugin adds websites without drawing a second file card. Settings appear on the Suite or standalone bundle page. Assistant rows delegate to the native renderer; DSH owns work-details modes, tool groups, folding, and scrolling. Older Harness users should keep the corresponding older plugin version.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/DamonBao/dsh-codex-suite/actions/workflows/ci.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
English | [简体中文](README.md)
|
|
9
9
|
|
|
10
|
-
A
|
|
10
|
+
A conversation enhancement plugin for DeepSeek Harness (DSH): progressive reveal and auto-expanded thinking augment the native assistant renderer, with deliveries contributed through an independent slot. DSH retains its ChatView, tool cards, Turn controls, and file previews. This is the Conversation UI package of the [DSH Codex Suite](../../README.md) monorepo.
|
|
11
11
|
|
|
12
12
|
**The package is fully independent from the Codex Provider** and can be installed alone to enhance conversations with any model.
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Native conversation integration
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- **Markdown images:** local absolute-path images in assistant replies use DSH's authenticated file route.
|
|
22
|
-
|
|
23
|
-
### Semantic tool activity
|
|
24
|
-
|
|
25
|
-
- Search, file read, edit, shell, database, web, skill, and agent tools each render a distinct icon, so the activity stream is scannable at a glance; groups collapse and expand.
|
|
18
|
+
- Compact, Standard, Detailed, and Verbose work-details modes retain DSH's native grouping, reasoning previews, and process disclosure.
|
|
19
|
+
- The native assistant renderer owns Markdown, protected local images, attachments, file mentions, stopped markers, and final-answer actions.
|
|
20
|
+
- Tool, retry, workflow, command, and context rows retain their native layout. The plugin only wraps the winning assistant renderer in place, keeping its children, inject, store, and locale; it leaves other rows and portals untouched.
|
|
26
21
|
|
|
27
22
|
### Two streaming reveal modes
|
|
28
23
|
|
|
29
24
|
| Mode | Behavior |
|
|
30
25
|
| --- | --- |
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
26
|
+
| `typewriter` (default) | Progressive reveal by grapheme cluster, safe for CJK text and emoji. |
|
|
27
|
+
| `teleprompter` | The latest model snapshot appears immediately, with no extra character-reveal queue. |
|
|
33
28
|
|
|
34
29
|
- Three smoothing presets: `realtime` (snappier), `balanced` (default), `silky` (extra smooth). Presets shape the reveal cadence — EMA-smoothed arrival rate, buffer targets, catch-up ceilings, and the settle drain after the input idles — so long replies never dump whole paragraphs at once and fast streams never stutter.
|
|
35
|
-
- `typewriter` mode
|
|
30
|
+
- `typewriter` mode exposes a fixed reveal rate via `revealCharsPerSec`. When the turn settles, the remaining reveal queue drains at a faster settle rate before switching to the full snapshot; stopped and failed turns use the same drain. Loading history or switching sessions does not replay the animation, and reduced motion shows the full snapshot immediately.
|
|
36
31
|
|
|
37
32
|
### Streaming viewport cooperation
|
|
38
33
|
|
|
39
34
|
- Current DSH `ChatView` exclusively owns the running status, per-session restoration, bottom-follow, and reader unpinning. The plugin no longer adds a second waiting row or writes `scrollTop` and row transforms.
|
|
40
|
-
- Respects `prefers-reduced-motion
|
|
35
|
+
- Respects `prefers-reduced-motion` by showing the latest snapshot immediately.
|
|
41
36
|
|
|
42
37
|
### Deliverables card
|
|
43
38
|
|
|
44
|
-
- Every finished turn ends with a **deliverables** card: produced files and websites with added/removed line counts.
|
|
39
|
+
- Every finished turn ends with a **deliverables** card: produced files and websites with real added/removed line counts.
|
|
40
|
+
- While DSH’s native changed-files card is active (developer tools on and the turn has git changes), files belong to that card, including its diff preview and review; the plugin lists websites only so one turn never shows two file cards.
|
|
41
|
+
- Relative and absolute spellings of the same file are merged, so the file is counted once.
|
|
45
42
|
|
|
46
43
|
### Plugin settings card
|
|
47
44
|
|
|
48
|
-
-
|
|
45
|
+
- Durable reveal mode (typewriter / teleprompter), smoothing preset (realtime / balanced / silky), reveal speed, and **Auto-expand thinking** controls in *Plugins → DSH Codex Suite (or Conversation UI)*; changes apply live without a restart.
|
|
49
46
|
- The card also shows the current version and installation kind (npm / local development); npm installs get a one-click update action (restart required after updating).
|
|
50
47
|
- Localized in Chinese and English.
|
|
51
48
|
|
|
@@ -54,7 +51,7 @@ A Codex-style conversation UI enhancement plugin for DeepSeek Harness (DSH): the
|
|
|
54
51
|
Published package:
|
|
55
52
|
|
|
56
53
|
```sh
|
|
57
|
-
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.2.
|
|
54
|
+
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.2.1-rc.2
|
|
58
55
|
dsh web
|
|
59
56
|
```
|
|
60
57
|
|
|
@@ -67,17 +64,17 @@ dsh web
|
|
|
67
64
|
|
|
68
65
|
Alternatively install the [`@jcy2387/dsh-suite`](../all/README.md) bundle to enable both the Codex Provider and this plugin.
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
Native assistant enhancement activates automatically; existing session data stays unchanged.
|
|
71
68
|
|
|
72
69
|
## Configuration
|
|
73
70
|
|
|
74
|
-
Profile patch ID: `conversation-ui`.
|
|
71
|
+
Profile patch ID: `conversation-ui`. The overlay sets deployment defaults (the suite bundle defaults to `mode: typewriter`, `preset: balanced`); `mode`, `preset`, and `revealCharsPerSec` are also live, persistent settings in the plugin card.
|
|
75
72
|
|
|
76
73
|
| Option | Range | Default | Notes |
|
|
77
74
|
| --- | --- | --- | --- |
|
|
78
|
-
| `mode` | `
|
|
79
|
-
| `preset` | `realtime` \| `balanced` \| `silky` | `balanced` |
|
|
80
|
-
| `revealCharsPerSec` | 5–200 | `80` |
|
|
75
|
+
| `mode` | `typewriter` \| `teleprompter` | `typewriter` | Deployment default reveal style; live-editable in the card. |
|
|
76
|
+
| `preset` | `realtime` \| `balanced` \| `silky` | `balanced` | Deployment default smoothing preset; live-editable in the card. |
|
|
77
|
+
| `revealCharsPerSec` | 5–200 | `80` | Deployment default reveal rate; live-editable in the card. |
|
|
81
78
|
| `scrollSpeedPxPerSec` | 1–200 | `48` | Deprecated; retained for old Profile compatibility. DSH owns scrolling. |
|
|
82
79
|
| `maxScrollSpeedPxPerSec` | 1–2000 | `1000` | Deprecated; retained for old Profile compatibility. DSH owns scrolling. |
|
|
83
80
|
|
|
@@ -108,7 +105,11 @@ The package ships a [`conversation-ui-off.yml`](conversation-ui-off.yml) overlay
|
|
|
108
105
|
The package ships two halves that cooperate over one very narrow config channel:
|
|
109
106
|
|
|
110
107
|
- **Host half** (`src/`): a Cordis plugin. It validates the config schema, injects the validated value into every served index HTML (the boot global `window.__DSH_CONVERSATION_UI_CONFIG__`), and registers the user-settings namespace plus a loopback-only settings RPC (read/write preferences, report installation kind, trigger an npm update).
|
|
111
|
-
- **Web half** (`src/client/`):
|
|
108
|
+
- **Web half** (`src/client/`): wraps the winning `assistant-step` renderer in place in `conversation.chat.node`, preserving its children, inject, store, and locale while adjusting streaming text and native `useDisclosure`. It does not replace `conversation.view` or `turn-process`, or read host DOM. Deliveries use an independent `conversation.chat.turnTail` list entry; settings use `plugins.bundle.config`. Registration follows the slot declaration lifetime; the native entry's child slots, inject, store, and locale stay intact.
|
|
109
|
+
|
|
110
|
+
### Presentation after upgrading
|
|
111
|
+
|
|
112
|
+
The old custom tool icons, tool group frames, and process folding styles now use native DSH presentation. Select a work-details mode in DSH; reveal configuration and the persisted Auto-expand thinking preference continue to apply. No session format or credential migration is needed. Delivery cards read persisted Turn data rather than scanning other rows' DOM or hiding native file previews.
|
|
112
113
|
|
|
113
114
|
## Development
|
|
114
115
|
|
|
@@ -118,10 +119,10 @@ pnpm --filter @jcy2387/dsh-conversation-ui test
|
|
|
118
119
|
pnpm --filter @jcy2387/dsh-conversation-ui build
|
|
119
120
|
```
|
|
120
121
|
|
|
121
|
-
Tests run on vitest + Testing Library, covering
|
|
122
|
+
Tests run on vitest + Testing Library, loading the published DSH Chat factory and covering native modes, reasoning disclosure, images, stream reveal, load/unload order, and the settings card (both client and host sides). See the [monorepo README](../../README.md) for workspace-wide commands.
|
|
122
123
|
|
|
123
124
|
## License
|
|
124
125
|
|
|
125
126
|
[MIT](LICENSE) © jcy2387
|
|
126
127
|
|
|
127
|
-
This release targets DSH `0.2.
|
|
128
|
+
This release targets DSH `0.2.1-rc.2`. It imports `conversation-ui.thinkAutoExpand` from `settings.yaml` or `settings.yaml.imported` into the active profile’s `cordis.patch.yml`, recording a marker after success and retaining the source after failure. The plugin’s compatibility import fills only missing values. Exported `locale/en.json` and `locale/zh.json` localize the name and description in DSH.
|
package/README.md
CHANGED
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
# @jcy2387/dsh-conversation-ui
|
|
2
2
|
|
|
3
|
-
本版本面向 Harness `0.2.
|
|
3
|
+
本版本面向 Harness `0.2.1-rc.2`。产物卡片使用列表插槽中的独立条目;文件在原生 changed-files 卡启用时交给原生卡,插件补充网站,避免重复;插件设置位于 Suite 或独立插件的配置页。助手行委托原生组件渲染,工作步骤展示模式、工具分组、折叠和滚动由 DSH 管理。旧版 Harness 用户应继续使用对应旧版插件。
|
|
4
4
|
|
|
5
5
|
[](https://github.com/DamonBao/dsh-codex-suite/actions/workflows/ci.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
[English](README.en.md) | 简体中文
|
|
9
9
|
|
|
10
|
-
DeepSeek Harness(DSH
|
|
10
|
+
DeepSeek Harness(DSH)的对话增强插件:在原生助手组件上增加逐字揭示和思考自动展开,并通过独立插槽展示产物。原生 ChatView、工具卡片、回合控制和文件预览保持宿主的呈现。本包是 [DSH Codex Suite](../../README.zh.md) Monorepo 的对话 UI 包。
|
|
11
11
|
|
|
12
12
|
**本包与 Codex Provider 完全独立**,可以单独安装并服务任意模型。
|
|
13
13
|
|
|
14
14
|
## 功能
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### 原生对话协作
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- **Markdown 图片:** 助手回复中的本地绝对路径图片通过 DSH 的受保护文件接口显示。
|
|
22
|
-
|
|
23
|
-
### 语义化 Tool 活动
|
|
24
|
-
|
|
25
|
-
- 搜索、文件读取、编辑、命令、数据库、网页、技能、Agent 等工具各有专属图标,活动流一眼可扫;工具组可折叠/展开。
|
|
18
|
+
- 工作步骤展示的简洁、标准、详细和完全展开模式继续使用 DSH 的原生分组、思考摘要和过程折叠。
|
|
19
|
+
- Markdown、受保护的本地图片、图片附件、文件引用、停止标记和最终答复操作由原生助手组件渲染。
|
|
20
|
+
- 工具、重试、工作流、命令和上下文行保留原生布局;插件只原地包装获胜的 assistant 渲染器,保留其 children、inject、store 和 locale,不改其他行,也不通过 Portal 重排。
|
|
26
21
|
|
|
27
22
|
### 两种流式揭示模式
|
|
28
23
|
|
|
29
24
|
| 模式 | 行为 |
|
|
30
25
|
| --- | --- |
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
26
|
+
| `typewriter`(默认) | 按字素(grapheme)渐进揭示,对中文、emoji 等宽字符安全。 |
|
|
27
|
+
| `teleprompter` | 直接呈现模型的最新内容快照,不引入额外逐字队列。 |
|
|
33
28
|
|
|
34
29
|
- 三档平滑预设:`realtime`(更跟手)、`balanced`(默认)、`silky`(更绵密)。预设控制揭示节奏曲线:到达速率的 EMA 平滑、缓冲目标、追速上限和停顿后的收尾排空速度,让长回复不会整段砸出、快流不会卡顿。
|
|
35
|
-
- `typewriter` 模式另有固定揭示速度 `revealCharsPerSec`
|
|
30
|
+
- `typewriter` 模式另有固定揭示速度 `revealCharsPerSec` 可调。回合结束后不会丢掉待揭示队列:剩余内容以更快的收尾速率排空,再切换到完整快照;停止和失败同样按此收尾。加载历史和切换会话不会重播逐字效果,减少动态效果时直接显示完整快照。
|
|
36
31
|
|
|
37
32
|
### 流式视口协作
|
|
38
33
|
|
|
39
34
|
- 当前 DSH `ChatView` 独占会话级位置恢复、底部跟随和用户上滑释放;插件不再直接写 `scrollTop` 或行变换,避免切换会话时争抢滚动所有权。
|
|
40
|
-
- 尊重 `prefers-reduced-motion
|
|
35
|
+
- 尊重 `prefers-reduced-motion`,启用减少动态效果时直接显示最新快照。
|
|
41
36
|
|
|
42
37
|
### 产物卡片
|
|
43
38
|
|
|
44
|
-
- 每个完成的 Turn
|
|
39
|
+
- 每个完成的 Turn 尾部列出**产物**:生成的文件与站点,附真实增删行数。
|
|
40
|
+
- 当 DSH 原生 changed-files 卡启用(开发者工具打开且该回合有 git 变更)时,文件交给原生卡(含 diff 预览和审阅),插件只列网站,避免同一回合出现两张文件卡。
|
|
41
|
+
- 路径在相对/绝对写法之间归一化并合并,同一文件不会重复计数。
|
|
45
42
|
|
|
46
43
|
### 插件设置卡片
|
|
47
44
|
|
|
48
|
-
- 在 **插件 → DSH Codex Suite(或 Conversation UI)**
|
|
45
|
+
- 在 **插件 → DSH Codex Suite(或 Conversation UI)** 中提供持久的揭示模式(typewriter / teleprompter)、平滑预设(realtime / balanced / silky)、揭示速度和「自动展开思考」;修改实时生效,无需重启。
|
|
49
46
|
- 卡片同时显示当前版本与安装形态(npm / 本地开发),npm 安装支持一键更新(更新后需重启)。
|
|
50
47
|
- 界面中英文本地化。
|
|
51
48
|
|
|
@@ -54,7 +51,7 @@ DeepSeek Harness(DSH)的 Codex 风格对话界面增强插件:把 Web 对
|
|
|
54
51
|
已发布版本:
|
|
55
52
|
|
|
56
53
|
```sh
|
|
57
|
-
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.2.
|
|
54
|
+
dsh plugin --profile web add @jcy2387/dsh-conversation-ui@0.2.1-rc.2
|
|
58
55
|
dsh web
|
|
59
56
|
```
|
|
60
57
|
|
|
@@ -67,17 +64,17 @@ dsh web
|
|
|
67
64
|
|
|
68
65
|
也可以安装 [`@jcy2387/dsh-suite`](../all/README.md) 组合包,一次启用 Codex Provider 与本插件。
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
安装后自动增强原生助手行,既有会话数据不变。
|
|
71
68
|
|
|
72
69
|
## 配置
|
|
73
70
|
|
|
74
|
-
Profile patch ID:`conversation-ui
|
|
71
|
+
Profile patch ID:`conversation-ui`。overlay 设置部署默认值(组合包默认值为 `mode: typewriter`、`preset: balanced`);`mode`、`preset`、`revealCharsPerSec` 也可在插件设置卡中实时修改并持久化。
|
|
75
72
|
|
|
76
73
|
| 选项 | 范围 | 默认 | 说明 |
|
|
77
74
|
| --- | --- | --- | --- |
|
|
78
|
-
| `mode` | `
|
|
79
|
-
| `preset` | `realtime` \| `balanced` \| `silky` | `balanced` |
|
|
80
|
-
| `revealCharsPerSec` | 5–200 | `80` |
|
|
75
|
+
| `mode` | `typewriter` \| `teleprompter` | `typewriter` | 部署默认揭示模式;设置卡可实时修改。 |
|
|
76
|
+
| `preset` | `realtime` \| `balanced` \| `silky` | `balanced` | 部署默认平滑预设;设置卡可实时修改。 |
|
|
77
|
+
| `revealCharsPerSec` | 5–200 | `80` | 部署默认揭示速度;设置卡可实时修改。 |
|
|
81
78
|
| `scrollSpeedPxPerSec` | 1–200 | `48` | 已弃用;仅保留旧 Profile 配置兼容,滚动由 DSH 管理。 |
|
|
82
79
|
| `maxScrollSpeedPxPerSec` | 1–2000 | `1000` | 已弃用;仅保留旧 Profile 配置兼容,滚动由 DSH 管理。 |
|
|
83
80
|
|
|
@@ -108,7 +105,11 @@ Overlay 示例:
|
|
|
108
105
|
本包由两半组成,通过一条极窄的配置通道协作:
|
|
109
106
|
|
|
110
107
|
- **Host 半**(`src/`):Cordis 插件。负责校验配置 schema,并把校验后的配置注入每个服务出的 index HTML(启动配置全局变量 `window.__DSH_CONVERSATION_UI_CONFIG__`);同时注册用户设置命名空间与一条仅限 loopback 的设置 RPC(读取/写入偏好、查询安装形态、触发 npm 更新)。
|
|
111
|
-
- **Web 半**(`src/client
|
|
108
|
+
- **Web 半**(`src/client/`):通过 `conversation.chat.node` 的 `assistant-step` 键原地包装获胜渲染器,保留既有组件的 children、inject、store 与 locale,只调整流式文本和原生 `useDisclosure`。不接管 `conversation.view` 或 `turn-process`,不读取宿主 DOM。产物使用 `conversation.chat.turnTail` 的独立列表条目,设置使用 `plugins.bundle.config`。组件装卸跟随插槽声明;获胜的 assistant 渲染器原地包装,children、inject、store 和 locale 保持原样。
|
|
109
|
+
|
|
110
|
+
### 升级后的呈现
|
|
111
|
+
|
|
112
|
+
旧版插件的自定义工具图标、工具分组框和过程折叠样式已交由 DSH 原生 UI。请使用 DSH 的「工作步骤展示」选择呈现模式;插件的揭示配置与持久化「自动展开思考」偏好继续生效。没有会话格式或凭据迁移。产物卡片只读取持久化回合数据,不再扫描其他行的 DOM 或隐藏原生文件预览。
|
|
112
113
|
|
|
113
114
|
## 开发
|
|
114
115
|
|
|
@@ -118,10 +119,10 @@ pnpm --filter @jcy2387/dsh-conversation-ui test
|
|
|
118
119
|
pnpm --filter @jcy2387/dsh-conversation-ui build
|
|
119
120
|
```
|
|
120
121
|
|
|
121
|
-
测试基于 vitest + Testing Library
|
|
122
|
+
测试基于 vitest + Testing Library,加载已发布 DSH Chat 工厂,覆盖原生模式、思考折叠、图片、流式揭示、装卸顺序与设置卡片(客户端与 Host 两侧)。工作区级命令见 [Monorepo README](../../README.zh.md)。
|
|
122
123
|
|
|
123
124
|
## 许可证
|
|
124
125
|
|
|
125
126
|
[MIT](LICENSE) © jcy2387
|
|
126
127
|
|
|
127
|
-
本版面向 DSH `0.2.
|
|
128
|
+
本版面向 DSH `0.2.1-rc.2`。旧 `conversation-ui.thinkAutoExpand` 从 `settings.yaml` 或 `settings.yaml.imported` 导入当前 profile 的 `cordis.patch.yml`,成功后记录迁移标记;失败保留源文件供重试。插件兼容导入只补充缺失的值。名称和描述通过导出的 `locale/en.json`、`locale/zh.json` 跟随 DSH 界面语言。
|