@max-null/dsh-node-appearance 0.4.0 → 0.6.0
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.md +35 -6
- package/docs/shots//344/272/244/344/273/230/350/241/214-/345/261/225/345/274/200.png +0 -0
- package/docs/shots//344/272/244/344/273/230/350/241/214-/346/212/230/345/217/240.png +0 -0
- package/docs/shots//350/256/276/347/275/256/345/215/241/347/211/207.png +0 -0
- package/lib/client.js +374 -92
- package/lib/client.js.map +1 -1
- package/lib/index.js +16 -14
- package/lib/types/client/deliverable-model.d.ts +69 -0
- package/lib/types/client/deliverable-model.d.ts.map +1 -0
- package/lib/types/client/deliverable-row.d.ts +19 -0
- package/lib/types/client/deliverable-row.d.ts.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/palette.d.ts +1 -1
- package/lib/types/client/palette.d.ts.map +1 -1
- package/lib/types/client/settings-card.d.ts +5 -5
- package/lib/types/client/settings-card.d.ts.map +1 -1
- package/lib/types/index.d.ts +89 -10
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +22 -19
- package/docs/shots//350/256/276/347/275/256/351/241/265/346/210/252/345/233/276.png +0 -0
package/lib/client.js
CHANGED
|
@@ -25,6 +25,7 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
agent: "#a855f7",
|
|
26
26
|
execute: "#f59e0b",
|
|
27
27
|
file: "#22c55e",
|
|
28
|
+
deliver: "#06b6d4",
|
|
28
29
|
task: "#ec4899",
|
|
29
30
|
ask: "#65a30d",
|
|
30
31
|
command: "#f97316",
|
|
@@ -66,6 +67,7 @@ window.__ModuleLoader__.load({
|
|
|
66
67
|
"glob",
|
|
67
68
|
"grep"
|
|
68
69
|
],
|
|
70
|
+
deliver: ["present"],
|
|
69
71
|
task: [
|
|
70
72
|
"todo_write",
|
|
71
73
|
"create_goal",
|
|
@@ -194,45 +196,45 @@ window.__ModuleLoader__.load({
|
|
|
194
196
|
}
|
|
195
197
|
//#endregion
|
|
196
198
|
//#region \0dsh-css:H:\MaxNull\WorkStation\max-null-plugins\dsh-node-appearance\src\client\card.module.css.mjs
|
|
197
|
-
const css$
|
|
198
|
-
const tagId$
|
|
199
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
199
|
+
const css$3 = ".CDqThG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.CDqThG_card:hover{border-color:var(--dsw-alias-label-dimmed)}.CDqThG_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.CDqThG_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.CDqThG_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.CDqThG_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.CDqThG_description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.CDqThG_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.CDqThG_chevronOpen{transform:rotate(180deg)}.CDqThG_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.CDqThG_readOnly,.CDqThG_statusLine{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:1.5}.CDqThG_disabled{opacity:.55;pointer-events:none}.CDqThG_footer{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:16px 0 4px;display:flex}.CDqThG_reset{appearance:none;border:1px solid var(--dsw-alias-border-l2);font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:0 0;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5}.CDqThG_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_resetConfirm{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.CDqThG_reset:disabled{opacity:.4;cursor:default}.CDqThG_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.CDqThG_row{border-top:1px solid var(--dsw-alias-border-l2);align-items:center;gap:10px;margin-top:10px;padding:10px 0 4px;display:flex;position:relative}.CDqThG_row:first-child{border-top:none;margin-top:4px}.CDqThG_rowLabel{min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1;gap:2px;font-size:13px;font-weight:500;line-height:1.5;display:flex}.CDqThG_rowHint{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:1.5}.CDqThG_colorInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);cursor:pointer;border-radius:8px;flex:none;width:34px;height:28px;padding:2px}.CDqThG_colorValue{width:64px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;font-size:12px;line-height:1.5}.CDqThG_sectionTitle{color:var(--dsw-alias-label-primary);margin:14px 0 0;font-size:13px;font-weight:600;line-height:1.5}.CDqThG_toolName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:1.5;overflow:hidden}.CDqThG_removeButton{appearance:none;border:1px solid var(--dsw-alias-border-l2);font:inherit;cursor:pointer;color:var(--dsw-alias-label-secondary);background:0 0;border-radius:8px;flex:none;padding:3px 10px;font-size:12px;line-height:1.5}.CDqThG_removeButton:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.CDqThG_addRow{align-items:center;gap:8px;margin-top:10px;margin-bottom:12px;display:flex}.CDqThG_toolInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);min-width:0;height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;flex:1;padding:0 12px;font-size:13px;line-height:1.5}.CDqThG_toolInput:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.CDqThG_toolInput::placeholder{color:var(--dsw-alias-label-tertiary)}.CDqThG_addButton{appearance:none;font:inherit;cursor:pointer;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border:1px solid #0000;border-radius:8px;flex:none;padding:5px 14px;font-size:13px;line-height:1.5}.CDqThG_addButton:disabled{opacity:.4;cursor:default}.CDqThG_switch{cursor:pointer;background:var(--dsw-alias-border-l4,#00000029);border:none;border-radius:11px;flex:none;width:40px;height:22px;padding:0;transition:background .15s}.CDqThG_switch.CDqThG_on{background:var(--dsw-alias-state-business-primary,#4fc3f7)}.CDqThG_knob{pointer-events:none;background:#fff;border-radius:8px;width:16px;height:16px;margin-left:2px;transition:margin-left .15s;display:block}.CDqThG_switch.CDqThG_on .CDqThG_knob{margin-left:22px}";
|
|
200
|
+
const tagId$3 = "@max-null/dsh-node-appearance/card.module.css";
|
|
201
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
200
202
|
const tag = document.createElement("style");
|
|
201
203
|
tag.dataset.plugin = "@max-null/dsh-node-appearance";
|
|
202
|
-
tag.dataset.pluginCss = tagId$
|
|
203
|
-
tag.textContent = css$
|
|
204
|
+
tag.dataset.pluginCss = tagId$3;
|
|
205
|
+
tag.textContent = css$3;
|
|
204
206
|
document.head.appendChild(tag);
|
|
205
207
|
}
|
|
206
208
|
var card_module_css_default = {
|
|
207
|
-
"
|
|
209
|
+
"readOnly": "CDqThG_readOnly",
|
|
208
210
|
"body": "CDqThG_body",
|
|
209
|
-
"statusLine": "CDqThG_statusLine",
|
|
210
|
-
"header": "CDqThG_header",
|
|
211
|
-
"cardOpen": "CDqThG_cardOpen",
|
|
212
|
-
"switch": "CDqThG_switch",
|
|
213
211
|
"rowHint": "CDqThG_rowHint",
|
|
212
|
+
"addRow": "CDqThG_addRow",
|
|
214
213
|
"toolInput": "CDqThG_toolInput",
|
|
215
|
-
"
|
|
216
|
-
"addButton": "CDqThG_addButton",
|
|
217
|
-
"disabled": "CDqThG_disabled",
|
|
218
|
-
"chevronOpen": "CDqThG_chevronOpen",
|
|
219
|
-
"row": "CDqThG_row",
|
|
220
|
-
"knob": "CDqThG_knob",
|
|
214
|
+
"reset": "CDqThG_reset",
|
|
221
215
|
"chevron": "CDqThG_chevron",
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"sectionTitle": "CDqThG_sectionTitle",
|
|
225
|
-
"description": "CDqThG_description",
|
|
226
|
-
"addRow": "CDqThG_addRow",
|
|
227
|
-
"removeButton": "CDqThG_removeButton",
|
|
216
|
+
"toolName": "CDqThG_toolName",
|
|
217
|
+
"chevronOpen": "CDqThG_chevronOpen",
|
|
228
218
|
"card": "CDqThG_card",
|
|
219
|
+
"resetConfirm": "CDqThG_resetConfirm",
|
|
220
|
+
"rowLabel": "CDqThG_rowLabel",
|
|
229
221
|
"footer": "CDqThG_footer",
|
|
222
|
+
"name": "CDqThG_name",
|
|
223
|
+
"row": "CDqThG_row",
|
|
224
|
+
"sectionTitle": "CDqThG_sectionTitle",
|
|
225
|
+
"headText": "CDqThG_headText",
|
|
230
226
|
"on": "CDqThG_on",
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
"
|
|
227
|
+
"cardOpen": "CDqThG_cardOpen",
|
|
228
|
+
"description": "CDqThG_description",
|
|
229
|
+
"statusLine": "CDqThG_statusLine",
|
|
230
|
+
"knob": "CDqThG_knob",
|
|
234
231
|
"colorValue": "CDqThG_colorValue",
|
|
235
|
-
"
|
|
232
|
+
"colorInput": "CDqThG_colorInput",
|
|
233
|
+
"switch": "CDqThG_switch",
|
|
234
|
+
"disabled": "CDqThG_disabled",
|
|
235
|
+
"removeButton": "CDqThG_removeButton",
|
|
236
|
+
"addButton": "CDqThG_addButton",
|
|
237
|
+
"header": "CDqThG_header"
|
|
236
238
|
};
|
|
237
239
|
//#endregion
|
|
238
240
|
//#region src/client/settings-card.tsx
|
|
@@ -255,6 +257,7 @@ window.__ModuleLoader__.load({
|
|
|
255
257
|
agent: "智能体调用",
|
|
256
258
|
execute: "代码 / 指令执行",
|
|
257
259
|
file: "文件操作",
|
|
260
|
+
deliver: "交付文件",
|
|
258
261
|
task: "任务 / 目标",
|
|
259
262
|
ask: "提问卡片",
|
|
260
263
|
command: "指令节点",
|
|
@@ -292,7 +295,7 @@ window.__ModuleLoader__.load({
|
|
|
292
295
|
* @returns the card, matching the official plugin-card chrome.
|
|
293
296
|
*/
|
|
294
297
|
function NodeAppearanceRow({ useNodeAppearance, apply, setShowThinking, setCategoryColor, setToolColor, removeToolColor }) {
|
|
295
|
-
const [open, setOpen] = (0, react.useState)(
|
|
298
|
+
const [open, setOpen] = (0, react.useState)(true);
|
|
296
299
|
const [confirmReset, setConfirmReset] = (0, react.useState)(false);
|
|
297
300
|
const [resetting, setResetting] = (0, react.useState)(false);
|
|
298
301
|
const [toolName, setToolName] = (0, react.useState)("");
|
|
@@ -344,7 +347,7 @@ window.__ModuleLoader__.load({
|
|
|
344
347
|
className: card_module_css_default.description,
|
|
345
348
|
children: COPY.description
|
|
346
349
|
})]
|
|
347
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
350
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineMedium, { className: card_module_css_default.chevron + (open ? " " + card_module_css_default.chevronOpen : "") })]
|
|
348
351
|
}), open && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
349
352
|
className: card_module_css_default.body,
|
|
350
353
|
children: [
|
|
@@ -627,42 +630,42 @@ window.__ModuleLoader__.load({
|
|
|
627
630
|
}
|
|
628
631
|
//#endregion
|
|
629
632
|
//#region \0dsh-css:H:\MaxNull\WorkStation\max-null-plugins\dsh-node-appearance\src\client\ask-card.module.css.mjs
|
|
630
|
-
const css$
|
|
631
|
-
const tagId$
|
|
632
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
633
|
+
const css$2 = ".ylzLDa_root{--ask-accent:var(--ncolor-accent,#65a30d);flex-direction:column;display:flex}.ylzLDa_row{position:relative;overflow:hidden}.ylzLDa_root[data-state=running] .ylzLDa_row:after{content:\"\";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite ylzLDa_ask-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes ylzLDa_ask-row-sweep{0%{left:-300px}90%,to{left:100%}}.ylzLDa_leading{flex-shrink:0}.ylzLDa_chevron{color:var(--dsw-alias-label-secondary)}.ylzLDa_title{font-weight:400}.ylzLDa_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.ylzLDa_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;overflow:hidden}.ylzLDa_bodyWrap{flex-direction:column;display:flex}.ylzLDa_card{border:1px solid color-mix(in srgb, var(--ask-accent) 34%, transparent);background:color-mix(in srgb, var(--ask-accent) 6%, var(--dsw-alias-bg-base));border-radius:12px;flex-direction:column;gap:14px;margin:4px 0 4px 4px;padding:14px 16px;display:flex}.ylzLDa_item{flex-direction:column;gap:8px;min-width:0;display:flex}.ylzLDa_header{color:var(--ask-accent);font-size:var(--dsh-content-font-size-secondary,13px);font-weight:500;line-height:calc(20px + var(--dsh-content-font-delta,0px))}.ylzLDa_question{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;overflow-wrap:anywhere}.ylzLDa_detail{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;overflow-wrap:anywhere}.ylzLDa_verdict{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta,0px));margin:0}.ylzLDa_options{flex-direction:column;gap:6px;display:flex}.ylzLDa_option{border:1px solid var(--dsw-alias-border-l3);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));border-radius:8px;align-items:flex-start;gap:8px;padding:9px 12px;display:flex}.ylzLDa_option[data-chosen]{border-color:var(--ask-accent);background:color-mix(in srgb, var(--ask-accent) 14%, transparent);color:var(--ask-accent);font-weight:500}.ylzLDa_marker{width:16px;height:calc(22px + var(--dsh-content-font-delta,0px));flex:none;justify-content:center;align-items:center;display:inline-flex}.ylzLDa_optionText{flex-direction:column;gap:2px;min-width:0;display:flex}.ylzLDa_label{overflow-wrap:anywhere}.ylzLDa_desc{color:inherit;opacity:.72;font-size:var(--dsh-content-font-size-secondary,13px);font-weight:400;line-height:calc(20px + var(--dsh-content-font-delta,0px));overflow-wrap:anywhere}.ylzLDa_answers{flex-direction:column;gap:2px;display:flex}.ylzLDa_answerLine{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;overflow-wrap:anywhere}.ylzLDa_answersEmpty{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px))}.ylzLDa_fallback{white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-xs-13);color:var(--dsw-alias-label-tertiary);margin:4px 0 4px 4px}.ylzLDa_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}.ylzLDa_root:hover .ylzLDa_inspectButton,.ylzLDa_inspectButton:focus-visible{opacity:1}.ylzLDa_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}";
|
|
634
|
+
const tagId$2 = "@max-null/dsh-node-appearance/ask-card.module.css";
|
|
635
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
633
636
|
const tag = document.createElement("style");
|
|
634
637
|
tag.dataset.plugin = "@max-null/dsh-node-appearance";
|
|
635
|
-
tag.dataset.pluginCss = tagId$
|
|
636
|
-
tag.textContent = css$
|
|
638
|
+
tag.dataset.pluginCss = tagId$2;
|
|
639
|
+
tag.textContent = css$2;
|
|
637
640
|
document.head.appendChild(tag);
|
|
638
641
|
}
|
|
639
642
|
var ask_card_module_css_default = {
|
|
640
|
-
"
|
|
643
|
+
"question": "ylzLDa_question",
|
|
644
|
+
"optionText": "ylzLDa_optionText",
|
|
645
|
+
"ask-row-sweep": "ylzLDa_ask-row-sweep",
|
|
641
646
|
"summary": "ylzLDa_summary",
|
|
647
|
+
"item": "ylzLDa_item",
|
|
648
|
+
"header": "ylzLDa_header",
|
|
649
|
+
"row": "ylzLDa_row",
|
|
650
|
+
"verdict": "ylzLDa_verdict",
|
|
642
651
|
"detail": "ylzLDa_detail",
|
|
643
|
-
"
|
|
644
|
-
"
|
|
652
|
+
"options": "ylzLDa_options",
|
|
653
|
+
"bodyWrap": "ylzLDa_bodyWrap",
|
|
645
654
|
"sep": "ylzLDa_sep",
|
|
646
|
-
"inspectButton": "ylzLDa_inspectButton",
|
|
647
|
-
"answers": "ylzLDa_answers",
|
|
648
|
-
"answerLine": "ylzLDa_answerLine",
|
|
649
655
|
"leading": "ylzLDa_leading",
|
|
656
|
+
"option": "ylzLDa_option",
|
|
657
|
+
"desc": "ylzLDa_desc",
|
|
658
|
+
"answers": "ylzLDa_answers",
|
|
659
|
+
"answersEmpty": "ylzLDa_answersEmpty",
|
|
660
|
+
"card": "ylzLDa_card",
|
|
661
|
+
"chevron": "ylzLDa_chevron",
|
|
650
662
|
"title": "ylzLDa_title",
|
|
651
|
-
"ask-row-sweep": "ylzLDa_ask-row-sweep",
|
|
652
663
|
"root": "ylzLDa_root",
|
|
664
|
+
"fallback": "ylzLDa_fallback",
|
|
665
|
+
"inspectButton": "ylzLDa_inspectButton",
|
|
653
666
|
"label": "ylzLDa_label",
|
|
654
|
-
"bodyWrap": "ylzLDa_bodyWrap",
|
|
655
|
-
"row": "ylzLDa_row",
|
|
656
|
-
"verdict": "ylzLDa_verdict",
|
|
657
|
-
"desc": "ylzLDa_desc",
|
|
658
|
-
"card": "ylzLDa_card",
|
|
659
|
-
"options": "ylzLDa_options",
|
|
660
|
-
"option": "ylzLDa_option",
|
|
661
|
-
"header": "ylzLDa_header",
|
|
662
|
-
"item": "ylzLDa_item",
|
|
663
|
-
"question": "ylzLDa_question",
|
|
664
667
|
"marker": "ylzLDa_marker",
|
|
665
|
-
"
|
|
668
|
+
"answerLine": "ylzLDa_answerLine"
|
|
666
669
|
};
|
|
667
670
|
//#endregion
|
|
668
671
|
//#region src/client/ask-card.tsx
|
|
@@ -701,7 +704,7 @@ window.__ModuleLoader__.load({
|
|
|
701
704
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
702
705
|
className: ask_card_module_css_default.marker,
|
|
703
706
|
"aria-hidden": "true",
|
|
704
|
-
children: chosen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
707
|
+
children: chosen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCheckOutlineMedium, {})
|
|
705
708
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
706
709
|
className: ask_card_module_css_default.optionText,
|
|
707
710
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -777,7 +780,7 @@ window.__ModuleLoader__.load({
|
|
|
777
780
|
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
778
781
|
const hasBody = model.questions.length > 0 || model.fallbackText !== null;
|
|
779
782
|
const open = expanded && hasBody;
|
|
780
|
-
const leading = model.state === "error" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" }) : model.state === "stopped" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "warning" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
783
|
+
const leading = model.state === "error" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" }) : model.state === "stopped" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "warning" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconQuestionOutlineMedium, {});
|
|
781
784
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
782
785
|
className: ask_card_module_css_default.root,
|
|
783
786
|
"data-variant": "others",
|
|
@@ -816,13 +819,260 @@ window.__ModuleLoader__.load({
|
|
|
816
819
|
type: "button",
|
|
817
820
|
className: ask_card_module_css_default.inspectButton,
|
|
818
821
|
onClick: inspect,
|
|
819
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
822
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconInspectOutlineMedium, {}), t("row.inspect")]
|
|
820
823
|
})]
|
|
821
824
|
})
|
|
822
825
|
})
|
|
823
826
|
});
|
|
824
827
|
}
|
|
825
828
|
//#endregion
|
|
829
|
+
//#region src/client/deliverable-model.ts
|
|
830
|
+
/**
|
|
831
|
+
* 从参数 JSON 里取文件路径。
|
|
832
|
+
* 截断的 JSON(调用仍在流式输出)返回 null —— 与官方一致:那时原样显示参数
|
|
833
|
+
* 文本,而不是当成「零个文件」。
|
|
834
|
+
* @param raw - 参数 JSON 原文。
|
|
835
|
+
* @returns 路径数组;JSON 未成形时为 null。
|
|
836
|
+
*/
|
|
837
|
+
function parsePaths(raw) {
|
|
838
|
+
let args;
|
|
839
|
+
try {
|
|
840
|
+
args = JSON.parse(raw);
|
|
841
|
+
} catch {
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
if (typeof args !== "object" || args === null || !("files" in args)) return null;
|
|
845
|
+
const files = args.files;
|
|
846
|
+
if (!Array.isArray(files)) return null;
|
|
847
|
+
return files.flatMap((file) => {
|
|
848
|
+
if (typeof file !== "object" || file === null || !("path" in file)) return [];
|
|
849
|
+
const path = file.path;
|
|
850
|
+
return typeof path === "string" ? [path] : [];
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
/** 最后一个路径分隔符的下标;没有分隔符时为 -1。 */
|
|
854
|
+
function separatorAt(path) {
|
|
855
|
+
return Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
|
|
856
|
+
}
|
|
857
|
+
/** 扩展名徽标:最后一个点之后的部分,过长截断;无扩展名返回 null。 */
|
|
858
|
+
function extensionBadge(name) {
|
|
859
|
+
const dot = name.lastIndexOf(".");
|
|
860
|
+
if (dot <= 0 || dot === name.length - 1) return null;
|
|
861
|
+
const ext = name.slice(dot + 1);
|
|
862
|
+
return (ext.length <= 4 ? ext : ext.slice(0, 4)).toUpperCase();
|
|
863
|
+
}
|
|
864
|
+
/** 拆一行:路径 → 文件名 + 所在目录 + 扩展名徽标。 */
|
|
865
|
+
function fileOf(path) {
|
|
866
|
+
const cut = separatorAt(path);
|
|
867
|
+
const name = cut === -1 ? path : path.slice(cut + 1);
|
|
868
|
+
return {
|
|
869
|
+
path,
|
|
870
|
+
name,
|
|
871
|
+
dir: cut === -1 ? "" : path.slice(0, cut),
|
|
872
|
+
badge: extensionBadge(name)
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* 折叠态摘要。
|
|
877
|
+
* `paths === null` 表示参数 JSON 未成形,此时按官方做法原样显示参数文本;解析
|
|
878
|
+
* 成功但一个路径都没取到时返回空串,不把 `{"files":[]}` 这种原文当摘要抛出去。
|
|
879
|
+
*/
|
|
880
|
+
function summaryOf(paths, fallback) {
|
|
881
|
+
if (paths === null) return fallback;
|
|
882
|
+
const first = paths[0];
|
|
883
|
+
if (first === void 0) return "";
|
|
884
|
+
const name = fileOf(first).name;
|
|
885
|
+
return paths.length === 1 ? name : `${name} 等 ${String(paths.length)} 个文件`;
|
|
886
|
+
}
|
|
887
|
+
/** 结果文本:把结果节点拼成一段;未结算时没有结果。 */
|
|
888
|
+
function outputOf(settled, block) {
|
|
889
|
+
if (!settled) return "";
|
|
890
|
+
return (block.content ?? []).map((item) => item.type === "text" ? item.text ?? "" : JSON.stringify(item)).join("\n");
|
|
891
|
+
}
|
|
892
|
+
/** 错误描述:没有结果文本时的兜底,比整行空白有用。 */
|
|
893
|
+
function errorTextOf(error) {
|
|
894
|
+
if (error === void 0) return "";
|
|
895
|
+
const name = error.name ?? "error";
|
|
896
|
+
return error.code === void 0 ? name : `${name}: ${error.code}`;
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* 派生一次交付的全部渲染数据。
|
|
900
|
+
* @param block - 工具调用/结果块。
|
|
901
|
+
* @returns 状态、折叠摘要、逐文件数据与结果文本。
|
|
902
|
+
*/
|
|
903
|
+
function deliverableModel(block) {
|
|
904
|
+
const settled = "kind" in block;
|
|
905
|
+
const state = !settled ? "running" : block.error?.code === "interrupted" ? "stopped" : block.isError === true ? "error" : "ok";
|
|
906
|
+
const args = (settled ? block.call?.argsRaw : block.argsRaw) ?? "";
|
|
907
|
+
const output = outputOf(settled, block);
|
|
908
|
+
const details = output !== "" ? output : settled ? errorTextOf(block.error) : "";
|
|
909
|
+
const paths = parsePaths(args);
|
|
910
|
+
const files = paths?.map(fileOf) ?? [];
|
|
911
|
+
return {
|
|
912
|
+
state,
|
|
913
|
+
summary: summaryOf(paths, args),
|
|
914
|
+
files,
|
|
915
|
+
details,
|
|
916
|
+
lineCount: details === "" ? 0 : details.split("\n").length,
|
|
917
|
+
expandable: files.length > 0 || details !== ""
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region \0dsh-css:H:\MaxNull\WorkStation\max-null-plugins\dsh-node-appearance\src\client\deliverable-row.module.css.mjs
|
|
922
|
+
const css$1 = "._8xFzxq_root{--deliverable-accent:var(--ncolor-accent,#06b6d4);flex-direction:column;display:flex}._8xFzxq_row{position:relative;overflow:hidden}._8xFzxq_root[data-state=running] ._8xFzxq_row:after{content:\"\";background:linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--dsw-alias-bg-base) 60%, transparent) 55%, transparent 100%);pointer-events:none;width:300px;animation:2.6s ease-out infinite _8xFzxq_deliverable-row-sweep;position:absolute;top:0;bottom:0;left:0}@keyframes _8xFzxq_deliverable-row-sweep{0%{left:-300px}90%,to{left:100%}}._8xFzxq_leading{flex-shrink:0}._8xFzxq_chevron{color:var(--dsw-alias-label-secondary)}._8xFzxq_title{font-weight:400}._8xFzxq_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}._8xFzxq_summary{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;align-items:center;gap:8px;display:flex;overflow:hidden}._8xFzxq_state{color:var(--dsw-alias-label-secondary);flex:none}._8xFzxq_paths{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._8xFzxq_bodyWrap{flex-direction:column;padding:2px 0 2px 4px;display:flex}._8xFzxq_files{flex-direction:column;gap:4px;margin:4px 0 0;padding:0;list-style:none;display:flex}._8xFzxq_file{align-items:center;gap:8px;min-width:0;display:flex}._8xFzxq_ext{box-sizing:border-box;background:color-mix(in srgb, var(--deliverable-accent) 14%, transparent);width:38px;color:var(--deliverable-accent);letter-spacing:.04em;text-align:center;border-radius:4px;flex:none;padding:1px 4px;font-size:10px;font-weight:600;line-height:16px}._8xFzxq_name{color:var(--dsw-alias-label-primary);font-size:var(--dsh-content-font-size,14px);line-height:calc(20px + var(--dsh-content-font-delta,0px));overflow-wrap:anywhere;flex:none}._8xFzxq_path{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta,0px));flex:auto;overflow:hidden}._8xFzxq_meta{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta,0px));margin-top:10px}._8xFzxq_output{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px;margin:8px 0 0;padding:12px;font-size:12px}._8xFzxq_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:8px 0 2px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}._8xFzxq_root:hover ._8xFzxq_inspectButton,._8xFzxq_inspectButton:focus-visible{opacity:1}._8xFzxq_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}";
|
|
923
|
+
const tagId$1 = "@max-null/dsh-node-appearance/deliverable-row.module.css";
|
|
924
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
925
|
+
const tag = document.createElement("style");
|
|
926
|
+
tag.dataset.plugin = "@max-null/dsh-node-appearance";
|
|
927
|
+
tag.dataset.pluginCss = tagId$1;
|
|
928
|
+
tag.textContent = css$1;
|
|
929
|
+
document.head.appendChild(tag);
|
|
930
|
+
}
|
|
931
|
+
var deliverable_row_module_css_default = {
|
|
932
|
+
"title": "_8xFzxq_title",
|
|
933
|
+
"sep": "_8xFzxq_sep",
|
|
934
|
+
"deliverable-row-sweep": "_8xFzxq_deliverable-row-sweep",
|
|
935
|
+
"files": "_8xFzxq_files",
|
|
936
|
+
"state": "_8xFzxq_state",
|
|
937
|
+
"bodyWrap": "_8xFzxq_bodyWrap",
|
|
938
|
+
"output": "_8xFzxq_output",
|
|
939
|
+
"row": "_8xFzxq_row",
|
|
940
|
+
"meta": "_8xFzxq_meta",
|
|
941
|
+
"inspectButton": "_8xFzxq_inspectButton",
|
|
942
|
+
"paths": "_8xFzxq_paths",
|
|
943
|
+
"chevron": "_8xFzxq_chevron",
|
|
944
|
+
"leading": "_8xFzxq_leading",
|
|
945
|
+
"name": "_8xFzxq_name",
|
|
946
|
+
"file": "_8xFzxq_file",
|
|
947
|
+
"summary": "_8xFzxq_summary",
|
|
948
|
+
"path": "_8xFzxq_path",
|
|
949
|
+
"root": "_8xFzxq_root",
|
|
950
|
+
"ext": "_8xFzxq_ext"
|
|
951
|
+
};
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region src/client/deliverable-row.tsx
|
|
954
|
+
/**
|
|
955
|
+
* 交付行:接管 `present` 的工具行。
|
|
956
|
+
*
|
|
957
|
+
* 官方 PresentRow 是一个 45 行的折叠行:状态点 + 「交付文件」标题 + **逗号拼接
|
|
958
|
+
* 的文件名** + 可展开的结果文本 + inspect 入口。多文件时那串文件名会挤成一行
|
|
959
|
+
* 读不完,也看不出这一轮交付了几个。
|
|
960
|
+
*
|
|
961
|
+
* 本组件保留官方全部信息与交互(四态、状态词、文件名、结果文本、inspect,以及
|
|
962
|
+
* `data-tool="present"` / `data-state` 这两个样式与快照测试的锚点),另加三件:
|
|
963
|
+
* ① 折叠态文件名只报「首个 + 数量」,多文件不再挤成一行;
|
|
964
|
+
* ② 展开态逐文件成行,带扩展名徽标与所在目录;
|
|
965
|
+
* ③ 结果文本标注行数。
|
|
966
|
+
*
|
|
967
|
+
* 全部派生在 deliverable-model.ts 里,本文件只做 JSX。
|
|
968
|
+
*
|
|
969
|
+
* 接管是 DSH 支持的机制(keyed slot 用不同 priority 遮蔽既有占用者,见
|
|
970
|
+
* ui-slots 的 `register()`;官方插件开发 skill:registering an existing key
|
|
971
|
+
* may replace the product's default card)。代价是本文件要自己承担官方行的
|
|
972
|
+
* 折叠外观 —— 因此行外壳逐项对齐 ToolRow.module.css 与同插件的提问卡
|
|
973
|
+
* (24px 行高、2px 分隔点、13px 次级摘要、running 扫光、hover 才现的
|
|
974
|
+
* Inspect 胶囊),组件全部来自共享 ui-primitives。
|
|
975
|
+
*
|
|
976
|
+
* 下载卡片与「打开」菜单不在这里:它们属于 `conversation.chat.turnTail` 槽的
|
|
977
|
+
* Deliverables 网格,与本 toolview 是两个不同的槽,接管互不影响。
|
|
978
|
+
*/
|
|
979
|
+
/** 状态点的外观名,四态映射与官方 PresentRow 一致。 */
|
|
980
|
+
const DOT = {
|
|
981
|
+
running: "ongoing",
|
|
982
|
+
ok: "done",
|
|
983
|
+
stopped: "warning",
|
|
984
|
+
error: "error"
|
|
985
|
+
};
|
|
986
|
+
/** 逐文件一行:扩展名徽标 + 文件名 + 所在目录(完整路径挂在 title 上)。 */
|
|
987
|
+
function FileLine({ file }) {
|
|
988
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
989
|
+
className: deliverable_row_module_css_default.file,
|
|
990
|
+
children: [
|
|
991
|
+
file.badge !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
992
|
+
className: deliverable_row_module_css_default.ext,
|
|
993
|
+
"aria-hidden": true,
|
|
994
|
+
children: file.badge
|
|
995
|
+
}),
|
|
996
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
997
|
+
className: deliverable_row_module_css_default.name,
|
|
998
|
+
children: file.name
|
|
999
|
+
}),
|
|
1000
|
+
file.dir !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1001
|
+
className: deliverable_row_module_css_default.path,
|
|
1002
|
+
title: file.path,
|
|
1003
|
+
children: file.dir
|
|
1004
|
+
})
|
|
1005
|
+
]
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* 渲染一次交付的完整记录。
|
|
1010
|
+
* @param props - locale 翻译函数、调用/结果切片与可选的轨迹入口。
|
|
1011
|
+
* @returns 折叠行 + 展开后的文件清单与结果文本。
|
|
1012
|
+
*/
|
|
1013
|
+
function DeliverableRow({ t, block, inspect }) {
|
|
1014
|
+
const model = deliverableModel(block);
|
|
1015
|
+
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
1016
|
+
const open = expanded && model.expandable;
|
|
1017
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1018
|
+
className: deliverable_row_module_css_default.root,
|
|
1019
|
+
"data-variant": "others",
|
|
1020
|
+
"data-tool": "present",
|
|
1021
|
+
"data-state": model.state,
|
|
1022
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
1023
|
+
rowClassName: deliverable_row_module_css_default.row,
|
|
1024
|
+
leadingClassName: deliverable_row_module_css_default.leading,
|
|
1025
|
+
titleClassName: deliverable_row_module_css_default.title,
|
|
1026
|
+
chevronClassName: deliverable_row_module_css_default.chevron,
|
|
1027
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: DOT[model.state] }),
|
|
1028
|
+
title: t("row.title"),
|
|
1029
|
+
open,
|
|
1030
|
+
expandable: model.expandable,
|
|
1031
|
+
expandOnRowClick: true,
|
|
1032
|
+
keepContentWhenOpen: true,
|
|
1033
|
+
onToggle: () => {
|
|
1034
|
+
setExpanded((value) => !value);
|
|
1035
|
+
},
|
|
1036
|
+
collapsedContent: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1037
|
+
className: deliverable_row_module_css_default.sep,
|
|
1038
|
+
"aria-hidden": true
|
|
1039
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1040
|
+
className: deliverable_row_module_css_default.summary,
|
|
1041
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1042
|
+
className: deliverable_row_module_css_default.state,
|
|
1043
|
+
children: t(`row.${model.state}`)
|
|
1044
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1045
|
+
className: deliverable_row_module_css_default.paths,
|
|
1046
|
+
children: model.summary
|
|
1047
|
+
})]
|
|
1048
|
+
})] }),
|
|
1049
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1050
|
+
className: deliverable_row_module_css_default.bodyWrap,
|
|
1051
|
+
children: [
|
|
1052
|
+
model.files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
1053
|
+
className: deliverable_row_module_css_default.files,
|
|
1054
|
+
"aria-label": t("presented.all", { count: model.files.length }),
|
|
1055
|
+
children: model.files.map((file, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileLine, { file }, `${String(index)}-${file.path}`))
|
|
1056
|
+
}),
|
|
1057
|
+
model.details !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [model.files.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1058
|
+
className: deliverable_row_module_css_default.meta,
|
|
1059
|
+
children: `输出 ${String(model.lineCount)} 行`
|
|
1060
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
1061
|
+
className: deliverable_row_module_css_default.output,
|
|
1062
|
+
children: model.details
|
|
1063
|
+
})] }),
|
|
1064
|
+
inspect !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1065
|
+
type: "button",
|
|
1066
|
+
className: deliverable_row_module_css_default.inspectButton,
|
|
1067
|
+
onClick: inspect,
|
|
1068
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconInspectOutlineMedium, {}), t("row.inspect")]
|
|
1069
|
+
})
|
|
1070
|
+
]
|
|
1071
|
+
})
|
|
1072
|
+
})
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
//#endregion
|
|
826
1076
|
//#region \0dsh-css:H:\MaxNull\WorkStation\max-null-plugins\dsh-node-appearance\src\client\goal-detail.module.css.mjs
|
|
827
1077
|
const css = ".WyWU3a_root{box-sizing:border-box;width:calc(100% - var(--dsh-composer-side-clearance) - var(--dsh-composer-side-clearance) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));max-width:calc(var(--dsh-composer-card-max-width) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset) - var(--dsh-composer-dock-inset));border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-specific-tip);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-top-color:#0000;border-radius:0 0 12px 12px;flex:none;margin:-6px auto 0;overflow:hidden}[data-goal-bar]>div:first-child{border-bottom-color:#0000;border-bottom-right-radius:0;border-bottom-left-radius:0}.WyWU3a_body{flex-direction:column;gap:8px;padding:6px 12px;display:flex}.WyWU3a_header{text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:10px;width:100%;padding:0;display:flex}.WyWU3a_lead{color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.WyWU3a_title{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}.WyWU3a_summary{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:auto;font-size:13px;line-height:20px;overflow:hidden}.WyWU3a_chevron{color:var(--dsw-alias-label-tertiary);flex:none;place-items:center;display:grid}.WyWU3a_detail{flex-direction:column;gap:6px;max-height:180px;margin:0;display:flex;overflow-y:auto}.WyWU3a_row{grid-template-columns:max-content 1fr;align-items:baseline;column-gap:10px;margin:0;display:grid}.WyWU3a_key{color:var(--dsw-alias-label-caption);font-size:13px;line-height:20px}.WyWU3a_value{min-width:0;color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:20px}.WyWU3a_code{font-family:var(--ds-font-family-code);color:var(--dsw-alias-label-caption);font-size:11px}.WyWU3a_value>.WyWU3a_code:not(:first-child){margin-left:8px}";
|
|
828
1078
|
const tagId = "@max-null/dsh-node-appearance/goal-detail.module.css";
|
|
@@ -834,18 +1084,18 @@ window.__ModuleLoader__.load({
|
|
|
834
1084
|
document.head.appendChild(tag);
|
|
835
1085
|
}
|
|
836
1086
|
var goal_detail_module_css_default = {
|
|
837
|
-
"
|
|
838
|
-
"summary": "WyWU3a_summary",
|
|
839
|
-
"row": "WyWU3a_row",
|
|
840
|
-
"lead": "WyWU3a_lead",
|
|
1087
|
+
"title": "WyWU3a_title",
|
|
841
1088
|
"value": "WyWU3a_value",
|
|
842
|
-
"chevron": "WyWU3a_chevron",
|
|
843
|
-
"key": "WyWU3a_key",
|
|
844
|
-
"detail": "WyWU3a_detail",
|
|
845
1089
|
"code": "WyWU3a_code",
|
|
846
|
-
"
|
|
1090
|
+
"chevron": "WyWU3a_chevron",
|
|
847
1091
|
"body": "WyWU3a_body",
|
|
848
|
-
"
|
|
1092
|
+
"lead": "WyWU3a_lead",
|
|
1093
|
+
"root": "WyWU3a_root",
|
|
1094
|
+
"header": "WyWU3a_header",
|
|
1095
|
+
"detail": "WyWU3a_detail",
|
|
1096
|
+
"row": "WyWU3a_row",
|
|
1097
|
+
"key": "WyWU3a_key",
|
|
1098
|
+
"summary": "WyWU3a_summary"
|
|
849
1099
|
};
|
|
850
1100
|
//#endregion
|
|
851
1101
|
//#region src/client/goal-detail.tsx
|
|
@@ -922,7 +1172,7 @@ window.__ModuleLoader__.load({
|
|
|
922
1172
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
923
1173
|
className: goal_detail_module_css_default.lead,
|
|
924
1174
|
"aria-hidden": true,
|
|
925
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
1175
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGoalOutlineMedium, { size: 14 })
|
|
926
1176
|
}),
|
|
927
1177
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
928
1178
|
className: goal_detail_module_css_default.title,
|
|
@@ -935,7 +1185,7 @@ window.__ModuleLoader__.load({
|
|
|
935
1185
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
936
1186
|
className: goal_detail_module_css_default.chevron,
|
|
937
1187
|
"aria-hidden": true,
|
|
938
|
-
children: collapsed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
1188
|
+
children: collapsed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronUpOutlineMedium, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineMedium, {})
|
|
939
1189
|
})
|
|
940
1190
|
]
|
|
941
1191
|
}), !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
@@ -974,10 +1224,10 @@ window.__ModuleLoader__.load({
|
|
|
974
1224
|
"slots",
|
|
975
1225
|
"connection",
|
|
976
1226
|
"remote",
|
|
977
|
-
"
|
|
1227
|
+
"configForms"
|
|
978
1228
|
];
|
|
979
1229
|
/** Upsert the plugin's paint stylesheet with the current snapshot's CSS. */
|
|
980
|
-
function paint(
|
|
1230
|
+
function paint(form) {
|
|
981
1231
|
let tag = document.querySelector(`style[data-plugin-css="${STYLE_TAG_ID}"]`);
|
|
982
1232
|
if (tag === null) {
|
|
983
1233
|
tag = document.createElement("style");
|
|
@@ -985,51 +1235,77 @@ window.__ModuleLoader__.load({
|
|
|
985
1235
|
tag.dataset.pluginCss = STYLE_TAG_ID;
|
|
986
1236
|
document.head.appendChild(tag);
|
|
987
1237
|
}
|
|
988
|
-
tag.textContent = buildCss(
|
|
1238
|
+
tag.textContent = buildCss(form.getSnapshot().value);
|
|
989
1239
|
}
|
|
990
1240
|
/**
|
|
991
1241
|
* Mount the node-appearance plugin on the page.
|
|
992
1242
|
* @param ctx - client root context.
|
|
993
1243
|
*/
|
|
994
1244
|
function apply(ctx) {
|
|
995
|
-
const
|
|
996
|
-
paint(
|
|
997
|
-
ctx.effect(() =>
|
|
998
|
-
paint(
|
|
1245
|
+
const form = ctx.configForms.get(NODE_APPEARANCE_NS);
|
|
1246
|
+
paint(form);
|
|
1247
|
+
ctx.effect(() => form.subscribe(() => {
|
|
1248
|
+
paint(form);
|
|
999
1249
|
}), "dsh-node-appearance: repaint on settings change");
|
|
1000
1250
|
const face = {
|
|
1001
|
-
hooks: { nodeAppearance:
|
|
1251
|
+
hooks: { nodeAppearance: form },
|
|
1002
1252
|
apply: async (value) => {
|
|
1003
|
-
await
|
|
1004
|
-
|
|
1005
|
-
|
|
1253
|
+
await form.mutate([
|
|
1254
|
+
{
|
|
1255
|
+
op: "set",
|
|
1256
|
+
path: ["showThinking"],
|
|
1257
|
+
value: value.showThinking ?? true
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
op: "set",
|
|
1261
|
+
path: ["colors"],
|
|
1262
|
+
value: value.colors ?? {}
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
op: "set",
|
|
1266
|
+
path: ["toolColors"],
|
|
1267
|
+
value: value.toolColors ?? {}
|
|
1268
|
+
}
|
|
1269
|
+
]);
|
|
1006
1270
|
},
|
|
1007
1271
|
setShowThinking: (show) => {
|
|
1008
|
-
|
|
1272
|
+
form.set("showThinking", show);
|
|
1009
1273
|
},
|
|
1010
1274
|
setCategoryColor: (category, color) => {
|
|
1011
|
-
const value =
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
[
|
|
1015
|
-
|
|
1275
|
+
const value = form.getSnapshot().value;
|
|
1276
|
+
form.mutate([{
|
|
1277
|
+
op: "set",
|
|
1278
|
+
path: ["colors"],
|
|
1279
|
+
value: {
|
|
1280
|
+
...value?.colors,
|
|
1281
|
+
[category]: color
|
|
1282
|
+
}
|
|
1283
|
+
}]);
|
|
1016
1284
|
},
|
|
1017
1285
|
setToolColor: (tool, color) => {
|
|
1018
|
-
const value =
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
[
|
|
1022
|
-
|
|
1286
|
+
const value = form.getSnapshot().value;
|
|
1287
|
+
form.mutate([{
|
|
1288
|
+
op: "set",
|
|
1289
|
+
path: ["toolColors"],
|
|
1290
|
+
value: {
|
|
1291
|
+
...value?.toolColors,
|
|
1292
|
+
[tool]: color
|
|
1293
|
+
}
|
|
1294
|
+
}]);
|
|
1023
1295
|
},
|
|
1024
1296
|
removeToolColor: (tool) => {
|
|
1025
|
-
const toolColors = { ...
|
|
1297
|
+
const toolColors = { ...form.getSnapshot().value?.toolColors };
|
|
1026
1298
|
delete toolColors[tool];
|
|
1027
|
-
|
|
1299
|
+
form.mutate([{
|
|
1300
|
+
op: "set",
|
|
1301
|
+
path: ["toolColors"],
|
|
1302
|
+
value: toolColors
|
|
1303
|
+
}]);
|
|
1028
1304
|
}
|
|
1029
1305
|
};
|
|
1030
|
-
ctx.slots.inject("
|
|
1031
|
-
name: "
|
|
1032
|
-
key:
|
|
1306
|
+
ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
|
|
1307
|
+
name: "plugins.bundle.config",
|
|
1308
|
+
key: "@max-null/dsh-node-appearance",
|
|
1033
1309
|
inject: () => face
|
|
1034
1310
|
}, NodeAppearanceRow));
|
|
1035
1311
|
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
@@ -1038,6 +1314,12 @@ window.__ModuleLoader__.load({
|
|
|
1038
1314
|
priority: -1,
|
|
1039
1315
|
locale: "conversation"
|
|
1040
1316
|
}, AskQuestionRow));
|
|
1317
|
+
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
1318
|
+
name: "tool.call.toolview",
|
|
1319
|
+
key: "present",
|
|
1320
|
+
priority: -1,
|
|
1321
|
+
locale: "deliverables"
|
|
1322
|
+
}, DeliverableRow));
|
|
1041
1323
|
ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|
|
1042
1324
|
name: "conversation.input.dock",
|
|
1043
1325
|
id: "max-null/goal-detail",
|