@deepseek-ai/dsh-client-ui-tool 0.1.7-rc.1 → 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 +48 -5
- package/README.md +3 -2
- package/README.zh.md +3 -2
- package/lib/client.js +119 -35
- package/lib/types/client/tool/components/ToolRow.d.ts +3 -1
- package/lib/types/client/tool/models/web-card-model.d.ts +6 -0
- package/package.json +26 -26
package/README.i18n.yaml
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
# Bilingual-pair consistency record (docs/i18n/README.md):
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-tool/README.md
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/:
|
|
6
|
+
en: d5ef8fa5a5ebfbc2
|
|
7
|
+
zh: 9870b3f207a248cc
|
|
8
|
+
/deepseek-ai-dsh-client-ui-tool:
|
|
9
|
+
en: 03bfcfbf7f1cea76
|
|
10
|
+
zh: 142abbf07affee63
|
|
11
|
+
/deepseek-ai-dsh-client-ui-tool/summary:
|
|
12
|
+
en: e7ef510d1764f9b2
|
|
13
|
+
zh: 236bc66607211f0f
|
|
14
|
+
/deepseek-ai-dsh-client-ui-tool/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: 09388d293f9be9cb
|
|
17
|
+
/deepseek-ai-dsh-client-ui-tool/use-this-package:
|
|
18
|
+
en: be2bc859e0d64fe5
|
|
19
|
+
zh: d51a35fb36675dd3
|
|
20
|
+
/deepseek-ai-dsh-client-ui-tool/use-this-package/registering-a-business-tool-view:
|
|
21
|
+
en: 5332d87e76037f07
|
|
22
|
+
zh: db5d06e7e46b8429
|
|
23
|
+
/deepseek-ai-dsh-client-ui-tool/use-this-package/built-in-views:
|
|
24
|
+
en: 53bd3369a3b868b0
|
|
25
|
+
zh: 030f281a5bd66c6f
|
|
26
|
+
/deepseek-ai-dsh-client-ui-tool/understand-the-implementation:
|
|
27
|
+
en: 00bc7b0c84edc603
|
|
28
|
+
zh: 1cfcf5b435248a91
|
|
29
|
+
/deepseek-ai-dsh-client-ui-tool/understand-the-implementation/rendering-contract:
|
|
30
|
+
en: 2959b10b01e08a7b
|
|
31
|
+
zh: 7084ca22650cbb5b
|
|
32
|
+
/deepseek-ai-dsh-client-ui-tool/understand-the-implementation/cards:
|
|
33
|
+
en: 401a0118de2dba33
|
|
34
|
+
zh: 9efe590dd485c336
|
|
35
|
+
/deepseek-ai-dsh-client-ui-tool/further-exploration:
|
|
36
|
+
en: 886059e6bd594ebf
|
|
37
|
+
zh: 94cfe8d0a789f413
|
|
38
|
+
/deepseek-ai-dsh-client-ui-tool/model-experience:
|
|
39
|
+
en: 1e5e72dd269855d5
|
|
40
|
+
zh: 81a4756d460e3af9
|
|
41
|
+
/deepseek-ai-dsh-client-ui-tool/model-experience/kv-cache-effect:
|
|
42
|
+
en: ca75c51c89c2c9b0
|
|
43
|
+
zh: de54f3467ef3b9be
|
|
44
|
+
/deepseek-ai-dsh-client-ui-tool/known-limitations-and-deferred-work:
|
|
45
|
+
en: 7475317a656f1d11
|
|
46
|
+
zh: 787f10cc0f2c586e
|
|
47
|
+
/deepseek-ai-dsh-client-ui-tool/known-limitations-and-deferred-work/dev-note:
|
|
48
|
+
en: 0fdeab2e4db0261f
|
|
49
|
+
zh: 156d2b2952cf112e
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
Tool calls appear in the conversation as cards: a root call tree with its nested subcalls, each atomic call rendered by its owning view. Every lifecycle state retains the tool's ordinary business glyph; failure and interruption remain explicit through the frozen call/result state, accessible status text, and failure summary. Users can open files or inspect calls through the Host callbacks.
|
|
28
|
+
Tool calls appear in the conversation as cards: a root call tree with its nested subcalls, each atomic call rendered by its owning view. Every lifecycle state retains the tool's ordinary business glyph; failure and interruption remain explicit through the frozen call/result state, accessible status text, and failure summary. Users can open files or inspect calls through the Host callbacks. A collapsed `web_fetch` row links its http(s) URL, which opens in a new browser tab.
|
|
29
29
|
|
|
30
30
|
Shared Tool rows and Bash rows retain error and warning colors for failed and stopped summaries, including on hover. Hover darkens only summaries without those states.
|
|
31
31
|
|
|
@@ -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
|
|
|
@@ -120,6 +120,7 @@ These limits define the dispatch depth and the view ownership; they are current
|
|
|
120
120
|
|
|
121
121
|
- **The Host excludes `run_code` from PTC mode program bindings** — production events produce one dispatch level; the recursive Runtime/UI contract supports nesting.
|
|
122
122
|
- **First-party Tool views are colocated here** — they can move to their owning business packages independently through the keyed slot.
|
|
123
|
+
- **Web tool links always open a new tab** — the collapsed `web_fetch` URL and the expanded web card links ignore the `ui-chat` link-opening setting because Tool views receive no external-link callback.
|
|
123
124
|
- **Tool copy reuses the `ui-conversation` locale namespace** — tool titles, row chrome, and Cordis-free primitive labels use that dictionary; presenter models retain locale keys or data rather than rendered wording.
|
|
124
125
|
|
|
125
126
|
<a id="dev-note"></a>
|
package/README.zh.md
CHANGED
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
工具调用在对话中显示为卡片:一个根调用树带其嵌套子调用,每个原子调用由所属视图渲染。所有生命周期状态都保留工具的普通业务图标;失败与中断仍通过冻结调用/结果状态、无障碍状态文本和失败摘要明确表达。用户可通过宿主回调打开文件或检查调用。折叠的 `web_fetch` 行把其 http(s) URL 显示为链接,在新浏览器标签页中打开。
|
|
29
29
|
|
|
30
30
|
共享工具行和 Bash 行的失败、停止摘要在悬停时仍保留错误色和警告色;只有不处于这两种状态的摘要会在悬停时加深。
|
|
31
31
|
|
|
@@ -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
|
|
|
@@ -120,6 +120,7 @@ terminal model 使用浏览器安全入口 `@deepseek-ai/dsh-spill-policy/notice
|
|
|
120
120
|
|
|
121
121
|
- **Host 不把 `run_code` 暴露为 PTC mode 程序 binding**:生产事件只产生一层分发;递归的运行时/UI 约定支持嵌套。
|
|
122
122
|
- **第一方工具视图集中在本包**:它们可以通过 keyed slot 独立迁移到各自所属的业务包。
|
|
123
|
+
- **Web 工具链接总是打开新标签页**:折叠的 `web_fetch` URL 与展开的 web 卡片链接不遵循 `ui-chat` 的链接打开方式设置,因为工具视图没有外部链接回调。
|
|
123
124
|
- **工具文案复用 `ui-conversation` locale namespace**:工具标题、行 chrome 与无 Cordis 的 primitive label 使用该字典;展示转换器模型保留 locale key 或数据,而不是已渲染文案。
|
|
124
125
|
|
|
125
126
|
<a id="dev-note"></a>
|
package/lib/client.js
CHANGED
|
@@ -115,6 +115,7 @@ window.__ModuleLoader__.load({
|
|
|
115
115
|
schedule_create: "tool.title.createSchedule",
|
|
116
116
|
schedule_list: "tool.title.listSchedules",
|
|
117
117
|
schedule_delete: "tool.title.deleteSchedule",
|
|
118
|
+
schedule_update: "tool.title.updateSchedule",
|
|
118
119
|
cordis_inspect_list: "tool.title.inspectProviders",
|
|
119
120
|
cordis_inspect_query: "tool.title.queryRuntime",
|
|
120
121
|
cordis_inspect_self: "tool.title.inspectPlugins",
|
|
@@ -1030,6 +1031,22 @@ window.__ModuleLoader__.load({
|
|
|
1030
1031
|
truncated: meta.truncated
|
|
1031
1032
|
};
|
|
1032
1033
|
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Read the openable URL of a web_fetch call from its arguments.
|
|
1036
|
+
* @param block - running or settled Tool block.
|
|
1037
|
+
* @returns the http(s) URL, or undefined for another tool, protocol, or unparsable argument.
|
|
1038
|
+
*/
|
|
1039
|
+
function webFetchHref(block) {
|
|
1040
|
+
const call = parsedToolCall(block);
|
|
1041
|
+
if (call?.name !== "web_fetch" || typeof call.args.url !== "string") return void 0;
|
|
1042
|
+
const { url } = call.args;
|
|
1043
|
+
try {
|
|
1044
|
+
const { protocol } = new URL(url);
|
|
1045
|
+
return protocol === "http:" || protocol === "https:" ? url : void 0;
|
|
1046
|
+
} catch {
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1033
1050
|
//#endregion
|
|
1034
1051
|
//#region lib/types/client/tool/models/auto-review-denial.js
|
|
1035
1052
|
/**
|
|
@@ -1177,7 +1194,7 @@ window.__ModuleLoader__.load({
|
|
|
1177
1194
|
}
|
|
1178
1195
|
//#endregion
|
|
1179
1196
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/AskQuestionCard.module.css.mjs
|
|
1180
|
-
const css$4 = ".fsXYAq_card{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);
|
|
1197
|
+
const css$4 = ".fsXYAq_card{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-base);flex-direction:column;gap:16px;max-height:360px;margin:4px 0 4px 4px;padding:16px 20px;display:flex;overflow-y:auto}.fsXYAq_item{flex-direction:column;gap:2px;min-width:0;display:flex}.fsXYAq_question,.fsXYAq_answer{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));margin:0}.fsXYAq_question{color:var(--dsw-alias-label-tertiary)}.fsXYAq_answer{color:var(--dsw-alias-label-primary)}.fsXYAq_answerLine{display:block}.fsXYAq_skipped{color:var(--dsw-alias-label-tertiary)}.fsXYAq_verdict{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));margin:0}.fsXYAq_questionList{flex-direction:column;gap:8px;margin:0;padding-left:20px;display:flex}.fsXYAq_unansweredQuestion{color:var(--dsw-alias-label-tertiary);white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px))}";
|
|
1181
1198
|
const tagId$4 = "@deepseek-ai/dsh-client-ui-tool/AskQuestionCard.module.css";
|
|
1182
1199
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
1183
1200
|
const tag = document.createElement("style");
|
|
@@ -1240,7 +1257,7 @@ window.__ModuleLoader__.load({
|
|
|
1240
1257
|
}
|
|
1241
1258
|
//#endregion
|
|
1242
1259
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/ToolDetails.module.css.mjs
|
|
1243
|
-
const css$3 = ".DXqwVW_root{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);
|
|
1260
|
+
const css$3 = ".DXqwVW_root{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:4px 0 4px 4px;overflow:hidden}.DXqwVW_list{max-height:320px;margin:0;padding:0;list-style:none;overflow-y:auto}.DXqwVW_item,.DXqwVW_empty{margin:0;padding:10px 14px}.DXqwVW_item+.DXqwVW_item{border-top:.5px solid var(--dsw-alias-border-l2)}.DXqwVW_root[data-inspect]:not([data-caption])>.DXqwVW_list>.DXqwVW_item,.DXqwVW_root[data-inspect]:not([data-caption]) .DXqwVW_empty,.DXqwVW_root[data-inspect] .DXqwVW_caption{padding-inline-end:88px}.DXqwVW_caption{color:var(--dsw-alias-label-caption);padding:10px 14px 6px;font-size:12px}.DXqwVW_heading{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.DXqwVW_text{white-space:pre-wrap;overflow-wrap:anywhere;flex:1;min-width:0}.DXqwVW_status{flex:none;justify-content:center;align-self:flex-start;align-items:center;width:14px;height:18px;font-size:16px;line-height:18px;display:inline-flex}.DXqwVW_pending{box-sizing:border-box;border:1px solid var(--dsw-alias-label-tertiary);border-radius:2px;width:10px;height:10px}.DXqwVW_heading:has(.DXqwVW_statusText) .DXqwVW_text{flex-basis:12em}.DXqwVW_statusText{color:var(--dsw-alias-label-caption);white-space:nowrap;margin-inline-start:auto;font-size:12px}.DXqwVW_previous,.DXqwVW_unchanged{color:var(--dsw-alias-label-tertiary)}.DXqwVW_item[data-change=added] .DXqwVW_status{color:var(--dsw-alias-state-success-primary)}.DXqwVW_item[data-change=removed] .DXqwVW_status{color:var(--dsw-alias-state-error-primary)}.DXqwVW_item[data-change=removed] .DXqwVW_text{color:var(--dsw-alias-label-tertiary);text-decoration:line-through}.DXqwVW_unchanged{border-top:.5px solid var(--dsw-alias-border-l2)}.DXqwVW_unchanged summary{cursor:pointer;align-items:center;gap:6px;padding:9px 14px;list-style:none;display:flex}.DXqwVW_unchanged summary::-webkit-details-marker{display:none}.DXqwVW_unchanged[open] summary svg{transform:rotate(90deg)}.DXqwVW_fields{margin:0}.DXqwVW_heading+.DXqwVW_fields{margin-top:6px}.DXqwVW_field{grid-template-columns:5.5em minmax(0,1fr);gap:12px;display:grid}.DXqwVW_field+.DXqwVW_field{margin-top:4px}.DXqwVW_field dt{color:var(--dsw-alias-label-caption)}.DXqwVW_field dd{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.DXqwVW_badge{color:var(--dsw-alias-label-caption);flex:none;align-items:center;gap:5px;font-size:12px;display:inline-flex}.DXqwVW_badge:before{content:\"\";corner-shape:round;background:currentColor;border-radius:50%;width:5px;height:5px}.DXqwVW_badge[data-tone=info]{color:var(--dsw-alias-state-business-primary)}.DXqwVW_badge[data-tone=success]{color:var(--dsw-alias-state-success-primary)}.DXqwVW_badge[data-tone=warning]{color:var(--dsw-alias-state-warn-primary)}.DXqwVW_badge[data-tone=error]{color:var(--dsw-alias-state-error-primary)}.DXqwVW_subtitle{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin-top:3px;font-size:12px}.DXqwVW_description{color:var(--dsw-alias-label-caption);white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}.DXqwVW_lines{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0;padding-inline-start:18px}.DXqwVW_lines li+li{margin-top:4px}.DXqwVW_group{border-top:.5px solid var(--dsw-alias-border-l2);margin-top:8px}.DXqwVW_group>summary{color:var(--dsw-alias-label-caption);cursor:pointer;overflow-wrap:anywhere;align-items:center;gap:6px;padding:8px 0 0;list-style:none;display:flex}.DXqwVW_group>summary::-webkit-details-marker{display:none}.DXqwVW_group[open]>summary svg{transform:rotate(90deg)}.DXqwVW_group>summary svg{flex:none}.DXqwVW_group .DXqwVW_list{max-height:none;overflow:visible}.DXqwVW_group .DXqwVW_item{padding:9px 0 2px 20px}.DXqwVW_prose,.DXqwVW_code{max-width:100%;font-size:13px}.DXqwVW_prose{margin-top:8px}.DXqwVW_root .DXqwVW_item>.DXqwVW_code{max-height:240px;margin:8px 0 0;overflow:auto}.DXqwVW_root .DXqwVW_item:has(>.DXqwVW_code:only-child){padding:0}.DXqwVW_root .DXqwVW_item>.DXqwVW_code:only-child{margin:0}.DXqwVW_root .DXqwVW_group .DXqwVW_item:has(>.DXqwVW_code:only-child){padding:4px 0 0 20px}.DXqwVW_path{min-width:0;color:inherit;font:inherit;text-align:start;overflow-wrap:anywhere;cursor:pointer;background:0 0;border:none;flex:1;padding:0}.DXqwVW_path:hover{text-decoration:underline}.DXqwVW_path:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:3px}";
|
|
1244
1261
|
const tagId$3 = "@deepseek-ai/dsh-client-ui-tool/ToolDetails.module.css";
|
|
1245
1262
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
1246
1263
|
const tag = document.createElement("style");
|
|
@@ -1414,7 +1431,7 @@ window.__ModuleLoader__.load({
|
|
|
1414
1431
|
}
|
|
1415
1432
|
//#endregion
|
|
1416
1433
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css.mjs
|
|
1417
|
-
const css$2 = ".o3BgMG_root{flex-direction:column;display:flex}.o3BgMG_leading{flex-shrink:0}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_leading,.o3BgMG_root[data-tool^=cordis_] .o3BgMG_title{color:var(--dsw-alias-state-business-primary)}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_title{font-weight:500}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_sep{background:var(--dsw-alias-state-business-primary)}.o3BgMG_chevron{color:var(--dsw-alias-label-secondary)}.o3BgMG_title{font-weight:400;transition:color .1s}.o3BgMG_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.o3BgMG_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:auto;transition:color .1s;overflow:hidden}.o3BgMG_summarySuffix{white-space:nowrap;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:none;margin-left:4px;transition:color .1s}.o3BgMG_row:hover .o3BgMG_title,.o3BgMG_row:hover .o3BgMG_summary:not(.o3BgMG_errorSummary):not(.o3BgMG_stoppedSummary),.o3BgMG_row:hover .o3BgMG_summarySuffix{color:var(--dsw-alias-label-primary)}.o3BgMG_diffStat{font-family:var(--ds-font-family-code);font-size:calc(var(--dsh-content-font-size-secondary,13px) - 2px);color:var(--dsw-alias-label-caption);margin-left:10px;transform:translateY(.5px)}.o3BgMG_fileLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:inherit;text-align:left;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-secondary);text-decoration:underline dotted;text-decoration-color:var(--dsw-alias-label-tertiary);text-underline-offset:3px;cursor:pointer;background:0 0;border:none;flex:0 auto;margin:0;padding:0;text-decoration-thickness:1px;transition:color .1s;overflow:hidden}.o3BgMG_row:hover .o3BgMG_fileLink,.o3BgMG_fileLink:hover{color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}.o3BgMG_errorSummary{color:var(--dsw-alias-state-error-primary)}.o3BgMG_stoppedSummary{color:var(--dsw-alias-state-warn-label)}.o3BgMG_bodyWrap{flex-direction:column;display:flex}.o3BgMG_inspectButton{border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.o3BgMG_root:hover .o3BgMG_inspectButton,.o3BgMG_inspectButton:focus-visible{opacity:1}.o3BgMG_detailsBodyWrap{position:relative}.o3BgMG_detailsBodyWrap .o3BgMG_inspectButton{margin:0;position:absolute;top:12px;right:12px}.o3BgMG_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.o3BgMG_bodyScroll{max-height:260px;overflow-y:auto}.o3BgMG_ioCard{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);
|
|
1434
|
+
const css$2 = ".o3BgMG_root{flex-direction:column;display:flex}.o3BgMG_leading{flex-shrink:0}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_leading,.o3BgMG_root[data-tool^=cordis_] .o3BgMG_title{color:var(--dsw-alias-state-business-primary)}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_title{font-weight:500}.o3BgMG_root[data-tool^=cordis_] .o3BgMG_sep{background:var(--dsw-alias-state-business-primary)}.o3BgMG_chevron{color:var(--dsw-alias-label-secondary)}.o3BgMG_title{font-weight:400;transition:color .1s}.o3BgMG_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.o3BgMG_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:auto;transition:color .1s;overflow:hidden}.o3BgMG_summarySuffix{white-space:nowrap;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:none;margin-left:4px;transition:color .1s}.o3BgMG_row:hover .o3BgMG_title,.o3BgMG_row:hover .o3BgMG_summary:not(.o3BgMG_errorSummary):not(.o3BgMG_stoppedSummary),.o3BgMG_row:hover .o3BgMG_summarySuffix{color:var(--dsw-alias-label-primary)}.o3BgMG_diffStat{font-family:var(--ds-font-family-code);font-size:calc(var(--dsh-content-font-size-secondary,13px) - 2px);color:var(--dsw-alias-label-caption);margin-left:10px;transform:translateY(.5px)}.o3BgMG_fileLink{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:inherit;text-align:left;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-secondary);text-decoration:underline dotted;text-decoration-color:var(--dsw-alias-label-tertiary);text-underline-offset:3px;cursor:pointer;background:0 0;border:none;flex:0 auto;margin:0;padding:0;text-decoration-thickness:1px;transition:color .1s;overflow:hidden}.o3BgMG_row:hover .o3BgMG_fileLink,.o3BgMG_fileLink:hover{color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}.o3BgMG_errorSummary{color:var(--dsw-alias-state-error-primary)}.o3BgMG_stoppedSummary{color:var(--dsw-alias-state-warn-label)}.o3BgMG_bodyWrap{flex-direction:column;display:flex}.o3BgMG_inspectButton{border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.o3BgMG_root:hover .o3BgMG_inspectButton,.o3BgMG_inspectButton:focus-visible{opacity:1}.o3BgMG_detailsBodyWrap{position:relative}.o3BgMG_detailsBodyWrap .o3BgMG_inspectButton{margin:0;position:absolute;top:12px;right:12px}.o3BgMG_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.o3BgMG_bodyScroll{max-height:260px;overflow-y:auto}.o3BgMG_ioCard{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);flex-direction:column;margin:4px 0 4px 4px;display:flex}.o3BgMG_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.o3BgMG_ioSection::-webkit-scrollbar-thumb{border-radius:var(--dsw-radius-sm);background-clip:padding-box;border:2px solid #0000}.o3BgMG_ioSection::-webkit-scrollbar-track{margin:6px 0}.o3BgMG_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.o3BgMG_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:.5px}.o3BgMG_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.o3BgMG_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.o3BgMG_codeBody,.o3BgMG_terminalBody,.o3BgMG_diffBody,.o3BgMG_readBody,.o3BgMG_imageBody,.o3BgMG_searchBody,.o3BgMG_webBody{margin:4px 0 4px 4px}.o3BgMG_searchRecovery{white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary);margin:4px 0 4px 4px}.o3BgMG_imageLabel{overflow-wrap:anywhere;font:var(--dsw-font-sm-13);color:var(--dsw-alias-label-secondary);margin-bottom:4px}.o3BgMG_imageMeta{white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary)}.o3BgMG_terminalBody{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:.5px solid var(--dsw-alias-border-l1)}.o3BgMG_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
1418
1435
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-tool/ToolRow.module.css";
|
|
1419
1436
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
1420
1437
|
const tag = document.createElement("style");
|
|
@@ -1459,6 +1476,10 @@ window.__ModuleLoader__.load({
|
|
|
1459
1476
|
};
|
|
1460
1477
|
//#endregion
|
|
1461
1478
|
//#region lib/types/client/tool/components/ToolRow.js
|
|
1479
|
+
/** Keep a summary link click from toggling the row; the browser still follows the link. */
|
|
1480
|
+
function stopLinkClick(event) {
|
|
1481
|
+
event.stopPropagation();
|
|
1482
|
+
}
|
|
1462
1483
|
/** Visually hidden run-state label for color-only running and settlement cues. */
|
|
1463
1484
|
function stateStatus$1(state, t) {
|
|
1464
1485
|
switch (state) {
|
|
@@ -1475,7 +1496,7 @@ window.__ModuleLoader__.load({
|
|
|
1475
1496
|
* @param props - tool state, summary, output, and navigation callbacks.
|
|
1476
1497
|
* @returns the tool disclosure.
|
|
1477
1498
|
*/
|
|
1478
|
-
const ToolRow = (0, react.memo)(function ToolRow({ t, variant, toolName, icon, title, summary, summarySuffix, bodyRaw, output, askQuestion, errorSummary, terminal, diff, read, image, renderSlot, loadImage, search, web, details, state, filePath, filePathLine, onOpenFile, inspect, useDisclosure }) {
|
|
1499
|
+
const ToolRow = (0, react.memo)(function ToolRow({ t, variant, toolName, icon, title, summary, summarySuffix, bodyRaw, output, askQuestion, errorSummary, terminal, diff, read, image, renderSlot, loadImage, search, web, details, state, filePath, filePathLine, onOpenFile, href, inspect, useDisclosure }) {
|
|
1479
1500
|
const { expanded, toggle: toggleExpand } = useDisclosure();
|
|
1480
1501
|
const terminalLabels = (0, react.useMemo)(() => terminalBlockLabels(t), [t]);
|
|
1481
1502
|
const diffLabels = (0, react.useMemo)(() => diffBlockLabels(t), [t]);
|
|
@@ -1522,39 +1543,43 @@ window.__ModuleLoader__.load({
|
|
|
1522
1543
|
onOpenFile,
|
|
1523
1544
|
settledWithCue
|
|
1524
1545
|
]);
|
|
1525
|
-
const
|
|
1546
|
+
const linkHref = settledWithCue ? void 0 : href;
|
|
1547
|
+
const summaryLinkKeyDown = (0, react.useCallback)((event) => {
|
|
1526
1548
|
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
1527
1549
|
}, []);
|
|
1528
1550
|
const cardBody = variant === "code" ? null : bodyText;
|
|
1529
1551
|
const collapsedContent = (0, react.useMemo)(() => summaryText !== "" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1530
1552
|
(0, react_jsx_runtime.jsx)("span", {
|
|
1531
1553
|
className: ToolRow_module_css_default.sep,
|
|
1554
|
+
"data-shimmer-decoration": true,
|
|
1532
1555
|
"aria-hidden": true
|
|
1533
1556
|
}),
|
|
1534
1557
|
openFile !== void 0 ? (0, react_jsx_runtime.jsx)("button", {
|
|
1535
1558
|
type: "button",
|
|
1536
1559
|
className: ToolRow_module_css_default.fileLink,
|
|
1537
1560
|
onClick: openFile,
|
|
1538
|
-
onKeyDown:
|
|
1539
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1561
|
+
onKeyDown: summaryLinkKeyDown,
|
|
1562
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1563
|
+
}) : linkHref !== void 0 ? (0, react_jsx_runtime.jsx)("a", {
|
|
1564
|
+
className: ToolRow_module_css_default.fileLink,
|
|
1565
|
+
href: linkHref,
|
|
1566
|
+
target: "_blank",
|
|
1567
|
+
rel: "noopener noreferrer",
|
|
1568
|
+
onClick: stopLinkClick,
|
|
1569
|
+
onKeyDown: summaryLinkKeyDown,
|
|
1570
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1543
1571
|
}) : (0, react_jsx_runtime.jsx)("span", {
|
|
1544
1572
|
className: clsx(ToolRow_module_css_default.summary, state === "error" && ToolRow_module_css_default.errorSummary, state === "stopped" && ToolRow_module_css_default.stoppedSummary),
|
|
1545
|
-
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1546
|
-
active: running,
|
|
1547
|
-
children: summaryText
|
|
1548
|
-
})
|
|
1573
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summaryText })
|
|
1549
1574
|
}),
|
|
1550
1575
|
suffix !== null && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1551
1576
|
className: clsx(ToolRow_module_css_default.summarySuffix, suffix === diffStat && ToolRow_module_css_default.diffStat),
|
|
1552
|
-
active: running,
|
|
1553
1577
|
children: suffix
|
|
1554
1578
|
})
|
|
1555
1579
|
] }), [
|
|
1556
1580
|
diffStat,
|
|
1557
|
-
|
|
1581
|
+
summaryLinkKeyDown,
|
|
1582
|
+
linkHref,
|
|
1558
1583
|
openFile,
|
|
1559
1584
|
running,
|
|
1560
1585
|
state,
|
|
@@ -1756,7 +1781,7 @@ window.__ModuleLoader__.load({
|
|
|
1756
1781
|
}
|
|
1757
1782
|
//#endregion
|
|
1758
1783
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/ToolCallTree.module.css.mjs
|
|
1759
|
-
const css$1 = ".ztWv_q_callRow{border-radius:
|
|
1784
|
+
const css$1 = ".ztWv_q_callRow{border-radius:var(--dsw-radius-sm)}.ztWv_q_subCalls{border-left:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:4px;margin:4px 0 2px 22px;padding-left:8px;display:flex}";
|
|
1760
1785
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-tool/ToolCallTree.module.css";
|
|
1761
1786
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
1762
1787
|
const tag = document.createElement("style");
|
|
@@ -2098,7 +2123,7 @@ window.__ModuleLoader__.load({
|
|
|
2098
2123
|
}
|
|
2099
2124
|
//#endregion
|
|
2100
2125
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css.mjs
|
|
2101
|
-
const css = ".CY-8Ka_card{flex-direction:column;display:flex}.CY-8Ka_terminal{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:.5px solid var(--dsw-alias-border-l1);margin:4px 0 4px 4px}.CY-8Ka_ioCard{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);
|
|
2126
|
+
const css = ".CY-8Ka_card{flex-direction:column;display:flex}.CY-8Ka_terminal{--dsl-terminal-font:var(--dsw-font-markdown-code-block-small);--dsl-terminal-line-height:18px;--dsl-terminal-output-max-height:224px;border:.5px solid var(--dsw-alias-border-l1);margin:4px 0 4px 4px}.CY-8Ka_ioCard{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);font:var(--dsw-font-markdown-code-block-small);flex-direction:column;margin:4px 0 4px 4px;display:flex}.CY-8Ka_ioSection{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:14px;max-height:150px;padding:12px 16px;display:grid;overflow-y:auto}.CY-8Ka_ioSection::-webkit-scrollbar-thumb{border-radius:var(--dsw-radius-sm);background-clip:padding-box;border:2px solid #0000}.CY-8Ka_ioSection::-webkit-scrollbar-track{margin:6px 0}.CY-8Ka_ioLabel{color:var(--dsw-alias-label-caption);align-self:start;position:sticky;top:0}.CY-8Ka_ioDivider{background:var(--dsw-alias-border-l2);flex:none;height:.5px}.CY-8Ka_ioText{white-space:pre-wrap;word-break:break-word;min-width:0;color:var(--dsw-alias-label-secondary)}.CY-8Ka_ioText[data-error]{color:var(--dsw-alias-state-error-primary)}.CY-8Ka_root[data-expandable]{cursor:pointer}.CY-8Ka_root{height:calc(24px + var(--dsh-content-font-delta,0px));align-items:center;min-width:0;display:flex}.CY-8Ka_leading{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex;position:relative}.CY-8Ka_leading svg:not([data-state]){width:calc(14px + var(--dsh-content-font-delta,0px));height:calc(14px + var(--dsh-content-font-delta,0px))}.CY-8Ka_chevron{color:var(--dsw-alias-label-secondary)}.CY-8Ka_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}.CY-8Ka_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}.CY-8Ka_root:hover .CY-8Ka_iconIdle{opacity:0}.CY-8Ka_root:hover .CY-8Ka_chevronHover{opacity:1}.CY-8Ka_title{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-secondary);flex:none;transition:color .1s}.CY-8Ka_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.CY-8Ka_summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:auto;transition:color .1s;overflow:hidden}.CY-8Ka_root:hover .CY-8Ka_title,.CY-8Ka_root:hover .CY-8Ka_summary:not(.CY-8Ka_errorSummary):not(.CY-8Ka_stoppedSummary){color:var(--dsw-alias-label-primary)}.CY-8Ka_errorSummary{color:var(--dsw-alias-state-error-primary)}.CY-8Ka_stoppedSummary{color:var(--dsw-alias-state-warn-label)}.CY-8Ka_bodyWrap{flex-direction:column;display:flex}.CY-8Ka_inspectButton{border:.5px solid var(--dsw-alias-border-l4);corner-shape:round;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.CY-8Ka_card:hover .CY-8Ka_inspectButton,.CY-8Ka_inspectButton:focus-visible{opacity:1}.CY-8Ka_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.CY-8Ka_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
2102
2127
|
const tagId = "@deepseek-ai/dsh-client-ui-tool/bash-sample.module.css";
|
|
2103
2128
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
2104
2129
|
const tag = document.createElement("style");
|
|
@@ -2206,21 +2231,23 @@ window.__ModuleLoader__.load({
|
|
|
2206
2231
|
className: bash_sample_module_css_default.visuallyHidden,
|
|
2207
2232
|
children: status
|
|
2208
2233
|
}),
|
|
2209
|
-
(0, react_jsx_runtime.
|
|
2210
|
-
className: bash_sample_module_css_default.title,
|
|
2234
|
+
(0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
2211
2235
|
active: running,
|
|
2212
|
-
children:
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
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
|
+
]
|
|
2224
2251
|
})
|
|
2225
2252
|
]
|
|
2226
2253
|
}), open && (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3548,14 +3575,40 @@ window.__ModuleLoader__.load({
|
|
|
3548
3575
|
fields
|
|
3549
3576
|
}] };
|
|
3550
3577
|
}
|
|
3578
|
+
/** ISO-weekday keys, Monday first: a stored weekly rule names days 1 through 7. */
|
|
3579
|
+
const WEEKDAY_KEYS = [
|
|
3580
|
+
"detail.weekday.1",
|
|
3581
|
+
"detail.weekday.2",
|
|
3582
|
+
"detail.weekday.3",
|
|
3583
|
+
"detail.weekday.4",
|
|
3584
|
+
"detail.weekday.5",
|
|
3585
|
+
"detail.weekday.6",
|
|
3586
|
+
"detail.weekday.7"
|
|
3587
|
+
];
|
|
3551
3588
|
function interval(seconds, t) {
|
|
3552
3589
|
if (seconds % 86400 === 0) return t("detail.days", { count: seconds / 86400 });
|
|
3553
3590
|
if (seconds % 3600 === 0) return t("detail.hours", { count: seconds / 3600 });
|
|
3554
3591
|
if (seconds % 60 === 0) return t("detail.minutes", { count: seconds / 60 });
|
|
3555
3592
|
return t("detail.seconds", { count: seconds });
|
|
3556
3593
|
}
|
|
3594
|
+
/** A stored wall clock without its zero seconds, the figure the schedule surfaces state. */
|
|
3595
|
+
function shortTime(time) {
|
|
3596
|
+
return time.replace(/:00\.000$/, "").replace(/\.000$/, "");
|
|
3597
|
+
}
|
|
3598
|
+
/** Localized weekday list of a stored weekly rule, or undefined when the set is empty or out of range. */
|
|
3599
|
+
function weekdayText(days, t) {
|
|
3600
|
+
if (!Array.isArray(days) || days.length === 0) return void 0;
|
|
3601
|
+
const labels = [];
|
|
3602
|
+
for (const day of days) {
|
|
3603
|
+
if (typeof day !== "number" || !Number.isInteger(day)) return void 0;
|
|
3604
|
+
const key = WEEKDAY_KEYS[day - 1];
|
|
3605
|
+
if (key === void 0) return void 0;
|
|
3606
|
+
labels.push(t(key));
|
|
3607
|
+
}
|
|
3608
|
+
return labels.join(t("detail.weekday.join"));
|
|
3609
|
+
}
|
|
3557
3610
|
function scheduleItem(value, t, locale) {
|
|
3558
|
-
if (!detailRecord(value) || !nonempty(value.id) || !nonempty(value.prompt) || typeof value.scheduledAt !== "string" || value.deliveryMode !== "session-local" || value.state !== "scheduled" && value.state !== "overdue") return null;
|
|
3611
|
+
if (!detailRecord(value) || !nonempty(value.id) || !nonempty(value.prompt) || typeof value.scheduledAt !== "string" || value.deliveryMode !== "host" && value.deliveryMode !== "session-local" || value.state !== "scheduled" && value.state !== "overdue") return null;
|
|
3559
3612
|
const date = new Date(value.scheduledAt);
|
|
3560
3613
|
if (!Number.isFinite(date.getTime()) || date.toISOString() !== value.scheduledAt) return null;
|
|
3561
3614
|
let frequency;
|
|
@@ -3571,11 +3624,35 @@ window.__ModuleLoader__.load({
|
|
|
3571
3624
|
if (!count(value.everySeconds) || value.everySeconds === 0) return null;
|
|
3572
3625
|
frequency = t("detail.schedule.every", { interval: interval(value.everySeconds, t) });
|
|
3573
3626
|
break;
|
|
3627
|
+
case "daily":
|
|
3628
|
+
if (!nonempty(value.time) || !nonempty(value.timeZone)) return null;
|
|
3629
|
+
frequency = t("detail.schedule.daily", {
|
|
3630
|
+
time: shortTime(value.time),
|
|
3631
|
+
zone: value.timeZone
|
|
3632
|
+
});
|
|
3633
|
+
break;
|
|
3634
|
+
case "weekly": {
|
|
3635
|
+
const days = weekdayText(value.weekdays, t);
|
|
3636
|
+
if (!nonempty(value.time) || !nonempty(value.timeZone) || days === void 0) return null;
|
|
3637
|
+
frequency = t("detail.schedule.weekly", {
|
|
3638
|
+
days,
|
|
3639
|
+
time: shortTime(value.time),
|
|
3640
|
+
zone: value.timeZone
|
|
3641
|
+
});
|
|
3642
|
+
break;
|
|
3643
|
+
}
|
|
3644
|
+
case "cron":
|
|
3645
|
+
if (!nonempty(value.expression) || !nonempty(value.timeZone)) return null;
|
|
3646
|
+
frequency = t("detail.schedule.cron", {
|
|
3647
|
+
expression: value.expression,
|
|
3648
|
+
zone: value.timeZone
|
|
3649
|
+
});
|
|
3650
|
+
break;
|
|
3574
3651
|
default: return null;
|
|
3575
3652
|
}
|
|
3576
3653
|
const dateText = formatDate(date, locale, value.scheduledAt);
|
|
3577
3654
|
return {
|
|
3578
|
-
title: value.prompt,
|
|
3655
|
+
title: nonempty(value.title) ? value.title : value.prompt,
|
|
3579
3656
|
fields: [
|
|
3580
3657
|
{
|
|
3581
3658
|
label: t("detail.schedule.when"),
|
|
@@ -3613,7 +3690,8 @@ window.__ModuleLoader__.load({
|
|
|
3613
3690
|
case "create_goal":
|
|
3614
3691
|
case "get_goal":
|
|
3615
3692
|
case "update_goal": return goalDetail(value, t);
|
|
3616
|
-
case "schedule_create":
|
|
3693
|
+
case "schedule_create":
|
|
3694
|
+
case "schedule_update": {
|
|
3617
3695
|
const item = scheduleItem(value, t, locale);
|
|
3618
3696
|
return item === null ? null : { items: [item] };
|
|
3619
3697
|
}
|
|
@@ -3739,6 +3817,11 @@ window.__ModuleLoader__.load({
|
|
|
3739
3817
|
key: "schedule_delete",
|
|
3740
3818
|
locale: CONVERSATION_NS
|
|
3741
3819
|
}, DetailsRow);
|
|
3820
|
+
yield ctx.slots.register({
|
|
3821
|
+
name: "tool.call.toolview",
|
|
3822
|
+
key: "schedule_update",
|
|
3823
|
+
locale: CONVERSATION_NS
|
|
3824
|
+
}, DetailsRow);
|
|
3742
3825
|
yield ctx.slots.register({
|
|
3743
3826
|
name: "tool.call.toolview",
|
|
3744
3827
|
key: "cordis_inspect_list",
|
|
@@ -4180,6 +4263,7 @@ window.__ModuleLoader__.load({
|
|
|
4180
4263
|
output: model.output,
|
|
4181
4264
|
errorSummary: model.errorSummary,
|
|
4182
4265
|
web,
|
|
4266
|
+
href: webFetchHref(block),
|
|
4183
4267
|
state: model.state,
|
|
4184
4268
|
inspect
|
|
4185
4269
|
});
|
|
@@ -70,6 +70,8 @@ export interface ToolRowProps {
|
|
|
70
70
|
filePathLine?: number | undefined;
|
|
71
71
|
/** Open the path (already cwd-resolved), landing on `filePathLine` when given. */
|
|
72
72
|
onOpenFile?: ((path: string, options?: OpenFileOptions) => void) | undefined;
|
|
73
|
+
/** Safe http(s) URL from tool args; when set, the summary renders as a link that opens it in a new tab. */
|
|
74
|
+
href?: string | undefined;
|
|
73
75
|
/**
|
|
74
76
|
* Jump to this call in the trajectory view: a hover-revealed Inspect pill
|
|
75
77
|
* over the expanded body. Absent = no affordance.
|
|
@@ -82,5 +84,5 @@ export interface ToolRowProps {
|
|
|
82
84
|
* @param props - tool state, summary, output, and navigation callbacks.
|
|
83
85
|
* @returns the tool disclosure.
|
|
84
86
|
*/
|
|
85
|
-
export declare const ToolRow: import("react").MemoExoticComponent<({ t, variant, toolName, icon, title, summary, summarySuffix, bodyRaw, output, askQuestion, errorSummary, terminal, diff, read, image, renderSlot, loadImage, search, web, details, state, filePath, filePathLine, onOpenFile, inspect, useDisclosure, }: ToolRowProps) => import("react").JSX.Element>;
|
|
87
|
+
export declare const ToolRow: import("react").MemoExoticComponent<({ t, variant, toolName, icon, title, summary, summarySuffix, bodyRaw, output, askQuestion, errorSummary, terminal, diff, read, image, renderSlot, loadImage, search, web, details, state, filePath, filePathLine, onOpenFile, href, inspect, useDisclosure, }: ToolRowProps) => import("react").JSX.Element>;
|
|
86
88
|
//# sourceMappingURL=ToolRow.d.ts.map
|
|
@@ -10,5 +10,11 @@ export type WebCardModelProps = DistributiveOmit<WebBlockProps, 'labels' | 'clas
|
|
|
10
10
|
* @returns web-card props, or null for the generic path.
|
|
11
11
|
*/
|
|
12
12
|
export declare function webCardModel(block: ToolCallBlock): WebCardModelProps | null;
|
|
13
|
+
/**
|
|
14
|
+
* Read the openable URL of a web_fetch call from its arguments.
|
|
15
|
+
* @param block - running or settled Tool block.
|
|
16
|
+
* @returns the http(s) URL, or undefined for another tool, protocol, or unparsable argument.
|
|
17
|
+
*/
|
|
18
|
+
export declare function webFetchHref(block: ToolCallBlock): string | undefined;
|
|
13
19
|
export {};
|
|
14
20
|
//# sourceMappingURL=web-card-model.d.ts.map
|
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-
|
|
50
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-tool-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
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",
|
|
57
58
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
58
|
-
"@deepseek-ai/dsh-api-remotes": "0.
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-client-locale": "0.
|
|
61
|
-
"@deepseek-ai/dsh-client-test-runtime": "0.
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-token-meter": "0.1.7-rc.1"
|
|
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",
|