dsh-edge 0.9.0 → 0.10.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/THIRD_PARTY_NOTICES.md +1318 -1075
- package/dist/assets/index-Df-65__b.js +110 -0
- package/dist/assets/index-b24khbeK.css +1 -0
- package/dist/assets/langs/{php-DDkx9sim.js → php-DJl5gRdb.js} +2 -2
- package/dist/assets/langs/{ruby-DCxyoPen.js → ruby-5eNB0pDK.js} +2 -2
- package/dist/assets/vendor-BNsW4eBh.css +1 -0
- package/dist/assets/vendor-CCJJTK99.js +411 -0
- package/dist/index.html +8 -8
- package/dist/plugins/@deepseek-ai/dsh-api-gateway/client.js +1513 -77
- package/dist/plugins/@deepseek-ai/dsh-api-remotes/client.js +3608 -757
- package/dist/plugins/@deepseek-ai/dsh-api-session-controller/client.js +2777 -0
- package/dist/plugins/@deepseek-ai/dsh-api-workspace-controller/client.js +415 -0
- package/dist/plugins/@deepseek-ai/dsh-client-connection/client.js +1975 -7466
- package/dist/plugins/@deepseek-ai/dsh-client-locale/client.js +225 -76
- package/dist/plugins/@deepseek-ai/dsh-client-modules/client.js +67 -15
- package/dist/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js +270 -460
- package/dist/plugins/@deepseek-ai/dsh-client-ui-approval/client.js +292 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js +42 -17
- package/dist/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js +7 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-chat/client.js +8177 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-commands/client.js +22 -10
- package/dist/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js +14950 -8910
- package/dist/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js +161 -137
- package/dist/plugins/@deepseek-ai/dsh-client-ui-goal/client.js +6 -7
- package/dist/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js +268 -40
- package/dist/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js +1 -1
- package/dist/plugins/@deepseek-ai/dsh-client-ui-layout/client.js +45 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-message-feedback/client.js +30 -58
- package/dist/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js +188 -89
- package/dist/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js +105 -75
- package/dist/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js +650 -188
- package/dist/plugins/@deepseek-ai/dsh-client-ui-schedule/client.js +307 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-session/client.js +340 -0
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings/client.js +57 -50
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js +134 -69
- package/dist/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js +575 -442
- package/dist/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js +24 -11
- package/dist/plugins/@deepseek-ai/dsh-client-ui-skill/client.js +13 -9
- package/dist/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js +44 -20
- package/dist/plugins/@deepseek-ai/dsh-client-ui-theme/client.js +265 -94
- package/dist/plugins/@deepseek-ai/dsh-client-ui-tool/client.js +899 -433
- package/dist/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js +1472 -613
- package/dist/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js +249 -95
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js +5 -5
- package/dist/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js +425 -146
- package/dist/plugins/@deepseek-ai/dsh-typert-registry/client.js +29 -14
- package/dist/plugins/dsh-edge-client-ui/client.js +28 -26
- package/package.json +62 -58
- package/scripts/verify-packed.mjs +1 -1
- package/worker/direct/index.js +2866 -1466
- package/worker/isolated/index.js +2438 -1038
- package/dist/assets/index-C6eRlFa6.css +0 -1
- package/dist/assets/index-ClqxG24t.js +0 -96
- package/dist/assets/vendor-CjyC-hUb.css +0 -1
- package/dist/assets/vendor-D22_Mp1f.js +0 -411
- package/dist/plugins/@deepseek-ai/dsh-client-runtime/client.js +0 -10574
|
@@ -4,36 +4,101 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
7
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
9
|
let react = require("react");
|
|
9
|
-
|
|
10
|
+
//#region ../../core/session/src/surface.ts
|
|
11
|
+
/** Runtime counterpart of the message-producing event union. */
|
|
12
|
+
const SURFACE_EVENT_TYPES = new Set([
|
|
13
|
+
"user/message",
|
|
14
|
+
"assistant/message",
|
|
15
|
+
"tool/result"
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* Narrow an event to a surface-eligible event carrying its required marker.
|
|
19
|
+
* @param event - event to test.
|
|
20
|
+
* @returns true when both the type and marker identify a surface event.
|
|
21
|
+
*/
|
|
22
|
+
function isSurfaceEvent(event) {
|
|
23
|
+
if (!SURFACE_EVENT_TYPES.has(event.type)) return false;
|
|
24
|
+
return event.surfaceOp !== void 0;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Narrow an event to an append-origin surface event: one that entered the
|
|
28
|
+
* surface at its own log position and was never itself a replacement copy.
|
|
29
|
+
*
|
|
30
|
+
* The model-visible surface deliberately shadows replaced ranges, so it is the
|
|
31
|
+
* wrong source for a human transcript — a landed replacement would erase
|
|
32
|
+
* conversation the user already saw. Append-origin events are that transcript's
|
|
33
|
+
* durable source material; replacement copies stay model-only.
|
|
34
|
+
* @param event - event to test.
|
|
35
|
+
* @returns true when the event appended to the surface tail.
|
|
36
|
+
*/
|
|
37
|
+
function isAppendSurfaceEvent(event) {
|
|
38
|
+
return isSurfaceEvent(event) && event.surfaceOp === "append";
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
10
41
|
//#region lib/types/client/turn-deliverables.js
|
|
11
42
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* nothing to open — a read looked, a delete removed, a terminal ran. Only
|
|
16
|
-
* root call views enter this Turn accumulator; nested Code Mode dispatches
|
|
17
|
-
* preserve the pre-assembly behavior and do not contribute independently.
|
|
43
|
+
* Turn-scoped produced-file Definition and readers. Client-only and
|
|
44
|
+
* model-free: the vocabulary comes from successful first-party mutation
|
|
45
|
+
* calls, never presentation data or the closing prose.
|
|
18
46
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Extract the path from a supported first-party mutation call. Session
|
|
49
|
+
* `tool/call` events are root calls; Code Dispatch children do not enter this
|
|
50
|
+
* Definition independently.
|
|
51
|
+
* @param name - wire tool name.
|
|
52
|
+
* @param argsRaw - model-produced JSON arguments.
|
|
53
|
+
* @returns the mutation path, or null when the call is not a supported mutation.
|
|
54
|
+
*/
|
|
55
|
+
function mutationPath(name, argsRaw) {
|
|
56
|
+
let args;
|
|
57
|
+
try {
|
|
58
|
+
args = JSON.parse(argsRaw);
|
|
59
|
+
} catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (!isRecord(args)) return null;
|
|
63
|
+
switch (name) {
|
|
64
|
+
case "write": return typeof args.content === "string" ? pathValue(args.file_path) : null;
|
|
65
|
+
case "edit": return validEditArgs(args) ? pathValue(args.file_path) : null;
|
|
66
|
+
case "str_replace_editor": return editorMutationPath(args);
|
|
67
|
+
default: return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** Validate the fields that an `edit` execution requires. */
|
|
71
|
+
function validEditArgs(args) {
|
|
72
|
+
return typeof args.old_string === "string" && args.old_string.length > 0 && typeof args.new_string === "string" && args.old_string !== args.new_string && (args.replace_all === void 0 || typeof args.replace_all === "boolean");
|
|
73
|
+
}
|
|
74
|
+
/** Extract a path only from a complete mutating editor command. */
|
|
75
|
+
function editorMutationPath(args) {
|
|
76
|
+
const path = pathValue(args.path);
|
|
77
|
+
if (path === null) return null;
|
|
78
|
+
switch (args.command) {
|
|
79
|
+
case "create": return typeof args.file_text === "string" ? path : null;
|
|
80
|
+
case "str_replace": return typeof args.old_str === "string" && args.old_str.length > 0 && (args.new_str === void 0 || typeof args.new_str === "string") ? path : null;
|
|
81
|
+
case "insert": return typeof args.insert_line === "number" && Number.isInteger(args.insert_line) && args.insert_line >= 0 && typeof args.new_str === "string" ? path : null;
|
|
82
|
+
default: return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** A non-blank path preserves the exact spelling supplied to the tool. */
|
|
86
|
+
function pathValue(value) {
|
|
87
|
+
return typeof value === "string" && value.trim().length > 0 ? value : null;
|
|
88
|
+
}
|
|
89
|
+
/** Narrow parsed JSON to an argument object. */
|
|
90
|
+
function isRecord(value) {
|
|
91
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24
92
|
}
|
|
25
93
|
/**
|
|
26
94
|
* Files produced by one Turn data value.
|
|
27
95
|
*
|
|
28
|
-
* The source is the
|
|
29
|
-
* closing prose: a produced file must be
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* produce it), and neither do deletes (there is nothing left to open) or
|
|
35
|
-
* failed calls. Paths keep first-seen order and appear once, so a file written
|
|
36
|
-
* and then edited in the same turn is one entry.
|
|
96
|
+
* The source is the arguments of successful `write`, `edit`, and mutating
|
|
97
|
+
* `str_replace_editor` calls, not the closing prose: a produced file must be
|
|
98
|
+
* listed whether or not the model remembered to name it. Reads, unsupported
|
|
99
|
+
* tools, malformed calls, and failed results contribute nothing. Paths keep
|
|
100
|
+
* first-seen order and appear once, so a file written and then edited in the
|
|
101
|
+
* same turn is one entry.
|
|
37
102
|
*
|
|
38
103
|
* The Conversation Location index owns turn membership before this function
|
|
39
104
|
* runs, so paths cannot spill across turns and this derivation does not infer
|
|
@@ -74,7 +139,7 @@ window.__ModuleLoader__.load({
|
|
|
74
139
|
id: String(event.data.turn),
|
|
75
140
|
role: "update"
|
|
76
141
|
};
|
|
77
|
-
if (event.type === "tool/result" &&
|
|
142
|
+
if (event.type === "tool/result" && isAppendSurfaceEvent(event)) return {
|
|
78
143
|
id: String(event.data.turn),
|
|
79
144
|
role: "update"
|
|
80
145
|
};
|
|
@@ -91,7 +156,7 @@ window.__ModuleLoader__.load({
|
|
|
91
156
|
update: (context, match) => {
|
|
92
157
|
if (match.event.type === "tool/call") {
|
|
93
158
|
const calls = new Map(context.state.calls);
|
|
94
|
-
calls.set(String(match.event.data.callId), match.
|
|
159
|
+
calls.set(String(match.event.data.callId), mutationPath(match.event.data.name, match.event.data.arguments));
|
|
95
160
|
return {
|
|
96
161
|
...context.state,
|
|
97
162
|
calls
|
|
@@ -100,20 +165,24 @@ window.__ModuleLoader__.load({
|
|
|
100
165
|
if (match.event.type !== "tool/result") return context.state;
|
|
101
166
|
if (match.event.data.message.content[0].isError === true) return context.state;
|
|
102
167
|
const callId = String(match.event.data.message.source.callId);
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
path
|
|
106
|
-
}));
|
|
107
|
-
return additions.length === 0 ? context.state : {
|
|
168
|
+
const path = context.state.calls.get(callId);
|
|
169
|
+
return path === null || path === void 0 ? context.state : {
|
|
108
170
|
...context.state,
|
|
109
|
-
produced: [...context.state.produced,
|
|
171
|
+
produced: [...context.state.produced, {
|
|
172
|
+
seq: match.event.seq,
|
|
173
|
+
path
|
|
174
|
+
}]
|
|
110
175
|
};
|
|
111
176
|
},
|
|
112
|
-
buildLocationData: (context, scope) =>
|
|
113
|
-
|
|
114
|
-
turn
|
|
115
|
-
|
|
116
|
-
|
|
177
|
+
buildLocationData: (context, scope, previous) => {
|
|
178
|
+
if (scope !== "turn" || context.state === void 0) return null;
|
|
179
|
+
if (previous?.kind === "turn" && previous.turn === context.state.turn && previous.key === "deliverables" && previous.value.produced === context.state.produced) return previous;
|
|
180
|
+
return {
|
|
181
|
+
kind: "turn",
|
|
182
|
+
turn: context.state.turn,
|
|
183
|
+
key: "deliverables",
|
|
184
|
+
value: { produced: context.state.produced }
|
|
185
|
+
};
|
|
117
186
|
}
|
|
118
187
|
};
|
|
119
188
|
/**
|
|
@@ -157,7 +226,7 @@ window.__ModuleLoader__.load({
|
|
|
157
226
|
}
|
|
158
227
|
//#endregion
|
|
159
228
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-deliverables/src/client/ProducedFiles.module.css.mjs
|
|
160
|
-
const css = ".P4kPIW_root{grid-template-columns:max-content minmax(0,1fr);align-items:
|
|
229
|
+
const css = ".P4kPIW_root{grid-template-columns:max-content minmax(0,1fr);align-items:start;column-gap:8px;margin-top:16px;font-size:13px;line-height:22px;display:grid}.P4kPIW_label{color:var(--dsw-alias-label-tertiary);grid-area:1/1}.P4kPIW_lane{--produced-file-chip-max:96px;--produced-file-gap:8px;grid-area:1/2;row-gap:6px;min-width:0;display:grid;container-type:inline-size}.P4kPIW_row{align-items:center;gap:var(--produced-file-gap);flex-wrap:nowrap;min-width:0;display:flex;overflow:hidden}.P4kPIW_file{box-sizing:border-box;min-width:0;max-width:var(--produced-file-chip-max);text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;border:none;border-radius:6px;flex:0 auto;margin:0;padding:0 8px;overflow:hidden}.P4kPIW_file:hover{color:var(--dsw-alias-label-primary);text-decoration:underline}.P4kPIW_file:focus-visible,.P4kPIW_showFolder:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-alias-border-l3);outline:none}.P4kPIW_more{white-space:nowrap;color:var(--dsw-alias-label-tertiary);flex:none;display:none}.P4kPIW_more[data-shown=\"6\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"6\"])>.P4kPIW_showFolder{display:block}@container (width<=687px){.P4kPIW_file:nth-of-type(6),.P4kPIW_more[data-shown=\"6\"]{display:none}.P4kPIW_more[data-shown=\"5\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"5\"])>.P4kPIW_showFolder{display:block}}@container (width<=583px){.P4kPIW_file:nth-of-type(5),.P4kPIW_more[data-shown=\"5\"]{display:none}.P4kPIW_more[data-shown=\"4\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"4\"])>.P4kPIW_showFolder{display:block}}@container (width<=479px){.P4kPIW_file:nth-of-type(4),.P4kPIW_more[data-shown=\"4\"]{display:none}.P4kPIW_more[data-shown=\"3\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"3\"])>.P4kPIW_showFolder{display:block}}@container (width<=375px){.P4kPIW_file:nth-of-type(3),.P4kPIW_more[data-shown=\"3\"]{display:none}.P4kPIW_more[data-shown=\"2\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"2\"])>.P4kPIW_showFolder{display:block}}@container (width<=271px){.P4kPIW_file:nth-of-type(2),.P4kPIW_more[data-shown=\"2\"]{display:none}.P4kPIW_more[data-shown=\"1\"]{display:inline}.P4kPIW_showFolder{display:none}.P4kPIW_lane:has(.P4kPIW_more[data-shown=\"1\"])>.P4kPIW_showFolder{display:block}}.P4kPIW_showFolder{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:4px;justify-self:start;margin:0;padding:0 2px;line-height:20px}.P4kPIW_showFolder:hover{color:var(--dsw-alias-label-secondary);text-decoration:underline}";
|
|
161
230
|
const tagId = "@deepseek-ai/dsh-client-ui-deliverables/ProducedFiles.module.css";
|
|
162
231
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
163
232
|
const tag = document.createElement("style");
|
|
@@ -169,41 +238,16 @@ window.__ModuleLoader__.load({
|
|
|
169
238
|
var ProducedFiles_module_css_default = {
|
|
170
239
|
"file": "P4kPIW_file",
|
|
171
240
|
"label": "P4kPIW_label",
|
|
172
|
-
"
|
|
241
|
+
"lane": "P4kPIW_lane",
|
|
173
242
|
"more": "P4kPIW_more",
|
|
174
|
-
"probe": "P4kPIW_probe",
|
|
175
243
|
"root": "P4kPIW_root",
|
|
176
244
|
"row": "P4kPIW_row",
|
|
177
245
|
"showFolder": "P4kPIW_showFolder"
|
|
178
246
|
};
|
|
179
247
|
//#endregion
|
|
180
248
|
//#region lib/types/client/ProducedFiles.js
|
|
181
|
-
/**
|
|
249
|
+
/** Maximum number of file chips rendered before the remainder counter. */
|
|
182
250
|
const SHOWN_LIMIT = 6;
|
|
183
|
-
/**
|
|
184
|
-
* Select the largest prefix whose measured chips and exact remainder fit.
|
|
185
|
-
* @param available - usable width of the one-line file lane.
|
|
186
|
-
* @param gap - computed flex gap between adjacent visible items.
|
|
187
|
-
* @param chipWidths - measured widths for the candidate file chips.
|
|
188
|
-
* @param moreWidthsByShown - exact localized remainder width for each shown count.
|
|
189
|
-
* @returns Number of leading chips to render.
|
|
190
|
-
*/
|
|
191
|
-
function fitProducedFiles(available, gap, chipWidths, moreWidthsByShown) {
|
|
192
|
-
if (available <= 0) return chipWidths.length;
|
|
193
|
-
const prefix = [0];
|
|
194
|
-
let prefixWidth = 0;
|
|
195
|
-
for (const width of chipWidths) {
|
|
196
|
-
prefixWidth += width;
|
|
197
|
-
prefix.push(prefixWidth);
|
|
198
|
-
}
|
|
199
|
-
let largestFit = 0;
|
|
200
|
-
for (const [shown, width] of prefix.entries()) {
|
|
201
|
-
const more = moreWidthsByShown[shown];
|
|
202
|
-
const items = shown + (more === void 0 ? 0 : 1);
|
|
203
|
-
if (width + (more ?? 0) + Math.max(0, items - 1) * gap <= available) largestFit = shown;
|
|
204
|
-
}
|
|
205
|
-
return largestFit;
|
|
206
|
-
}
|
|
207
251
|
function moreLabel(t, count) {
|
|
208
252
|
return count === 1 ? t("produced.moreOne") : t("produced.more", { count: String(count) });
|
|
209
253
|
}
|
|
@@ -212,55 +256,21 @@ window.__ModuleLoader__.load({
|
|
|
212
256
|
* @param props - selector-matched paths, the chat view's file opener, and the locale seat.
|
|
213
257
|
* @returns The produced-files row.
|
|
214
258
|
*/
|
|
215
|
-
function ProducedFiles({ matched: paths, openFile, isLoopback,
|
|
216
|
-
|
|
259
|
+
function ProducedFiles({ matched: paths, openFile, isLoopback, ensureWorkspacePathOpen, useWorkspacePathOpen, t }) {
|
|
260
|
+
(0, react.useEffect)(() => {
|
|
261
|
+
ensureWorkspacePathOpen();
|
|
262
|
+
}, [ensureWorkspacePathOpen]);
|
|
263
|
+
const hostCanOpenPath = useWorkspacePathOpen((available) => available === true);
|
|
217
264
|
const canOpenPath = isLoopback && hostCanOpenPath;
|
|
218
|
-
const
|
|
219
|
-
const [shownCount, setShownCount] = (0, react.useState)(limit);
|
|
220
|
-
const rowRef = (0, react.useRef)(null);
|
|
221
|
-
const chipProbes = (0, react.useRef)([]);
|
|
222
|
-
const moreProbe = (0, react.useRef)(null);
|
|
223
|
-
(0, react.useLayoutEffect)(() => {
|
|
224
|
-
const row = rowRef.current;
|
|
225
|
-
const remainderProbe = moreProbe.current;
|
|
226
|
-
/* v8 ignore next -- React attaches both refs before the layout effect runs. */
|
|
227
|
-
if (row === null || remainderProbe === null) return;
|
|
228
|
-
const measure = () => {
|
|
229
|
-
const styles = getComputedStyle(row);
|
|
230
|
-
const gap = Number.parseFloat(styles.columnGap || styles.gap) || 0;
|
|
231
|
-
const chips = chipProbes.current.slice(0, limit).map((probe) => probe.getBoundingClientRect().width);
|
|
232
|
-
const more = Array.from({ length: limit + 1 }, (_, candidate) => {
|
|
233
|
-
if (paths.length === candidate) return void 0;
|
|
234
|
-
remainderProbe.textContent = moreLabel(t, paths.length - candidate);
|
|
235
|
-
return remainderProbe.getBoundingClientRect().width;
|
|
236
|
-
});
|
|
237
|
-
setShownCount(fitProducedFiles(row.clientWidth, gap, chips, more));
|
|
238
|
-
};
|
|
239
|
-
measure();
|
|
240
|
-
if (typeof ResizeObserver === "undefined") return;
|
|
241
|
-
const observer = new ResizeObserver(measure);
|
|
242
|
-
observer.observe(row);
|
|
243
|
-
for (const probe of [...chipProbes.current, moreProbe.current]) if (probe !== null) observer.observe(probe);
|
|
244
|
-
return () => {
|
|
245
|
-
observer.disconnect();
|
|
246
|
-
};
|
|
247
|
-
}, [
|
|
248
|
-
limit,
|
|
249
|
-
paths,
|
|
250
|
-
t
|
|
251
|
-
]);
|
|
252
|
-
const visibleCount = Math.min(shownCount, limit);
|
|
253
|
-
const shown = paths.slice(0, visibleCount);
|
|
254
|
-
const hidden = paths.length - shown.length;
|
|
265
|
+
const shown = paths.slice(0, SHOWN_LIMIT);
|
|
255
266
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
256
267
|
className: ProducedFiles_module_css_default.root,
|
|
257
|
-
children: [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
(0, react_jsx_runtime.jsxs)("div", {
|
|
263
|
-
ref: rowRef,
|
|
268
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
269
|
+
className: ProducedFiles_module_css_default.label,
|
|
270
|
+
children: t("produced.label")
|
|
271
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
272
|
+
className: ProducedFiles_module_css_default.lane,
|
|
273
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
264
274
|
className: ProducedFiles_module_css_default.row,
|
|
265
275
|
"data-produced-files-row": true,
|
|
266
276
|
children: [shown.map((path) => (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -272,36 +282,25 @@ window.__ModuleLoader__.load({
|
|
|
272
282
|
openFile(path);
|
|
273
283
|
},
|
|
274
284
|
children: basename(path)
|
|
275
|
-
}, path)),
|
|
276
|
-
|
|
277
|
-
|
|
285
|
+
}, path)), shown.map((_, index) => {
|
|
286
|
+
const shownCount = index + 1;
|
|
287
|
+
const remainder = paths.length - shownCount;
|
|
288
|
+
if (remainder <= 0) return null;
|
|
289
|
+
return (0, react_jsx_runtime.jsx)("span", {
|
|
290
|
+
className: ProducedFiles_module_css_default.more,
|
|
291
|
+
"data-shown": shownCount,
|
|
292
|
+
children: moreLabel(t, remainder)
|
|
293
|
+
}, shownCount);
|
|
278
294
|
})]
|
|
279
|
-
}),
|
|
280
|
-
hidden > 0 && canOpenPath && (0, react_jsx_runtime.jsx)("button", {
|
|
295
|
+
}), paths.length > 1 && canOpenPath && (0, react_jsx_runtime.jsx)("button", {
|
|
281
296
|
type: "button",
|
|
282
297
|
className: ProducedFiles_module_css_default.showFolder,
|
|
283
298
|
onClick: () => {
|
|
284
299
|
openFile(".");
|
|
285
300
|
},
|
|
286
301
|
children: t("produced.showInFolder")
|
|
287
|
-
})
|
|
288
|
-
|
|
289
|
-
className: ProducedFiles_module_css_default.measure,
|
|
290
|
-
"aria-hidden": "true",
|
|
291
|
-
children: [paths.slice(0, limit).map((path, index) => (0, react_jsx_runtime.jsx)("button", {
|
|
292
|
-
ref: (node) => {
|
|
293
|
-
chipProbes.current[index] = node;
|
|
294
|
-
},
|
|
295
|
-
type: "button",
|
|
296
|
-
tabIndex: -1,
|
|
297
|
-
className: `${ProducedFiles_module_css_default.file} ${ProducedFiles_module_css_default.probe}`,
|
|
298
|
-
children: basename(path)
|
|
299
|
-
}, path)), (0, react_jsx_runtime.jsx)("span", {
|
|
300
|
-
ref: moreProbe,
|
|
301
|
-
className: `${ProducedFiles_module_css_default.more} ${ProducedFiles_module_css_default.probe}`
|
|
302
|
-
})]
|
|
303
|
-
})
|
|
304
|
-
]
|
|
302
|
+
})]
|
|
303
|
+
})]
|
|
305
304
|
});
|
|
306
305
|
}
|
|
307
306
|
//#endregion
|
|
@@ -331,16 +330,40 @@ window.__ModuleLoader__.load({
|
|
|
331
330
|
const inject = [
|
|
332
331
|
"slots",
|
|
333
332
|
"locale",
|
|
334
|
-
"
|
|
335
|
-
"
|
|
333
|
+
"uiConversation",
|
|
334
|
+
"remote",
|
|
335
|
+
"remote.session"
|
|
336
336
|
];
|
|
337
337
|
/**
|
|
338
338
|
* Client plugin body: register the dictionaries and the turn-tail entry.
|
|
339
339
|
* @param ctx - client root context.
|
|
340
340
|
*/
|
|
341
341
|
function apply(ctx) {
|
|
342
|
-
const
|
|
343
|
-
|
|
342
|
+
const workspacePathOpen = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(void 0);
|
|
343
|
+
let requestedWorkspacePathOpen = false;
|
|
344
|
+
let capabilityRevision = 0;
|
|
345
|
+
let pendingCapability;
|
|
346
|
+
const loadWorkspacePathOpen = () => {
|
|
347
|
+
if (pendingCapability !== void 0) return;
|
|
348
|
+
const revision = capabilityRevision;
|
|
349
|
+
const pending = ctx.remote.session.canOpenWorkspacePath().then((result) => {
|
|
350
|
+
if (revision === capabilityRevision) workspacePathOpen.set(result.ok && result.value);
|
|
351
|
+
}).finally(() => {
|
|
352
|
+
if (pendingCapability === pending) pendingCapability = void 0;
|
|
353
|
+
});
|
|
354
|
+
pendingCapability = pending;
|
|
355
|
+
};
|
|
356
|
+
const ensureWorkspacePathOpen = () => {
|
|
357
|
+
requestedWorkspacePathOpen = true;
|
|
358
|
+
if (workspacePathOpen.getSnapshot() === void 0) loadWorkspacePathOpen();
|
|
359
|
+
};
|
|
360
|
+
ctx.on("connection/reset", () => {
|
|
361
|
+
capabilityRevision++;
|
|
362
|
+
pendingCapability = void 0;
|
|
363
|
+
workspacePathOpen.set(void 0);
|
|
364
|
+
if (requestedWorkspacePathOpen) loadWorkspacePathOpen();
|
|
365
|
+
});
|
|
366
|
+
ctx.uiConversation.events.register(deliverablesDefinition);
|
|
344
367
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
345
368
|
zh,
|
|
346
369
|
en
|
|
@@ -350,8 +373,9 @@ window.__ModuleLoader__.load({
|
|
|
350
373
|
select: selectProducedFiles,
|
|
351
374
|
locale: NS,
|
|
352
375
|
inject: () => ({
|
|
353
|
-
isLoopback:
|
|
354
|
-
|
|
376
|
+
isLoopback: ctx.remote.$host.isLoopback,
|
|
377
|
+
ensureWorkspacePathOpen,
|
|
378
|
+
hooks: { workspacePathOpen }
|
|
355
379
|
})
|
|
356
380
|
}, ProducedFiles));
|
|
357
381
|
const t = ctx.locale.bind(NS);
|
|
@@ -8,7 +8,7 @@ window.__ModuleLoader__.load({
|
|
|
8
8
|
let react = require("react");
|
|
9
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
10
10
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-goal/src/client/GoalBar.module.css.mjs
|
|
11
|
-
const css$1 = ".nLMEza_dock{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));margin:0 auto}.nLMEza_bar{box-sizing:border-box;width:100%;max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));border
|
|
11
|
+
const css$1 = ".nLMEza_dock{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));margin:0 auto}.nLMEza_bar{box-sizing:border-box;width:100%;max-width:calc(var(--dsh-composer-card-max-width) - 4 * var(--dsh-composer-dock-inset));border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-specific-tip);border-radius:12px;align-items:center;gap:10px;height:36px;margin:0 auto;padding:4px 5px 4px 12px;display:flex}.nLMEza_goalGlyph{color:var(--dsw-alias-label-tertiary);flex:none;display:inline-flex}.nLMEza_label{color:var(--dsw-alias-label-primary);flex:none;font-size:13px;font-weight:500;line-height:24px}.nLMEza_objective{min-width:0;color:var(--dsw-alias-label-primary-dimmed);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:20px;overflow:hidden}.nLMEza_error{min-width:0;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:20px;overflow:hidden}.nLMEza_objectiveInput{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-base);min-width:0;height:26px;color:var(--dsw-alias-label-primary);border-radius:6px;outline:none;flex:1;padding:0 8px;font-size:13px;line-height:20px}.nLMEza_objectiveInput:focus{border-color:var(--dsw-alias-state-business-primary)}.nLMEza_objectiveInput::placeholder{color:var(--dsw-alias-label-caption)}.nLMEza_actions{flex:none;align-items:center;gap:10px;display:flex}.nLMEza_iconBtn{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex}.nLMEza_iconBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.nLMEza_iconBtn:disabled{opacity:.4;cursor:default}";
|
|
12
12
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-goal/GoalBar.module.css";
|
|
13
13
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
14
14
|
const tag = document.createElement("style");
|
|
@@ -251,7 +251,7 @@ window.__ModuleLoader__.load({
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-goal/src/client/GoalCommandInputView.module.css.mjs
|
|
254
|
-
const css = ".oRe1gG_row{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.oRe1gG_stack{
|
|
254
|
+
const css = ".oRe1gG_row{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.oRe1gG_stack{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%);flex-direction:column;align-items:flex-end;display:flex}.oRe1gG_bubble{overflow-wrap:anywhere;background:var(--dsw-specific-bubble);max-width:100%;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code);font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));white-space:pre-wrap;border-radius:22px;padding:10px 16px}";
|
|
255
255
|
const tagId = "@deepseek-ai/dsh-client-ui-goal/GoalCommandInputView.module.css";
|
|
256
256
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
257
257
|
const tag = document.createElement("style");
|
|
@@ -339,7 +339,7 @@ window.__ModuleLoader__.load({
|
|
|
339
339
|
"phase.paused": "已暂停的目标",
|
|
340
340
|
"phase.blocked": "受阻的目标",
|
|
341
341
|
"objective.aria": "目标内容",
|
|
342
|
-
"commandInput.aria": "
|
|
342
|
+
"commandInput.aria": "指令输入",
|
|
343
343
|
"action.save": "保存目标",
|
|
344
344
|
"action.cancel": "取消编辑",
|
|
345
345
|
"action.pause": "暂停目标",
|
|
@@ -372,14 +372,14 @@ window.__ModuleLoader__.load({
|
|
|
372
372
|
"remote",
|
|
373
373
|
"remote.goals",
|
|
374
374
|
"locale",
|
|
375
|
-
"
|
|
375
|
+
"uiConversation"
|
|
376
376
|
];
|
|
377
377
|
/**
|
|
378
378
|
* Client plugin body: the GoalBar dock entry with its mutation verbs.
|
|
379
379
|
* @param ctx - client root context.
|
|
380
380
|
*/
|
|
381
381
|
function apply(ctx) {
|
|
382
|
-
ctx.
|
|
382
|
+
ctx.uiConversation.events.register(goalCommandInputDefinition);
|
|
383
383
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
384
384
|
zh,
|
|
385
385
|
en
|
|
@@ -403,8 +403,7 @@ window.__ModuleLoader__.load({
|
|
|
403
403
|
ok: false,
|
|
404
404
|
error: {
|
|
405
405
|
code: "no-current-goal",
|
|
406
|
-
message: "no current goal to mutate"
|
|
407
|
-
details: {}
|
|
406
|
+
message: "no current goal to mutate"
|
|
408
407
|
}
|
|
409
408
|
};
|
|
410
409
|
ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|