@deepseek-ai/dsh-client-ui-chat 0.1.7-rc.2 → 0.2.0-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.i18n.yaml +11 -11
- package/README.md +12 -3
- package/README.zh.md +11 -2
- package/lib/client.js +232 -136
- package/lib/index.js +4 -4
- package/lib/types/chat-settings.d.ts +7 -7
- package/lib/types/client/apply.d.ts +0 -1
- package/lib/types/client/chat/RunningStatus.d.ts +13 -0
- package/lib/types/client/chat/RunningWhaleTail.d.ts +6 -0
- package/lib/types/client/chat/TurnProcessNodeView.d.ts +1 -1
- package/lib/types/client/chat/message-chrome.d.ts +12 -16
- package/lib/types/client/locale.d.ts +8 -8
- package/lib/types/client/transcript-view.d.ts +4 -2
- package/lib/types/index.d.ts +4 -4
- package/package.json +37 -36
package/README.i18n.yaml
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
en: d88f75fc0178ba53
|
|
7
7
|
zh: 52bc7ae9551ab1cf
|
|
8
8
|
/deepseek-ai-dsh-client-ui-chat:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
9
|
+
en: 02bd72c12ada3218
|
|
10
|
+
zh: 331b3a38b3ddfc6e
|
|
11
11
|
/deepseek-ai-dsh-client-ui-chat/summary:
|
|
12
12
|
en: fba5b2fb8080e2dd
|
|
13
13
|
zh: 32c337123b7dfbcb
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
en: 41cd21266011d571
|
|
16
16
|
zh: 3172d1a2acbb27b7
|
|
17
17
|
/deepseek-ai-dsh-client-ui-chat/reference-previews:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: 0a1948349b1fbfd9
|
|
19
|
+
zh: 56256e4d695e5192
|
|
20
20
|
/deepseek-ai-dsh-client-ui-chat/hidden-chat-rows:
|
|
21
|
-
en:
|
|
21
|
+
en: cbf1f0a2205046a5
|
|
22
22
|
zh: 2e59d0815351349f
|
|
23
23
|
/deepseek-ai-dsh-client-ui-chat/command-and-failure-rows:
|
|
24
24
|
en: 2157fcd6b0d100b5
|
|
25
25
|
zh: 9e865ac3953ebe30
|
|
26
26
|
/deepseek-ai-dsh-client-ui-chat/turn-token-usage:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 11436f75c377ed1b
|
|
28
|
+
zh: 42707b8efc201dad
|
|
29
29
|
/deepseek-ai-dsh-client-ui-chat/completed-turn-footer:
|
|
30
30
|
en: b4cd36e7ab91281e
|
|
31
31
|
zh: 8ccf412b9dde61d5
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
en: 0ca3e8c4eab1ca78
|
|
34
34
|
zh: 1a1c71bab151eb7d
|
|
35
35
|
/deepseek-ai-dsh-client-ui-chat/grouped-rendering:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: 1dc0ab19a6469e37
|
|
37
|
+
zh: 75c788f1b7b214e5
|
|
38
38
|
/deepseek-ai-dsh-client-ui-chat/scroll-ownership:
|
|
39
39
|
en: 69b021c5a5d8b5a7
|
|
40
40
|
zh: 091ae7986c7a8a20
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
en: 15a7151ff9268f15
|
|
46
46
|
zh: 6eae68c718be579b
|
|
47
47
|
/deepseek-ai-dsh-client-ui-chat/known-limitations-and-deferred-work:
|
|
48
|
-
en:
|
|
49
|
-
zh:
|
|
48
|
+
en: 811787a5d2feaa90
|
|
49
|
+
zh: 3f1697bbc1fc7691
|
|
50
50
|
/deepseek-ai-dsh-client-ui-chat/known-limitations-and-deferred-work/dev-note:
|
|
51
51
|
en: b8b7eeb4ae675d2a
|
|
52
52
|
zh: fbe7022074ba81b9
|
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ kind: "package-reference"
|
|
|
6
6
|
|
|
7
7
|
English | [中文](README.zh.md)
|
|
8
8
|
|
|
9
|
+
Desktop product events use the optional [product analytics service](../product-analytics/README.md); ordinary Web interactions are excluded.
|
|
10
|
+
|
|
9
11
|
## Summary
|
|
10
12
|
|
|
11
13
|
Use this package to render a browser chat from recorded Session conversations, including historical images, localized actions, and restored scroll position. Work-details modes control reasoning previews and process visibility without hiding final answers; Verbose keeps completed-turn process rows visible. Local transcript and steering submissions appear immediately, remain in their original surface, and disappear atomically when authoritative Session records arrive, while queued submissions stay outside Chat. The package does not assemble or modify model requests.
|
|
@@ -35,12 +37,12 @@ Chat supplies file and HTTP(S) navigation through one `MarkdownDelegateProvider`
|
|
|
35
37
|
|
|
36
38
|
Standalone Markdown images show contained previews and open the shared image lightbox; local paths resolve against the viewed workspace after settlement. Image file links keep their sidebar activation and show a thumbnail after hover dwell or keyboard focus. Escape dismisses the thumbnail. Failed images retain a localized status and their description; no duplicate-image filtering is applied.
|
|
37
39
|
|
|
38
|
-
Settings → General → Open chat links in selects the destination for ordinary clicks on Chat HTTP(S) links: In-App Sidebar (default) opens a new right-Sidebar Browser tab, while Default Browser opens an external tab. The setting is shown only while the Sidebar Browser is available. If the Sidebar Browser is not registered, both choices use the external browser; modified clicks retain native behavior. The `ui-chat.linkOpening` preference persists on loopback browsers and stays process-local when settings cannot persist writes. Sent file references and skills confirmed by the message’s logged invocation also open in the right Sidebar. File paths use the viewed Session; skill names resolve through its current input-trigger source. Both use the prose file-link dotted underline on hover or focus. Sessions, directories, and command labels remain non-navigating references.
|
|
40
|
+
Settings → General → Open chat links in selects the destination for ordinary clicks on Chat HTTP(S) links: In-App Sidebar (default) opens a new right-Sidebar Browser tab, while Default Browser opens an external tab. The setting follows Keyboard shortcuts and is shown only while the Sidebar Browser is available. If the Sidebar Browser is not registered, both choices use the external browser; modified clicks retain native behavior. The `ui-chat.linkOpening` preference persists on loopback browsers and stays process-local when settings cannot persist writes. Sent file references and skills confirmed by the message’s logged invocation also open in the right Sidebar. File paths use the viewed Session; skill names resolve through its current input-trigger source. Both use the prose file-link dotted underline on hover or focus. Sessions, directories, and command labels remain non-navigating references.
|
|
39
41
|
|
|
40
42
|
<a id="system-prompt-row"></a>
|
|
41
43
|
## Hidden Chat rows
|
|
42
44
|
|
|
43
|
-
Chat omits system-prompt, ordinary Context injection, and `permission` command rows in every work-details mode. Context containing tool additions or removals remains visible. The filter changes neither recorded Session events nor Trajectory inspection. Non-human Turn triggers remain independent notices; other command rows remain in Chat.
|
|
45
|
+
Chat omits system-prompt, ordinary Context injection, and `permission` command rows in every work-details mode. Context containing tool additions or removals remains visible. The filter changes neither recorded Session events nor Trajectory inspection. Non-human Turn triggers remain independent, bordered notices with a contrasting neutral background; other command rows remain in Chat.
|
|
44
46
|
|
|
45
47
|
When an Assistant attempt retires without a visible message, Chat hides its already-published Node instead of removing its key. A retry in the same Step reuses that key when visible content returns. This also applies when the loaded window lacks the Step start.
|
|
46
48
|
|
|
@@ -56,7 +58,7 @@ Generic command rows retain the ordinary command glyph in every lifecycle state;
|
|
|
56
58
|
|
|
57
59
|
A completed Turn shows an expandable usage row only when the loaded window includes `turn/start` and every started model attempt reports safe, exact usage. The row omits unavailable optional buckets. Incomplete or contradictory accounting hides the complete disclosure instead of presenting a partial total.
|
|
58
60
|
|
|
59
|
-
Settings → General → Performance & usage stores `ui-chat.performanceUsage` as `detailed` (default) or `compact`. Compact shows only available output speed and cache-hit percentage beneath the composer, without interactive statistic dialogs or per-Turn usage. Detailed exposes session statistics and per-Turn token usage. Neither mode shows elapsed time in the completed-turn footer. The preference changes presentation only; accounting and Session events remain intact.
|
|
61
|
+
Settings → General → Performance & usage appears after Send behavior while busy and before Session Log upload, and stores `ui-chat.performanceUsage` as `detailed` (default) or `compact`. Compact shows only available output speed and cache-hit percentage beneath the composer, without interactive statistic dialogs or per-Turn usage. Detailed exposes session statistics and per-Turn token usage. Neither mode shows elapsed time in the completed-turn footer. The preference changes presentation only; accounting and Session events remain intact.
|
|
60
62
|
|
|
61
63
|
On non-loopback browsers, the preference remains process-local because the settings scope cannot persist writes. Explicit selections update every consumer immediately; accepted Host settings reconcile the live value on loopback browsers.
|
|
62
64
|
|
|
@@ -93,12 +95,18 @@ Live tool deltas share reasoning's frame-batched publication; durable calls and
|
|
|
93
95
|
|
|
94
96
|
The process group uses a stable `div` layout box, a scroll body, and an uncapped content box that reports growth inside the body. Business styles must adapt spacing within and across groups, including hidden or empty members and the answer-spacing exception. CSS variables do not belong in the Group Definition.
|
|
95
97
|
|
|
98
|
+
Running group titles, reasoning previews, tool and command rows, the active retry line, and the bottom running status use the shared [TextShimmer](../ui-primitives/README.md#component-catalog). Each row’s text shares one left-to-right highlight, including collapsed group titles; icons and hover chevrons retain their base appearance. Tool and process rows sit 6px apart. An expanded group title has 8px before its content, Assistant responses have 12px from adjacent process rows, and completed-Turn duration/status controls have 16px around them. Hidden and empty rows, including retained empty slot anchors, add no gap. The running “Deep diving” text retains its blue base while its theme-specific highlight sweeps across it.
|
|
99
|
+
|
|
100
|
+
The running status shows a whale whose APNG mask inherits the text color. CSS selects the static SVG when reduced motion or forced colors are active, or alpha masks are unsupported. The build embeds the image in the plugin stylesheet; React does not pass image data through DOM styles.
|
|
101
|
+
|
|
96
102
|
Scroll-edge fades initialize when `ResizeObserver` reports the open group's layout; opening the group performs no immediate scroll-dimension read in a layout effect.
|
|
97
103
|
|
|
98
104
|
Each group owns local `useDisclosure` state that survives mode changes while its component stays mounted.
|
|
99
105
|
|
|
100
106
|
The Chat-node slot injects a reset-bound `useDisclosure` Hook for reasoning and tools. Intermediate renderers forward it without subscribing; each invocation owns independent open state. Source callbacks retain their receiver and stable identity. When an enclosing Turn actually hides a process member, its seat resets those disclosures without replacing component keys or changing the Hook reference. Display-mode changes preserve their open state.
|
|
101
107
|
|
|
108
|
+
Process rows share one text and icon color in every Work details mode: tertiary at rest and secondary on hover, while error and warning text keeps its semantic color. Leading icons, disclosure chevrons, and their boxes scale with the content font-size delta.
|
|
109
|
+
|
|
102
110
|
-----
|
|
103
111
|
|
|
104
112
|
<a id="scroll-ownership"></a>
|
|
@@ -153,6 +161,7 @@ None; Chat presentation does not assemble or mutate provider requests.
|
|
|
153
161
|
|
|
154
162
|
<a id="known-limitations-and-deferred-work"></a>
|
|
155
163
|
|
|
164
|
+
- **Running-icon resolution** — the animated whale uses a 28×28 image at a default 14×14 CSS size. Larger content fonts or device pixel ratios above 2 can soften the raster stroke; the static fallback remains vector-based. Browser image caching owns the animation clock, so remounting does not guarantee playback restarts at the first frame.
|
|
156
165
|
|
|
157
166
|
- **Tool-change presentation** — The `developer-message` Definition shares context presentation with `input-message`. Tool-only developer messages name a single added or removed tool inline without expansion. Multiple changes show added/removed counts and expand to comma-separated tool lists, one line per change kind. Mixed content uses the generic context presentation.
|
|
158
167
|
|
package/README.zh.md
CHANGED
|
@@ -6,6 +6,8 @@ kind: "package-reference"
|
|
|
6
6
|
|
|
7
7
|
[English](README.md) | 中文
|
|
8
8
|
|
|
9
|
+
桌面端产品事件使用可选的[产品埋点服务](../product-analytics/README.zh.md),不包含普通 Web 交互。
|
|
10
|
+
|
|
9
11
|
## 概述
|
|
10
12
|
|
|
11
13
|
使用本包可在浏览器中渲染已记录的 Session 对话,包括历史图片、本地化操作和滚动位置恢复。工作步骤展示模式控制思考预览与过程显隐,不隐藏最终答案;完全展开模式保持已完成轮次的过程行可见。本地 transcript(文本记录)与 steering(中途引导)提交会立即显示并保留在原区域,在权威会话记录到达时原子地消失,而排队中的提交始终不进入 Chat。本包不组装或修改模型请求。
|
|
@@ -35,7 +37,7 @@ Chat 在节点列表外通过一个 `MarkdownDelegateProvider` 提供文件及 H
|
|
|
35
37
|
|
|
36
38
|
独立的 Markdown 图片以内嵌预览显示,点击打开共享图片浮层;本地路径在消息落定后基于当前查看的工作区解析。图片文件链接保持点击打开侧栏,鼠标停留或键盘聚焦时显示缩略图,Esc 关闭缩略图。图片加载失败时保留本地化状态与图片说明;不执行重复图片过滤。
|
|
37
39
|
|
|
38
|
-
设置 → 通用设置 → 网页链接默认打开方式控制普通点击 Chat HTTP(S) 链接时的目标:「应用内侧边栏」(默认)打开新的右侧 Sidebar Browser tab
|
|
40
|
+
设置 → 通用设置 → 网页链接默认打开方式控制普通点击 Chat HTTP(S) 链接时的目标:「应用内侧边栏」(默认)打开新的右侧 Sidebar Browser tab,「默认浏览器」打开外部标签页。该设置项位于快捷键之后,仅在 Sidebar Browser 可用时显示。若 Sidebar Browser 未注册,两种选择均使用外部浏览器;带修饰键的点击保留原生行为。`ui-chat.linkOpening` 偏好在回环地址浏览器中持久化,设置无法持久化写入时仅在当前进程内生效。已发送的文件引用及消息日志确认调用的 skill 也可在右侧栏打开预览。文件路径使用当前查看的 Session;skill 名称由该 Session 当前的输入触发源解析。两者悬停或聚焦时均使用正文文件链接的虚线下划线。会话、目录和命令标签仍只作为引用展示。
|
|
39
41
|
|
|
40
42
|
<a id="system-prompt-row"></a>
|
|
41
43
|
## Chat 隐藏的行
|
|
@@ -56,7 +58,7 @@ Assistant 尝试结束且没有可见消息时,Chat 隐藏已发布的 Node,
|
|
|
56
58
|
|
|
57
59
|
只有当已加载窗口包含 `turn/start`,且每次已启动的模型尝试都报告安全、精确的用量时,已完成轮次才显示可展开的用量行。该行会省略不可用的可选用量桶。记账不完整或相互矛盾时,整个详情都不显示,避免把部分总量冒充完整结果。
|
|
58
60
|
|
|
59
|
-
设置 → 通用设置 →
|
|
61
|
+
设置 → 通用设置 → 性能与用量位于繁忙时的发送行为之后、Session Log 上传之前,将 `ui-chat.performanceUsage` 保存为 `detailed`(默认)或 `compact`。简洁模式仅在输入框下方显示可用的输出速度和缓存命中率,不显示统计交互卡片或每轮用量。详细模式提供会话统计和每轮 token 用量。两种模式的已完成轮次页脚均不显示耗时。该偏好仅影响展示,记账和 Session 事件保持完整。
|
|
60
62
|
|
|
61
63
|
在非回环地址浏览器中,设置作用域无法持久化写入,因此该偏好仅在当前进程内生效。明确选择会立即更新所有使用方;回环地址浏览器收到 Host 已接受的设置后会同步当前值。
|
|
62
64
|
|
|
@@ -93,12 +95,18 @@ Chat 通过 `uiConversation.groups` 注册过程 Group Definition。React 通过
|
|
|
93
95
|
|
|
94
96
|
过程组使用稳定的 `div` 布局盒子、滚动正文及不限高的内容盒子,后者报告正文内部的内容增长。业务样式必须适配组内及组边界间距,处理隐藏或空成员以及回答前的间距特例。CSS 变量不属于 Group Definition。
|
|
95
97
|
|
|
98
|
+
运行中的分组标题、思考预览、工具与命令行、当前重试行以及底部运行状态使用共享的 [TextShimmer](../ui-primitives/README.zh.md#component-catalog)。每行的文字共用一道从左到右的高光,包括折叠的分组标题;图标和悬停箭头保留底色。工具和过程行之间相隔 6px;展开的分组标题与内容之间相隔 8px;Assistant 回复与相邻过程行之间相隔 12px;每轮完成/耗时控件周围保留 16px。隐藏行与空行(包括保留的空 slot 锚点)不产生间距。“深度求索”运行文字保留蓝色底色,并使用主题专用高光扫过文字。
|
|
99
|
+
|
|
100
|
+
运行状态显示一只鲸鱼,其 APNG 遮罩继承文字颜色。启用减少动态效果或强制颜色模式、或浏览器不支持 alpha 遮罩时,CSS 选择静态 SVG。构建将图片嵌入插件样式表;React 不通过 DOM 样式传递图片数据。
|
|
101
|
+
|
|
96
102
|
滚动边缘渐隐在 `ResizeObserver` 报告已展开组的布局后初始化;展开组时不会在 layout effect 中立即读取滚动尺寸。
|
|
97
103
|
|
|
98
104
|
每个组拥有本地 `useDisclosure` 状态,组件保持挂载时,模式切换保留该状态。
|
|
99
105
|
|
|
100
106
|
Chat 节点 slot 为推理与工具注入绑定重置来源的 `useDisclosure` 钩子。中间 renderer 只透传、不订阅,每次调用拥有独立展开状态。来源回调保留接收对象及稳定引用。外层轮次实际隐藏过程成员时,所在节点重置这些开合状态,不替换组件 key,也不改变钩子引用。展示模式切换保留展开状态。
|
|
101
107
|
|
|
108
|
+
过程行的文字与图标在所有工作过程展示模式下共用一种颜色:默认 tertiary、悬停 secondary,错误与警告文字保留语义色。前置图标、折叠箭头及其容器随正文字号增量缩放。
|
|
109
|
+
|
|
102
110
|
-----
|
|
103
111
|
|
|
104
112
|
<a id="scroll-ownership"></a>
|
|
@@ -153,6 +161,7 @@ Chat 会在历史前插与 renderer 重新挂载时恢复语义锚点,并且
|
|
|
153
161
|
|
|
154
162
|
<a id="known-limitations-and-deferred-work"></a>
|
|
155
163
|
|
|
164
|
+
- **运行图标分辨率**——动态鲸鱼使用 28×28 图片,默认 CSS 尺寸为 14×14。较大的正文字号或大于 2 的设备像素比可能使位图描边变模糊;静态回退图标仍为矢量图。浏览器图片缓存管理动画时钟,因此重新挂载不保证从第一帧重新播放。
|
|
156
165
|
|
|
157
166
|
- **工具变更展示** — `developer-message` Definition 与 `input-message` 共用上下文展示。仅包含工具变更的 developer 消息在单个工具新增或移除时直接显示工具名,不提供展开操作。多个变更显示新增、移除数量,展开后按变更类型分别以逗号分隔显示一行工具列表。混合内容使用通用上下文展示。
|
|
158
167
|
|