@deepseek-ai/dsh-client-ui-tool 0.1.7-alpha.2 → 0.1.7-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 +48 -5
- package/README.md +12 -4
- package/README.zh.md +12 -4
- package/lib/client.js +291 -87
- package/lib/types/client/contract/slots.d.ts +43 -20
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/tool/components/PreparingToolRow.d.ts +19 -0
- package/lib/types/client/tool/components/ToolRow.d.ts +4 -1
- package/lib/types/client/tool/models/raw-tool-call.d.ts +4 -3
- package/lib/types/client/tool/models/todo-diff-model.d.ts +1 -1
- package/lib/types/client/tool/models/tool-call-model.d.ts +10 -3
- package/lib/types/client/tool/models/web-card-model.d.ts +6 -0
- package/lib/types/client/tool/tool-call-arguments-partial.d.ts +9 -0
- package/lib/types/client/tool/toolviews/GenericToolCard.d.ts +3 -2
- package/lib/types/client/tool/toolviews/bash-sample.d.ts +1 -1
- package/lib/types/client/tool/toolviews/details-row.d.ts +3 -1
- package/lib/types/client/tool/toolviews/file-mutation-row.d.ts +1 -1
- package/package.json +26 -26
package/lib/client.js
CHANGED
|
@@ -106,7 +106,46 @@ window.__ModuleLoader__.load({
|
|
|
106
106
|
cordis_stop: "tool.title.stopCordis",
|
|
107
107
|
cordis_undefine: "tool.title.removeCordis",
|
|
108
108
|
pwsh: "tool.title.pwsh",
|
|
109
|
-
read_image: "tool.title.readImage"
|
|
109
|
+
read_image: "tool.title.readImage",
|
|
110
|
+
todo_write: "todo.rowTitle",
|
|
111
|
+
ask_user_question: "ask.rowTitle",
|
|
112
|
+
create_goal: "tool.title.createGoal",
|
|
113
|
+
get_goal: "tool.title.getGoal",
|
|
114
|
+
update_goal: "tool.title.updateGoal",
|
|
115
|
+
schedule_create: "tool.title.createSchedule",
|
|
116
|
+
schedule_list: "tool.title.listSchedules",
|
|
117
|
+
schedule_delete: "tool.title.deleteSchedule",
|
|
118
|
+
schedule_update: "tool.title.updateSchedule",
|
|
119
|
+
cordis_inspect_list: "tool.title.inspectProviders",
|
|
120
|
+
cordis_inspect_query: "tool.title.queryRuntime",
|
|
121
|
+
cordis_inspect_self: "tool.title.inspectPlugins",
|
|
122
|
+
workflow: "tool.title.workflow",
|
|
123
|
+
ralph: "tool.title.ralph",
|
|
124
|
+
session_event_read: "tool.title.readEvent",
|
|
125
|
+
session_event_search: "tool.title.searchEvents",
|
|
126
|
+
session_event_trace: "tool.title.traceEvent",
|
|
127
|
+
session_search: "tool.title.searchSessions",
|
|
128
|
+
session_trace: "tool.title.traceSession",
|
|
129
|
+
list_subagent_models: "tool.title.listModels",
|
|
130
|
+
subagent: "tool.title.subagent",
|
|
131
|
+
list_agents: "tool.title.listAgents",
|
|
132
|
+
send_message: "tool.title.sendMessage",
|
|
133
|
+
interrupt_agent: "tool.title.interruptAgent",
|
|
134
|
+
job_list: "tool.title.listJobs",
|
|
135
|
+
job_output: "tool.title.readJob",
|
|
136
|
+
job_kill: "tool.title.killJob",
|
|
137
|
+
terminal_open: "tool.title.openTerminal",
|
|
138
|
+
terminal_read: "tool.title.readTerminal",
|
|
139
|
+
terminal_list: "tool.title.listTerminals",
|
|
140
|
+
terminal_signal: "tool.title.signalTerminal",
|
|
141
|
+
terminal_close: "tool.title.closeTerminal",
|
|
142
|
+
lsp: "tool.title.lsp",
|
|
143
|
+
spawn_teammate: "tool.title.spawnTeammate",
|
|
144
|
+
team_task_create: "tool.title.createTeamTask",
|
|
145
|
+
team_task_get: "tool.title.getTeamTask",
|
|
146
|
+
team_task_update: "tool.title.updateTeamTask",
|
|
147
|
+
team_task_list: "tool.title.listTeamTasks",
|
|
148
|
+
wait_agent: "tool.title.waitAgent"
|
|
110
149
|
};
|
|
111
150
|
/**
|
|
112
151
|
* Classify a tool name into its row variant.
|
|
@@ -116,6 +155,14 @@ window.__ModuleLoader__.load({
|
|
|
116
155
|
function classifyTool(toolName) {
|
|
117
156
|
return TOOL_VARIANTS[toolName] ?? "others";
|
|
118
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Select a tool-owned or generic title without reading arguments.
|
|
160
|
+
* @param toolName - wire tool name.
|
|
161
|
+
* @returns the localized title key.
|
|
162
|
+
*/
|
|
163
|
+
function toolTitleKey(toolName) {
|
|
164
|
+
return TOOL_TITLE_KEYS[toolName] ?? VARIANT_TITLE_KEYS[classifyTool(toolName)];
|
|
165
|
+
}
|
|
119
166
|
function deriveAutoReviewDenial(block) {
|
|
120
167
|
if (!("kind" in block) || !block.isError) return null;
|
|
121
168
|
const error = block.error;
|
|
@@ -218,27 +265,27 @@ window.__ModuleLoader__.load({
|
|
|
218
265
|
/**
|
|
219
266
|
* Derive the full row model from a frozen call slice.
|
|
220
267
|
* @param toolName - wire tool name (dispatch-supplied; survives windowless results).
|
|
221
|
-
* @param block -
|
|
268
|
+
* @param block - preparing call, dispatched call, or result from the snapshot.
|
|
222
269
|
* @param cwd - session workspace root; workspace-rooted path summaries display relative to it.
|
|
223
270
|
* @param home - host account home; a leftover POSIX home path displays as `~`.
|
|
224
271
|
* @returns the row model.
|
|
225
272
|
*/
|
|
226
273
|
function toolRowModel(toolName, block, cwd, home) {
|
|
227
274
|
const variant = classifyTool(toolName);
|
|
275
|
+
const titleKey = toolTitleKey(toolName);
|
|
228
276
|
const done = "kind" in block;
|
|
229
|
-
const argsRaw =
|
|
230
|
-
const state = !done ? "running" : block.error?.code === "interrupted" ? "stopped" : block.isError ? "error" : "ok";
|
|
231
|
-
const base = argsRaw === "" ? block.callId : abbreviateHomePath(relativizeToCwd(deriveSummary(variant, argsRaw), cwd), home);
|
|
232
|
-
const
|
|
233
|
-
const summary = variant === "others" && toolName !== "" && toolTitleKey === void 0 ? `${toolName} · ${base}` : base;
|
|
277
|
+
const argsRaw = done ? block.call?.argsRaw ?? "" : block.phase === "start" ? block.argsRaw : null;
|
|
278
|
+
const state = !done ? block.phase === "preparing" ? "preparing" : "running" : block.error?.code === "interrupted" ? "stopped" : block.isError ? "error" : "ok";
|
|
279
|
+
const base = argsRaw === null ? "" : argsRaw === "" ? block.callId : abbreviateHomePath(relativizeToCwd(deriveSummary(variant, argsRaw), cwd), home);
|
|
280
|
+
const summary = [titleKey === "tool.title.generic" ? toolName : "", base].filter(Boolean).join(" · ");
|
|
234
281
|
const output = done ? resultText(block) || null : null;
|
|
235
282
|
const errorSummary = state === "error" && output !== null ? firstLine(output) : null;
|
|
236
283
|
const bodyRaw = argsRaw === "" ? null : argsRaw;
|
|
237
284
|
return {
|
|
238
285
|
variant,
|
|
239
|
-
titleKey
|
|
286
|
+
titleKey,
|
|
240
287
|
summary,
|
|
241
|
-
filePath: deriveFilePath(variant, argsRaw),
|
|
288
|
+
filePath: argsRaw === null ? void 0 : deriveFilePath(variant, argsRaw),
|
|
242
289
|
bodyRaw,
|
|
243
290
|
output,
|
|
244
291
|
errorSummary,
|
|
@@ -251,10 +298,11 @@ window.__ModuleLoader__.load({
|
|
|
251
298
|
const parsedCalls = /* @__PURE__ */ new WeakMap();
|
|
252
299
|
/**
|
|
253
300
|
* Parse the call head paired with one immutable Tool block.
|
|
254
|
-
* @param block -
|
|
255
|
-
* @returns the Tool name and object arguments, or null
|
|
301
|
+
* @param block - preparing, dispatched, or settled Tool block.
|
|
302
|
+
* @returns the Tool name and object arguments, or null during preparation or when valid arguments are unavailable.
|
|
256
303
|
*/
|
|
257
304
|
function parsedToolCall(block) {
|
|
305
|
+
if (!("kind" in block) && block.phase === "preparing") return null;
|
|
258
306
|
const cached = parsedCalls.get(block);
|
|
259
307
|
if (cached !== void 0 || parsedCalls.has(block)) return cached ?? null;
|
|
260
308
|
const call = "kind" in block ? block.call : block;
|
|
@@ -983,6 +1031,22 @@ window.__ModuleLoader__.load({
|
|
|
983
1031
|
truncated: meta.truncated
|
|
984
1032
|
};
|
|
985
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
|
+
}
|
|
986
1050
|
//#endregion
|
|
987
1051
|
//#region lib/types/client/tool/models/auto-review-denial.js
|
|
988
1052
|
/**
|
|
@@ -1130,7 +1194,7 @@ window.__ModuleLoader__.load({
|
|
|
1130
1194
|
}
|
|
1131
1195
|
//#endregion
|
|
1132
1196
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/AskQuestionCard.module.css.mjs
|
|
1133
|
-
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))}";
|
|
1134
1198
|
const tagId$4 = "@deepseek-ai/dsh-client-ui-tool/AskQuestionCard.module.css";
|
|
1135
1199
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
1136
1200
|
const tag = document.createElement("style");
|
|
@@ -1193,7 +1257,7 @@ window.__ModuleLoader__.load({
|
|
|
1193
1257
|
}
|
|
1194
1258
|
//#endregion
|
|
1195
1259
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/ToolDetails.module.css.mjs
|
|
1196
|
-
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}";
|
|
1197
1261
|
const tagId$3 = "@deepseek-ai/dsh-client-ui-tool/ToolDetails.module.css";
|
|
1198
1262
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
1199
1263
|
const tag = document.createElement("style");
|
|
@@ -1367,7 +1431,7 @@ window.__ModuleLoader__.load({
|
|
|
1367
1431
|
}
|
|
1368
1432
|
//#endregion
|
|
1369
1433
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css.mjs
|
|
1370
|
-
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}";
|
|
1371
1435
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-tool/ToolRow.module.css";
|
|
1372
1436
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
1373
1437
|
const tag = document.createElement("style");
|
|
@@ -1412,9 +1476,14 @@ window.__ModuleLoader__.load({
|
|
|
1412
1476
|
};
|
|
1413
1477
|
//#endregion
|
|
1414
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
|
+
}
|
|
1415
1483
|
/** Visually hidden run-state label for color-only running and settlement cues. */
|
|
1416
1484
|
function stateStatus$1(state, t) {
|
|
1417
1485
|
switch (state) {
|
|
1486
|
+
case "preparing": return t("row.preparing");
|
|
1418
1487
|
case "running": return t("row.running");
|
|
1419
1488
|
case "error": return t("row.failed");
|
|
1420
1489
|
case "stopped": return t("row.stopped");
|
|
@@ -1423,10 +1492,11 @@ window.__ModuleLoader__.load({
|
|
|
1423
1492
|
}
|
|
1424
1493
|
/**
|
|
1425
1494
|
* Render one localized tool summary and lazily mounted result card.
|
|
1495
|
+
* Preparation retains the icon, title, and optional tool-name summary without disclosure.
|
|
1426
1496
|
* @param props - tool state, summary, output, and navigation callbacks.
|
|
1427
1497
|
* @returns the tool disclosure.
|
|
1428
1498
|
*/
|
|
1429
|
-
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 }) {
|
|
1430
1500
|
const { expanded, toggle: toggleExpand } = useDisclosure();
|
|
1431
1501
|
const terminalLabels = (0, react.useMemo)(() => terminalBlockLabels(t), [t]);
|
|
1432
1502
|
const diffLabels = (0, react.useMemo)(() => diffBlockLabels(t), [t]);
|
|
@@ -1444,7 +1514,7 @@ window.__ModuleLoader__.load({
|
|
|
1444
1514
|
const inputRaw = bodyRaw ?? null;
|
|
1445
1515
|
const outputText = output ?? null;
|
|
1446
1516
|
const card = askQuestionBody ?? terminalBody ?? diffBody ?? readBody ?? imageBody ?? searchBody ?? webBody ?? detailsBody;
|
|
1447
|
-
const expandable = inputRaw !== null || outputText !== null || card !== null;
|
|
1517
|
+
const expandable = state !== "preparing" && (inputRaw !== null || outputText !== null || card !== null);
|
|
1448
1518
|
const open = expanded && expandable;
|
|
1449
1519
|
const bodyText = (0, react.useMemo)(() => open && card === null && inputRaw !== null ? formatToolBody(variant, inputRaw) : null, [
|
|
1450
1520
|
card,
|
|
@@ -1453,7 +1523,7 @@ window.__ModuleLoader__.load({
|
|
|
1453
1523
|
variant
|
|
1454
1524
|
]);
|
|
1455
1525
|
const status = stateStatus$1(state, t);
|
|
1456
|
-
const running = state === "running";
|
|
1526
|
+
const running = state === "running" || state === "preparing";
|
|
1457
1527
|
const normalSummary = terminalBody?.description ?? (open ? detailsBody?.expandedSummary ?? summary : summary);
|
|
1458
1528
|
const summaryText = (state === "error" ? errorSummary ?? normalSummary : null) ?? normalSummary;
|
|
1459
1529
|
const diffStat = (0, react.useMemo)(() => {
|
|
@@ -1473,7 +1543,8 @@ window.__ModuleLoader__.load({
|
|
|
1473
1543
|
onOpenFile,
|
|
1474
1544
|
settledWithCue
|
|
1475
1545
|
]);
|
|
1476
|
-
const
|
|
1546
|
+
const linkHref = settledWithCue ? void 0 : href;
|
|
1547
|
+
const summaryLinkKeyDown = (0, react.useCallback)((event) => {
|
|
1477
1548
|
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
1478
1549
|
}, []);
|
|
1479
1550
|
const cardBody = variant === "code" ? null : bodyText;
|
|
@@ -1486,7 +1557,18 @@ window.__ModuleLoader__.load({
|
|
|
1486
1557
|
type: "button",
|
|
1487
1558
|
className: ToolRow_module_css_default.fileLink,
|
|
1488
1559
|
onClick: openFile,
|
|
1489
|
-
onKeyDown:
|
|
1560
|
+
onKeyDown: summaryLinkKeyDown,
|
|
1561
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1562
|
+
active: running,
|
|
1563
|
+
children: summaryText
|
|
1564
|
+
})
|
|
1565
|
+
}) : linkHref !== void 0 ? (0, react_jsx_runtime.jsx)("a", {
|
|
1566
|
+
className: ToolRow_module_css_default.fileLink,
|
|
1567
|
+
href: linkHref,
|
|
1568
|
+
target: "_blank",
|
|
1569
|
+
rel: "noopener noreferrer",
|
|
1570
|
+
onClick: stopLinkClick,
|
|
1571
|
+
onKeyDown: summaryLinkKeyDown,
|
|
1490
1572
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
1491
1573
|
active: running,
|
|
1492
1574
|
children: summaryText
|
|
@@ -1505,7 +1587,8 @@ window.__ModuleLoader__.load({
|
|
|
1505
1587
|
})
|
|
1506
1588
|
] }), [
|
|
1507
1589
|
diffStat,
|
|
1508
|
-
|
|
1590
|
+
summaryLinkKeyDown,
|
|
1591
|
+
linkHref,
|
|
1509
1592
|
openFile,
|
|
1510
1593
|
running,
|
|
1511
1594
|
state,
|
|
@@ -1672,6 +1755,7 @@ window.__ModuleLoader__.load({
|
|
|
1672
1755
|
code: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCodeOutlineRegular, { size: 14 }),
|
|
1673
1756
|
others: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSparkleRegular, { size: 14 })
|
|
1674
1757
|
};
|
|
1758
|
+
/** @param props - current tool stage and locale. @returns its preparation or dispatched card. */
|
|
1675
1759
|
function GenericToolCard({ toolName, block, cwd, home, openFile, inspect, useDisclosure, t }) {
|
|
1676
1760
|
const model = toolRowModel(toolName, block, cwd, home);
|
|
1677
1761
|
const autoReview = model.autoReviewDenial === null ? null : localizeAutoReviewDenial(model.autoReviewDenial, t);
|
|
@@ -1706,7 +1790,7 @@ window.__ModuleLoader__.load({
|
|
|
1706
1790
|
}
|
|
1707
1791
|
//#endregion
|
|
1708
1792
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/ToolCallTree.module.css.mjs
|
|
1709
|
-
const css$1 = ".ztWv_q_callRow{border-radius:
|
|
1793
|
+
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}";
|
|
1710
1794
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-tool/ToolCallTree.module.css";
|
|
1711
1795
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
1712
1796
|
const tag = document.createElement("style");
|
|
@@ -1722,16 +1806,38 @@ window.__ModuleLoader__.load({
|
|
|
1722
1806
|
//#endregion
|
|
1723
1807
|
//#region lib/types/client/tool/ToolCallTree.js
|
|
1724
1808
|
/** Root/subcall Tool composition with one keyed atomic dispatch path. */
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1809
|
+
function toolCallPhase(block) {
|
|
1810
|
+
if ("kind" in block) return {
|
|
1811
|
+
phase: "result",
|
|
1812
|
+
block
|
|
1813
|
+
};
|
|
1814
|
+
return block.phase === "preparing" ? {
|
|
1815
|
+
phase: "preparing",
|
|
1816
|
+
block
|
|
1817
|
+
} : {
|
|
1818
|
+
phase: "start",
|
|
1819
|
+
block
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
/** Resolve a Tool call's wire name from its current stage. */
|
|
1823
|
+
function callName(call) {
|
|
1824
|
+
return call.phase === "result" ? call.block.call?.name ?? "" : call.block.name;
|
|
1728
1825
|
}
|
|
1729
1826
|
/** One atomic call dispatched through the Tool-owned keyed slot. */
|
|
1730
|
-
const ToolCall = (0, react.memo)(function ToolCall({ renderSlot, callId, toolName,
|
|
1827
|
+
const ToolCall = (0, react.memo)(function ToolCall({ renderSlot, callId, toolName, call, assistant, openFile, cwd, home, inspectCall, loadImage, useDisclosure, t, children }) {
|
|
1828
|
+
const preparing = call.phase === "preparing";
|
|
1829
|
+
const hookContext = (0, react.useMemo)(() => ({
|
|
1830
|
+
callId,
|
|
1831
|
+
assistant: preparing ? assistant : void 0
|
|
1832
|
+
}), [
|
|
1833
|
+
assistant,
|
|
1834
|
+
callId,
|
|
1835
|
+
preparing
|
|
1836
|
+
]);
|
|
1731
1837
|
const owner = (0, react.useMemo)(() => ({
|
|
1732
1838
|
callId,
|
|
1733
1839
|
toolName,
|
|
1734
|
-
|
|
1840
|
+
...call,
|
|
1735
1841
|
openFile,
|
|
1736
1842
|
cwd,
|
|
1737
1843
|
home,
|
|
@@ -1743,7 +1849,7 @@ window.__ModuleLoader__.load({
|
|
|
1743
1849
|
}), [
|
|
1744
1850
|
callId,
|
|
1745
1851
|
toolName,
|
|
1746
|
-
|
|
1852
|
+
call,
|
|
1747
1853
|
openFile,
|
|
1748
1854
|
cwd,
|
|
1749
1855
|
home,
|
|
@@ -1751,7 +1857,7 @@ window.__ModuleLoader__.load({
|
|
|
1751
1857
|
inspectCall,
|
|
1752
1858
|
useDisclosure
|
|
1753
1859
|
]);
|
|
1754
|
-
const autoReviewDenied = (0, react.useMemo)(() => toolRowModel(toolName, block).autoReviewDenial !== null, [toolName,
|
|
1860
|
+
const autoReviewDenied = (0, react.useMemo)(() => call.phase === "result" && toolRowModel(toolName, call.block).autoReviewDenial !== null, [toolName, call]);
|
|
1755
1861
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
1756
1862
|
className: ToolCallTree_module_css_default.callRow,
|
|
1757
1863
|
"data-chat-anchor-key": `call:${callId}`,
|
|
@@ -1761,6 +1867,7 @@ window.__ModuleLoader__.load({
|
|
|
1761
1867
|
t
|
|
1762
1868
|
}) : renderSlot("tool.call.toolview", owner, {
|
|
1763
1869
|
entryKey: toolName,
|
|
1870
|
+
hookContext,
|
|
1764
1871
|
fallback: (0, react_jsx_runtime.jsx)(GenericToolCard, {
|
|
1765
1872
|
...owner,
|
|
1766
1873
|
t
|
|
@@ -1768,12 +1875,14 @@ window.__ModuleLoader__.load({
|
|
|
1768
1875
|
}), children]
|
|
1769
1876
|
});
|
|
1770
1877
|
});
|
|
1771
|
-
const ToolCallBranch = (0, react.memo)(function ToolCallBranch({ renderSlot, block, cwd, home, openFile, inspectCall, loadImage, useDisclosure, t }) {
|
|
1878
|
+
const ToolCallBranch = (0, react.memo)(function ToolCallBranch({ renderSlot, block, assistant, cwd, home, openFile, inspectCall, loadImage, useDisclosure, t }) {
|
|
1879
|
+
const call = (0, react.useMemo)(() => toolCallPhase(block), [block]);
|
|
1772
1880
|
return (0, react_jsx_runtime.jsx)(ToolCall, {
|
|
1773
1881
|
renderSlot,
|
|
1774
|
-
callId: block.callId,
|
|
1775
|
-
toolName: callName(
|
|
1776
|
-
|
|
1882
|
+
callId: call.block.callId,
|
|
1883
|
+
toolName: callName(call),
|
|
1884
|
+
call,
|
|
1885
|
+
assistant,
|
|
1777
1886
|
openFile,
|
|
1778
1887
|
cwd,
|
|
1779
1888
|
home,
|
|
@@ -1781,12 +1890,13 @@ window.__ModuleLoader__.load({
|
|
|
1781
1890
|
useDisclosure,
|
|
1782
1891
|
loadImage,
|
|
1783
1892
|
t,
|
|
1784
|
-
children: block.subCalls.length > 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
1893
|
+
children: call.phase !== "preparing" && call.block.subCalls.length > 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
1785
1894
|
className: ToolCallTree_module_css_default.subCalls,
|
|
1786
1895
|
"data-subcalls": true,
|
|
1787
|
-
children: block.subCalls.map((child) => (0, react_jsx_runtime.jsx)(ToolCallBranch, {
|
|
1896
|
+
children: call.block.subCalls.map((child) => (0, react_jsx_runtime.jsx)(ToolCallBranch, {
|
|
1788
1897
|
renderSlot,
|
|
1789
1898
|
block: child,
|
|
1899
|
+
assistant,
|
|
1790
1900
|
cwd,
|
|
1791
1901
|
home,
|
|
1792
1902
|
openFile,
|
|
@@ -1806,10 +1916,11 @@ window.__ModuleLoader__.load({
|
|
|
1806
1916
|
*/
|
|
1807
1917
|
function ToolCallTree({ renderSlot, node, cwd, openFile, inspectCall, loadImage, useDisclosure, useHostInfo, t }) {
|
|
1808
1918
|
const home = useHostInfo((info) => info.home);
|
|
1809
|
-
const
|
|
1919
|
+
const assistant = node.location.kind === "step" ? node.location.step.data.source("assistant-step") : void 0;
|
|
1810
1920
|
return (0, react_jsx_runtime.jsx)(ToolCallBranch, {
|
|
1811
1921
|
renderSlot,
|
|
1812
|
-
block,
|
|
1922
|
+
block: node.data.root,
|
|
1923
|
+
assistant,
|
|
1813
1924
|
cwd,
|
|
1814
1925
|
home,
|
|
1815
1926
|
openFile,
|
|
@@ -1820,6 +1931,27 @@ window.__ModuleLoader__.load({
|
|
|
1820
1931
|
});
|
|
1821
1932
|
}
|
|
1822
1933
|
//#endregion
|
|
1934
|
+
//#region lib/types/client/tool/tool-call-arguments-partial.js
|
|
1935
|
+
/** Call-local argument subscription bound by the atomic Tool slot. */
|
|
1936
|
+
const subscribeEmpty = () => () => {};
|
|
1937
|
+
/**
|
|
1938
|
+
* Bind one call without subscribing until its component invokes the Hook.
|
|
1939
|
+
* @param _standard - framework-provided scope props.
|
|
1940
|
+
* @param context - the preparing call's Step source and identity.
|
|
1941
|
+
* @returns a Hook that reads only this call's raw argument prefix.
|
|
1942
|
+
*/
|
|
1943
|
+
const bindToolCallArgumentsPartial = (_standard, context) => {
|
|
1944
|
+
const { assistant, callId } = context;
|
|
1945
|
+
const subscribe = assistant === void 0 ? subscribeEmpty : (listener) => assistant.subscribe(listener);
|
|
1946
|
+
const getSnapshot = () => {
|
|
1947
|
+
const block = assistant?.getSnapshot()?.blocks.find((candidate) => candidate.kind === "tool-call" && candidate.callId === callId);
|
|
1948
|
+
return block?.kind === "tool-call" ? block.argsRaw : "";
|
|
1949
|
+
};
|
|
1950
|
+
return function useToolCallArgumentsPartial() {
|
|
1951
|
+
return (0, react.useSyncExternalStore)(subscribe, getSnapshot);
|
|
1952
|
+
};
|
|
1953
|
+
};
|
|
1954
|
+
//#endregion
|
|
1823
1955
|
//#region lib/types/client/locale.js
|
|
1824
1956
|
/** Locale namespace supplied by the conversation owner to Tool renderers. */
|
|
1825
1957
|
const CONVERSATION_NS = "conversation";
|
|
@@ -1917,7 +2049,7 @@ window.__ModuleLoader__.load({
|
|
|
1917
2049
|
function AskQuestionRow({ toolName, block, inspect, useDisclosure, t }) {
|
|
1918
2050
|
const model = toolRowModel(toolName, block);
|
|
1919
2051
|
const code = "kind" in block ? block.error?.code : void 0;
|
|
1920
|
-
const argsRaw =
|
|
2052
|
+
const argsRaw = model.bodyRaw ?? "";
|
|
1921
2053
|
let summary = model.summary;
|
|
1922
2054
|
let state = model.state;
|
|
1923
2055
|
let transcript = null;
|
|
@@ -1958,7 +2090,7 @@ window.__ModuleLoader__.load({
|
|
|
1958
2090
|
variant: model.variant,
|
|
1959
2091
|
toolName,
|
|
1960
2092
|
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQuestionOutlineRegular, {}),
|
|
1961
|
-
title: t(
|
|
2093
|
+
title: t(model.titleKey),
|
|
1962
2094
|
summary,
|
|
1963
2095
|
bodyRaw: transcript === null ? model.bodyRaw : null,
|
|
1964
2096
|
output: transcript === null ? model.output : null,
|
|
@@ -1980,8 +2112,27 @@ window.__ModuleLoader__.load({
|
|
|
1980
2112
|
}
|
|
1981
2113
|
};
|
|
1982
2114
|
//#endregion
|
|
2115
|
+
//#region lib/types/client/tool/components/PreparingToolRow.js
|
|
2116
|
+
/**
|
|
2117
|
+
* Render a non-expandable tool prefix with an optional preparation summary.
|
|
2118
|
+
* @param props - tool prefix and locale.
|
|
2119
|
+
* @returns the preparation row.
|
|
2120
|
+
*/
|
|
2121
|
+
function PreparingToolRow({ toolName, useDisclosure, icon, title, summary = "", t }) {
|
|
2122
|
+
return (0, react_jsx_runtime.jsx)(ToolRow, {
|
|
2123
|
+
useDisclosure,
|
|
2124
|
+
t,
|
|
2125
|
+
variant: classifyTool(toolName),
|
|
2126
|
+
toolName,
|
|
2127
|
+
icon,
|
|
2128
|
+
title,
|
|
2129
|
+
summary,
|
|
2130
|
+
state: "preparing"
|
|
2131
|
+
});
|
|
2132
|
+
}
|
|
2133
|
+
//#endregion
|
|
1983
2134
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css.mjs
|
|
1984
|
-
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);
|
|
2135
|
+
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}";
|
|
1985
2136
|
const tagId = "@deepseek-ai/dsh-client-ui-tool/bash-sample.module.css";
|
|
1986
2137
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
1987
2138
|
const tag = document.createElement("style");
|
|
@@ -2029,7 +2180,15 @@ window.__ModuleLoader__.load({
|
|
|
2029
2180
|
* @param props - tool call, Session sources, locale, and inspection callback.
|
|
2030
2181
|
* @returns the Bash output row.
|
|
2031
2182
|
*/
|
|
2032
|
-
const BashRow = (0, react.memo)(function BashRow(
|
|
2183
|
+
const BashRow = (0, react.memo)(function BashRow(props) {
|
|
2184
|
+
if (props.phase === "preparing") return (0, react_jsx_runtime.jsx)(PreparingToolRow, {
|
|
2185
|
+
...props,
|
|
2186
|
+
icon: BASH_ICON,
|
|
2187
|
+
title: props.t(toolTitleKey(props.toolName))
|
|
2188
|
+
});
|
|
2189
|
+
return (0, react_jsx_runtime.jsx)(StartedBashRow, { ...props });
|
|
2190
|
+
});
|
|
2191
|
+
const StartedBashRow = (0, react.memo)(function StartedBashRow({ toolName, block, sessionId, useSessions, inspect, useDisclosure, t }) {
|
|
2033
2192
|
const model = (0, react.useMemo)(() => toolRowModel(toolName, block), [toolName, block]);
|
|
2034
2193
|
const cwd = useSessions((list) => list.byId[sessionId]?.cwd);
|
|
2035
2194
|
const terminalModel = (0, react.useMemo)(() => terminalCardModel(block, cwd), [block, cwd]);
|
|
@@ -2157,10 +2316,25 @@ window.__ModuleLoader__.load({
|
|
|
2157
2316
|
};
|
|
2158
2317
|
//#endregion
|
|
2159
2318
|
//#region lib/types/client/tool/toolviews/file-mutation-row.js
|
|
2319
|
+
const FILE_MUTATION_ICON = (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 14 });
|
|
2160
2320
|
/**
|
|
2161
2321
|
* Lets users expand an applied file diff and open the reported path.
|
|
2162
2322
|
*/
|
|
2163
|
-
function FileMutationRow(
|
|
2323
|
+
function FileMutationRow(props) {
|
|
2324
|
+
return props.phase === "preparing" ? (0, react_jsx_runtime.jsx)(PreparingFileMutationRow, { ...props }) : (0, react_jsx_runtime.jsx)(StartedFileMutationRow, { ...props });
|
|
2325
|
+
}
|
|
2326
|
+
function PreparingFileMutationRow({ toolName, useDisclosure, useToolCallArgumentsPartial, t }) {
|
|
2327
|
+
const raw = useToolCallArgumentsPartial();
|
|
2328
|
+
return (0, react_jsx_runtime.jsx)(PreparingToolRow, {
|
|
2329
|
+
toolName,
|
|
2330
|
+
useDisclosure,
|
|
2331
|
+
icon: FILE_MUTATION_ICON,
|
|
2332
|
+
title: t(toolTitleKey(toolName)),
|
|
2333
|
+
t,
|
|
2334
|
+
summary: t("tool.preparing.content", { kilobytes: Math.ceil(raw.length / 1024) })
|
|
2335
|
+
});
|
|
2336
|
+
}
|
|
2337
|
+
function StartedFileMutationRow({ toolName, block, cwd, home, openFile, inspect, useDisclosure, t }) {
|
|
2164
2338
|
const model = toolRowModel(toolName, block, cwd, home);
|
|
2165
2339
|
const diff = diffCardModel(block);
|
|
2166
2340
|
return (0, react_jsx_runtime.jsx)(ToolRow, {
|
|
@@ -2168,7 +2342,7 @@ window.__ModuleLoader__.load({
|
|
|
2168
2342
|
t,
|
|
2169
2343
|
variant: model.variant,
|
|
2170
2344
|
toolName,
|
|
2171
|
-
icon:
|
|
2345
|
+
icon: FILE_MUTATION_ICON,
|
|
2172
2346
|
title: t(model.titleKey),
|
|
2173
2347
|
summary: model.summary,
|
|
2174
2348
|
output: model.output,
|
|
@@ -3408,14 +3582,40 @@ window.__ModuleLoader__.load({
|
|
|
3408
3582
|
fields
|
|
3409
3583
|
}] };
|
|
3410
3584
|
}
|
|
3585
|
+
/** ISO-weekday keys, Monday first: a stored weekly rule names days 1 through 7. */
|
|
3586
|
+
const WEEKDAY_KEYS = [
|
|
3587
|
+
"detail.weekday.1",
|
|
3588
|
+
"detail.weekday.2",
|
|
3589
|
+
"detail.weekday.3",
|
|
3590
|
+
"detail.weekday.4",
|
|
3591
|
+
"detail.weekday.5",
|
|
3592
|
+
"detail.weekday.6",
|
|
3593
|
+
"detail.weekday.7"
|
|
3594
|
+
];
|
|
3411
3595
|
function interval(seconds, t) {
|
|
3412
3596
|
if (seconds % 86400 === 0) return t("detail.days", { count: seconds / 86400 });
|
|
3413
3597
|
if (seconds % 3600 === 0) return t("detail.hours", { count: seconds / 3600 });
|
|
3414
3598
|
if (seconds % 60 === 0) return t("detail.minutes", { count: seconds / 60 });
|
|
3415
3599
|
return t("detail.seconds", { count: seconds });
|
|
3416
3600
|
}
|
|
3601
|
+
/** A stored wall clock without its zero seconds, the figure the schedule surfaces state. */
|
|
3602
|
+
function shortTime(time) {
|
|
3603
|
+
return time.replace(/:00\.000$/, "").replace(/\.000$/, "");
|
|
3604
|
+
}
|
|
3605
|
+
/** Localized weekday list of a stored weekly rule, or undefined when the set is empty or out of range. */
|
|
3606
|
+
function weekdayText(days, t) {
|
|
3607
|
+
if (!Array.isArray(days) || days.length === 0) return void 0;
|
|
3608
|
+
const labels = [];
|
|
3609
|
+
for (const day of days) {
|
|
3610
|
+
if (typeof day !== "number" || !Number.isInteger(day)) return void 0;
|
|
3611
|
+
const key = WEEKDAY_KEYS[day - 1];
|
|
3612
|
+
if (key === void 0) return void 0;
|
|
3613
|
+
labels.push(t(key));
|
|
3614
|
+
}
|
|
3615
|
+
return labels.join(t("detail.weekday.join"));
|
|
3616
|
+
}
|
|
3417
3617
|
function scheduleItem(value, t, locale) {
|
|
3418
|
-
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;
|
|
3618
|
+
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;
|
|
3419
3619
|
const date = new Date(value.scheduledAt);
|
|
3420
3620
|
if (!Number.isFinite(date.getTime()) || date.toISOString() !== value.scheduledAt) return null;
|
|
3421
3621
|
let frequency;
|
|
@@ -3431,11 +3631,35 @@ window.__ModuleLoader__.load({
|
|
|
3431
3631
|
if (!count(value.everySeconds) || value.everySeconds === 0) return null;
|
|
3432
3632
|
frequency = t("detail.schedule.every", { interval: interval(value.everySeconds, t) });
|
|
3433
3633
|
break;
|
|
3634
|
+
case "daily":
|
|
3635
|
+
if (!nonempty(value.time) || !nonempty(value.timeZone)) return null;
|
|
3636
|
+
frequency = t("detail.schedule.daily", {
|
|
3637
|
+
time: shortTime(value.time),
|
|
3638
|
+
zone: value.timeZone
|
|
3639
|
+
});
|
|
3640
|
+
break;
|
|
3641
|
+
case "weekly": {
|
|
3642
|
+
const days = weekdayText(value.weekdays, t);
|
|
3643
|
+
if (!nonempty(value.time) || !nonempty(value.timeZone) || days === void 0) return null;
|
|
3644
|
+
frequency = t("detail.schedule.weekly", {
|
|
3645
|
+
days,
|
|
3646
|
+
time: shortTime(value.time),
|
|
3647
|
+
zone: value.timeZone
|
|
3648
|
+
});
|
|
3649
|
+
break;
|
|
3650
|
+
}
|
|
3651
|
+
case "cron":
|
|
3652
|
+
if (!nonempty(value.expression) || !nonempty(value.timeZone)) return null;
|
|
3653
|
+
frequency = t("detail.schedule.cron", {
|
|
3654
|
+
expression: value.expression,
|
|
3655
|
+
zone: value.timeZone
|
|
3656
|
+
});
|
|
3657
|
+
break;
|
|
3434
3658
|
default: return null;
|
|
3435
3659
|
}
|
|
3436
3660
|
const dateText = formatDate(date, locale, value.scheduledAt);
|
|
3437
3661
|
return {
|
|
3438
|
-
title: value.prompt,
|
|
3662
|
+
title: nonempty(value.title) ? value.title : value.prompt,
|
|
3439
3663
|
fields: [
|
|
3440
3664
|
{
|
|
3441
3665
|
label: t("detail.schedule.when"),
|
|
@@ -3473,7 +3697,8 @@ window.__ModuleLoader__.load({
|
|
|
3473
3697
|
case "create_goal":
|
|
3474
3698
|
case "get_goal":
|
|
3475
3699
|
case "update_goal": return goalDetail(value, t);
|
|
3476
|
-
case "schedule_create":
|
|
3700
|
+
case "schedule_create":
|
|
3701
|
+
case "schedule_update": {
|
|
3477
3702
|
const item = scheduleItem(value, t, locale);
|
|
3478
3703
|
return item === null ? null : { items: [item] };
|
|
3479
3704
|
}
|
|
@@ -3506,51 +3731,22 @@ window.__ModuleLoader__.load({
|
|
|
3506
3731
|
//#endregion
|
|
3507
3732
|
//#region lib/types/client/tool/toolviews/details-row.js
|
|
3508
3733
|
/** Keyed recorded-result rows sharing the compact detail body. */
|
|
3509
|
-
const TITLE_KEYS = {
|
|
3510
|
-
create_goal: "tool.title.createGoal",
|
|
3511
|
-
get_goal: "tool.title.getGoal",
|
|
3512
|
-
update_goal: "tool.title.updateGoal",
|
|
3513
|
-
schedule_create: "tool.title.createSchedule",
|
|
3514
|
-
schedule_list: "tool.title.listSchedules",
|
|
3515
|
-
schedule_delete: "tool.title.deleteSchedule",
|
|
3516
|
-
cordis_inspect_list: "tool.title.inspectProviders",
|
|
3517
|
-
cordis_inspect_query: "tool.title.queryRuntime",
|
|
3518
|
-
cordis_inspect_self: "tool.title.inspectPlugins",
|
|
3519
|
-
workflow: "tool.title.workflow",
|
|
3520
|
-
ralph: "tool.title.ralph",
|
|
3521
|
-
session_event_read: "tool.title.readEvent",
|
|
3522
|
-
session_event_search: "tool.title.searchEvents",
|
|
3523
|
-
session_event_trace: "tool.title.traceEvent",
|
|
3524
|
-
session_search: "tool.title.searchSessions",
|
|
3525
|
-
session_trace: "tool.title.traceSession",
|
|
3526
|
-
list_subagent_models: "tool.title.listModels",
|
|
3527
|
-
subagent: "tool.title.subagent",
|
|
3528
|
-
list_agents: "tool.title.listAgents",
|
|
3529
|
-
send_message: "tool.title.sendMessage",
|
|
3530
|
-
interrupt_agent: "tool.title.interruptAgent",
|
|
3531
|
-
job_list: "tool.title.listJobs",
|
|
3532
|
-
job_output: "tool.title.readJob",
|
|
3533
|
-
job_kill: "tool.title.killJob",
|
|
3534
|
-
terminal_open: "tool.title.openTerminal",
|
|
3535
|
-
terminal_read: "tool.title.readTerminal",
|
|
3536
|
-
terminal_list: "tool.title.listTerminals",
|
|
3537
|
-
terminal_signal: "tool.title.signalTerminal",
|
|
3538
|
-
terminal_close: "tool.title.closeTerminal",
|
|
3539
|
-
lsp: "tool.title.lsp",
|
|
3540
|
-
spawn_teammate: "tool.title.spawnTeammate",
|
|
3541
|
-
team_task_create: "tool.title.createTeamTask",
|
|
3542
|
-
team_task_get: "tool.title.getTeamTask",
|
|
3543
|
-
team_task_update: "tool.title.updateTeamTask",
|
|
3544
|
-
team_task_list: "tool.title.listTeamTasks",
|
|
3545
|
-
wait_agent: "tool.title.waitAgent"
|
|
3546
|
-
};
|
|
3547
3734
|
const LSP_TITLE_KEYS = {
|
|
3548
3735
|
goToDefinition: "tool.title.findDefinition",
|
|
3549
3736
|
findReferences: "tool.title.findReferences",
|
|
3550
3737
|
goToImplementation: "tool.title.findImplementation",
|
|
3551
3738
|
hover: "tool.title.hoverSymbol"
|
|
3552
3739
|
};
|
|
3740
|
+
/** Teammate-coordination tools presented with the two-person team icon. */
|
|
3741
|
+
const TEAMMATE_TOOLS = new Set([
|
|
3742
|
+
"spawn_teammate",
|
|
3743
|
+
"list_agents",
|
|
3744
|
+
"send_message",
|
|
3745
|
+
"interrupt_agent",
|
|
3746
|
+
"wait_agent"
|
|
3747
|
+
]);
|
|
3553
3748
|
function detailIcon(toolName) {
|
|
3749
|
+
if (TEAMMATE_TOOLS.has(toolName)) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUsersOutlineRegular, { size: 14 });
|
|
3554
3750
|
if (toolName.startsWith("schedule_")) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconClockOutlineRegular, { size: 14 });
|
|
3555
3751
|
if (toolName.endsWith("_goal")) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGoalOutlineRegular, { size: 14 });
|
|
3556
3752
|
if (toolName.startsWith("cordis_")) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCordisPluginOutlineRegular, {});
|
|
@@ -3574,7 +3770,7 @@ window.__ModuleLoader__.load({
|
|
|
3574
3770
|
locale
|
|
3575
3771
|
]);
|
|
3576
3772
|
const operation = toolName === "lsp" ? parsedToolCall(block)?.args.operation : void 0;
|
|
3577
|
-
const titleKey = typeof operation === "string" && Object.hasOwn(LSP_TITLE_KEYS, operation) ? LSP_TITLE_KEYS[operation] :
|
|
3773
|
+
const titleKey = typeof operation === "string" && Object.hasOwn(LSP_TITLE_KEYS, operation) ? LSP_TITLE_KEYS[operation] : model.titleKey;
|
|
3578
3774
|
return (0, react_jsx_runtime.jsx)(ToolRow, {
|
|
3579
3775
|
useDisclosure,
|
|
3580
3776
|
t,
|
|
@@ -3628,6 +3824,11 @@ window.__ModuleLoader__.load({
|
|
|
3628
3824
|
key: "schedule_delete",
|
|
3629
3825
|
locale: CONVERSATION_NS
|
|
3630
3826
|
}, DetailsRow);
|
|
3827
|
+
yield ctx.slots.register({
|
|
3828
|
+
name: "tool.call.toolview",
|
|
3829
|
+
key: "schedule_update",
|
|
3830
|
+
locale: CONVERSATION_NS
|
|
3831
|
+
}, DetailsRow);
|
|
3631
3832
|
yield ctx.slots.register({
|
|
3632
3833
|
name: "tool.call.toolview",
|
|
3633
3834
|
key: "cordis_inspect_list",
|
|
@@ -3981,6 +4182,7 @@ window.__ModuleLoader__.load({
|
|
|
3981
4182
|
return typeof value === "object" && value !== null;
|
|
3982
4183
|
}
|
|
3983
4184
|
function summarize(argsRaw, t) {
|
|
4185
|
+
if (argsRaw === null) return null;
|
|
3984
4186
|
let parsed;
|
|
3985
4187
|
try {
|
|
3986
4188
|
parsed = JSON.parse(argsRaw);
|
|
@@ -4011,7 +4213,7 @@ window.__ModuleLoader__.load({
|
|
|
4011
4213
|
t
|
|
4012
4214
|
]);
|
|
4013
4215
|
const model = toolRowModel(toolName, block);
|
|
4014
|
-
const summary = summarize(
|
|
4216
|
+
const summary = summarize(model.bodyRaw, t) ?? {
|
|
4015
4217
|
text: model.summary,
|
|
4016
4218
|
extra: 0
|
|
4017
4219
|
};
|
|
@@ -4021,7 +4223,7 @@ window.__ModuleLoader__.load({
|
|
|
4021
4223
|
variant: model.variant,
|
|
4022
4224
|
toolName,
|
|
4023
4225
|
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutlineRegular, {}),
|
|
4024
|
-
title: t(
|
|
4226
|
+
title: t(model.titleKey),
|
|
4025
4227
|
summary: summary.text,
|
|
4026
4228
|
summarySuffix: [diff?.summary, summary.extra > 0 ? `+${summary.extra}` : null].filter((part) => part !== null && part !== void 0).join(" · ") || null,
|
|
4027
4229
|
bodyRaw: model.bodyRaw,
|
|
@@ -4068,6 +4270,7 @@ window.__ModuleLoader__.load({
|
|
|
4068
4270
|
output: model.output,
|
|
4069
4271
|
errorSummary: model.errorSummary,
|
|
4070
4272
|
web,
|
|
4273
|
+
href: webFetchHref(block),
|
|
4071
4274
|
state: model.state,
|
|
4072
4275
|
inspect
|
|
4073
4276
|
});
|
|
@@ -4111,7 +4314,8 @@ window.__ModuleLoader__.load({
|
|
|
4111
4314
|
locale: CONVERSATION_NS,
|
|
4112
4315
|
children: { "tool.call.toolview": {
|
|
4113
4316
|
kind: "keyed",
|
|
4114
|
-
scope: "session"
|
|
4317
|
+
scope: "session",
|
|
4318
|
+
inject: { hooks: { toolCallArgumentsPartial: bindToolCallArgumentsPartial } }
|
|
4115
4319
|
} },
|
|
4116
4320
|
inject: toolInject
|
|
4117
4321
|
}, ToolCallTree));
|