dsh-edge 0.6.0-alpha.2 → 0.6.0-alpha.4
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 +199 -3
- package/package.json +1 -1
- package/worker/direct/index.js +611 -611
- package/worker/isolated/index.js +419 -419
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" />
|
|
@@ -9,8 +9,178 @@ window.__ModuleLoader__.load({
|
|
|
9
9
|
//#endregion
|
|
10
10
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
11
11
|
let react = require("react");
|
|
12
|
-
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
13
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
|
|
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;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
|
+
const tagId$1 = "dsh-edge-client-ui/src/client/EdgeDirectoryFlow.module.css";
|
|
17
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
18
|
+
const tag = document.createElement("style");
|
|
19
|
+
tag.dataset.plugin = "dsh-edge-client-ui";
|
|
20
|
+
tag.dataset.pluginCss = tagId$1;
|
|
21
|
+
tag.textContent = css$1;
|
|
22
|
+
document.head.appendChild(tag);
|
|
23
|
+
}
|
|
24
|
+
var EdgeDirectoryFlow_module_css_default = {
|
|
25
|
+
"error": "_f3UMG_error",
|
|
26
|
+
"errorText": "_f3UMG_errorText",
|
|
27
|
+
"hint": "_f3UMG_hint",
|
|
28
|
+
"input": "_f3UMG_input",
|
|
29
|
+
"inputGroup": "_f3UMG_inputGroup",
|
|
30
|
+
"overlay": "_f3UMG_overlay",
|
|
31
|
+
"popover": "_f3UMG_popover",
|
|
32
|
+
"prefix": "_f3UMG_prefix",
|
|
33
|
+
"submitBtn": "_f3UMG_submitBtn",
|
|
34
|
+
"title": "_f3UMG_title"
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../../packages/client/ui-edge/src/client/EdgeDirectoryFlow.tsx
|
|
38
|
+
const WORKSPACE_PREFIX = "/workspace/";
|
|
39
|
+
const POPOVER_WIDTH = 260;
|
|
40
|
+
const VIEWPORT_MARGIN = 8;
|
|
41
|
+
function validate$1(name, t) {
|
|
42
|
+
if (name.length === 0) return null;
|
|
43
|
+
if (name.includes("/")) return t("workspaceNewErrorSlash");
|
|
44
|
+
if (name === "." || name === "..") return t("workspaceNewErrorTraversal");
|
|
45
|
+
if (name.includes("\0")) return t("workspaceNewErrorChars");
|
|
46
|
+
return "";
|
|
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
|
+
}
|
|
72
|
+
function EdgeDirectoryFlow(props) {
|
|
73
|
+
const { open, busy, onPicked, onCancel, t } = props;
|
|
74
|
+
const [name, setName] = (0, react.useState)("");
|
|
75
|
+
const [anchor, setAnchor] = (0, react.useState)(null);
|
|
76
|
+
const inputRef = (0, react.useRef)(null);
|
|
77
|
+
const popoverRef = (0, react.useRef)(null);
|
|
78
|
+
const slotRef = (0, react.useRef)(null);
|
|
79
|
+
const btnRef = (0, react.useRef)(null);
|
|
80
|
+
(0, react.useEffect)(() => {
|
|
81
|
+
if (!open) {
|
|
82
|
+
setAnchor(null);
|
|
83
|
+
btnRef.current = null;
|
|
84
|
+
return;
|
|
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
|
+
};
|
|
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
|
+
});
|
|
103
|
+
(0, react.useEffect)(() => {
|
|
104
|
+
if (!open) return;
|
|
105
|
+
const handleClickOutside = (e) => {
|
|
106
|
+
if (popoverRef.current && !popoverRef.current.contains(e.target)) onCancel();
|
|
107
|
+
};
|
|
108
|
+
const handleEscape = (e) => {
|
|
109
|
+
if (e.key === "Escape") {
|
|
110
|
+
e.stopPropagation();
|
|
111
|
+
onCancel();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
document.addEventListener("mousedown", handleClickOutside, true);
|
|
115
|
+
document.addEventListener("keydown", handleEscape, true);
|
|
116
|
+
return () => {
|
|
117
|
+
document.removeEventListener("mousedown", handleClickOutside, true);
|
|
118
|
+
document.removeEventListener("keydown", handleEscape, true);
|
|
119
|
+
};
|
|
120
|
+
}, [open, onCancel]);
|
|
121
|
+
const handleKeyDown = (0, react.useCallback)((e) => {
|
|
122
|
+
if (e.key === "Enter") {
|
|
123
|
+
if (validate$1(name, t) === "") onPicked(WORKSPACE_PREFIX + name);
|
|
124
|
+
}
|
|
125
|
+
}, [
|
|
126
|
+
name,
|
|
127
|
+
onPicked,
|
|
128
|
+
t
|
|
129
|
+
]);
|
|
130
|
+
if (!open || anchor === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { ref: slotRef });
|
|
131
|
+
const validation = validate$1(name, t);
|
|
132
|
+
const isValid = validation === "";
|
|
133
|
+
const isError = validation !== null && validation !== "";
|
|
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", {
|
|
135
|
+
ref: popoverRef,
|
|
136
|
+
className: EdgeDirectoryFlow_module_css_default.popover,
|
|
137
|
+
style: {
|
|
138
|
+
top: anchor.top,
|
|
139
|
+
left: anchor.left,
|
|
140
|
+
width: POPOVER_WIDTH
|
|
141
|
+
},
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
144
|
+
className: EdgeDirectoryFlow_module_css_default.title,
|
|
145
|
+
children: t("workspaceNewTitle")
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
148
|
+
className: `${EdgeDirectoryFlow_module_css_default.inputGroup}${isError ? ` ${EdgeDirectoryFlow_module_css_default.error}` : ""}`,
|
|
149
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
150
|
+
className: EdgeDirectoryFlow_module_css_default.prefix,
|
|
151
|
+
children: WORKSPACE_PREFIX
|
|
152
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
153
|
+
ref: inputRef,
|
|
154
|
+
className: EdgeDirectoryFlow_module_css_default.input,
|
|
155
|
+
type: "text",
|
|
156
|
+
placeholder: t("workspaceNewPlaceholder"),
|
|
157
|
+
value: name,
|
|
158
|
+
onChange: (e) => setName(e.target.value),
|
|
159
|
+
onKeyDown: handleKeyDown,
|
|
160
|
+
disabled: busy
|
|
161
|
+
})]
|
|
162
|
+
}),
|
|
163
|
+
isError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
164
|
+
className: EdgeDirectoryFlow_module_css_default.errorText,
|
|
165
|
+
children: validation
|
|
166
|
+
}),
|
|
167
|
+
!isError && !isValid && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
168
|
+
className: EdgeDirectoryFlow_module_css_default.hint,
|
|
169
|
+
children: t("workspaceNewHint")
|
|
170
|
+
}),
|
|
171
|
+
isValid && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
172
|
+
className: EdgeDirectoryFlow_module_css_default.hint,
|
|
173
|
+
children: [WORKSPACE_PREFIX, name]
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
176
|
+
className: EdgeDirectoryFlow_module_css_default.submitBtn,
|
|
177
|
+
disabled: !isValid || busy,
|
|
178
|
+
onClick: () => onPicked(WORKSPACE_PREFIX + name),
|
|
179
|
+
children: busy ? t("workspaceNewCreating") : t("workspaceNewCreate")
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})] });
|
|
183
|
+
}
|
|
14
184
|
//#endregion
|
|
15
185
|
//#region ../../../packages/client/ui-edge/src/client/store.ts
|
|
16
186
|
var import_umd = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -486,7 +656,15 @@ window.__ModuleLoader__.load({
|
|
|
486
656
|
ownerIntro: "Signing out clears this browser’s owner session. Your deployment and data remain unchanged.",
|
|
487
657
|
signOut: "Sign out",
|
|
488
658
|
signingOut: "Signing out…",
|
|
489
|
-
signOutFailed: "Could not sign out. Try again."
|
|
659
|
+
signOutFailed: "Could not sign out. Try again.",
|
|
660
|
+
workspaceNewTitle: "New Workspace",
|
|
661
|
+
workspaceNewPlaceholder: "project-name",
|
|
662
|
+
workspaceNewHint: "Enter a project directory name",
|
|
663
|
+
workspaceNewCreate: "Create",
|
|
664
|
+
workspaceNewCreating: "Creating…",
|
|
665
|
+
workspaceNewErrorSlash: "Name cannot contain /",
|
|
666
|
+
workspaceNewErrorTraversal: "Invalid directory name",
|
|
667
|
+
workspaceNewErrorChars: "Invalid characters"
|
|
490
668
|
};
|
|
491
669
|
/** Simplified Chinese copy for the Edge settings page. */
|
|
492
670
|
const zh = {
|
|
@@ -520,7 +698,15 @@ window.__ModuleLoader__.load({
|
|
|
520
698
|
ownerIntro: "退出只会清除此浏览器的 Owner 会话,不会改变部署或数据。",
|
|
521
699
|
signOut: "退出登录",
|
|
522
700
|
signingOut: "正在退出…",
|
|
523
|
-
signOutFailed: "退出失败,请重试。"
|
|
701
|
+
signOutFailed: "退出失败,请重试。",
|
|
702
|
+
workspaceNewTitle: "新建工作空间",
|
|
703
|
+
workspaceNewPlaceholder: "项目名称",
|
|
704
|
+
workspaceNewHint: "输入项目目录名称",
|
|
705
|
+
workspaceNewCreate: "创建",
|
|
706
|
+
workspaceNewCreating: "创建中…",
|
|
707
|
+
workspaceNewErrorSlash: "名称不能包含 /",
|
|
708
|
+
workspaceNewErrorTraversal: "无效的目录名称",
|
|
709
|
+
workspaceNewErrorChars: "包含无效字符"
|
|
524
710
|
};
|
|
525
711
|
//#endregion
|
|
526
712
|
//#region ../../../packages/client/ui-edge/src/client/index.ts
|
|
@@ -562,6 +748,16 @@ window.__ModuleLoader__.load({
|
|
|
562
748
|
locale: "settings.edge",
|
|
563
749
|
inject: injected
|
|
564
750
|
}, EdgeSettingsSection));
|
|
751
|
+
ctx.slots.inject("conversation.hero.workspace.directoryFlow", () => ctx.slots.inject("sidebar.workspaces.directoryFlow", function* () {
|
|
752
|
+
yield ctx.slots.register({
|
|
753
|
+
name: "conversation.hero.workspace.directoryFlow",
|
|
754
|
+
locale: "settings.edge"
|
|
755
|
+
}, EdgeDirectoryFlow);
|
|
756
|
+
yield ctx.slots.register({
|
|
757
|
+
name: "sidebar.workspaces.directoryFlow",
|
|
758
|
+
locale: "settings.edge"
|
|
759
|
+
}, EdgeDirectoryFlow);
|
|
760
|
+
}));
|
|
565
761
|
}
|
|
566
762
|
//#endregion
|
|
567
763
|
exports.apply = apply;
|
package/package.json
CHANGED