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
|
@@ -22,12 +22,46 @@ window.__ModuleLoader__.load({
|
|
|
22
22
|
return `@"${path}"`;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
+
//#region ../../util/workspace-path/src/file-address.ts
|
|
26
|
+
/** The scheme and type every file address opens with. */
|
|
27
|
+
const FILE_ADDRESS_PREFIX = "dsh-resource://file/";
|
|
28
|
+
/** Component-encode one id or path segment, keeping `:` literal for drive letters. */
|
|
29
|
+
function encodeSegment(segment) {
|
|
30
|
+
return encodeURIComponent(segment).replace(/%3A/gi, ":");
|
|
31
|
+
}
|
|
32
|
+
/** Encode a `/`-separated path segment by segment. */
|
|
33
|
+
function encodePath(path) {
|
|
34
|
+
return path.split("/").map(encodeSegment).join("/");
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build the address of a file read through one Session.
|
|
38
|
+
* @param sessionId - the Session whose Host workspace resolves the path.
|
|
39
|
+
* @param path - absolute or workspace-relative path; backslashes are normalized to `/`, and leading `./` prefixes are dropped.
|
|
40
|
+
* @returns the `dsh-resource://file/session/<sessionId>/<path>` address.
|
|
41
|
+
*/
|
|
42
|
+
function sessionFileAddress(sessionId, path) {
|
|
43
|
+
const normalized = path.replace(/\\/g, "/").replace(/^(?:\.\/)+/, "");
|
|
44
|
+
return `${FILE_ADDRESS_PREFIX}session/${encodeSegment(sessionId)}/${encodePath(normalized)}`;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
25
47
|
//#region ../../util/workspace-path/src/index.ts
|
|
48
|
+
/**
|
|
49
|
+
* Browser-safe Workspace path and display helpers.
|
|
50
|
+
* @module @deepseek-ai/dsh-util-workspace-path
|
|
51
|
+
*/
|
|
26
52
|
/** Whether a path uses a Windows drive or UNC prefix. */
|
|
27
53
|
function isWindowsStylePath(value) {
|
|
28
54
|
return /^[A-Za-z]:[/\\]/.test(value) || value.startsWith("\\\\");
|
|
29
55
|
}
|
|
30
56
|
/**
|
|
57
|
+
* Whether a path is absolute in either spelling the Host accepts: POSIX (`/a/b`) or Windows drive or UNC.
|
|
58
|
+
* @param path - the path to classify.
|
|
59
|
+
* @returns `true` for an absolute path; `false` for a Workspace-relative one.
|
|
60
|
+
*/
|
|
61
|
+
function isAbsoluteWorkspacePath(path) {
|
|
62
|
+
return path.startsWith("/") || isWindowsStylePath(path);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
31
65
|
* Abbreviate a POSIX home directory for display.
|
|
32
66
|
* @param path - Absolute or already-short display path.
|
|
33
67
|
* @param home - Host account home; absent skips abbreviation.
|
|
@@ -42,6 +76,24 @@ window.__ModuleLoader__.load({
|
|
|
42
76
|
if (path.startsWith(`${root}/`)) return `~${path.slice(root.length)}`;
|
|
43
77
|
return path;
|
|
44
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The address for a path as a caller holds it: a relative path, or an absolute
|
|
81
|
+
* path inside the Session's workspace, becomes a `session`-scoped address; an
|
|
82
|
+
* absolute path outside it, or one whose workspace root is unknown, keeps its
|
|
83
|
+
* absolute path in that Session's address.
|
|
84
|
+
* @param sessionId - the Session the path is read in.
|
|
85
|
+
* @param cwd - that Session's workspace root, when known.
|
|
86
|
+
* @param path - absolute or workspace-relative path, in either separator spelling.
|
|
87
|
+
* @returns the `dsh-resource://file/…` address.
|
|
88
|
+
*/
|
|
89
|
+
function fileAddressFor(sessionId, cwd, path) {
|
|
90
|
+
const normalized = path.replace(/\\/g, "/");
|
|
91
|
+
if (!isAbsoluteWorkspacePath(normalized)) return sessionFileAddress(sessionId, normalized);
|
|
92
|
+
const root = cwd === void 0 ? "" : cwd.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
93
|
+
if (root !== "" && normalized === root) return sessionFileAddress(sessionId, "");
|
|
94
|
+
if (root !== "" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));
|
|
95
|
+
return sessionFileAddress(sessionId, normalized);
|
|
96
|
+
}
|
|
45
97
|
//#endregion
|
|
46
98
|
//#region lib/types/client/locales.js
|
|
47
99
|
/** `reference` namespace dictionaries for the unified `@` source. */
|
|
@@ -56,6 +108,7 @@ window.__ModuleLoader__.load({
|
|
|
56
108
|
*/
|
|
57
109
|
const zh = {
|
|
58
110
|
"section.files": "文件与文件夹",
|
|
111
|
+
"section.subagents": "子智能体",
|
|
59
112
|
"section.sessions": "对话",
|
|
60
113
|
"candidate.noCwd": "(无工作目录)",
|
|
61
114
|
"crumb.root": "工作区",
|
|
@@ -69,6 +122,7 @@ window.__ModuleLoader__.load({
|
|
|
69
122
|
/** English dictionary, checked complete against the zh key set. */
|
|
70
123
|
const en = {
|
|
71
124
|
"section.files": "Files & folders",
|
|
125
|
+
"section.subagents": "Subagents",
|
|
72
126
|
"section.sessions": "Sessions",
|
|
73
127
|
"candidate.noCwd": "(no cwd)",
|
|
74
128
|
"crumb.root": "Workspace",
|
|
@@ -88,7 +142,8 @@ window.__ModuleLoader__.load({
|
|
|
88
142
|
"sessions",
|
|
89
143
|
"remote",
|
|
90
144
|
"remote.fileReferences",
|
|
91
|
-
"remote.sessionReferenceResolver"
|
|
145
|
+
"remote.sessionReferenceResolver",
|
|
146
|
+
"sidebarRight"
|
|
92
147
|
];
|
|
93
148
|
/**
|
|
94
149
|
* Register the combined `@file` / `@session` source.
|
|
@@ -106,15 +161,36 @@ window.__ModuleLoader__.load({
|
|
|
106
161
|
name: "reference",
|
|
107
162
|
showGroupTitle: false,
|
|
108
163
|
async candidates(session, { query, quoted, drilled, signal }) {
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
164
|
+
if (sessions.binding(session.sessionId) === void 0) throw new Error(`reference candidates require a retained session "${session.sessionId}"`);
|
|
165
|
+
const [fileItems, sessionItems] = await sessions.using(session.sessionId, {
|
|
166
|
+
source: "referenceCandidates",
|
|
167
|
+
signal
|
|
168
|
+
}, async (reference) => {
|
|
169
|
+
signal.throwIfAborted();
|
|
170
|
+
const state = reference.binding.session.getSnapshot();
|
|
171
|
+
if (state.openState !== "open") throw state.openError ?? /* @__PURE__ */ new Error(`session "${session.sessionId}" is not open`);
|
|
172
|
+
const fileLookup = ctx.remote.fileReferences.list(session.sessionId, query, signal).then((result) => result.ok ? result.value : []);
|
|
173
|
+
const sessionLookup = quoted === true ? Promise.resolve([]) : ctx.remote.sessionReferenceResolver.candidates(session.sessionId, query, signal).then((result) => result.ok ? result.value : []);
|
|
174
|
+
return Promise.all([fileLookup, sessionLookup]);
|
|
175
|
+
});
|
|
112
176
|
if (signal.aborted) return [];
|
|
113
177
|
const withLocation = crumbsFor(query, quoted === true, drilled, t) === void 0;
|
|
114
178
|
const now = Date.now();
|
|
115
179
|
const home = ctx.remote.$host.home;
|
|
116
180
|
const listed = sessions.list.getSnapshot().byId;
|
|
117
|
-
|
|
181
|
+
const sessionRows = sessionItems.map((candidate) => {
|
|
182
|
+
const summary = listed[candidate.sessionId];
|
|
183
|
+
const child = summary?.origin === "subagent" && summary.parentId === session.sessionId;
|
|
184
|
+
return {
|
|
185
|
+
child,
|
|
186
|
+
row: sessionCandidate(candidate, candidate.displayTitle ?? candidate.label, summary?.updatedAt ?? candidate.createdAt, now, home, t(child ? "section.subagents" : "section.sessions"), t)
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
return [
|
|
190
|
+
...fileItems.flatMap((candidate) => fileCandidate(candidate, quoted === true, withLocation, t)),
|
|
191
|
+
...sessionRows.filter((item) => item.child).map((item) => item.row),
|
|
192
|
+
...sessionRows.filter((item) => !item.child).map((item) => item.row)
|
|
193
|
+
];
|
|
118
194
|
},
|
|
119
195
|
header(_session, req) {
|
|
120
196
|
return crumbsFor(req.query, req.quoted === true, req.drilled, t);
|
|
@@ -142,6 +218,13 @@ window.__ModuleLoader__.load({
|
|
|
142
218
|
clipboardText: value.mention
|
|
143
219
|
} };
|
|
144
220
|
},
|
|
221
|
+
openReference(session, { ref, appearance }) {
|
|
222
|
+
if (appearance !== "file") return false;
|
|
223
|
+
const path = ref.startsWith("@\"") ? ref.slice(2, -1) : ref.slice(1);
|
|
224
|
+
const cwd = sessions.list.getSnapshot().byId[session.sessionId]?.cwd;
|
|
225
|
+
ctx.sidebarRight.openResource(fileAddressFor(session.sessionId, cwd, path));
|
|
226
|
+
return true;
|
|
227
|
+
},
|
|
145
228
|
codec: {
|
|
146
229
|
clipboardText: (ref) => ref,
|
|
147
230
|
serialize: (ref) => Promise.resolve(ref)
|
|
@@ -217,20 +300,20 @@ window.__ModuleLoader__.load({
|
|
|
217
300
|
...directory ? { drill: true } : {}
|
|
218
301
|
}];
|
|
219
302
|
}
|
|
220
|
-
function sessionCandidate(candidate, updatedAt, now, home, t) {
|
|
303
|
+
function sessionCandidate(candidate, label, updatedAt, now, home, section, t) {
|
|
221
304
|
const { unit, n } = (0, _deepseek_ai_dsh_client_ui_primitives.relativeTime)(updatedAt, now);
|
|
222
305
|
const age = unit === "now" ? t("time.now") : t(`time.${unit}`, { n });
|
|
223
306
|
const location = candidate.sameWorkspace ? void 0 : candidate.cwd === void 0 ? t("candidate.noCwd") : abbreviateHomePath(candidate.cwd, home);
|
|
224
307
|
const value = {
|
|
225
308
|
kind: "session",
|
|
226
|
-
label
|
|
309
|
+
label,
|
|
227
310
|
mention: candidate.mention
|
|
228
311
|
};
|
|
229
312
|
return {
|
|
230
|
-
name:
|
|
313
|
+
name: label,
|
|
231
314
|
description: location === void 0 ? age : `${location} · ${age}`,
|
|
232
315
|
icon: "session",
|
|
233
|
-
section
|
|
316
|
+
section,
|
|
234
317
|
value: JSON.stringify(value)
|
|
235
318
|
};
|
|
236
319
|
}
|