dsh-edge 0.18.0 → 0.19.0-alpha.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 +2 -2
- package/README.md +8 -8
- package/README.zh.md +8 -8
- package/THIRD_PARTY_NOTICES.md +2011 -449
- package/dist/assets/fonts/Montserrat-OFL.txt +93 -0
- package/dist/assets/fonts/montserrat-light-Cvd2VjE_.woff2 +0 -0
- package/dist/assets/fonts/montserrat-medium-B4OyO9CN.woff2 +0 -0
- package/dist/assets/fonts/montserrat-regular-DYep38cA.woff2 +0 -0
- package/dist/assets/index-Cq6ljTv2.css +1 -0
- package/dist/assets/index-Dy0OhsZ5.js +127 -0
- package/dist/assets/langs/asciidoc-Ve4PFQV2.js +2 -0
- package/dist/assets/langs/bat-BkioyH1T.js +2 -0
- package/dist/assets/langs/bibtex-CHM0blh-.js +2 -0
- package/dist/assets/langs/clojure-P80f7IUj.js +2 -0
- package/dist/assets/langs/cmake-D1j8_8rp.js +2 -0
- package/dist/assets/langs/csv-fuZLfV_i.js +2 -0
- package/dist/assets/langs/dart-bE4Kk8sk.js +2 -0
- package/dist/assets/langs/diff-D97Zzqfu.js +2 -0
- package/dist/assets/langs/dotenv-Da5cRb03.js +2 -0
- package/dist/assets/langs/elixir-CvYZzuDY.js +2 -0
- package/dist/assets/langs/erlang-DsQrWhSR.js +2 -0
- package/dist/assets/langs/fish-BvzEVeQv.js +2 -0
- package/dist/assets/langs/fsharp-CXgrBDvD.js +2 -0
- package/dist/assets/langs/graphql-DujV8YkJ.js +2 -0
- package/dist/assets/langs/groovy-gcz8RCvz.js +2 -0
- package/dist/assets/langs/haskell-Df6bDoY_.js +2 -0
- package/dist/assets/langs/hcl-BWvSN4gD.js +2 -0
- package/dist/assets/langs/html-derivative-DOyKdj44.js +2 -0
- package/dist/assets/langs/html-fwsONPVS.js +2 -0
- package/dist/assets/langs/http-DcV90OkR.js +2 -0
- package/dist/assets/langs/javascript-DI5JR1nB.js +2 -0
- package/dist/assets/langs/julia-BpJ6DjL_.js +2 -0
- package/dist/assets/langs/latex-B4C7GdlO.js +2 -0
- package/dist/assets/langs/log-2UxHyX5q.js +2 -0
- package/dist/assets/langs/make-CHLpvVh8.js +2 -0
- package/dist/assets/langs/nix-CwoSXNpI.js +2 -0
- package/dist/assets/langs/perl-DsWkoyyU.js +2 -0
- package/dist/assets/langs/php-LEPfNACG.js +2 -0
- package/dist/assets/langs/powershell-Dpen1YoG.js +2 -0
- package/dist/assets/langs/proto-C7zT0LnQ.js +2 -0
- package/dist/assets/langs/r-Dspwwk_N.js +2 -0
- package/dist/assets/langs/rst-BbocfKWr.js +2 -0
- package/dist/assets/langs/ruby-R292Iif0.js +2 -0
- package/dist/assets/langs/scala-C151Ov-r.js +2 -0
- package/dist/assets/langs/svelte-DNMY6jOf.js +2 -0
- package/dist/assets/langs/system-verilog-CnnmHF94.js +2 -0
- package/dist/assets/langs/vb-D17OF-Vu.js +2 -0
- package/dist/assets/langs/verilog-BQ8w6xss.js +2 -0
- package/dist/assets/langs/vue-Dq2x6432.js +2 -0
- package/dist/favicon-dark.svg +3 -0
- package/dist/favicon.svg +0 -5
- package/dist/index.html +5 -4
- package/dist/manifest.webmanifest +3 -4
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +353 -101
- package/dist/plugins/@deepseek-ai/dsh-api-job-controller/client.js +367 -0
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +7223 -3584
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +1107 -991
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +119 -6
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-files/client.js +41 -35
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +354 -5279
- package/dist/plugins/@deepseek-ai/dsh-client-file-upload/client.js +10 -23
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +234 -80
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +554 -46
- package/dist/plugins/@deepseek-ai/dsh-client-shortcuts/client.js +2006 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +1090 -914
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +79 -6
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +126 -155
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +5776 -1593
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +375 -121
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +3524 -1923
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +1615 -258
- package/dist/plugins/@deepseek-ai/dsh-client-ui-directory-picker-browse/client.js +9 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +25 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +169 -24
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +413 -63
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +131 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +24 -22
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +281 -128
- package/dist/plugins/@deepseek-ai/dsh-client-ui-open-in-app/client.js +674 -223
- package/dist/plugins/@deepseek-ai/dsh-client-ui-plan/client.js +596 -18
- package/dist/plugins/@deepseek-ai/dsh-client-ui-reference/client.js +92 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +467 -59
- package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +231 -72
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +281 -117
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +642 -122
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +1565 -438
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/client.js +201 -75
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-plugins/client.js +30 -1628
- package/dist/plugins/@deepseek-ai/dsh-client-ui-shortcuts/client.js +1163 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +165 -39
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-browser/client.js +1648 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/client.js +5515 -25622
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-files/client.js +419 -118
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar-right/client.js +5692 -260
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +156 -41
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +386 -263
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +183 -73
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +2367 -429
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +788 -270
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +87 -79
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +28 -14
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +2647 -1044
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +22 -7
- package/dist/plugins/dsh-edge-client-ui/client.js +1 -10
- package/package.json +96 -86
- package/scripts/cli.mjs +16 -4
- package/scripts/install.d.mts +12 -2
- package/scripts/install.mjs +36 -9
- package/scripts/legal-files.mjs +15 -0
- package/worker/direct/index.js +2564 -1822
- package/worker/isolated/index.js +2144 -1402
- package/dist/assets/index-BKQ_L1z6.js +0 -117
- package/dist/assets/index-DPX2bQLO.css +0 -1
- package/dist/assets/langs/html-CfGypltT.js +0 -2
- package/dist/assets/langs/php-DJl5gRdb.js +0 -2
- package/dist/assets/langs/ruby-5eNB0pDK.js +0 -2
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +0 -505
- package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +0 -307
|
@@ -7,8 +7,66 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react = require("react");
|
|
10
|
+
//#region ../../util/workspace-path/src/file-address.ts
|
|
11
|
+
/** The scheme and type every file address opens with. */
|
|
12
|
+
const FILE_ADDRESS_PREFIX = "dsh-resource://file/";
|
|
13
|
+
/** Component-encode one id or path segment, keeping `:` literal for drive letters. */
|
|
14
|
+
function encodeSegment(segment) {
|
|
15
|
+
return encodeURIComponent(segment).replace(/%3A/gi, ":");
|
|
16
|
+
}
|
|
17
|
+
/** Encode a `/`-separated path segment by segment. */
|
|
18
|
+
function encodePath(path) {
|
|
19
|
+
return path.split("/").map(encodeSegment).join("/");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build the address of a file read through one Session.
|
|
23
|
+
* @param sessionId - the Session whose Host workspace resolves the path.
|
|
24
|
+
* @param path - absolute or workspace-relative path; backslashes are normalized to `/`, and leading `./` prefixes are dropped.
|
|
25
|
+
* @returns the `dsh-resource://file/session/<sessionId>/<path>` address.
|
|
26
|
+
*/
|
|
27
|
+
function sessionFileAddress(sessionId, path) {
|
|
28
|
+
const normalized = path.replace(/\\/g, "/").replace(/^(?:\.\/)+/, "");
|
|
29
|
+
return `${FILE_ADDRESS_PREFIX}session/${encodeSegment(sessionId)}/${encodePath(normalized)}`;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ../../util/workspace-path/src/index.ts
|
|
33
|
+
/**
|
|
34
|
+
* Browser-safe Workspace path and display helpers.
|
|
35
|
+
* @module @deepseek-ai/dsh-util-workspace-path
|
|
36
|
+
*/
|
|
37
|
+
/** Whether a path uses a Windows drive or UNC prefix. */
|
|
38
|
+
function isWindowsStylePath(value) {
|
|
39
|
+
return /^[A-Za-z]:[/\\]/.test(value) || value.startsWith("\\\\");
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether a path is absolute in either spelling the Host accepts: POSIX (`/a/b`) or Windows drive or UNC.
|
|
43
|
+
* @param path - the path to classify.
|
|
44
|
+
* @returns `true` for an absolute path; `false` for a Workspace-relative one.
|
|
45
|
+
*/
|
|
46
|
+
function isAbsoluteWorkspacePath(path) {
|
|
47
|
+
return path.startsWith("/") || isWindowsStylePath(path);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The address for a path as a caller holds it: a relative path, or an absolute
|
|
51
|
+
* path inside the Session's workspace, becomes a `session`-scoped address; an
|
|
52
|
+
* absolute path outside it, or one whose workspace root is unknown, keeps its
|
|
53
|
+
* absolute path in that Session's address.
|
|
54
|
+
* @param sessionId - the Session the path is read in.
|
|
55
|
+
* @param cwd - that Session's workspace root, when known.
|
|
56
|
+
* @param path - absolute or workspace-relative path, in either separator spelling.
|
|
57
|
+
* @returns the `dsh-resource://file/…` address.
|
|
58
|
+
*/
|
|
59
|
+
function fileAddressFor(sessionId, cwd, path) {
|
|
60
|
+
const normalized = path.replace(/\\/g, "/");
|
|
61
|
+
if (!isAbsoluteWorkspacePath(normalized)) return sessionFileAddress(sessionId, normalized);
|
|
62
|
+
const root = cwd === void 0 ? "" : cwd.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
63
|
+
if (root !== "" && normalized === root) return sessionFileAddress(sessionId, "");
|
|
64
|
+
if (root !== "" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));
|
|
65
|
+
return sessionFileAddress(sessionId, normalized);
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
10
68
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-skill/src/client/SkillRow.module.css.mjs
|
|
11
|
-
const css = ".iWrAna_card{flex-direction:column;display:flex}.iWrAna_row{align-items:center;min-width:0;
|
|
69
|
+
const css = ".iWrAna_card{flex-direction:column;display:flex}.iWrAna_row{height:calc(24px + var(--dsh-content-font-delta,0px));align-items:center;min-width:0;display:flex;position:relative;overflow:hidden}.iWrAna_row[data-expandable]{cursor:pointer}.iWrAna_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}.iWrAna_leading svg{width:calc(14px + var(--dsh-content-font-delta,0px));height:calc(14px + var(--dsh-content-font-delta,0px))}.iWrAna_chevron{color:var(--dsw-alias-label-secondary)}.iWrAna_iconIdle{opacity:1;transition:opacity .1s;display:inline-flex}.iWrAna_chevronHover{opacity:0;margin:auto;transition:opacity .1s;position:absolute;inset:0}.iWrAna_row:hover .iWrAna_iconIdle{opacity:0}.iWrAna_row:hover .iWrAna_chevronHover{opacity:1}.iWrAna_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}.iWrAna_separator{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.iWrAna_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}.iWrAna_errorSummary{color:var(--dsw-alias-state-error-primary)}.iWrAna_stoppedSummary{color:var(--dsw-alias-state-warn-label)}.iWrAna_bodyWrap{flex-direction:column;display:flex}.iWrAna_instructionsCard{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);flex-direction:column;max-height:260px;margin:4px 0 4px 4px;display:flex;overflow:hidden}.iWrAna_instructionsHeader{border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-markdown-code-block-banner);color:var(--dsw-alias-label-caption);text-transform:uppercase;letter-spacing:.04em;flex:none;padding:8px 12px;font-size:11px;font-weight:500;line-height:16px}.iWrAna_instructions{white-space:pre-wrap;overflow-wrap:anywhere;min-height:0;font:var(--dsw-font-markdown-code-block-small);color:var(--dsw-alias-label-secondary);margin:0;padding:10px 12px 12px;overflow:auto}.iWrAna_instructions[data-error]{color:var(--dsw-alias-state-error-primary)}.iWrAna_instructions::-webkit-scrollbar-thumb{border-radius:var(--dsw-radius-sm);background-clip:padding-box;border:2px solid #0000}.iWrAna_instructions::-webkit-scrollbar-track{margin:6px 0}.iWrAna_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}.iWrAna_card:hover .iWrAna_inspectButton,.iWrAna_inspectButton:focus-visible{opacity:1}.iWrAna_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.iWrAna_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.iWrAna_iconIdle,.iWrAna_chevronHover,.iWrAna_inspectButton{transition:none}}";
|
|
12
70
|
const tagId = "@deepseek-ai/dsh-client-ui-skill/SkillRow.module.css";
|
|
13
71
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
14
72
|
const tag = document.createElement("style");
|
|
@@ -22,7 +80,6 @@ window.__ModuleLoader__.load({
|
|
|
22
80
|
"card": "iWrAna_card",
|
|
23
81
|
"chevron": "iWrAna_chevron",
|
|
24
82
|
"chevronHover": "iWrAna_chevronHover",
|
|
25
|
-
"dsh-skill-row-sweep": "iWrAna_dsh-skill-row-sweep",
|
|
26
83
|
"errorSummary": "iWrAna_errorSummary",
|
|
27
84
|
"iconIdle": "iWrAna_iconIdle",
|
|
28
85
|
"inspectButton": "iWrAna_inspectButton",
|
|
@@ -32,6 +89,7 @@ window.__ModuleLoader__.load({
|
|
|
32
89
|
"leading": "iWrAna_leading",
|
|
33
90
|
"row": "iWrAna_row",
|
|
34
91
|
"separator": "iWrAna_separator",
|
|
92
|
+
"stoppedSummary": "iWrAna_stoppedSummary",
|
|
35
93
|
"summary": "iWrAna_summary",
|
|
36
94
|
"title": "iWrAna_title",
|
|
37
95
|
"visuallyHidden": "iWrAna_visuallyHidden"
|
|
@@ -76,30 +134,21 @@ window.__ModuleLoader__.load({
|
|
|
76
134
|
state
|
|
77
135
|
};
|
|
78
136
|
}
|
|
79
|
-
/** State substitution for the collapsed leading slot. */
|
|
80
|
-
function leadingFor(state) {
|
|
81
|
-
switch (state) {
|
|
82
|
-
case "error": return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "error" });
|
|
83
|
-
case "stopped": return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "warning" });
|
|
84
|
-
default: return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutline16, { size: 14 });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
137
|
/** Leading disclosure slot: state icon at rest, chevron on hover or while open. */
|
|
88
|
-
function disclosureLeading(
|
|
89
|
-
if (open) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
90
|
-
const icon =
|
|
138
|
+
function disclosureLeading(open, expandable) {
|
|
139
|
+
if (open) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: SkillRow_module_css_default.chevron });
|
|
140
|
+
const icon = (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size: 14 });
|
|
91
141
|
if (!expandable) return icon;
|
|
92
142
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
93
143
|
className: SkillRow_module_css_default.iconIdle,
|
|
94
144
|
children: icon
|
|
95
|
-
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
145
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `${SkillRow_module_css_default.chevron} ${SkillRow_module_css_default.chevronHover}` })] });
|
|
96
146
|
}
|
|
97
|
-
/** Visually hidden state copy for the
|
|
147
|
+
/** Visually hidden state copy for the color-only running sweep and error tone. */
|
|
98
148
|
function stateStatus(state, t) {
|
|
99
149
|
switch (state) {
|
|
100
150
|
case "running": return t("row.running");
|
|
101
151
|
case "error": return t("row.failed");
|
|
102
|
-
case "stopped": return t("row.stopped");
|
|
103
152
|
default: return null;
|
|
104
153
|
}
|
|
105
154
|
}
|
|
@@ -108,13 +157,40 @@ window.__ModuleLoader__.load({
|
|
|
108
157
|
* @param props - keyed toolview payload plus the skill locale seat.
|
|
109
158
|
* @returns the dedicated skill row.
|
|
110
159
|
*/
|
|
111
|
-
function SkillRow(
|
|
160
|
+
function SkillRow(props) {
|
|
161
|
+
if (props.phase === "preparing") return (0, react_jsx_runtime.jsx)("div", {
|
|
162
|
+
className: SkillRow_module_css_default.card,
|
|
163
|
+
"data-tool": "skill",
|
|
164
|
+
"data-state": "preparing",
|
|
165
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
166
|
+
className: SkillRow_module_css_default.row,
|
|
167
|
+
children: [
|
|
168
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
169
|
+
className: SkillRow_module_css_default.leading,
|
|
170
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size: 14 })
|
|
171
|
+
}),
|
|
172
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
173
|
+
className: SkillRow_module_css_default.visuallyHidden,
|
|
174
|
+
children: props.t("row.preparing")
|
|
175
|
+
}),
|
|
176
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
177
|
+
active: true,
|
|
178
|
+
className: SkillRow_module_css_default.title,
|
|
179
|
+
children: props.t("row.title")
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
return (0, react_jsx_runtime.jsx)(StartedSkillRow, { ...props });
|
|
185
|
+
}
|
|
186
|
+
function StartedSkillRow({ block, inspect, t }) {
|
|
112
187
|
const model = skillRowModel(block);
|
|
113
188
|
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
114
189
|
const expandable = model.output !== null;
|
|
115
190
|
const open = expanded && expandable;
|
|
116
191
|
const status = stateStatus(model.state, t);
|
|
117
|
-
const
|
|
192
|
+
const running = model.state === "running";
|
|
193
|
+
const summary = model.state === "stopped" ? t("row.stopped") : model.errorSummary ?? model.name;
|
|
118
194
|
const toggleExpand = () => {
|
|
119
195
|
setExpanded((value) => !value);
|
|
120
196
|
};
|
|
@@ -130,7 +206,7 @@ window.__ModuleLoader__.load({
|
|
|
130
206
|
onClick: toggleExpand,
|
|
131
207
|
onKeyDown: toggleFromKeyboard
|
|
132
208
|
} : {};
|
|
133
|
-
const leading = disclosureLeading(
|
|
209
|
+
const leading = disclosureLeading(open, expandable);
|
|
134
210
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
135
211
|
className: SkillRow_module_css_default.card,
|
|
136
212
|
"data-tool": "skill",
|
|
@@ -148,17 +224,23 @@ window.__ModuleLoader__.load({
|
|
|
148
224
|
className: SkillRow_module_css_default.visuallyHidden,
|
|
149
225
|
children: status
|
|
150
226
|
}) : null,
|
|
151
|
-
(0, react_jsx_runtime.
|
|
152
|
-
|
|
153
|
-
children:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
227
|
+
(0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, {
|
|
228
|
+
active: running,
|
|
229
|
+
children: [
|
|
230
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
231
|
+
className: SkillRow_module_css_default.title,
|
|
232
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: t("row.title") })
|
|
233
|
+
}),
|
|
234
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
235
|
+
className: SkillRow_module_css_default.separator,
|
|
236
|
+
"data-shimmer-decoration": true,
|
|
237
|
+
"aria-hidden": true
|
|
238
|
+
}),
|
|
239
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
240
|
+
className: `${SkillRow_module_css_default.summary}${model.state === "error" ? ` ${SkillRow_module_css_default.errorSummary}` : model.state === "stopped" ? ` ${SkillRow_module_css_default.stoppedSummary}` : ""}`,
|
|
241
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { children: summary })
|
|
242
|
+
})
|
|
243
|
+
]
|
|
162
244
|
})
|
|
163
245
|
]
|
|
164
246
|
}), open ? (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -178,7 +260,7 @@ window.__ModuleLoader__.load({
|
|
|
178
260
|
type: "button",
|
|
179
261
|
className: SkillRow_module_css_default.inspectButton,
|
|
180
262
|
onClick: inspect,
|
|
181
|
-
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
263
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconInspectOutlineRegular, {}), t("row.inspect")]
|
|
182
264
|
}) : null]
|
|
183
265
|
}) : null]
|
|
184
266
|
});
|
|
@@ -190,8 +272,9 @@ window.__ModuleLoader__.load({
|
|
|
190
272
|
const NS = "skill";
|
|
191
273
|
/** Simplified Chinese dictionary (the key-set source of truth). */
|
|
192
274
|
const zh = {
|
|
193
|
-
"row.title": "
|
|
275
|
+
"row.title": "加载技能",
|
|
194
276
|
"row.running": "正在加载 skill",
|
|
277
|
+
"row.preparing": "准备加载技能",
|
|
195
278
|
"row.failed": "skill 加载失败",
|
|
196
279
|
"row.stopped": "skill 加载已中止",
|
|
197
280
|
"row.instructions": "说明",
|
|
@@ -202,6 +285,7 @@ window.__ModuleLoader__.load({
|
|
|
202
285
|
const en = {
|
|
203
286
|
"row.title": "Skill",
|
|
204
287
|
"row.running": "Loading skill",
|
|
288
|
+
"row.preparing": "Preparing to load a skill",
|
|
205
289
|
"row.failed": "Skill load failed",
|
|
206
290
|
"row.stopped": "Skill load stopped",
|
|
207
291
|
"row.instructions": "Instructions",
|
|
@@ -217,7 +301,8 @@ window.__ModuleLoader__.load({
|
|
|
217
301
|
"slots",
|
|
218
302
|
"locale",
|
|
219
303
|
"remote",
|
|
220
|
-
"remote.skills"
|
|
304
|
+
"remote.skills",
|
|
305
|
+
"sidebarRight"
|
|
221
306
|
];
|
|
222
307
|
/**
|
|
223
308
|
* Client plugin body: register the '/' source, dictionaries, and keyed tool row.
|
|
@@ -245,14 +330,23 @@ window.__ModuleLoader__.load({
|
|
|
245
330
|
}
|
|
246
331
|
};
|
|
247
332
|
const fetchCatalog = (sessionId) => {
|
|
248
|
-
if (sessions.subagentAddress(sessionId) !== void 0) return Promise.resolve([]);
|
|
249
333
|
const existing = fetches.get(sessionId);
|
|
250
|
-
if (existing !== void 0) return existing
|
|
334
|
+
if (existing !== void 0) return existing;
|
|
251
335
|
const abort = new AbortController();
|
|
252
336
|
const promise = (async () => {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
337
|
+
if (sessions.binding(sessionId) === void 0) throw new Error(`skill catalog requires a retained session "${sessionId}"`);
|
|
338
|
+
return sessions.using(sessionId, {
|
|
339
|
+
source: "skillCatalog",
|
|
340
|
+
signal: abort.signal
|
|
341
|
+
}, async (reference) => {
|
|
342
|
+
abort.signal.throwIfAborted();
|
|
343
|
+
const state = reference.binding.session.getSnapshot();
|
|
344
|
+
if (state.openState !== "open") throw state.openError ?? /* @__PURE__ */ new Error(`session "${sessionId}" is not open`);
|
|
345
|
+
const result = await skills.list({ sessionId }, abort.signal);
|
|
346
|
+
abort.signal.throwIfAborted();
|
|
347
|
+
if (!result.ok) throw new Error(`skills/list failed: ${result.error.code}: ${result.error.message}`);
|
|
348
|
+
return result.value.skills;
|
|
349
|
+
});
|
|
256
350
|
})();
|
|
257
351
|
const entry = {
|
|
258
352
|
promise,
|
|
@@ -265,7 +359,7 @@ window.__ModuleLoader__.load({
|
|
|
265
359
|
}, () => {
|
|
266
360
|
if (fetches.get(sessionId) === entry) fetches.delete(sessionId);
|
|
267
361
|
});
|
|
268
|
-
return
|
|
362
|
+
return entry;
|
|
269
363
|
};
|
|
270
364
|
const invalidate = (key) => {
|
|
271
365
|
const entry = fetches.get(key);
|
|
@@ -283,7 +377,8 @@ window.__ModuleLoader__.load({
|
|
|
283
377
|
name: "skill",
|
|
284
378
|
order: 2,
|
|
285
379
|
async candidates(session, { query, signal }) {
|
|
286
|
-
|
|
380
|
+
if (sessions.subagentAddress(session.sessionId) !== void 0) return [];
|
|
381
|
+
const skills = await fetchCatalog(session.sessionId).promise;
|
|
287
382
|
if (signal.aborted) return [];
|
|
288
383
|
return (0, _deepseek_ai_dsh_client_ui_primitives.rankByName)(skills, query).map((skill) => ({
|
|
289
384
|
name: skill.name,
|
|
@@ -291,7 +386,8 @@ window.__ModuleLoader__.load({
|
|
|
291
386
|
}));
|
|
292
387
|
},
|
|
293
388
|
warm(session) {
|
|
294
|
-
|
|
389
|
+
if (sessions.subagentAddress(session.sessionId) !== void 0) return;
|
|
390
|
+
fetchCatalog(session.sessionId).promise.catch(() => {});
|
|
295
391
|
},
|
|
296
392
|
lexicon(session) {
|
|
297
393
|
return fetches.get(session.sessionId)?.settled?.map((skill) => skill.name);
|
|
@@ -306,6 +402,25 @@ window.__ModuleLoader__.load({
|
|
|
306
402
|
if (listeners.size === 0) lexiconListeners.delete(key);
|
|
307
403
|
};
|
|
308
404
|
},
|
|
405
|
+
openReference(session, { ref }) {
|
|
406
|
+
if (sessions.subagentAddress(session.sessionId) !== void 0) return false;
|
|
407
|
+
const cwd = sessions.list.getSnapshot().byId[session.sessionId]?.cwd;
|
|
408
|
+
const open = (catalog) => {
|
|
409
|
+
const path = catalog.find((skill) => `/${skill.name}` === ref)?.path;
|
|
410
|
+
if (path === void 0) return false;
|
|
411
|
+
ctx.sidebarRight.openResource(fileAddressFor(session.sessionId, cwd, path));
|
|
412
|
+
return true;
|
|
413
|
+
};
|
|
414
|
+
const settled = fetches.get(session.sessionId)?.settled;
|
|
415
|
+
if (settled !== void 0) return open(settled);
|
|
416
|
+
const entry = fetchCatalog(session.sessionId);
|
|
417
|
+
entry.promise.then((catalog) => {
|
|
418
|
+
if (!entry.abort.signal.aborted) open(catalog);
|
|
419
|
+
}).catch((error) => {
|
|
420
|
+
if (!entry.abort.signal.aborted) console.error("[ui-skill] reference preview failed:", error);
|
|
421
|
+
});
|
|
422
|
+
return true;
|
|
423
|
+
},
|
|
309
424
|
onPick({ candidate }) {
|
|
310
425
|
return { text: `/${candidate.name} ` };
|
|
311
426
|
}
|