@deepseek-ai/dsh-client-ui-tool 0.1.7-rc.2 → 0.2.0-rc.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.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +20 -27
- package/package.json +26 -26
package/README.i18n.yaml
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
en: 5332d87e76037f07
|
|
22
22
|
zh: db5d06e7e46b8429
|
|
23
23
|
/deepseek-ai-dsh-client-ui-tool/use-this-package/built-in-views:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 53bd3369a3b868b0
|
|
25
|
+
zh: 030f281a5bd66c6f
|
|
26
26
|
/deepseek-ai-dsh-client-ui-tool/understand-the-implementation:
|
|
27
27
|
en: 00bc7b0c84edc603
|
|
28
28
|
zh: 1cfcf5b435248a91
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ The owner payload is `ToolCallOwnerProps`: `callId`, `toolName`, the `phase` dis
|
|
|
49
49
|
|
|
50
50
|
Every registered view receives the explicit `preparing`, `start`, and `result` props declared in [the Tool slot types](src/client/contract/slots.ts). Shared rows use the same `ToolRow` in all stages. Their row model selects the title and combines any generic tool-name prefix with the available argument summary independently of lifecycle state. Tool-owned titles omit the English name. The shared argument parser returns no call during preparation and does not parse partial JSON. Write/edit use separate preparing and dispatched components, so only the preparing component invokes `useToolCallArgumentsPartial`; start and result share the dispatched component. Custom renderers such as Bash, Skill, and Cordis handle preparation separately; their argument-dependent components accept `StartedToolCallViewProps`.
|
|
51
51
|
|
|
52
|
-
This package owns the generic fallback and the built-in shell/pwsh, read, read_image, write/edit, running `str_replace_editor` `create`/`str_replace`, grep/glob, web, todo, question, and PTC dispatch presentations. Structured cards derive directly from first-party raw event fields; Host `presentCall` and `presentResult` values never enter the Client. Running and settled foreground standard `bash`/`pwsh` and `terminal_send` calls use terminal cards at the root and in PTC dispatch children, subject to the same argument, result, and error checks. Persistent `bash`/`pwsh` calls use terminal cards only while running. Shell output ending in a recognized spill-policy notice uses expandable generic output in shell rows and generic output in Details; a displaced or omitted exit marker cannot establish success. Settled persistent-shell results stay generic because reset and partial-output diagnostics do not always describe one process exit status; root persistent results are expandable, while background acknowledgements remain collapsed. A native or PTC dispatch failure carrying `AUTO_REVIEW_DENIED` shows the Auto review verdict in its collapsed row and one normalized not-executed reason when expanded; a missing or whitespace-only reason uses localized fallback text. A successful question row pairs call questions with result answers by their stable ids and shows readable question/answer lines when expanded. A cancelled or interrupted row shows its verdict and original questions without inventing answers. Unsupported, malformed, or ambiguous inputs fall back to flattened Tool input/result text. `ui-skill` demonstrates a business-owned registration for `skill`.
|
|
52
|
+
This package owns the generic fallback and the built-in shell/pwsh, read, read_image, write/edit, running `str_replace_editor` `create`/`str_replace`, grep/glob, web, todo, question, and PTC dispatch presentations. Structured cards derive directly from first-party raw event fields; Host `presentCall` and `presentResult` values never enter the Client. Running atomic rows share one left-to-right highlight across their titles, separators, summaries, and suffixes, while settled rows stay static. Running and settled foreground standard `bash`/`pwsh` and `terminal_send` calls use terminal cards at the root and in PTC dispatch children, subject to the same argument, result, and error checks. Persistent `bash`/`pwsh` calls use terminal cards only while running. Shell output ending in a recognized spill-policy notice uses expandable generic output in shell rows and generic output in Details; a displaced or omitted exit marker cannot establish success. Settled persistent-shell results stay generic because reset and partial-output diagnostics do not always describe one process exit status; root persistent results are expandable, while background acknowledgements remain collapsed. A native or PTC dispatch failure carrying `AUTO_REVIEW_DENIED` shows the Auto review verdict in its collapsed row and one normalized not-executed reason when expanded; a missing or whitespace-only reason uses localized fallback text. A successful question row pairs call questions with result answers by their stable ids and shows readable question/answer lines when expanded. A cancelled or interrupted row shows its verdict and original questions without inventing answers. Unsupported, malformed, or ambiguous inputs fall back to flattened Tool input/result text. `ui-skill` demonstrates a business-owned registration for `skill`.
|
|
53
53
|
|
|
54
54
|
-----
|
|
55
55
|
|
package/README.zh.md
CHANGED
|
@@ -49,7 +49,7 @@ owner 载荷为 `ToolCallOwnerProps`:`callId`、`toolName`、`phase` 判别字
|
|
|
49
49
|
|
|
50
50
|
每个注册视图都接收[工具 slot 类型](src/client/contract/slots.ts)声明的显式 `preparing`、`start` 和 `result` props。通用行在三个阶段使用同一个 `ToolRow`。行模型统一选择标题,并组合通用工具名前缀与已有参数摘要,不按生命周期阶段改变前缀;专用标题不附带英文名。准备阶段的共享参数解析入口直接返回无调用,不解析部分 JSON。write/edit 将准备态和派发后阶段拆成两个组件,只有准备态组件调用 `useToolCallArgumentsPartial`,start 与 result 共用派发后组件。Bash、Skill、Cordis 等自定义 renderer 分别处理准备态,其依赖参数的组件接收 `StartedToolCallViewProps`。
|
|
51
51
|
|
|
52
|
-
本包拥有 generic fallback,以及 shell/pwsh、read、read_image、write/edit、运行中的 `str_replace_editor` `create`/`str_replace`、grep/glob、web、todo、question 与 PTC dispatch 的内置展示。结构化卡片直接从第一方原始 event 字段派生;Host `presentCall` 与 `presentResult` 值不会进入 Client
|
|
52
|
+
本包拥有 generic fallback,以及 shell/pwsh、read、read_image、write/edit、运行中的 `str_replace_editor` `create`/`str_replace`、grep/glob、web、todo、question 与 PTC dispatch 的内置展示。结构化卡片直接从第一方原始 event 字段派生;Host `presentCall` 与 `presentResult` 值不会进入 Client。运行中的原子工具行以同一道高光从左到右扫过标题、分隔符、摘要与后缀;已完成行保持静态。运行中与已完成的前台标准 `bash`/`pwsh` 和 `terminal_send` 调用,无论位于根还是 PTC dispatch 子调用中,都在通过相同的参数、结果和错误检查后使用 terminal 卡片。持久 `bash`/`pwsh` 调用仅在运行中使用 terminal 卡片。以已识别的 spill 策略提示结尾的 shell 输出,在 shell 行中使用可展开的 generic 输出,在 Details 中使用 generic 输出;位置被改变或被省略的退出标记无法证明成功。已完成的持久 shell 结果保持 generic 展示,因为 reset 与部分输出诊断不一定描述单个进程的退出状态;根调用的持久 shell 结果可展开,后台启动回执则保持折叠。带有 `AUTO_REVIEW_DENIED` 的原生或 PTC dispatch 失败会在折叠行显示 Auto review 裁决,展开时显示一行归一化后的“未执行”原因;原因缺失或只有空白时使用本地化 fallback 文案。成功的问题行按稳定 id 配对调用中的问题与结果中的回答,展开后显示可读的问答行。已取消或已中断的问题行显示其裁决与原始问题,不虚构回答。不受支持、格式错误或含糊的输入回退为压平的工具输入/结果文本。`ui-skill` 展示了业务包自行拥有的 `skill` 注册项。
|
|
53
53
|
|
|
54
54
|
-----
|
|
55
55
|
|
package/lib/client.js
CHANGED
|
@@ -1551,6 +1551,7 @@ window.__ModuleLoader__.load({
|
|
|
1551
1551
|
const collapsedContent = (0, react.useMemo)(() => summaryText !== "" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1552
1552
|
(0, react_jsx_runtime.jsx)("span", {
|
|
1553
1553
|
className: ToolRow_module_css_default.sep,
|
|
1554
|
+
"data-shimmer-decoration": true,
|
|
1554
1555
|
"aria-hidden": true
|
|
1555
1556
|
}),
|
|
1556
1557
|
openFile !== void 0 ? (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -1558,10 +1559,7 @@ window.__ModuleLoader__.load({
|
|
|
1558
1559
|
className: ToolRow_module_css_default.fileLink,
|
|
1559
1560
|
onClick: openFile,
|
|
1560
1561
|
onKeyDown: summaryLinkKeyDown,
|
|
1561
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1562
|
-
active: running,
|
|
1563
|
-
children: summaryText
|
|
1564
|
-
})
|
|
1562
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1565
1563
|
}) : linkHref !== void 0 ? (0, react_jsx_runtime.jsx)("a", {
|
|
1566
1564
|
className: ToolRow_module_css_default.fileLink,
|
|
1567
1565
|
href: linkHref,
|
|
@@ -1569,20 +1567,13 @@ window.__ModuleLoader__.load({
|
|
|
1569
1567
|
rel: "noopener noreferrer",
|
|
1570
1568
|
onClick: stopLinkClick,
|
|
1571
1569
|
onKeyDown: summaryLinkKeyDown,
|
|
1572
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1573
|
-
active: running,
|
|
1574
|
-
children: summaryText
|
|
1575
|
-
})
|
|
1570
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1576
1571
|
}) : (0, react_jsx_runtime.jsx)("span", {
|
|
1577
1572
|
className: clsx(ToolRow_module_css_default.summary, state === "error" && ToolRow_module_css_default.errorSummary, state === "stopped" && ToolRow_module_css_default.stoppedSummary),
|
|
1578
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1579
|
-
active: running,
|
|
1580
|
-
children: summaryText
|
|
1581
|
-
})
|
|
1573
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1582
1574
|
}),
|
|
1583
1575
|
suffix !== null && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1584
1576
|
className: clsx(ToolRow_module_css_default.summarySuffix, suffix === diffStat && ToolRow_module_css_default.diffStat),
|
|
1585
|
-
active: running,
|
|
1586
1577
|
children: suffix
|
|
1587
1578
|
})
|
|
1588
1579
|
] }), [
|
|
@@ -2240,21 +2231,23 @@ window.__ModuleLoader__.load({
|
|
|
2240
2231
|
className: bash_sample_module_css_default.visuallyHidden,
|
|
2241
2232
|
children: status
|
|
2242
2233
|
}),
|
|
2243
|
-
(0, react_jsx_runtime.
|
|
2244
|
-
className: bash_sample_module_css_default.title,
|
|
2234
|
+
(0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
2245
2235
|
active: running,
|
|
2246
|
-
children:
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2236
|
+
children: [
|
|
2237
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
2238
|
+
className: bash_sample_module_css_default.title,
|
|
2239
|
+
children: t(model.titleKey)
|
|
2240
|
+
}),
|
|
2241
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
2242
|
+
className: bash_sample_module_css_default.sep,
|
|
2243
|
+
"data-shimmer-decoration": true,
|
|
2244
|
+
"aria-hidden": true
|
|
2245
|
+
}),
|
|
2246
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
2247
|
+
className: clsx(bash_sample_module_css_default.summary, state === "error" && bash_sample_module_css_default.errorSummary, state === "stopped" && bash_sample_module_css_default.stoppedSummary),
|
|
2248
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: settlementLine ?? normalSummary })
|
|
2249
|
+
})
|
|
2250
|
+
]
|
|
2258
2251
|
})
|
|
2259
2252
|
]
|
|
2260
2253
|
}), open && (0, react_jsx_runtime.jsxs)("div", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-tool",
|
|
3
3
|
"description": "Client Tool call-tree renderer and keyed per-tool presentation slot",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-rc.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -46,32 +46,32 @@
|
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-dom": "^18.2.0",
|
|
48
48
|
"clsx": "^2.0.0",
|
|
49
|
-
"@deepseek-ai/dsh-spill-policy": "0.
|
|
50
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
51
|
-
"@deepseek-ai/dsh-llm": "0.
|
|
52
|
-
"@deepseek-ai/dsh-session": "0.
|
|
53
|
-
"@deepseek-ai/dsh-system-prompt": "0.
|
|
54
|
-
"@deepseek-ai/dsh-tools": "0.
|
|
55
|
-
"@deepseek-ai/dsh-tool-jobs": "0.
|
|
56
|
-
"@deepseek-ai/dsh-tool-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-spill": "0.1.7-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-spill-policy": "0.2.0-rc.1",
|
|
50
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.1",
|
|
51
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.1",
|
|
52
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-tool-terminal": "0.2.0-rc.1",
|
|
57
|
+
"@deepseek-ai/dsh-spill": "0.2.0-rc.1",
|
|
59
58
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
60
|
-
"@deepseek-ai/dsh-api-remotes": "0.
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-client-locale": "0.
|
|
63
|
-
"@deepseek-ai/dsh-client-test-runtime": "0.
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
59
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.0-rc.1",
|
|
60
|
+
"@deepseek-ai/dsh-tool-session-query": "0.2.0-rc.1",
|
|
61
|
+
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.1",
|
|
62
|
+
"@deepseek-ai/dsh-client-test-runtime": "0.2.0-rc.1",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.1",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1",
|
|
65
|
+
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.1",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.0-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.0-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.0-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-token-meter": "0.2.0-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.1"
|
|
75
75
|
},
|
|
76
76
|
"files": [
|
|
77
77
|
"lib/index.js",
|