dsh-edge 0.6.0-alpha.3 → 0.6.0-alpha.5
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/dist/index.html +1 -1
- package/dist/plugins/dsh-edge-client-ui/client.js +58 -7
- package/package.json +1 -1
- package/worker/direct/index.js +731 -735
- package/worker/isolated/index.js +494 -498
package/dist/index.html
CHANGED
|
@@ -39,7 +39,7 @@ window.__ModuleLoader__={
|
|
|
39
39
|
return exports.createClientModuleSystem(this,{id:registration.id,exports},options)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
})()</script><script src="/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903"></script><script src="/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=aba836a0c42d"></script><script>globalThis["__DSH_BOOT__"] = {"rev":"
|
|
42
|
+
})()</script><script src="/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903"></script><script src="/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=aba836a0c42d"></script><script>globalThis["__DSH_BOOT__"] = {"rev":"f1fb92ab810b","entries":[{"id":"@deepseek-ai/dsh-typert-registry","url":"/plugins/@deepseek-ai/dsh-typert-registry/client.js?rev=f41d56e0b747","rev":"f41d56e0b747","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-api-gateway","url":"/plugins/@deepseek-ai/dsh-api-gateway/client.js?rev=965b70361a00","rev":"965b70361a00","inject":["@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-client-connection"],"immediately":true},{"id":"@deepseek-ai/dsh-client-modules","url":"/plugins/@deepseek-ai/dsh-client-modules/client.js?rev=7eb526320903","rev":"7eb526320903","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-client-connection","url":"/plugins/@deepseek-ai/dsh-client-connection/client.js?rev=70b02b2d3fc2","rev":"70b02b2d3fc2","inject":[],"immediately":true},{"id":"@deepseek-ai/dsh-api-remotes","url":"/plugins/@deepseek-ai/dsh-api-remotes/client.js?rev=9a16f4532366","rev":"9a16f4532366","inject":["@deepseek-ai/dsh-api-gateway"],"immediately":true},{"id":"@deepseek-ai/dsh-client-runtime","url":"/plugins/@deepseek-ai/dsh-client-runtime/client.js?rev=aba836a0c42d","rev":"aba836a0c42d","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-typert-registry","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-theme","url":"/plugins/@deepseek-ai/dsh-client-ui-theme/client.js?rev=e19c47b60a1c","rev":"e19c47b60a1c","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-locale","url":"/plugins/@deepseek-ai/dsh-client-locale/client.js?rev=2660ca3f6a00","rev":"2660ca3f6a00","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-layout","url":"/plugins/@deepseek-ai/dsh-client-ui-layout/client.js?rev=abdb7f55acba","rev":"abdb7f55acba","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-theme"]},{"id":"@deepseek-ai/dsh-client-ui-renderer","url":"/plugins/@deepseek-ai/dsh-client-ui-renderer/client.js?rev=79b59d365f3b","rev":"79b59d365f3b","inject":["@deepseek-ai/dsh-client-runtime"],"immediately":true},{"id":"@deepseek-ai/dsh-client-ui-sidebar","url":"/plugins/@deepseek-ai/dsh-client-ui-sidebar/client.js?rev=7563cb4b02ca","rev":"7563cb4b02ca","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-layout","@deepseek-ai/dsh-client-locale"]},{"id":"@deepseek-ai/dsh-client-ui-settings","url":"/plugins/@deepseek-ai/dsh-client-ui-settings/client.js?rev=5d1695c62b38","rev":"5d1695c62b38","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-settings-general","url":"/plugins/@deepseek-ai/dsh-client-ui-settings-general/client.js?rev=f733efde3f2f","rev":"f733efde3f2f","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-settings-models","url":"/plugins/@deepseek-ai/dsh-client-ui-settings-models/client.js?rev=f12fb342db3b","rev":"f12fb342db3b","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-conversation","url":"/plugins/@deepseek-ai/dsh-client-ui-conversation/client.js?rev=cf4575517765","rev":"cf4575517765","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-layout"]},{"id":"@deepseek-ai/dsh-client-ui-brand-official","url":"/plugins/@deepseek-ai/dsh-client-ui-brand-official/client.js?rev=c426d52ce216","rev":"c426d52ce216","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-attachment","url":"/plugins/@deepseek-ai/dsh-client-ui-attachment/client.js?rev=5349ce7aa495","rev":"5349ce7aa495","inject":["@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-tool","url":"/plugins/@deepseek-ai/dsh-client-ui-tool/client.js?rev=48c8d92e8828","rev":"48c8d92e8828","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-workflow-run","url":"/plugins/@deepseek-ai/dsh-client-ui-workflow-run/client.js?rev=60e130ad4f36","rev":"60e130ad4f36","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-deliverables","url":"/plugins/@deepseek-ai/dsh-client-ui-deliverables/client.js?rev=13a78ee19f2e","rev":"13a78ee19f2e","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-workspace","url":"/plugins/@deepseek-ai/dsh-client-ui-workspace/client.js?rev=2e1cd4f55f0c","rev":"2e1cd4f55f0c","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"]},{"id":"@deepseek-ai/dsh-client-ui-input-trigger","url":"/plugins/@deepseek-ai/dsh-client-ui-input-trigger/client.js?rev=b9564b9138a7","rev":"b9564b9138a7","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale"]},{"id":"@deepseek-ai/dsh-client-ui-commands","url":"/plugins/@deepseek-ai/dsh-client-ui-commands/client.js?rev=887c0ca028a4","rev":"887c0ca028a4","inject":["@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-input-trigger","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-skill","url":"/plugins/@deepseek-ai/dsh-client-ui-skill/client.js?rev=f229a70eecce","rev":"f229a70eecce","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-tool","@deepseek-ai/dsh-client-ui-input-trigger","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-subagent","url":"/plugins/@deepseek-ai/dsh-client-ui-subagent/client.js?rev=0bb1ff842ae8","rev":"0bb1ff842ae8","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-input-trigger"]},{"id":"@deepseek-ai/dsh-client-ui-jobs","url":"/plugins/@deepseek-ai/dsh-client-ui-jobs/client.js?rev=ed0d04a8c154","rev":"ed0d04a8c154","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives"]},{"id":"@deepseek-ai/dsh-client-ui-model-selection","url":"/plugins/@deepseek-ai/dsh-client-ui-model-selection/client.js?rev=639da97bfe66","rev":"639da97bfe66","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-permission-presets","url":"/plugins/@deepseek-ai/dsh-client-ui-permission-presets/client.js?rev=e36eeb24d0eb","rev":"e36eeb24d0eb","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-commands","@deepseek-ai/dsh-api-remotes","@deepseek-ai/dsh-client-ui-settings"]},{"id":"@deepseek-ai/dsh-client-ui-agent-preset","url":"/plugins/@deepseek-ai/dsh-client-ui-agent-preset/client.js?rev=96dbaff92d41","rev":"96dbaff92d41","inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"]},{"id":"@deepseek-ai/dsh-client-ui-user-questions","url":"/plugins/@deepseek-ai/dsh-client-ui-user-questions/client.js?rev=350ccf0385ba","rev":"350ccf0385ba","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"@deepseek-ai/dsh-client-ui-trajectory","url":"/plugins/@deepseek-ai/dsh-client-ui-trajectory/client.js?rev=3345fd0d652c","rev":"3345fd0d652c","inject":["@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"]},{"id":"dsh-edge-client-ui","url":"/plugins/dsh-edge-client-ui/client.js?rev=dc3c48739f02","rev":"dc3c48739f02","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-locale"]}]}</script>
|
|
43
43
|
<meta charset="utf-8" />
|
|
44
44
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
45
45
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
@@ -12,7 +12,7 @@ window.__ModuleLoader__.load({
|
|
|
12
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
14
14
|
//#region \0dsh-edge-css:src/client/EdgeDirectoryFlow.module.css.mjs
|
|
15
|
-
const css$1 = "._f3UMG_overlay{z-index:999;position:fixed;inset:0}._f3UMG_popover{background:var(--dsh-surface-2,#252526);border:1px solid var(--dsh-border,#3e3e42);z-index:1000;border-radius:8px;flex-direction:column;gap:8px;
|
|
15
|
+
const css$1 = "._f3UMG_overlay{z-index:999;position:fixed;inset:0}._f3UMG_popover{background:var(--dsh-surface-2,#252526);border:1px solid var(--dsh-border,#3e3e42);z-index:1000;border-radius:8px;flex-direction:column;gap:8px;padding:12px;display:flex;position:fixed;box-shadow:0 8px 24px #0006,0 2px 8px #0000004d}._f3UMG_title{color:var(--dsh-text-1,#ccc);font-size:12px;font-weight:600}._f3UMG_inputGroup{border:1px solid var(--dsh-border,#3e3e42);border-radius:6px;transition:border-color .15s;display:flex;overflow:hidden}._f3UMG_inputGroup:focus-within{border-color:var(--dsh-accent,#3b82f6)}._f3UMG_inputGroup._f3UMG_error{border-color:var(--dsh-error,#ef4444)}._f3UMG_prefix{background:var(--dsh-surface-1,#1a1a1a);color:var(--dsh-text-3,#6b6b6b);white-space:nowrap;font-size:12px;font-family:var(--dsh-font-mono,\"SF Mono\", \"Menlo\", monospace);user-select:none;border-right:1px solid var(--dsh-border,#3e3e42);align-items:center;padding:6px 2px 6px 8px;display:flex}._f3UMG_input{background:var(--dsh-surface-3,#2d2d2d);color:var(--dsh-text-1,#ccc);font-size:12px;font-family:var(--dsh-font-mono,\"SF Mono\", \"Menlo\", monospace);border:none;outline:none;flex:1;min-width:0;padding:6px 8px}._f3UMG_input::placeholder{color:var(--dsh-text-3,#6b6b6b)}._f3UMG_hint{color:var(--dsh-text-3,#6b6b6b);font-size:11px;line-height:1.4}._f3UMG_errorText{color:var(--dsh-error,#ef4444);font-size:11px;line-height:1.4}._f3UMG_submitBtn{background:var(--dsh-accent,#3b82f6);color:#fff;cursor:pointer;border:none;border-radius:6px;width:100%;padding:6px 0;font-size:12px;font-weight:500;transition:opacity .15s}._f3UMG_submitBtn:hover{opacity:.9}._f3UMG_submitBtn:disabled{opacity:.4;cursor:not-allowed}";
|
|
16
16
|
const tagId$1 = "dsh-edge-client-ui/src/client/EdgeDirectoryFlow.module.css";
|
|
17
17
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
18
18
|
const tag = document.createElement("style");
|
|
@@ -36,6 +36,8 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region ../../../packages/client/ui-edge/src/client/EdgeDirectoryFlow.tsx
|
|
38
38
|
const WORKSPACE_PREFIX = "/workspace/";
|
|
39
|
+
const POPOVER_WIDTH = 260;
|
|
40
|
+
const VIEWPORT_MARGIN = 8;
|
|
39
41
|
function validate$1(name, t) {
|
|
40
42
|
if (name.length === 0) return null;
|
|
41
43
|
if (name.includes("/")) return t("workspaceNewErrorSlash");
|
|
@@ -43,17 +45,61 @@ window.__ModuleLoader__.load({
|
|
|
43
45
|
if (name.includes("\0")) return t("workspaceNewErrorChars");
|
|
44
46
|
return "";
|
|
45
47
|
}
|
|
48
|
+
function findAnchorButton(slotEl) {
|
|
49
|
+
let node = slotEl?.parentElement ?? null;
|
|
50
|
+
while (node !== null) {
|
|
51
|
+
const btn = node.querySelector("button[aria-label]");
|
|
52
|
+
if (btn !== null) return btn;
|
|
53
|
+
node = node.parentElement;
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
function computeAnchor(btn, popover) {
|
|
58
|
+
if (btn === null) return {
|
|
59
|
+
top: 60,
|
|
60
|
+
left: 12
|
|
61
|
+
};
|
|
62
|
+
const rect = btn.getBoundingClientRect();
|
|
63
|
+
const left = Math.min(rect.left, window.innerWidth - POPOVER_WIDTH - VIEWPORT_MARGIN);
|
|
64
|
+
const panelHeight = popover?.offsetHeight ?? 160;
|
|
65
|
+
const belowTop = rect.bottom + 6;
|
|
66
|
+
const aboveTop = rect.top - panelHeight - 6;
|
|
67
|
+
return {
|
|
68
|
+
top: belowTop + panelHeight + VIEWPORT_MARGIN <= window.innerHeight ? belowTop : Math.max(VIEWPORT_MARGIN, aboveTop),
|
|
69
|
+
left: Math.max(VIEWPORT_MARGIN, left)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
46
72
|
function EdgeDirectoryFlow(props) {
|
|
47
73
|
const { open, busy, onPicked, onCancel, t } = props;
|
|
48
74
|
const [name, setName] = (0, react.useState)("");
|
|
75
|
+
const [anchor, setAnchor] = (0, react.useState)(null);
|
|
49
76
|
const inputRef = (0, react.useRef)(null);
|
|
50
77
|
const popoverRef = (0, react.useRef)(null);
|
|
78
|
+
const slotRef = (0, react.useRef)(null);
|
|
79
|
+
const btnRef = (0, react.useRef)(null);
|
|
51
80
|
(0, react.useEffect)(() => {
|
|
52
|
-
if (open) {
|
|
53
|
-
|
|
54
|
-
|
|
81
|
+
if (!open) {
|
|
82
|
+
setAnchor(null);
|
|
83
|
+
btnRef.current = null;
|
|
84
|
+
return;
|
|
55
85
|
}
|
|
86
|
+
setName("");
|
|
87
|
+
btnRef.current = findAnchorButton(slotRef.current);
|
|
88
|
+
setAnchor(computeAnchor(btnRef.current, popoverRef.current));
|
|
89
|
+
requestAnimationFrame(() => inputRef.current?.focus());
|
|
90
|
+
const recompute = () => setAnchor(computeAnchor(btnRef.current, popoverRef.current));
|
|
91
|
+
window.addEventListener("resize", recompute);
|
|
92
|
+
window.addEventListener("scroll", recompute, true);
|
|
93
|
+
return () => {
|
|
94
|
+
window.removeEventListener("resize", recompute);
|
|
95
|
+
window.removeEventListener("scroll", recompute, true);
|
|
96
|
+
};
|
|
56
97
|
}, [open]);
|
|
98
|
+
(0, react.useLayoutEffect)(() => {
|
|
99
|
+
if (!open || popoverRef.current === null) return;
|
|
100
|
+
const next = computeAnchor(btnRef.current, popoverRef.current);
|
|
101
|
+
setAnchor((prev) => prev !== null && prev.top === next.top && prev.left === next.left ? prev : next);
|
|
102
|
+
});
|
|
57
103
|
(0, react.useEffect)(() => {
|
|
58
104
|
if (!open) return;
|
|
59
105
|
const handleClickOutside = (e) => {
|
|
@@ -81,13 +127,18 @@ window.__ModuleLoader__.load({
|
|
|
81
127
|
onPicked,
|
|
82
128
|
t
|
|
83
129
|
]);
|
|
84
|
-
if (!open) return
|
|
130
|
+
if (!open || anchor === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { ref: slotRef });
|
|
85
131
|
const validation = validate$1(name, t);
|
|
86
132
|
const isValid = validation === "";
|
|
87
133
|
const isError = validation !== null && validation !== "";
|
|
88
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
134
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { ref: slotRef }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
89
135
|
ref: popoverRef,
|
|
90
136
|
className: EdgeDirectoryFlow_module_css_default.popover,
|
|
137
|
+
style: {
|
|
138
|
+
top: anchor.top,
|
|
139
|
+
left: anchor.left,
|
|
140
|
+
width: POPOVER_WIDTH
|
|
141
|
+
},
|
|
91
142
|
children: [
|
|
92
143
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
93
144
|
className: EdgeDirectoryFlow_module_css_default.title,
|
|
@@ -128,7 +179,7 @@ window.__ModuleLoader__.load({
|
|
|
128
179
|
children: busy ? t("workspaceNewCreating") : t("workspaceNewCreate")
|
|
129
180
|
})
|
|
130
181
|
]
|
|
131
|
-
});
|
|
182
|
+
})] });
|
|
132
183
|
}
|
|
133
184
|
//#endregion
|
|
134
185
|
//#region ../../../packages/client/ui-edge/src/client/store.ts
|
package/package.json
CHANGED