@hachej/boring-workspace 0.1.55 → 0.1.56
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/{FileTree-DGonRKiT.js → FileTree-ChkSU4gL.js} +1 -1
- package/dist/{MarkdownEditor-CwglOF-8.js → MarkdownEditor-BlYGosmH.js} +1 -1
- package/dist/{WorkspaceLoadingState-B2Ctp-b2.js → WorkspaceLoadingState-BYTO4wdt.js} +1 -1
- package/dist/{WorkspaceProvider-DF90RUdU.js → WorkspaceProvider-Bp1Sm40K.js} +651 -645
- package/dist/app-front.js +2 -2
- package/dist/testing.js +1 -1
- package/dist/workspace.js +5 -5
- package/package.json +4 -4
|
@@ -5,8 +5,8 @@ import * as Jo from "react/jsx-runtime";
|
|
|
5
5
|
import { jsx as l, jsxs as x, Fragment as We } from "react/jsx-runtime";
|
|
6
6
|
import * as Yo from "react";
|
|
7
7
|
import { useRef as N, useMemo as Y, useContext as ge, createContext as Pe, useSyncExternalStore as st, useState as B, useCallback as R, Component as Xo, useEffect as O, createElement as be, Suspense as Ot, Fragment as Er, lazy as Lt, useLayoutEffect as Qo } from "react";
|
|
8
|
-
import { AlertTriangleIcon as Zo, ImageIcon as Ke, FileTextIcon as Ne, FileJsonIcon as An, FileCodeIcon as
|
|
9
|
-
import { Notice as Rr, IconButton as xe, LoadingState as fi, Input as Nr, toast as _e, ErrorState as it, Skeleton as pi, Spinner as Mt, Button as Fe, AlertDialog as
|
|
8
|
+
import { AlertTriangleIcon as Zo, ImageIcon as Ke, FileTextIcon as Ne, FileJsonIcon as An, FileCodeIcon as me, FileIcon as $t, X as hn, RefreshCw as ei, Download as ti, RefreshCcw as ni, ExternalLink as Ir, FolderTree as ri, TerminalIcon as gn, ClockIcon as oi, ArrowUp as ii, ArrowDown as si, CornerDownLeft as ai, GripVertical as ci, Plus as li, ChevronLeft as ui, ChevronRight as Tr, Pin as di, Menu as At, Search as Dn } from "lucide-react";
|
|
9
|
+
import { Notice as Rr, IconButton as xe, LoadingState as fi, Input as Nr, toast as _e, ErrorState as it, Skeleton as pi, Spinner as Mt, Button as Fe, AlertDialog as mi, AlertDialogContent as hi, AlertDialogHeader as gi, AlertDialogTitle as vi, AlertDialogDescription as yi, AlertDialogFooter as bi, AlertDialogCancel as wi, AlertDialogAction as ki, EmptyState as Ar, Kbd as rt, TooltipProvider as Si, Tooltip as xi, TooltipTrigger as Ci, TooltipContent as Pi, Dialog as Ei, DialogContent as Ii, DialogHeader as Ti, DialogTitle as Ri, DialogDescription as Ni, Command as Ai, CommandList as Di, CommandEmpty as _i, CommandInput as Fi, CommandGroup as vn, CommandItem as Wt, CommandShortcut as Oi, Toaster as Li } from "@hachej/boring-ui-kit";
|
|
10
10
|
import { useStore as qe, create as $i } from "zustand";
|
|
11
11
|
import { persist as Mi } from "zustand/middleware";
|
|
12
12
|
import { z as te } from "zod";
|
|
@@ -67,7 +67,7 @@ function Ge(e) {
|
|
|
67
67
|
}
|
|
68
68
|
function Lr(e = {}) {
|
|
69
69
|
const t = [], n = [], r = [], o = [], i = [], s = [], u = [], a = [], d = /* @__PURE__ */ new Map(), c = (f, p) => {
|
|
70
|
-
const
|
|
70
|
+
const h = `${f}:${p}`, v = d.get(h);
|
|
71
71
|
if (v !== void 0) {
|
|
72
72
|
const g = e.pluginId ?? "<plugin>";
|
|
73
73
|
throw new an(
|
|
@@ -75,7 +75,7 @@ function Lr(e = {}) {
|
|
|
75
75
|
`plugin "${g}" registers ${f} "${p}" twice (first as ${v}, then again). If you are composing kits, two of them are registering the same id — namespace one of them.`
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
|
-
d.set(
|
|
78
|
+
d.set(h, `${f} "${p}"`);
|
|
79
79
|
};
|
|
80
80
|
return {
|
|
81
81
|
registerProvider(f) {
|
|
@@ -160,7 +160,7 @@ function ps(e, t) {
|
|
|
160
160
|
...e.chromeless !== void 0 ? { chromeless: e.chromeless } : {}
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function ms(e, t) {
|
|
164
164
|
return {
|
|
165
165
|
id: e.id,
|
|
166
166
|
title: e.title,
|
|
@@ -172,7 +172,7 @@ function hs(e, t) {
|
|
|
172
172
|
...e.when ? { when: e.when } : {}
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function hs(e, t) {
|
|
176
176
|
return {
|
|
177
177
|
id: e.id ?? `${t}:${e.kind}`,
|
|
178
178
|
config: {
|
|
@@ -193,11 +193,11 @@ function gs(e, t) {
|
|
|
193
193
|
for (const o of n.leftTabs)
|
|
194
194
|
t.panels.register(o.id, ps(o, e.id));
|
|
195
195
|
for (const o of n.panelCommands)
|
|
196
|
-
t.commands.registerCommand(
|
|
196
|
+
t.commands.registerCommand(ms(o, e.id));
|
|
197
197
|
for (const o of n.catalogs)
|
|
198
198
|
t.catalogs.register(o, e.id);
|
|
199
199
|
for (const o of n.surfaceResolvers) {
|
|
200
|
-
const { id: i, config: s } =
|
|
200
|
+
const { id: i, config: s } = hs(o, e.id);
|
|
201
201
|
(r = t.surfaceResolvers) == null || r.register(i, s);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
@@ -373,7 +373,7 @@ class Mr {
|
|
|
373
373
|
for (const t of [...this.listeners]) t();
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
const
|
|
376
|
+
const ht = Pe(null);
|
|
377
377
|
function bs({
|
|
378
378
|
panelRegistry: e,
|
|
379
379
|
commandRegistry: t,
|
|
@@ -392,25 +392,25 @@ function bs({
|
|
|
392
392
|
}),
|
|
393
393
|
[e, t, u, a]
|
|
394
394
|
);
|
|
395
|
-
return /* @__PURE__ */ l(
|
|
395
|
+
return /* @__PURE__ */ l(ht.Provider, { value: d, children: o });
|
|
396
396
|
}
|
|
397
397
|
function Bt() {
|
|
398
|
-
const e = ge(
|
|
398
|
+
const e = ge(ht);
|
|
399
399
|
if (!e) throw new Error("useRegistry must be used within a RegistryProvider");
|
|
400
400
|
return e.panelRegistry;
|
|
401
401
|
}
|
|
402
402
|
function yn() {
|
|
403
|
-
const e = ge(
|
|
403
|
+
const e = ge(ht);
|
|
404
404
|
if (!e) throw new Error("useCommandRegistry must be used within a RegistryProvider");
|
|
405
405
|
return e.commandRegistry;
|
|
406
406
|
}
|
|
407
407
|
function Ut() {
|
|
408
|
-
const e = ge(
|
|
408
|
+
const e = ge(ht);
|
|
409
409
|
if (!e) throw new Error("useCatalogRegistry must be used within a RegistryProvider");
|
|
410
410
|
return e.catalogRegistry;
|
|
411
411
|
}
|
|
412
412
|
function Wr() {
|
|
413
|
-
const e = ge(
|
|
413
|
+
const e = ge(ht);
|
|
414
414
|
if (!e) throw new Error("useSurfaceResolverRegistry must be used within a RegistryProvider");
|
|
415
415
|
return e.surfaceResolverRegistry;
|
|
416
416
|
}
|
|
@@ -453,7 +453,7 @@ function xs({ children: e }) {
|
|
|
453
453
|
);
|
|
454
454
|
return /* @__PURE__ */ l(bn.Provider, { value: o, children: e });
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function tf() {
|
|
457
457
|
const e = ge(bn);
|
|
458
458
|
if (!e) throw new Error("usePluginErrors must be used within a PluginErrorProvider");
|
|
459
459
|
return e;
|
|
@@ -571,12 +571,12 @@ function Os(e) {
|
|
|
571
571
|
async openFile(a, d) {
|
|
572
572
|
const c = Rs.safeParse({ path: a, mode: d == null ? void 0 : d.mode });
|
|
573
573
|
if (!c.success) return i("VALIDATION", c.error.issues[0].message);
|
|
574
|
-
const f = e.getState(), p = c.data.mode ?? "edit",
|
|
575
|
-
if (f.panels.find((g) => g.id ===
|
|
574
|
+
const f = e.getState(), p = c.data.mode ?? "edit", h = `file:${a}`;
|
|
575
|
+
if (f.panels.find((g) => g.id === h)) {
|
|
576
576
|
const g = f.activePanel;
|
|
577
|
-
return f.activatePanel(
|
|
577
|
+
return f.activatePanel(h), f.visibleFiles.includes(a) || f.openFile(a, h), s("panel:activated", { panelId: h, previousPanelId: g }), o();
|
|
578
578
|
}
|
|
579
|
-
return f.panels.length >= wt ? i("MAX_PANELS", `cannot exceed ${wt} open panels`) : (f.openFile(a,
|
|
579
|
+
return f.panels.length >= wt ? i("MAX_PANELS", `cannot exceed ${wt} open panels`) : (f.openFile(a, h), f.openPanel({ id: h, component: "editor", params: { path: a, mode: p } }), s("file:opened", { path: a, mode: p }), s("panel:opened", { panelId: h, params: { path: a, mode: p } }), o());
|
|
580
580
|
},
|
|
581
581
|
async openPanel(a) {
|
|
582
582
|
const d = Ns.safeParse(a);
|
|
@@ -715,7 +715,7 @@ function Ws(e) {
|
|
|
715
715
|
onVersionMismatch: a,
|
|
716
716
|
onConnectionChange: d
|
|
717
717
|
} = e;
|
|
718
|
-
let c = null, f = null, p = null,
|
|
718
|
+
let c = null, f = null, p = null, h = null, v = !1, g = !1, b = 0;
|
|
719
719
|
function y(_) {
|
|
720
720
|
g || v !== _ && (v = _, d == null || d(_));
|
|
721
721
|
}
|
|
@@ -756,8 +756,8 @@ function Ws(e) {
|
|
|
756
756
|
a == null || a(T.v);
|
|
757
757
|
return;
|
|
758
758
|
}
|
|
759
|
-
|
|
760
|
-
|
|
759
|
+
b++, $n(n, T.kind, T.params).finally(() => {
|
|
760
|
+
b--;
|
|
761
761
|
});
|
|
762
762
|
break;
|
|
763
763
|
}
|
|
@@ -789,7 +789,7 @@ function Ws(e) {
|
|
|
789
789
|
k("heartbeat", T.data);
|
|
790
790
|
}), c = j;
|
|
791
791
|
}
|
|
792
|
-
async function
|
|
792
|
+
async function m() {
|
|
793
793
|
if (!g)
|
|
794
794
|
try {
|
|
795
795
|
const _ = `${t}/api/v1/ui/commands/next?poll=true`, j = await fetch(_, { headers: Ln(o) });
|
|
@@ -807,11 +807,11 @@ function Ws(e) {
|
|
|
807
807
|
a == null || a(A.v);
|
|
808
808
|
continue;
|
|
809
809
|
}
|
|
810
|
-
|
|
810
|
+
b++;
|
|
811
811
|
try {
|
|
812
812
|
await $n(n, A.kind, A.params);
|
|
813
813
|
} finally {
|
|
814
|
-
|
|
814
|
+
b--;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
y(!0);
|
|
@@ -820,18 +820,18 @@ function Ws(e) {
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
function L() {
|
|
823
|
-
|
|
823
|
+
h = r.subscribe(() => {
|
|
824
824
|
if (g) return;
|
|
825
|
-
const _ =
|
|
825
|
+
const _ = b > 0 ? "agent" : "user";
|
|
826
826
|
M(_);
|
|
827
827
|
});
|
|
828
828
|
}
|
|
829
829
|
return {
|
|
830
830
|
connect() {
|
|
831
|
-
g = !1, !i && typeof EventSource < "u" ? I() : (
|
|
831
|
+
g = !1, !i && typeof EventSource < "u" ? I() : (m(), f = setInterval(m, s)), L();
|
|
832
832
|
},
|
|
833
833
|
disconnect() {
|
|
834
|
-
c && (c.close(), c = null), f !== null && (clearInterval(f), f = null), p !== null && (clearTimeout(p), p = null),
|
|
834
|
+
c && (c.close(), c = null), f !== null && (clearInterval(f), f = null), p !== null && (clearTimeout(p), p = null), h && (h(), h = null), y(!1), g = !0;
|
|
835
835
|
},
|
|
836
836
|
pushState(_) {
|
|
837
837
|
z(_);
|
|
@@ -1050,8 +1050,8 @@ function Wn(e, t) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
function oa(e) {
|
|
1052
1052
|
const t = e.endpoint ?? "", n = e.ctx, r = e.query, o = e.eventSourceCtor === null ? null : e.eventSourceCtor ?? (typeof EventSource < "u" ? EventSource : null), i = e.fetcher ?? (typeof fetch < "u" ? fetch : null), s = e.reconnectDelayMs ?? na, u = e.maxReconnects ?? ra, a = e.pollIntervalMs ?? ta;
|
|
1053
|
-
let d = !1, c = null, f = null, p = null,
|
|
1054
|
-
function
|
|
1053
|
+
let d = !1, c = null, f = null, p = null, h = null, v = 0, g = !1;
|
|
1054
|
+
function b(M) {
|
|
1055
1055
|
M && typeof M == "object" && typeof M.kind == "string" && cn(M, n);
|
|
1056
1056
|
}
|
|
1057
1057
|
function y() {
|
|
@@ -1067,7 +1067,7 @@ function oa(e) {
|
|
|
1067
1067
|
if (d) return;
|
|
1068
1068
|
if (k.ok) {
|
|
1069
1069
|
const I = await k.json();
|
|
1070
|
-
if (Array.isArray(I)) for (const
|
|
1070
|
+
if (Array.isArray(I)) for (const m of I) b(m);
|
|
1071
1071
|
}
|
|
1072
1072
|
} catch {
|
|
1073
1073
|
} finally {
|
|
@@ -1088,7 +1088,7 @@ function oa(e) {
|
|
|
1088
1088
|
const k = M.data;
|
|
1089
1089
|
if (!(typeof k != "string" || k.length === 0))
|
|
1090
1090
|
try {
|
|
1091
|
-
|
|
1091
|
+
b(JSON.parse(k));
|
|
1092
1092
|
} catch {
|
|
1093
1093
|
}
|
|
1094
1094
|
}), c.addEventListener("init", () => {
|
|
@@ -1099,13 +1099,13 @@ function oa(e) {
|
|
|
1099
1099
|
y();
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
|
-
|
|
1102
|
+
h = setTimeout(z, s * v);
|
|
1103
1103
|
}
|
|
1104
1104
|
});
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
return z(), () => {
|
|
1108
|
-
d = !0, c && (c.close(), c = null), f && (clearTimeout(f), f = null), p && (p.abort(), p = null),
|
|
1108
|
+
d = !0, c && (c.close(), c = null), f && (clearTimeout(f), f = null), p && (p.abort(), p = null), h && (clearTimeout(h), h = null);
|
|
1109
1109
|
};
|
|
1110
1110
|
}
|
|
1111
1111
|
const ia = 1e4, sa = 3, aa = 1e3;
|
|
@@ -1138,7 +1138,7 @@ class la {
|
|
|
1138
1138
|
c > 0 && await ca(this.retryBaseMs * 2 ** (c - 1));
|
|
1139
1139
|
const f = new AbortController(), p = () => f.abort();
|
|
1140
1140
|
i == null || i.addEventListener("abort", p, { once: !0 });
|
|
1141
|
-
const
|
|
1141
|
+
const h = setTimeout(() => f.abort(), s);
|
|
1142
1142
|
try {
|
|
1143
1143
|
const v = r != null, g = await fetch(`${this.baseUrl}${n}`, {
|
|
1144
1144
|
method: t,
|
|
@@ -1146,23 +1146,23 @@ class la {
|
|
|
1146
1146
|
body: v ? JSON.stringify(r) : void 0,
|
|
1147
1147
|
signal: f.signal
|
|
1148
1148
|
});
|
|
1149
|
-
if (clearTimeout(
|
|
1149
|
+
if (clearTimeout(h), i == null || i.removeEventListener("abort", p), g.status === 401 || g.status === 403)
|
|
1150
1150
|
throw (a = this.onAuthError) == null || a.call(this, g.status), new Ue(g.status, `Auth error: ${g.status}`);
|
|
1151
1151
|
if (jn(g.status)) {
|
|
1152
1152
|
u = new Ue(g.status, `HTTP ${g.status}: ${g.statusText}`);
|
|
1153
1153
|
continue;
|
|
1154
1154
|
}
|
|
1155
1155
|
if (!g.ok) {
|
|
1156
|
-
const
|
|
1156
|
+
const b = await ua(g);
|
|
1157
1157
|
throw new Ue(
|
|
1158
1158
|
g.status,
|
|
1159
1159
|
`HTTP ${g.status}: ${g.statusText}`,
|
|
1160
|
-
|
|
1160
|
+
b
|
|
1161
1161
|
);
|
|
1162
1162
|
}
|
|
1163
1163
|
return await g.json();
|
|
1164
1164
|
} catch (v) {
|
|
1165
|
-
if (clearTimeout(
|
|
1165
|
+
if (clearTimeout(h), i == null || i.removeEventListener("abort", p), v instanceof Ue && !jn(v.status))
|
|
1166
1166
|
throw v;
|
|
1167
1167
|
if (v instanceof DOMException && v.name === "AbortError") {
|
|
1168
1168
|
if (i != null && i.aborted)
|
|
@@ -1289,12 +1289,12 @@ async function ua(e) {
|
|
|
1289
1289
|
return null;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
const da = "filesystem:file.changed", fa = "filesystem:file.created", pa = "filesystem:file.moved",
|
|
1292
|
+
const da = "filesystem:file.changed", fa = "filesystem:file.created", pa = "filesystem:file.moved", ma = "filesystem:file.deleted", ee = {
|
|
1293
1293
|
changed: da,
|
|
1294
1294
|
created: fa,
|
|
1295
1295
|
moved: pa,
|
|
1296
|
-
deleted:
|
|
1297
|
-
}, Et = "filesystem", un = "files", It = un, Ht = "files",
|
|
1296
|
+
deleted: ma
|
|
1297
|
+
}, Et = "filesystem", un = "files", It = un, Ht = "files", ha = "filesystem-path", dn = "code-editor", Br = "csv-viewer", Ur = "markdown-editor", qr = "image-viewer", Hr = "pdf-viewer", Vr = "html-viewer", ga = "empty-file-panel";
|
|
1298
1298
|
function Kr(e, t) {
|
|
1299
1299
|
const n = [], r = [];
|
|
1300
1300
|
for (const o of e)
|
|
@@ -1453,25 +1453,25 @@ function xa() {
|
|
|
1453
1453
|
} catch {
|
|
1454
1454
|
return;
|
|
1455
1455
|
}
|
|
1456
|
-
const d = (
|
|
1457
|
-
if (s.has(
|
|
1458
|
-
if (s.add(
|
|
1456
|
+
const d = (h) => {
|
|
1457
|
+
if (s.has(h)) return !1;
|
|
1458
|
+
if (s.add(h), u.push(h), u.length > a) {
|
|
1459
1459
|
const v = u.shift();
|
|
1460
1460
|
v !== void 0 && s.delete(v);
|
|
1461
1461
|
}
|
|
1462
1462
|
return !0;
|
|
1463
|
-
}, c = (
|
|
1463
|
+
}, c = (h) => {
|
|
1464
1464
|
let v;
|
|
1465
1465
|
try {
|
|
1466
|
-
v = JSON.parse(
|
|
1466
|
+
v = JSON.parse(h.data);
|
|
1467
1467
|
} catch {
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
1470
1470
|
typeof (v == null ? void 0 : v.eventId) != "string" || typeof v.change != "object" || v.change == null || d(v.eventId) && Ca(v.change);
|
|
1471
|
-
}, f = (
|
|
1471
|
+
}, f = (h) => {
|
|
1472
1472
|
i = !0;
|
|
1473
1473
|
try {
|
|
1474
|
-
const v = JSON.parse(
|
|
1474
|
+
const v = JSON.parse(h.data);
|
|
1475
1475
|
console.warn(
|
|
1476
1476
|
`[boring-ui] live file events disabled (${v.reason ?? "unsupported"})${v.message ? `: ${v.message}` : ""}`
|
|
1477
1477
|
);
|
|
@@ -1480,7 +1480,7 @@ function xa() {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
o == null || o.close();
|
|
1482
1482
|
}, p = () => {
|
|
1483
|
-
s.clear(), u.length = 0, n.invalidateQueries({ predicate: (
|
|
1483
|
+
s.clear(), u.length = 0, n.invalidateQueries({ predicate: (h) => Pa(h.queryKey) });
|
|
1484
1484
|
};
|
|
1485
1485
|
return o.addEventListener("change", c), o.addEventListener("unsupported", f), o.addEventListener("resync-required", p), () => {
|
|
1486
1486
|
o && (o.removeEventListener("change", c), o.removeEventListener("unsupported", f), o.removeEventListener("resync-required", p), i || o.close(), o = null);
|
|
@@ -1523,7 +1523,7 @@ function je() {
|
|
|
1523
1523
|
if (!e) throw new Error("useDataClient must be used within a DataProvider");
|
|
1524
1524
|
return e;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function nf() {
|
|
1527
1527
|
return ge(Sn) != null;
|
|
1528
1528
|
}
|
|
1529
1529
|
function Ye() {
|
|
@@ -1851,11 +1851,11 @@ class Ka {
|
|
|
1851
1851
|
const n = this.wrapperComponentCache.get(t);
|
|
1852
1852
|
if (n) return n;
|
|
1853
1853
|
const r = this, o = function(s) {
|
|
1854
|
-
var
|
|
1854
|
+
var h;
|
|
1855
1855
|
st(r.subscribe, r.getSnapshot, r.getSnapshot);
|
|
1856
1856
|
const u = r.get(t), a = r.generation, d = !!(u && r.satisfiesCapabilities(u)), c = Y(() => !u || !r.satisfiesCapabilities(u) ? () => null : u.lazy ? r.getLazyComponent(t, u.component) : u.component, [u == null ? void 0 : u.component, u == null ? void 0 : u.lazy, u == null ? void 0 : u.requiresCapabilities, a]);
|
|
1857
1857
|
if (!d) return null;
|
|
1858
|
-
const f = (u == null ? void 0 : u.pluginId) ?? (u == null ? void 0 : u.id) ?? t, p = typeof ((
|
|
1858
|
+
const f = (u == null ? void 0 : u.pluginId) ?? (u == null ? void 0 : u.id) ?? t, p = typeof ((h = s == null ? void 0 : s.api) == null ? void 0 : h.id) == "string" ? s.api.id : void 0;
|
|
1859
1859
|
return be(
|
|
1860
1860
|
Va,
|
|
1861
1861
|
{
|
|
@@ -1890,26 +1890,26 @@ class Ka {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
1892
|
const Hn = {
|
|
1893
|
-
ts:
|
|
1894
|
-
tsx:
|
|
1895
|
-
js:
|
|
1896
|
-
jsx:
|
|
1897
|
-
mjs:
|
|
1898
|
-
cjs:
|
|
1899
|
-
py:
|
|
1900
|
-
rb:
|
|
1901
|
-
go:
|
|
1902
|
-
rs:
|
|
1903
|
-
java:
|
|
1904
|
-
c:
|
|
1905
|
-
cpp:
|
|
1906
|
-
h:
|
|
1907
|
-
cs:
|
|
1908
|
-
swift:
|
|
1909
|
-
kt:
|
|
1910
|
-
sh:
|
|
1911
|
-
bash:
|
|
1912
|
-
zsh:
|
|
1893
|
+
ts: me,
|
|
1894
|
+
tsx: me,
|
|
1895
|
+
js: me,
|
|
1896
|
+
jsx: me,
|
|
1897
|
+
mjs: me,
|
|
1898
|
+
cjs: me,
|
|
1899
|
+
py: me,
|
|
1900
|
+
rb: me,
|
|
1901
|
+
go: me,
|
|
1902
|
+
rs: me,
|
|
1903
|
+
java: me,
|
|
1904
|
+
c: me,
|
|
1905
|
+
cpp: me,
|
|
1906
|
+
h: me,
|
|
1907
|
+
cs: me,
|
|
1908
|
+
swift: me,
|
|
1909
|
+
kt: me,
|
|
1910
|
+
sh: me,
|
|
1911
|
+
bash: me,
|
|
1912
|
+
zsh: me,
|
|
1913
1913
|
json: An,
|
|
1914
1914
|
jsonl: An,
|
|
1915
1915
|
md: Ne,
|
|
@@ -1950,22 +1950,22 @@ function He() {
|
|
|
1950
1950
|
);
|
|
1951
1951
|
return fn;
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function rf() {
|
|
1954
1954
|
return qe(He(), (e) => e.activeFile);
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function of() {
|
|
1957
1957
|
return qe(He(), (e) => e.activePanel);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function sf() {
|
|
1960
1960
|
return qe(He(), (e) => e.sidebar);
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function af() {
|
|
1963
1963
|
return qe(He(), (e) => e.setSidebar);
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function cf() {
|
|
1966
1966
|
return qe(He(), (e) => e.panels);
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function lf() {
|
|
1969
1969
|
return qe(He(), (e) => e.dirtyFiles);
|
|
1970
1970
|
}
|
|
1971
1971
|
function xn() {
|
|
@@ -1974,7 +1974,7 @@ function xn() {
|
|
|
1974
1974
|
function Ja() {
|
|
1975
1975
|
return qe(He(), (e) => e.hydrationComplete);
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function uf() {
|
|
1978
1978
|
return qe(He(), (e) => e.resetLayout);
|
|
1979
1979
|
}
|
|
1980
1980
|
function Ya(e) {
|
|
@@ -2043,39 +2043,39 @@ function rc(e) {
|
|
|
2043
2043
|
const { api: t } = e, n = e.tabLocation === "headerOverflow", [r, o] = B(t.title ?? t.id), [i, s] = B(null), u = N(null);
|
|
2044
2044
|
O(() => {
|
|
2045
2045
|
var W;
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2048
|
-
const L = (W = t.onDidTitleChange) == null ? void 0 : W.call(t,
|
|
2046
|
+
const m = () => o(t.title ?? t.id);
|
|
2047
|
+
m();
|
|
2048
|
+
const L = (W = t.onDidTitleChange) == null ? void 0 : W.call(t, m);
|
|
2049
2049
|
return () => {
|
|
2050
2050
|
var _;
|
|
2051
2051
|
return (_ = L == null ? void 0 : L.dispose) == null ? void 0 : _.call(L);
|
|
2052
2052
|
};
|
|
2053
2053
|
}, [t]), O(() => {
|
|
2054
2054
|
if (!i) return;
|
|
2055
|
-
function
|
|
2055
|
+
function m(L) {
|
|
2056
2056
|
u.current && !u.current.contains(L.target) && s(null);
|
|
2057
2057
|
}
|
|
2058
|
-
return document.addEventListener("pointerdown",
|
|
2058
|
+
return document.addEventListener("pointerdown", m), () => document.removeEventListener("pointerdown", m);
|
|
2059
2059
|
}, [i]);
|
|
2060
|
-
const a = r.endsWith(" ●"), d = a ? r.slice(0, -2) : r, c = Ga(d), f = Za(e.params, "path") ?? ec(t.id), p = Qa(e).map(Xa).filter((
|
|
2061
|
-
ln(Te.editorSaveStart, (
|
|
2062
|
-
|
|
2063
|
-
}), ln(Te.editorSaveEnd, (
|
|
2064
|
-
|
|
2060
|
+
const a = r.endsWith(" ●"), d = a ? r.slice(0, -2) : r, c = Ga(d), f = Za(e.params, "path") ?? ec(t.id), p = Qa(e).map(Xa).filter((m) => m.close), h = p.filter((m) => m.id !== t.id), [v, g] = B(!1);
|
|
2061
|
+
ln(Te.editorSaveStart, (m) => {
|
|
2062
|
+
m.panelId === t.id && g(!0);
|
|
2063
|
+
}), ln(Te.editorSaveEnd, (m) => {
|
|
2064
|
+
m.panelId === t.id && g(!1);
|
|
2065
2065
|
});
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2068
|
-
}, y = (
|
|
2069
|
-
!f &&
|
|
2070
|
-
}, z = (
|
|
2071
|
-
s(null), tc(
|
|
2066
|
+
const b = (m) => {
|
|
2067
|
+
m.preventDefault(), m.stopPropagation(), n && m.nativeEvent.stopImmediatePropagation(), t.close(), n && nc();
|
|
2068
|
+
}, y = (m) => {
|
|
2069
|
+
!f && h.length === 0 || (m.preventDefault(), m.stopPropagation(), s({ x: m.clientX, y: m.clientY }));
|
|
2070
|
+
}, z = (m) => {
|
|
2071
|
+
s(null), tc(m);
|
|
2072
2072
|
}, M = () => {
|
|
2073
|
-
var
|
|
2074
|
-
s(null), (
|
|
2075
|
-
for (const W of
|
|
2073
|
+
var m, L;
|
|
2074
|
+
s(null), (m = t.setActive) == null || m.call(t);
|
|
2075
|
+
for (const W of h) (L = W.close) == null || L.call(W);
|
|
2076
2076
|
}, k = () => {
|
|
2077
|
-
var
|
|
2078
|
-
s(null), (
|
|
2077
|
+
var m, L;
|
|
2078
|
+
s(null), (m = t.setActive) == null || m.call(t);
|
|
2079
2079
|
for (const W of p) (L = W.close) == null || L.call(W);
|
|
2080
2080
|
}, I = i && typeof document < "u" ? _r(
|
|
2081
2081
|
/* @__PURE__ */ x(
|
|
@@ -2085,9 +2085,9 @@ function rc(e) {
|
|
|
2085
2085
|
role: "menu",
|
|
2086
2086
|
className: "fixed z-[1000] min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
2087
2087
|
style: { left: i.x, top: i.y },
|
|
2088
|
-
onPointerDown: (
|
|
2089
|
-
onContextMenu: (
|
|
2090
|
-
|
|
2088
|
+
onPointerDown: (m) => m.stopPropagation(),
|
|
2089
|
+
onContextMenu: (m) => {
|
|
2090
|
+
m.preventDefault(), m.stopPropagation();
|
|
2091
2091
|
},
|
|
2092
2092
|
children: [
|
|
2093
2093
|
f ? /* @__PURE__ */ l(
|
|
@@ -2100,7 +2100,7 @@ function rc(e) {
|
|
|
2100
2100
|
children: "Copy path"
|
|
2101
2101
|
}
|
|
2102
2102
|
) : null,
|
|
2103
|
-
|
|
2103
|
+
h.length > 0 ? /* @__PURE__ */ l(
|
|
2104
2104
|
"button",
|
|
2105
2105
|
{
|
|
2106
2106
|
type: "button",
|
|
@@ -2135,8 +2135,8 @@ function rc(e) {
|
|
|
2135
2135
|
"cursor-pointer transition-colors"
|
|
2136
2136
|
),
|
|
2137
2137
|
title: a ? `${d} (unsaved changes)` : d,
|
|
2138
|
-
onPointerDown: (
|
|
2139
|
-
|
|
2138
|
+
onPointerDown: (m) => {
|
|
2139
|
+
m.button === 2 && y(m);
|
|
2140
2140
|
},
|
|
2141
2141
|
onContextMenu: y,
|
|
2142
2142
|
children: [
|
|
@@ -2178,10 +2178,10 @@ function rc(e) {
|
|
|
2178
2178
|
...n ? (
|
|
2179
2179
|
// In the overflow popover, intercept on capture so we run before
|
|
2180
2180
|
// dockview's native row click listener (see handleClose).
|
|
2181
|
-
{ onClickCapture:
|
|
2182
|
-
) : { onClick:
|
|
2181
|
+
{ onClickCapture: b }
|
|
2182
|
+
) : { onClick: b },
|
|
2183
2183
|
"aria-label": `Close ${d}`,
|
|
2184
|
-
children: /* @__PURE__ */ l(
|
|
2184
|
+
children: /* @__PURE__ */ l(hn, { className: "h-3 w-3", strokeWidth: 2.25 })
|
|
2185
2185
|
}
|
|
2186
2186
|
)
|
|
2187
2187
|
] })
|
|
@@ -2207,7 +2207,7 @@ function Vn(e, t) {
|
|
|
2207
2207
|
n.some((s) => ic(i, s)) && (r.has(i.id) || (r.add(i.id), o.push(i)));
|
|
2208
2208
|
return o;
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2210
|
+
function df() {
|
|
2211
2211
|
const e = ge(ro);
|
|
2212
2212
|
if (!e)
|
|
2213
2213
|
throw new Error(
|
|
@@ -2367,11 +2367,11 @@ function lc(e, t, n, r, o, i) {
|
|
|
2367
2367
|
c && clearTimeout(c), c = setTimeout(() => {
|
|
2368
2368
|
o(s.toJSON());
|
|
2369
2369
|
}, oc);
|
|
2370
|
-
}, p = s.onDidLayoutChange(f),
|
|
2370
|
+
}, p = s.onDidLayoutChange(f), h = () => {
|
|
2371
2371
|
c && (clearTimeout(c), o(s.toJSON()));
|
|
2372
2372
|
};
|
|
2373
|
-
window.addEventListener("beforeunload",
|
|
2374
|
-
|
|
2373
|
+
window.addEventListener("beforeunload", h), d = () => {
|
|
2374
|
+
h(), p.dispose(), window.removeEventListener("beforeunload", h), a == null || a();
|
|
2375
2375
|
};
|
|
2376
2376
|
} else
|
|
2377
2377
|
d = () => {
|
|
@@ -2390,12 +2390,12 @@ function uc({
|
|
|
2390
2390
|
rightHeaderActions: u,
|
|
2391
2391
|
watermarkComponent: a
|
|
2392
2392
|
}) {
|
|
2393
|
-
const d = Bt(), c = st(d.subscribe, d.getSnapshot, d.getSnapshot), f = Ja(), p = N(null),
|
|
2394
|
-
const k = d.getComponents(), I = o ? Object.fromEntries(Object.entries(k).filter(([L]) => o.includes(L))) : k,
|
|
2395
|
-
if (
|
|
2396
|
-
const L = Object.keys(
|
|
2397
|
-
if (L.length === W.length && W.every((_) =>
|
|
2398
|
-
return
|
|
2393
|
+
const d = Bt(), c = st(d.subscribe, d.getSnapshot, d.getSnapshot), f = Ja(), p = N(null), h = N(null), v = N(void 0), g = N(null), b = Y(() => {
|
|
2394
|
+
const k = d.getComponents(), I = o ? Object.fromEntries(Object.entries(k).filter(([L]) => o.includes(L))) : k, m = g.current;
|
|
2395
|
+
if (m) {
|
|
2396
|
+
const L = Object.keys(m), W = Object.keys(I);
|
|
2397
|
+
if (L.length === W.length && W.every((_) => m[_] === I[_]))
|
|
2398
|
+
return m;
|
|
2399
2399
|
}
|
|
2400
2400
|
return g.current = I, I;
|
|
2401
2401
|
}, [d, c, o]), y = Y(() => ac(p), []), z = R(
|
|
@@ -2416,18 +2416,18 @@ function uc({
|
|
|
2416
2416
|
var k;
|
|
2417
2417
|
return (k = v.current) == null ? void 0 : k.call(v);
|
|
2418
2418
|
}, []), O(() => {
|
|
2419
|
-
const k = J.on(Te.panelUpdate, ({ match:
|
|
2419
|
+
const k = J.on(Te.panelUpdate, ({ match: m, params: L, title: W }) => {
|
|
2420
2420
|
const _ = p.current;
|
|
2421
2421
|
if (_)
|
|
2422
|
-
for (const j of Vn(_,
|
|
2422
|
+
for (const j of Vn(_, m))
|
|
2423
2423
|
L && j.api.updateParameters({
|
|
2424
2424
|
...j.params ?? {},
|
|
2425
2425
|
...L
|
|
2426
2426
|
}), W && j.api.setTitle(W);
|
|
2427
|
-
}), I = J.on(Te.panelClose, ({ match:
|
|
2427
|
+
}), I = J.on(Te.panelClose, ({ match: m }) => {
|
|
2428
2428
|
const L = p.current;
|
|
2429
2429
|
if (L)
|
|
2430
|
-
for (const W of Vn(L,
|
|
2430
|
+
for (const W of Vn(L, m))
|
|
2431
2431
|
L.removePanel(W);
|
|
2432
2432
|
});
|
|
2433
2433
|
return () => {
|
|
@@ -2437,7 +2437,7 @@ function uc({
|
|
|
2437
2437
|
const M = R(
|
|
2438
2438
|
(k) => {
|
|
2439
2439
|
if (!f) {
|
|
2440
|
-
|
|
2440
|
+
h.current = k;
|
|
2441
2441
|
return;
|
|
2442
2442
|
}
|
|
2443
2443
|
z(k);
|
|
@@ -2445,12 +2445,12 @@ function uc({
|
|
|
2445
2445
|
[f, z]
|
|
2446
2446
|
);
|
|
2447
2447
|
return O(() => {
|
|
2448
|
-
f &&
|
|
2448
|
+
f && h.current && (z(h.current), h.current = null);
|
|
2449
2449
|
}, [f, z]), f ? /* @__PURE__ */ l(ro.Provider, { value: y, children: /* @__PURE__ */ l(
|
|
2450
2450
|
Or,
|
|
2451
2451
|
{
|
|
2452
2452
|
className: `dv-shell ${i ?? ""}`,
|
|
2453
|
-
components:
|
|
2453
|
+
components: b,
|
|
2454
2454
|
defaultTabComponent: rc,
|
|
2455
2455
|
prefixHeaderActionsComponent: s,
|
|
2456
2456
|
rightHeaderActionsComponent: u,
|
|
@@ -2526,7 +2526,7 @@ function pc({
|
|
|
2526
2526
|
/* @__PURE__ */ l("div", { className: "flex-1 overflow-auto", children: r })
|
|
2527
2527
|
] });
|
|
2528
2528
|
}
|
|
2529
|
-
const
|
|
2529
|
+
const mc = [
|
|
2530
2530
|
"node_modules",
|
|
2531
2531
|
".git",
|
|
2532
2532
|
".worktrees",
|
|
@@ -2544,7 +2544,7 @@ function pn(e, t) {
|
|
|
2544
2544
|
if (typeof n == "string" ? n === e : n.test(e)) return !0;
|
|
2545
2545
|
return !1;
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2547
|
+
function hc(e, t) {
|
|
2548
2548
|
return t.length === 0 ? e : e == null ? void 0 : e.filter((n) => !pn(n.name, t));
|
|
2549
2549
|
}
|
|
2550
2550
|
function oo(e) {
|
|
@@ -2601,7 +2601,7 @@ async function Gn(e) {
|
|
|
2601
2601
|
}
|
|
2602
2602
|
if (!n) throw new Error("Clipboard not available");
|
|
2603
2603
|
}
|
|
2604
|
-
const io = () => import("./FileTree-
|
|
2604
|
+
const io = () => import("./FileTree-ChkSU4gL.js").then((e) => ({ default: e.FileTree }));
|
|
2605
2605
|
function vc() {
|
|
2606
2606
|
io();
|
|
2607
2607
|
}
|
|
@@ -2639,27 +2639,27 @@ function Yn({
|
|
|
2639
2639
|
searchQuery: t,
|
|
2640
2640
|
bridge: n,
|
|
2641
2641
|
revealFileTreeRequest: r,
|
|
2642
|
-
ignoreNames: o =
|
|
2642
|
+
ignoreNames: o = mc,
|
|
2643
2643
|
className: i
|
|
2644
2644
|
}) {
|
|
2645
2645
|
var Nn;
|
|
2646
|
-
const s = je(), { data: u, error: a, isLoading: d } = Zr(e), [c, f] = B(/* @__PURE__ */ new Map()), [p,
|
|
2646
|
+
const s = je(), { data: u, error: a, isLoading: d } = Zr(e), [c, f] = B(/* @__PURE__ */ new Map()), [p, h] = B(/* @__PURE__ */ new Set()), v = Jt(e), g = Y(
|
|
2647
2647
|
() => Xt(Yt(u, c.get(v)), p),
|
|
2648
2648
|
[u, c, v, p]
|
|
2649
|
-
),
|
|
2650
|
-
() =>
|
|
2649
|
+
), b = Y(
|
|
2650
|
+
() => hc(g, o),
|
|
2651
2651
|
[g, o]
|
|
2652
|
-
), { mutateAsync: y } = eo(), { mutateAsync: z } = $a(), { mutateAsync: M } = Ma(), { mutateAsync: k } = Wa(), [I,
|
|
2652
|
+
), { mutateAsync: y } = eo(), { mutateAsync: z } = $a(), { mutateAsync: M } = Ma(), { mutateAsync: k } = Wa(), [I, m] = B(/* @__PURE__ */ new Map()), L = Y(() => {
|
|
2653
2653
|
if (c.size === 0 && p.size === 0) return I;
|
|
2654
|
-
const
|
|
2654
|
+
const w = /* @__PURE__ */ new Map();
|
|
2655
2655
|
for (const [S, E] of I)
|
|
2656
|
-
|
|
2656
|
+
w.set(S, Xt(E, p) ?? E);
|
|
2657
2657
|
for (const [S, E] of c) {
|
|
2658
2658
|
if (S === v) continue;
|
|
2659
|
-
const G = Xt(Yt(
|
|
2660
|
-
G &&
|
|
2659
|
+
const G = Xt(Yt(w.get(S), E), p);
|
|
2660
|
+
G && w.set(S, G);
|
|
2661
2661
|
}
|
|
2662
|
-
return
|
|
2662
|
+
return w;
|
|
2663
2663
|
}, [I, c, v, p]), W = N(null), [_, j] = B(400), [T, A] = B(null), P = T && !T.isBackground && T.node.kind === "file" ? T.node.path : null, { data: F } = Oa(P), [V, X] = B(null), pe = N(null), [ne, se] = B(
|
|
2664
2664
|
((Nn = n == null ? void 0 : n.getActiveFile) == null ? void 0 : Nn.call(n)) ?? null
|
|
2665
2665
|
), [Z, U] = B(null), [ue, de] = B(null), Ee = N(0), Ce = N(0), Ve = N(0), Le = ((t == null ? void 0 : t.trim().length) ?? 0) > 0, { data: Ie } = La(
|
|
@@ -2668,49 +2668,49 @@ function Yn({
|
|
|
2668
2668
|
);
|
|
2669
2669
|
O(() => {
|
|
2670
2670
|
if (!T) return;
|
|
2671
|
-
function
|
|
2671
|
+
function w(S) {
|
|
2672
2672
|
pe.current && !pe.current.contains(S.target) && A(null);
|
|
2673
2673
|
}
|
|
2674
|
-
return document.addEventListener("pointerdown",
|
|
2674
|
+
return document.addEventListener("pointerdown", w), () => document.removeEventListener("pointerdown", w);
|
|
2675
2675
|
}, [T]), Qo(() => {
|
|
2676
2676
|
if (!T || !pe.current) return;
|
|
2677
|
-
const { x:
|
|
2677
|
+
const { x: w, y: S } = wc(
|
|
2678
2678
|
T.x,
|
|
2679
2679
|
T.y,
|
|
2680
2680
|
pe.current.getBoundingClientRect(),
|
|
2681
2681
|
window.innerWidth,
|
|
2682
2682
|
window.innerHeight
|
|
2683
2683
|
);
|
|
2684
|
-
|
|
2684
|
+
w === T.x && S === T.y || A((E) => !E || E.x === w && E.y === S ? E : { ...E, x: w, y: S });
|
|
2685
2685
|
}, [T]), O(() => {
|
|
2686
|
-
const
|
|
2687
|
-
if (!
|
|
2686
|
+
const w = W.current;
|
|
2687
|
+
if (!w) return;
|
|
2688
2688
|
const S = new ResizeObserver(([E]) => {
|
|
2689
2689
|
E && j(Math.floor(E.contentRect.height));
|
|
2690
2690
|
});
|
|
2691
|
-
return S.observe(
|
|
2691
|
+
return S.observe(w), () => S.disconnect();
|
|
2692
2692
|
}, []);
|
|
2693
|
-
const et = (Le && Ie ? Ie.map((
|
|
2694
|
-
name:
|
|
2693
|
+
const et = (Le && Ie ? Ie.map((w) => ({
|
|
2694
|
+
name: w.split("/").pop() ?? w,
|
|
2695
2695
|
kind: "file",
|
|
2696
|
-
path:
|
|
2697
|
-
})) : void 0) ?? Kr(
|
|
2698
|
-
(
|
|
2699
|
-
se(
|
|
2696
|
+
path: w
|
|
2697
|
+
})) : void 0) ?? Kr(b ?? [], L), ct = Gr(et, Z, e), ce = R(
|
|
2698
|
+
(w) => {
|
|
2699
|
+
se(w), n == null || n.openFile(w, { mode: "edit" });
|
|
2700
2700
|
},
|
|
2701
2701
|
[n]
|
|
2702
2702
|
), ye = R(
|
|
2703
|
-
async (
|
|
2703
|
+
async (w) => {
|
|
2704
2704
|
try {
|
|
2705
|
-
const S = await s.getTree(
|
|
2706
|
-
|
|
2705
|
+
const S = await s.getTree(w), E = o.length === 0 ? S : S.filter((G) => !pn(G.name, o));
|
|
2706
|
+
m((G) => new Map(G).set(w, E));
|
|
2707
2707
|
} catch {
|
|
2708
2708
|
}
|
|
2709
2709
|
},
|
|
2710
2710
|
[s, o]
|
|
2711
2711
|
), fe = R(
|
|
2712
|
-
async (
|
|
2713
|
-
const E = Array.from(new Set(
|
|
2712
|
+
async (w, S) => {
|
|
2713
|
+
const E = Array.from(new Set(w)).filter(
|
|
2714
2714
|
(q) => q && q !== e && q !== "."
|
|
2715
2715
|
);
|
|
2716
2716
|
if (E.length === 0) return;
|
|
@@ -2724,7 +2724,7 @@ function Yn({
|
|
|
2724
2724
|
}
|
|
2725
2725
|
})
|
|
2726
2726
|
);
|
|
2727
|
-
|
|
2727
|
+
m((q) => {
|
|
2728
2728
|
const ie = new Map(q);
|
|
2729
2729
|
for (const ae of G) {
|
|
2730
2730
|
if (!ae) continue;
|
|
@@ -2739,13 +2739,13 @@ function Yn({
|
|
|
2739
2739
|
O(() => {
|
|
2740
2740
|
Ae.current = new Set(I.keys());
|
|
2741
2741
|
}, [I]), O(() => {
|
|
2742
|
-
const
|
|
2742
|
+
const w = /* @__PURE__ */ new Set(), S = (ae) => Array.from(new Set(ae.map(Se))).filter((ke) => Ae.current.has(ke)), E = (ae) => {
|
|
2743
2743
|
if (!ae.length) return;
|
|
2744
2744
|
fe(ae);
|
|
2745
2745
|
const ke = setTimeout(() => {
|
|
2746
|
-
|
|
2746
|
+
w.delete(ke), fe(ae);
|
|
2747
2747
|
}, bc);
|
|
2748
|
-
|
|
2748
|
+
w.add(ke);
|
|
2749
2749
|
}, G = J.on(ee.created, (ae) => {
|
|
2750
2750
|
ae.cause !== "user" && E(S([ae.path]));
|
|
2751
2751
|
}), q = J.on(ee.deleted, (ae) => {
|
|
@@ -2755,26 +2755,26 @@ function Yn({
|
|
|
2755
2755
|
});
|
|
2756
2756
|
return () => {
|
|
2757
2757
|
G(), q(), ie();
|
|
2758
|
-
for (const ae of
|
|
2759
|
-
|
|
2758
|
+
for (const ae of w) clearTimeout(ae);
|
|
2759
|
+
w.clear();
|
|
2760
2760
|
};
|
|
2761
2761
|
}, [fe]);
|
|
2762
2762
|
const Re = R(
|
|
2763
|
-
async (
|
|
2764
|
-
if (!
|
|
2765
|
-
const E = so(
|
|
2763
|
+
async (w, S) => {
|
|
2764
|
+
if (!w) return;
|
|
2765
|
+
const E = so(w), G = ++Ee.current;
|
|
2766
2766
|
se(E);
|
|
2767
2767
|
const q = S != null && S.refreshTargetDir ? [...Jn(E), E] : Jn(E);
|
|
2768
2768
|
await fe([...new Set(q)], { force: !0 }), Ee.current === G && de(E);
|
|
2769
2769
|
},
|
|
2770
2770
|
[fe]
|
|
2771
|
-
), Qe = R((
|
|
2772
|
-
de((S) => S ===
|
|
2771
|
+
), Qe = R((w) => {
|
|
2772
|
+
de((S) => S === w ? null : S);
|
|
2773
2773
|
}, []), C = R(
|
|
2774
|
-
async (
|
|
2774
|
+
async (w) => {
|
|
2775
2775
|
const S = ++Ce.current;
|
|
2776
2776
|
try {
|
|
2777
|
-
await Re(
|
|
2777
|
+
await Re(w, { refreshTargetDir: !0 });
|
|
2778
2778
|
} finally {
|
|
2779
2779
|
Ce.current === S && (Ce.current = 0);
|
|
2780
2780
|
}
|
|
@@ -2785,8 +2785,8 @@ function Yn({
|
|
|
2785
2785
|
r && C(r.path);
|
|
2786
2786
|
}, [r, C]), O(() => {
|
|
2787
2787
|
var E;
|
|
2788
|
-
const
|
|
2789
|
-
|
|
2788
|
+
const w = ((E = n == null ? void 0 : n.getActiveFile) == null ? void 0 : E.call(n)) ?? null;
|
|
2789
|
+
w && Ce.current === 0 && Re(w);
|
|
2790
2790
|
const S = [];
|
|
2791
2791
|
return n != null && n.select && S.push(
|
|
2792
2792
|
n.select((G) => G.activeFile, (G) => {
|
|
@@ -2800,36 +2800,36 @@ function Yn({
|
|
|
2800
2800
|
for (const G of S) G();
|
|
2801
2801
|
};
|
|
2802
2802
|
}, [n, C, Re]);
|
|
2803
|
-
const $ = R((
|
|
2803
|
+
const $ = R((w, S) => {
|
|
2804
2804
|
f((E) => {
|
|
2805
|
-
const G = Jt(
|
|
2805
|
+
const G = Jt(w), q = new Map(E), ie = Yt(q.get(G), [S]) ?? [S];
|
|
2806
2806
|
return q.set(G, ie), q;
|
|
2807
2807
|
});
|
|
2808
|
-
}, []), D = R((
|
|
2808
|
+
}, []), D = R((w, S) => {
|
|
2809
2809
|
f((E) => {
|
|
2810
|
-
const G = Jt(
|
|
2810
|
+
const G = Jt(w), q = E.get(G);
|
|
2811
2811
|
if (!(q != null && q.length)) return E;
|
|
2812
2812
|
const ie = q.filter((ke) => ke.path !== S), ae = new Map(E);
|
|
2813
2813
|
return ie.length > 0 ? ae.set(G, ie) : ae.delete(G), ae;
|
|
2814
2814
|
});
|
|
2815
|
-
}, []), H = R((
|
|
2816
|
-
|
|
2817
|
-
if (S.has(
|
|
2815
|
+
}, []), H = R((w) => {
|
|
2816
|
+
h((S) => {
|
|
2817
|
+
if (S.has(w)) return S;
|
|
2818
2818
|
const E = new Set(S);
|
|
2819
|
-
return E.add(
|
|
2819
|
+
return E.add(w), E;
|
|
2820
2820
|
});
|
|
2821
|
-
}, []), oe = R((
|
|
2822
|
-
|
|
2823
|
-
if (!S.has(
|
|
2821
|
+
}, []), oe = R((w) => {
|
|
2822
|
+
h((S) => {
|
|
2823
|
+
if (!S.has(w)) return S;
|
|
2824
2824
|
const E = new Set(S);
|
|
2825
|
-
return E.delete(
|
|
2825
|
+
return E.delete(w), E;
|
|
2826
2826
|
});
|
|
2827
2827
|
}, []);
|
|
2828
2828
|
O(() => {
|
|
2829
|
-
const
|
|
2829
|
+
const w = (q) => q === v || Ae.current.has(q), S = J.on(ee.created, (q) => {
|
|
2830
2830
|
if (oe(q.path), q.cause === "user") return;
|
|
2831
2831
|
const ie = Se(q.path);
|
|
2832
|
-
|
|
2832
|
+
w(ie) && $(ie, { name: kc(q.path), kind: q.kind, path: q.path });
|
|
2833
2833
|
}), E = J.on(ee.deleted, (q) => {
|
|
2834
2834
|
q.cause !== "user" && (H(q.path), D(Se(q.path), q.path));
|
|
2835
2835
|
}), G = J.on(ee.moved, (q) => {
|
|
@@ -2839,57 +2839,57 @@ function Yn({
|
|
|
2839
2839
|
S(), E(), G();
|
|
2840
2840
|
};
|
|
2841
2841
|
}, [$, H, D, v, oe]);
|
|
2842
|
-
const [
|
|
2842
|
+
const [he, we] = B(/* @__PURE__ */ new Set()), le = R((w) => {
|
|
2843
2843
|
we((S) => {
|
|
2844
2844
|
const E = new Set(S);
|
|
2845
|
-
return E.add(
|
|
2845
|
+
return E.add(w), E;
|
|
2846
2846
|
});
|
|
2847
|
-
}, []), ve = R((
|
|
2847
|
+
}, []), ve = R((w) => {
|
|
2848
2848
|
we((S) => {
|
|
2849
|
-
if (!S.has(
|
|
2849
|
+
if (!S.has(w)) return S;
|
|
2850
2850
|
const E = new Set(S);
|
|
2851
|
-
return E.delete(
|
|
2851
|
+
return E.delete(w), E;
|
|
2852
2852
|
});
|
|
2853
2853
|
}, []), gt = R(
|
|
2854
|
-
(
|
|
2855
|
-
A({ node: S, x:
|
|
2854
|
+
(w, S) => {
|
|
2855
|
+
A({ node: S, x: w.clientX, y: w.clientY });
|
|
2856
2856
|
},
|
|
2857
2857
|
[]
|
|
2858
2858
|
), vt = R(
|
|
2859
|
-
(
|
|
2860
|
-
const S =
|
|
2861
|
-
S.closest("[role=treeitem]") || S.closest("[data-path]") || (
|
|
2859
|
+
(w) => {
|
|
2860
|
+
const S = w.target;
|
|
2861
|
+
S.closest("[role=treeitem]") || S.closest("[data-path]") || (w.preventDefault(), A({
|
|
2862
2862
|
node: { name: e, kind: "dir", path: e },
|
|
2863
|
-
x:
|
|
2864
|
-
y:
|
|
2863
|
+
x: w.clientX,
|
|
2864
|
+
y: w.clientY,
|
|
2865
2865
|
isBackground: !0
|
|
2866
2866
|
}));
|
|
2867
2867
|
},
|
|
2868
2868
|
[e]
|
|
2869
2869
|
), Kt = R(
|
|
2870
|
-
async (
|
|
2871
|
-
const E =
|
|
2872
|
-
if (q !==
|
|
2873
|
-
le(
|
|
2870
|
+
async (w, S) => {
|
|
2871
|
+
const E = w.split("/").pop() ?? w, G = S === "." ? e : S, q = G === "." ? E : `${G}/${E}`;
|
|
2872
|
+
if (q !== w) {
|
|
2873
|
+
le(w);
|
|
2874
2874
|
try {
|
|
2875
|
-
await M({ from:
|
|
2875
|
+
await M({ from: w, to: q }), await fe([Se(w), Se(q)]), _e.success({ title: "Moved", description: `${w} → ${q}` });
|
|
2876
2876
|
} catch (ie) {
|
|
2877
2877
|
_e.error({
|
|
2878
2878
|
title: "Move failed",
|
|
2879
2879
|
description: ie instanceof Error ? ie.message : String(ie)
|
|
2880
2880
|
});
|
|
2881
2881
|
} finally {
|
|
2882
|
-
ve(
|
|
2882
|
+
ve(w);
|
|
2883
2883
|
}
|
|
2884
2884
|
}
|
|
2885
2885
|
},
|
|
2886
2886
|
[M, fe, e, le, ve]
|
|
2887
2887
|
);
|
|
2888
|
-
function yt(
|
|
2888
|
+
function yt(w) {
|
|
2889
2889
|
return () => {
|
|
2890
2890
|
A(null), (async () => {
|
|
2891
2891
|
try {
|
|
2892
|
-
await
|
|
2892
|
+
await w();
|
|
2893
2893
|
} catch (S) {
|
|
2894
2894
|
_e.error({
|
|
2895
2895
|
title: "Action failed",
|
|
@@ -2899,16 +2899,16 @@ function Yn({
|
|
|
2899
2899
|
})();
|
|
2900
2900
|
};
|
|
2901
2901
|
}
|
|
2902
|
-
const Rn = (
|
|
2902
|
+
const Rn = (w) => {
|
|
2903
2903
|
const S = T == null ? void 0 : T.node;
|
|
2904
2904
|
A(null);
|
|
2905
2905
|
const E = (S == null ? void 0 : S.kind) === "dir" ? S.path : S ? Se(S.path) : e, G = `__draft__:${++Ve.current}`;
|
|
2906
|
-
U({ kind:
|
|
2906
|
+
U({ kind: w, parentDir: E, path: G });
|
|
2907
2907
|
}, Mo = () => Rn("create-file"), Wo = () => Rn("create-folder"), jo = () => {
|
|
2908
|
-
const
|
|
2909
|
-
A(null),
|
|
2908
|
+
const w = T == null ? void 0 : T.node;
|
|
2909
|
+
A(null), w && U({ kind: "rename", path: w.path, initialValue: w.name });
|
|
2910
2910
|
}, zo = R(
|
|
2911
|
-
async (
|
|
2911
|
+
async (w, S) => {
|
|
2912
2912
|
const E = Z;
|
|
2913
2913
|
if (U(null), !E) return;
|
|
2914
2914
|
const G = S.trim();
|
|
@@ -2968,22 +2968,22 @@ function Yn({
|
|
|
2968
2968
|
await Gn(F.url), _e.success({ title: "Git URL copied", description: F.url });
|
|
2969
2969
|
}), Ho = R(async () => {
|
|
2970
2970
|
if (!V) return;
|
|
2971
|
-
const
|
|
2972
|
-
X(null), le(
|
|
2971
|
+
const w = V;
|
|
2972
|
+
X(null), le(w.path);
|
|
2973
2973
|
try {
|
|
2974
|
-
await k({ path:
|
|
2974
|
+
await k({ path: w.path }), D(Se(w.path), w.path), w.kind === "dir" && m((S) => {
|
|
2975
2975
|
const E = new Map(S);
|
|
2976
2976
|
for (const G of E.keys())
|
|
2977
|
-
(G ===
|
|
2977
|
+
(G === w.path || G.startsWith(`${w.path}/`)) && E.delete(G);
|
|
2978
2978
|
return E;
|
|
2979
|
-
}), await fe([Se(
|
|
2979
|
+
}), await fe([Se(w.path)]), _e.success({ title: "Deleted", description: w.path });
|
|
2980
2980
|
} catch (S) {
|
|
2981
2981
|
_e.error({
|
|
2982
2982
|
title: "Delete failed",
|
|
2983
2983
|
description: S instanceof Error ? S.message : String(S)
|
|
2984
2984
|
});
|
|
2985
2985
|
} finally {
|
|
2986
|
-
ve(
|
|
2986
|
+
ve(w.path);
|
|
2987
2987
|
}
|
|
2988
2988
|
}, [
|
|
2989
2989
|
V,
|
|
@@ -3008,7 +3008,7 @@ function Yn({
|
|
|
3008
3008
|
ref: W,
|
|
3009
3009
|
className: "min-h-0 flex-1 overflow-hidden",
|
|
3010
3010
|
onContextMenu: vt,
|
|
3011
|
-
children: d ? /* @__PURE__ */ l("div", { className: "space-y-1 p-2", "data-testid": "tree-skeleton", children: Array.from({ length: 8 }).map((
|
|
3011
|
+
children: d ? /* @__PURE__ */ l("div", { className: "space-y-1 p-2", "data-testid": "tree-skeleton", children: Array.from({ length: 8 }).map((w, S) => /* @__PURE__ */ l(
|
|
3012
3012
|
pi,
|
|
3013
3013
|
{
|
|
3014
3014
|
className: "h-5",
|
|
@@ -3035,7 +3035,7 @@ function Yn({
|
|
|
3035
3035
|
} : null,
|
|
3036
3036
|
revealPath: ue,
|
|
3037
3037
|
onRevealHandled: Qe,
|
|
3038
|
-
pendingPaths:
|
|
3038
|
+
pendingPaths: he,
|
|
3039
3039
|
onSelect: ce,
|
|
3040
3040
|
onExpand: ye,
|
|
3041
3041
|
onContextMenu: gt,
|
|
@@ -3090,13 +3090,13 @@ function Yn({
|
|
|
3090
3090
|
document.body
|
|
3091
3091
|
),
|
|
3092
3092
|
/* @__PURE__ */ l(
|
|
3093
|
-
|
|
3093
|
+
mi,
|
|
3094
3094
|
{
|
|
3095
3095
|
open: V !== null,
|
|
3096
|
-
onOpenChange: (
|
|
3097
|
-
|
|
3096
|
+
onOpenChange: (w) => {
|
|
3097
|
+
w || X(null);
|
|
3098
3098
|
},
|
|
3099
|
-
children: /* @__PURE__ */ x(
|
|
3099
|
+
children: /* @__PURE__ */ x(hi, { children: [
|
|
3100
3100
|
/* @__PURE__ */ x(gi, { children: [
|
|
3101
3101
|
/* @__PURE__ */ x(vi, { children: [
|
|
3102
3102
|
"Delete ",
|
|
@@ -3124,9 +3124,9 @@ function Sc({
|
|
|
3124
3124
|
chromeless: s = !1,
|
|
3125
3125
|
className: u
|
|
3126
3126
|
}) {
|
|
3127
|
-
const a = (e == null ? void 0 : e.rootDir) ?? t, d = (e == null ? void 0 : e.bridge) ?? o, c = (e == null ? void 0 : e.chromeless) ?? s, f = (e == null ? void 0 : e.revealFileTreeRequest) ?? null, p = (e == null ? void 0 : e.searchQuery) ?? (e == null ? void 0 : e.query) ?? n,
|
|
3127
|
+
const a = (e == null ? void 0 : e.rootDir) ?? t, d = (e == null ? void 0 : e.bridge) ?? o, c = (e == null ? void 0 : e.chromeless) ?? s, f = (e == null ? void 0 : e.revealFileTreeRequest) ?? null, p = (e == null ? void 0 : e.searchQuery) ?? (e == null ? void 0 : e.query) ?? n, h = r ?? i, [v, g] = B(""), [b, y] = B(""), z = N(void 0);
|
|
3128
3128
|
O(() => (clearTimeout(z.current), z.current = setTimeout(() => y(v), 200), () => clearTimeout(z.current)), [v]);
|
|
3129
|
-
const M = p !== void 0 ? p || void 0 :
|
|
3129
|
+
const M = p !== void 0 ? p || void 0 : b || void 0;
|
|
3130
3130
|
return c ? /* @__PURE__ */ l(
|
|
3131
3131
|
Yn,
|
|
3132
3132
|
{
|
|
@@ -3136,7 +3136,7 @@ function Sc({
|
|
|
3136
3136
|
revealFileTreeRequest: f,
|
|
3137
3137
|
className: re("px-1 pt-1 [&_[role=treeitem]]:!indent-0", u)
|
|
3138
3138
|
}
|
|
3139
|
-
) : /* @__PURE__ */ l(pc, { title: "Files", panelApi:
|
|
3139
|
+
) : /* @__PURE__ */ l(pc, { title: "Files", panelApi: h, children: /* @__PURE__ */ x("div", { className: "flex h-full flex-col", children: [
|
|
3140
3140
|
/* @__PURE__ */ l("div", { className: "border-b border-border px-2 py-1.5", children: /* @__PURE__ */ l(
|
|
3141
3141
|
Nr,
|
|
3142
3142
|
{
|
|
@@ -3238,7 +3238,7 @@ function Tc(e, t = {}) {
|
|
|
3238
3238
|
o.cause === "agent" && (r && o.kind !== "file" || n != null && n(o.path) || e(o.path));
|
|
3239
3239
|
});
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function ff(e) {
|
|
3242
3242
|
return J.on(ee.changed, e);
|
|
3243
3243
|
}
|
|
3244
3244
|
function Rc() {
|
|
@@ -3250,8 +3250,8 @@ function Rc() {
|
|
|
3250
3250
|
}
|
|
3251
3251
|
const Nc = 250, Ac = 3e3, Dc = 3e4;
|
|
3252
3252
|
function _c(e, t) {
|
|
3253
|
-
const { adapter: n, panelId: r, onDirtyChange: o, serverMtime: i } = t, [s, u] = B(!1), [a, d] = B(!1), [c, f] = B(null), [p,
|
|
3254
|
-
|
|
3253
|
+
const { adapter: n, panelId: r, onDirtyChange: o, serverMtime: i } = t, [s, u] = B(!1), [a, d] = B(!1), [c, f] = B(null), [p, h] = B(!1), [v, g] = B(!1), b = N(void 0), y = N(null), z = N(0), M = N(null), k = N(0), I = N(void 0), m = N(o);
|
|
3254
|
+
m.current = o;
|
|
3255
3255
|
const L = N(n);
|
|
3256
3256
|
L.current = n;
|
|
3257
3257
|
const W = R(async () => {
|
|
@@ -3273,7 +3273,7 @@ function _c(e, t) {
|
|
|
3273
3273
|
Z
|
|
3274
3274
|
]);
|
|
3275
3275
|
if (k.current !== pe) return;
|
|
3276
|
-
ue === "saved" && (z.current = Date.now(), f(Date.now()), u(!1), (U =
|
|
3276
|
+
ue === "saved" && (z.current = Date.now(), f(Date.now()), u(!1), (U = m.current) == null || U.call(m, e, !1));
|
|
3277
3277
|
} catch {
|
|
3278
3278
|
if (k.current !== pe) return;
|
|
3279
3279
|
} finally {
|
|
@@ -3282,19 +3282,19 @@ function _c(e, t) {
|
|
|
3282
3282
|
}
|
|
3283
3283
|
})(), y.current = ne, ne;
|
|
3284
3284
|
}, [e, r]), _ = R(() => {
|
|
3285
|
-
clearTimeout(
|
|
3285
|
+
clearTimeout(b.current), b.current = setTimeout(W, Nc);
|
|
3286
3286
|
}, [W]), j = R(() => {
|
|
3287
3287
|
var X;
|
|
3288
|
-
e && (u(!0), (X =
|
|
3288
|
+
e && (u(!0), (X = m.current) == null || X.call(m, e, !0), _());
|
|
3289
3289
|
}, [e, _]), T = R(() => {
|
|
3290
3290
|
var X;
|
|
3291
|
-
clearTimeout(
|
|
3291
|
+
clearTimeout(b.current), u(!1), g(!1), e && ((X = m.current) == null || X.call(m, e, !1));
|
|
3292
3292
|
}, [e]), A = R(async () => {
|
|
3293
3293
|
var X;
|
|
3294
|
-
if (clearTimeout(
|
|
3294
|
+
if (clearTimeout(b.current), y.current) return y.current;
|
|
3295
3295
|
if ((X = L.current) != null && X.isDirty())
|
|
3296
3296
|
return W();
|
|
3297
|
-
}, [W]), P = R(() =>
|
|
3297
|
+
}, [W]), P = R(() => h(!1), []), F = R(() => g(!1), []), V = R((X) => {
|
|
3298
3298
|
M.current = X, g(!1);
|
|
3299
3299
|
}, []);
|
|
3300
3300
|
return O(() => {
|
|
@@ -3308,7 +3308,7 @@ function _c(e, t) {
|
|
|
3308
3308
|
M.current = i;
|
|
3309
3309
|
return;
|
|
3310
3310
|
}
|
|
3311
|
-
M.current = i, s ? g(!0) :
|
|
3311
|
+
M.current = i, s ? g(!0) : h(!0);
|
|
3312
3312
|
}
|
|
3313
3313
|
}
|
|
3314
3314
|
}, [i, e, s]), O(() => {
|
|
@@ -3316,8 +3316,8 @@ function _c(e, t) {
|
|
|
3316
3316
|
I.current = e;
|
|
3317
3317
|
return;
|
|
3318
3318
|
}
|
|
3319
|
-
I.current !== e && (I.current = e, k.current += 1, clearTimeout(
|
|
3320
|
-
}, [e]), O(() => () => clearTimeout(
|
|
3319
|
+
I.current !== e && (I.current = e, k.current += 1, clearTimeout(b.current), y.current && J.emit(Te.editorSaveEnd, { panelId: r }), y.current = null, M.current = null, z.current = 0, u(!1), d(!1), h(!1), g(!1));
|
|
3320
|
+
}, [e]), O(() => () => clearTimeout(b.current), []), {
|
|
3321
3321
|
isDirty: s,
|
|
3322
3322
|
isSaving: a,
|
|
3323
3323
|
lastSavedAt: c,
|
|
@@ -3355,7 +3355,7 @@ function ao({ shortcuts: e, enabled: t = !0 }) {
|
|
|
3355
3355
|
return document.addEventListener("keydown", r, !0), () => document.removeEventListener("keydown", r, !0);
|
|
3356
3356
|
}, [t]);
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3358
|
+
function pf(e) {
|
|
3359
3359
|
const t = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.userAgent), n = [];
|
|
3360
3360
|
e.mod && n.push(t ? "⌘" : "Ctrl"), e.shift && n.push(t ? "⇧" : "Shift");
|
|
3361
3361
|
const r = { "\\": "\\", p: "P", b: "B", s: "S", w: "W" };
|
|
@@ -3363,11 +3363,11 @@ function ff(e) {
|
|
|
3363
3363
|
}
|
|
3364
3364
|
let Lc = 0;
|
|
3365
3365
|
function co(e) {
|
|
3366
|
-
const { path: t, panelId: n, initialContent: r = null, createIfMissing: o } = e, i = /\S/.test(t) ? t : null, s = N(n ?? `file-pane:${Lc++}`), u = n ?? s.current, a = o === void 0 ? void 0 : { createIfMissing: o }, { data: d, isLoading: c, error: f, refetch: p } = Fa(i, a), { mutateAsync:
|
|
3366
|
+
const { path: t, panelId: n, initialContent: r = null, createIfMissing: o } = e, i = /\S/.test(t) ? t : null, s = N(n ?? `file-pane:${Lc++}`), u = n ?? s.current, a = o === void 0 ? void 0 : { createIfMissing: o }, { data: d, isLoading: c, error: f, refetch: p } = Fa(i, a), { mutateAsync: h } = eo(), [v, g] = B(r), b = N(""), y = N(!1), z = N(null), M = N(null), k = N(null), I = N(0), [m, L] = B(null);
|
|
3367
3367
|
O(() => {
|
|
3368
|
-
z.current !== t && (g(r),
|
|
3368
|
+
z.current !== t && (g(r), b.current = r ?? "", y.current = !1, M.current = null, I.current += 1, L(null), z.current = t);
|
|
3369
3369
|
}, [t, r]), O(() => {
|
|
3370
|
-
(d == null ? void 0 : d.content) != null && v === null && (g(d.content),
|
|
3370
|
+
(d == null ? void 0 : d.content) != null && v === null && (g(d.content), b.current = d.content, M.current = d.mtimeMs ?? null);
|
|
3371
3371
|
}, [d, v]);
|
|
3372
3372
|
const W = i && v != null ? {
|
|
3373
3373
|
isDirty: () => y.current,
|
|
@@ -3375,9 +3375,9 @@ function co(e) {
|
|
|
3375
3375
|
var se;
|
|
3376
3376
|
const ne = ++I.current;
|
|
3377
3377
|
try {
|
|
3378
|
-
const Z = await
|
|
3378
|
+
const Z = await h({
|
|
3379
3379
|
path: i,
|
|
3380
|
-
content:
|
|
3380
|
+
content: b.current,
|
|
3381
3381
|
expectedMtimeMs: M.current ?? void 0
|
|
3382
3382
|
});
|
|
3383
3383
|
if (I.current !== ne) return;
|
|
@@ -3386,7 +3386,7 @@ function co(e) {
|
|
|
3386
3386
|
throw I.current !== ne || Z instanceof pt && (typeof Z.currentMtimeMs == "number" && (M.current = Z.currentMtimeMs), L(Z)), Z;
|
|
3387
3387
|
}
|
|
3388
3388
|
},
|
|
3389
|
-
getContent: () =>
|
|
3389
|
+
getContent: () => b.current
|
|
3390
3390
|
} : null, _ = _c(i, {
|
|
3391
3391
|
adapter: W,
|
|
3392
3392
|
panelId: u,
|
|
@@ -3398,7 +3398,7 @@ function co(e) {
|
|
|
3398
3398
|
_.ackSync();
|
|
3399
3399
|
return;
|
|
3400
3400
|
}
|
|
3401
|
-
g(d.content),
|
|
3401
|
+
g(d.content), b.current = d.content, M.current = d.mtimeMs ?? null, y.current = !1, _.ackSync();
|
|
3402
3402
|
}
|
|
3403
3403
|
}, [_.shouldSync, _, d, g]), O(() => {
|
|
3404
3404
|
!_.externalChangeWhileDirty || (d == null ? void 0 : d.mtimeMs) == null || (L(new pt(i ?? t, d.mtimeMs, M.current)), M.current = d.mtimeMs, _.ackExternalChange());
|
|
@@ -3409,25 +3409,25 @@ function co(e) {
|
|
|
3409
3409
|
A(ne);
|
|
3410
3410
|
}, [j, _.isDirty]);
|
|
3411
3411
|
const P = R((ne) => {
|
|
3412
|
-
g(ne),
|
|
3412
|
+
g(ne), b.current = ne, y.current = !0, _.markDirty();
|
|
3413
3413
|
}, [g, _]), F = R(async () => {
|
|
3414
3414
|
var Z;
|
|
3415
3415
|
if (!i) return;
|
|
3416
3416
|
const ne = await p();
|
|
3417
3417
|
if (ne.status !== "success" || ne.data == null) return;
|
|
3418
3418
|
const se = ne.data;
|
|
3419
|
-
g(se.content),
|
|
3419
|
+
g(se.content), b.current = se.content, M.current = se.mtimeMs ?? null, y.current = !1, _.markClean(), typeof se.mtimeMs == "number" && ((Z = k.current) == null || Z.call(k, se.mtimeMs)), L(null);
|
|
3420
3420
|
}, [i, _, p, g]), V = R(async () => {
|
|
3421
3421
|
var se;
|
|
3422
3422
|
const ne = ++I.current;
|
|
3423
3423
|
try {
|
|
3424
3424
|
if (!i) return;
|
|
3425
|
-
const Z =
|
|
3425
|
+
const Z = b.current, U = await h({ path: i, content: Z });
|
|
3426
3426
|
if (I.current !== ne) return;
|
|
3427
3427
|
typeof U.mtimeMs == "number" && (M.current = U.mtimeMs, (se = k.current) == null || se.call(k, U.mtimeMs)), y.current = !1, L(null);
|
|
3428
3428
|
} catch {
|
|
3429
3429
|
}
|
|
3430
|
-
}, [i,
|
|
3430
|
+
}, [i, h]), X = R(async () => {
|
|
3431
3431
|
!W || !y.current || await W.save();
|
|
3432
3432
|
}, [W]), pe = R(async () => {
|
|
3433
3433
|
await _.flushSave();
|
|
@@ -3437,7 +3437,7 @@ function co(e) {
|
|
|
3437
3437
|
error: f,
|
|
3438
3438
|
content: v,
|
|
3439
3439
|
isDirty: _.isDirty,
|
|
3440
|
-
conflict:
|
|
3440
|
+
conflict: m,
|
|
3441
3441
|
onReloadFromServer: F,
|
|
3442
3442
|
onOverwrite: V,
|
|
3443
3443
|
setContent: P,
|
|
@@ -3491,7 +3491,7 @@ function lo({
|
|
|
3491
3491
|
return /* @__PURE__ */ l("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ l(Ar, { className: "min-h-0 border-0", title: "No file selected", description: "Choose a file from the file tree to open an editor." }) });
|
|
3492
3492
|
if (r)
|
|
3493
3493
|
return /* @__PURE__ */ l("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ l(it, { title: "Failed to load file", description: f ?? r.message }) });
|
|
3494
|
-
const
|
|
3494
|
+
const h = c ?? /* @__PURE__ */ x("div", { className: "flex h-full items-center justify-center gap-2 text-sm text-muted-foreground", children: [
|
|
3495
3495
|
/* @__PURE__ */ l(Mt, { className: "size-3.5" }),
|
|
3496
3496
|
/* @__PURE__ */ l("span", { children: "Loading file..." })
|
|
3497
3497
|
] });
|
|
@@ -3504,7 +3504,7 @@ function lo({
|
|
|
3504
3504
|
onOverwrite: u
|
|
3505
3505
|
}
|
|
3506
3506
|
),
|
|
3507
|
-
/* @__PURE__ */ l(Ot, { fallback:
|
|
3507
|
+
/* @__PURE__ */ l(Ot, { fallback: h, children: n || t === null ? h : /* @__PURE__ */ l(
|
|
3508
3508
|
a,
|
|
3509
3509
|
{
|
|
3510
3510
|
content: t,
|
|
@@ -3650,10 +3650,10 @@ function Uc({
|
|
|
3650
3650
|
}) {
|
|
3651
3651
|
const u = N(null), a = N(null), d = N(t);
|
|
3652
3652
|
d.current = t;
|
|
3653
|
-
const c = N(!1), f = N(new lt()), p = N(new lt()),
|
|
3653
|
+
const c = N(!1), f = N(new lt()), p = N(new lt()), h = N(new lt()), v = N(new lt()), g = N(new lt()), b = e.length >= Wc, y = e.length >= jc, z = r || b, M = Y(() => {
|
|
3654
3654
|
const k = Bc(), I = [
|
|
3655
3655
|
p.current.of(Gt.readOnly.of(z)),
|
|
3656
|
-
|
|
3656
|
+
h.current.of(o ? _n() : []),
|
|
3657
3657
|
v.current.of(i ? ot.lineWrapping : []),
|
|
3658
3658
|
Bi(),
|
|
3659
3659
|
Ui(),
|
|
@@ -3667,16 +3667,16 @@ function Uc({
|
|
|
3667
3667
|
g.current.of(Xn()),
|
|
3668
3668
|
Fr(os, { fallback: !0 })
|
|
3669
3669
|
];
|
|
3670
|
-
if (
|
|
3670
|
+
if (b)
|
|
3671
3671
|
I.push(f.current.of([]));
|
|
3672
3672
|
else {
|
|
3673
|
-
const
|
|
3674
|
-
I.push(f.current.of(
|
|
3673
|
+
const m = Qn(n);
|
|
3674
|
+
I.push(f.current.of(m ?? []));
|
|
3675
3675
|
}
|
|
3676
3676
|
return I.push(
|
|
3677
|
-
ot.updateListener.of((
|
|
3677
|
+
ot.updateListener.of((m) => {
|
|
3678
3678
|
var L;
|
|
3679
|
-
|
|
3679
|
+
m.docChanged && !c.current && ((L = d.current) == null || L.call(d, m.state.doc.toString()));
|
|
3680
3680
|
})
|
|
3681
3681
|
), I;
|
|
3682
3682
|
}, []);
|
|
@@ -3703,7 +3703,7 @@ function Uc({
|
|
|
3703
3703
|
}, [z]), O(() => {
|
|
3704
3704
|
const k = a.current;
|
|
3705
3705
|
k && k.dispatch({
|
|
3706
|
-
effects:
|
|
3706
|
+
effects: h.current.reconfigure(
|
|
3707
3707
|
o ? _n() : []
|
|
3708
3708
|
)
|
|
3709
3709
|
});
|
|
@@ -3716,25 +3716,25 @@ function Uc({
|
|
|
3716
3716
|
});
|
|
3717
3717
|
}, [i]), O(() => {
|
|
3718
3718
|
const k = a.current;
|
|
3719
|
-
if (!k ||
|
|
3719
|
+
if (!k || b) return;
|
|
3720
3720
|
const I = Qn(n);
|
|
3721
3721
|
k.dispatch({
|
|
3722
3722
|
effects: f.current.reconfigure(I ?? [])
|
|
3723
3723
|
});
|
|
3724
|
-
}, [n,
|
|
3724
|
+
}, [n, b]), O(() => {
|
|
3725
3725
|
const k = new MutationObserver(() => {
|
|
3726
3726
|
const I = a.current;
|
|
3727
3727
|
if (!I) return;
|
|
3728
|
-
const
|
|
3728
|
+
const m = document.documentElement.getAttribute("data-theme") === "dark";
|
|
3729
3729
|
I.dispatch({
|
|
3730
|
-
effects: g.current.reconfigure(Xn({ dark:
|
|
3730
|
+
effects: g.current.reconfigure(Xn({ dark: m }))
|
|
3731
3731
|
});
|
|
3732
3732
|
});
|
|
3733
3733
|
return k.observe(document.documentElement, {
|
|
3734
3734
|
attributes: !0,
|
|
3735
3735
|
attributeFilter: ["data-theme"]
|
|
3736
3736
|
}), () => k.disconnect();
|
|
3737
|
-
}, []),
|
|
3737
|
+
}, []), b ? /* @__PURE__ */ x("div", { className: re("flex h-full flex-col", s), children: [
|
|
3738
3738
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-2 border-b border-border bg-muted/50 px-3 py-2 text-sm text-muted-foreground", children: [
|
|
3739
3739
|
/* @__PURE__ */ l("span", { children: "Large file — editing disabled" }),
|
|
3740
3740
|
y && /* @__PURE__ */ l(
|
|
@@ -3745,8 +3745,8 @@ function Uc({
|
|
|
3745
3745
|
size: "xs",
|
|
3746
3746
|
className: "ml-auto",
|
|
3747
3747
|
onClick: () => {
|
|
3748
|
-
const k = new Blob([e], { type: "text/plain" }), I = URL.createObjectURL(k),
|
|
3749
|
-
|
|
3748
|
+
const k = new Blob([e], { type: "text/plain" }), I = URL.createObjectURL(k), m = document.createElement("a");
|
|
3749
|
+
m.href = I, m.download = "file.txt", m.click(), URL.revokeObjectURL(I);
|
|
3750
3750
|
},
|
|
3751
3751
|
children: "Download"
|
|
3752
3752
|
}
|
|
@@ -3816,7 +3816,7 @@ function Zn({ params: e, api: t, className: n }) {
|
|
|
3816
3816
|
);
|
|
3817
3817
|
}
|
|
3818
3818
|
const Hc = Lt(
|
|
3819
|
-
() => import("./MarkdownEditor-
|
|
3819
|
+
() => import("./MarkdownEditor-BlYGosmH.js").then((e) => ({ default: e.MarkdownEditor }))
|
|
3820
3820
|
);
|
|
3821
3821
|
function Vc({ params: e, api: t, className: n }) {
|
|
3822
3822
|
const r = typeof (e == null ? void 0 : e.path) == "string" ? e.path : "", {
|
|
@@ -3852,7 +3852,7 @@ function nt(e) {
|
|
|
3852
3852
|
return e.split("/").pop() ?? e;
|
|
3853
3853
|
}
|
|
3854
3854
|
function Gc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
|
|
3855
|
-
const i = Ye(), s = Xe(), [u, a] = B(null), [d, c] = B(null), [f, p] = B(!0),
|
|
3855
|
+
const i = Ye(), s = Xe(), [u, a] = B(null), [d, c] = B(null), [f, p] = B(!0), h = Y(() => {
|
|
3856
3856
|
const v = new URLSearchParams({ path: e });
|
|
3857
3857
|
return n > 0 && v.set("reload", String(n)), Kc(i, `/api/v1/files/raw?${v.toString()}`);
|
|
3858
3858
|
}, [i, e, n]);
|
|
@@ -3860,10 +3860,10 @@ function Gc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
|
|
|
3860
3860
|
const v = new AbortController();
|
|
3861
3861
|
let g = null;
|
|
3862
3862
|
p(!0), c(null), a(null);
|
|
3863
|
-
const
|
|
3864
|
-
return s && (
|
|
3863
|
+
const b = {};
|
|
3864
|
+
return s && (b["x-boring-workspace-id"] = s), fetch(h, {
|
|
3865
3865
|
credentials: "include",
|
|
3866
|
-
headers:
|
|
3866
|
+
headers: b,
|
|
3867
3867
|
signal: v.signal
|
|
3868
3868
|
}).then(async (y) => {
|
|
3869
3869
|
if (!y.ok) throw new Error(`HTTP ${y.status}`);
|
|
@@ -3876,7 +3876,7 @@ function Gc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
|
|
|
3876
3876
|
}), () => {
|
|
3877
3877
|
v.abort(), g && URL.revokeObjectURL(g);
|
|
3878
3878
|
};
|
|
3879
|
-
}, [
|
|
3879
|
+
}, [h, s]), e ? /* @__PURE__ */ x("div", { className: re("flex h-full min-h-0 flex-col bg-background", o), children: [
|
|
3880
3880
|
/* @__PURE__ */ x("div", { className: "flex shrink-0 items-center justify-between gap-3 border-b border-border/60 px-3 py-2", children: [
|
|
3881
3881
|
/* @__PURE__ */ l("div", { className: "min-w-0 truncate text-xs font-medium text-muted-foreground", title: e, children: nt(e) }),
|
|
3882
3882
|
/* @__PURE__ */ x("div", { className: "flex items-center gap-1", children: [
|
|
@@ -3997,22 +3997,22 @@ function Cn(e, t, n) {
|
|
|
3997
3997
|
const r = new URLSearchParams({ path: t });
|
|
3998
3998
|
return n && r.set("workspaceId", n), Xc(e, `/api/v1/files/raw?${r.toString()}`);
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4000
|
+
function mt(e, t, n, r) {
|
|
4001
4001
|
const o = fo(t, n);
|
|
4002
4002
|
if (!o) return n;
|
|
4003
4003
|
const { suffix: i } = uo(n.trim()), s = i.indexOf("#"), u = s === -1 ? "" : i.slice(s);
|
|
4004
4004
|
return `${Cn(e, o, r)}${u}`;
|
|
4005
4005
|
}
|
|
4006
4006
|
function Qt(e, t, n, r) {
|
|
4007
|
-
return e.replace(/url\(\s*(["']?)([^"')]+)\1\s*\)/gi, (o, i, s) => `url(${i}${
|
|
4008
|
-
const a =
|
|
4007
|
+
return e.replace(/url\(\s*(["']?)([^"')]+)\1\s*\)/gi, (o, i, s) => `url(${i}${mt(n, t, s, r)}${i})`).replace(/@import\s+(url\(\s*)?(["'])([^"']+)\2\s*\)?/gi, (o, i, s, u) => {
|
|
4008
|
+
const a = mt(n, t, u, r);
|
|
4009
4009
|
return i ? `@import ${i}${s}${a}${s})` : o.replace(`${s}${u}${s}`, `${s}${a}${s}`);
|
|
4010
4010
|
});
|
|
4011
4011
|
}
|
|
4012
4012
|
function tl(e, t, n, r) {
|
|
4013
4013
|
return e.split(",").map((o) => {
|
|
4014
4014
|
const i = o.trim(), [s, ...u] = i.split(/\s+/);
|
|
4015
|
-
return s ? [
|
|
4015
|
+
return s ? [mt(n, t, s, r), ...u].join(" ") : o;
|
|
4016
4016
|
}).join(", ");
|
|
4017
4017
|
}
|
|
4018
4018
|
async function po(e, t, n) {
|
|
@@ -4033,10 +4033,10 @@ async function nl(e) {
|
|
|
4033
4033
|
const f = fo(n, c);
|
|
4034
4034
|
if (f)
|
|
4035
4035
|
try {
|
|
4036
|
-
const p = await po(Cn(r, f, i), o, s),
|
|
4037
|
-
|
|
4036
|
+
const p = await po(Cn(r, f, i), o, s), h = u.createElement("style");
|
|
4037
|
+
h.setAttribute("data-boring-html-viewer-href", c), h.textContent = Qt(p, f, r, i), d.replaceWith(h);
|
|
4038
4038
|
} catch {
|
|
4039
|
-
d.setAttribute("href",
|
|
4039
|
+
d.setAttribute("href", mt(r, n, c, i));
|
|
4040
4040
|
}
|
|
4041
4041
|
})
|
|
4042
4042
|
);
|
|
@@ -4061,7 +4061,7 @@ async function nl(e) {
|
|
|
4061
4061
|
for (const [d, c] of a)
|
|
4062
4062
|
for (const f of Array.from(u.querySelectorAll(`${d}[${c}]`))) {
|
|
4063
4063
|
const p = f.getAttribute(c);
|
|
4064
|
-
p && f.setAttribute(c,
|
|
4064
|
+
p && f.setAttribute(c, mt(r, n, p, i));
|
|
4065
4065
|
}
|
|
4066
4066
|
for (const d of Array.from(u.querySelectorAll("[srcset]"))) {
|
|
4067
4067
|
const c = d.getAttribute("srcset");
|
|
@@ -4074,24 +4074,24 @@ function rl({ path: e, className: t }) {
|
|
|
4074
4074
|
const n = Ye(), r = Xe(), [o, i] = B(null), [s, u] = B(null), [a, d] = B(!0), c = Y(
|
|
4075
4075
|
() => Cn(n, e, r),
|
|
4076
4076
|
[n, e, r]
|
|
4077
|
-
), [f, p] = B(0),
|
|
4077
|
+
), [f, p] = B(0), h = R(() => {
|
|
4078
4078
|
p((v) => v + 1);
|
|
4079
4079
|
}, []);
|
|
4080
4080
|
return O(() => {
|
|
4081
4081
|
const v = new AbortController();
|
|
4082
4082
|
d(!0), u(null), i(null);
|
|
4083
4083
|
const g = {};
|
|
4084
|
-
return r && (g["x-boring-workspace-id"] = r), po(c, g, v.signal).then(async (
|
|
4084
|
+
return r && (g["x-boring-workspace-id"] = r), po(c, g, v.signal).then(async (b) => {
|
|
4085
4085
|
i(await nl({
|
|
4086
|
-
html:
|
|
4086
|
+
html: b,
|
|
4087
4087
|
path: e,
|
|
4088
4088
|
apiBaseUrl: n,
|
|
4089
4089
|
headers: g,
|
|
4090
4090
|
workspaceRequestId: r,
|
|
4091
4091
|
signal: v.signal
|
|
4092
4092
|
}));
|
|
4093
|
-
}).catch((
|
|
4094
|
-
v.signal.aborted || u(
|
|
4093
|
+
}).catch((b) => {
|
|
4094
|
+
v.signal.aborted || u(b instanceof Error ? b.message : "Failed to load HTML preview");
|
|
4095
4095
|
}).finally(() => {
|
|
4096
4096
|
v.signal.aborted || d(!1);
|
|
4097
4097
|
}), () => v.abort();
|
|
@@ -4107,7 +4107,7 @@ function rl({ path: e, className: t }) {
|
|
|
4107
4107
|
variant: "ghost",
|
|
4108
4108
|
size: "icon-xs",
|
|
4109
4109
|
className: "text-muted-foreground hover:text-foreground",
|
|
4110
|
-
onClick:
|
|
4110
|
+
onClick: h,
|
|
4111
4111
|
"aria-label": "Refresh preview",
|
|
4112
4112
|
title: "Refresh preview",
|
|
4113
4113
|
children: /* @__PURE__ */ l(ni, { className: "h-3.5 w-3.5", strokeWidth: 1.75 })
|
|
@@ -4252,7 +4252,7 @@ function ul(e) {
|
|
|
4252
4252
|
return t ?? tr.find((r) => r.fallback);
|
|
4253
4253
|
}
|
|
4254
4254
|
const Zt = {
|
|
4255
|
-
id:
|
|
4255
|
+
id: ha,
|
|
4256
4256
|
source: "builtin",
|
|
4257
4257
|
resolve(e) {
|
|
4258
4258
|
if (e.kind !== Je) return;
|
|
@@ -4318,12 +4318,12 @@ function pl({
|
|
|
4318
4318
|
}
|
|
4319
4319
|
);
|
|
4320
4320
|
}
|
|
4321
|
-
function
|
|
4321
|
+
function ml() {
|
|
4322
4322
|
return O(() => {
|
|
4323
4323
|
vc();
|
|
4324
4324
|
}, []), Zr("."), null;
|
|
4325
4325
|
}
|
|
4326
|
-
function
|
|
4326
|
+
function hl() {
|
|
4327
4327
|
const e = je(), t = Ut();
|
|
4328
4328
|
return O(() => {
|
|
4329
4329
|
const n = t.get(It);
|
|
@@ -4346,7 +4346,7 @@ const gl = (e) => {
|
|
|
4346
4346
|
component: pl
|
|
4347
4347
|
}), e.registerBinding({
|
|
4348
4348
|
id: "filesystem-tree-preload",
|
|
4349
|
-
component:
|
|
4349
|
+
component: ml
|
|
4350
4350
|
}), e.registerLeftTab({
|
|
4351
4351
|
id: un,
|
|
4352
4352
|
title: "Files",
|
|
@@ -4405,7 +4405,7 @@ const gl = (e) => {
|
|
|
4405
4405
|
resolve: Zt.resolve
|
|
4406
4406
|
}), e.registerBinding({
|
|
4407
4407
|
id: "filesystem-catalog",
|
|
4408
|
-
component:
|
|
4408
|
+
component: hl
|
|
4409
4409
|
}), e.registerBinding({
|
|
4410
4410
|
id: "filesystem-file-panel",
|
|
4411
4411
|
component: Cc
|
|
@@ -4501,12 +4501,12 @@ function Oe({
|
|
|
4501
4501
|
] })
|
|
4502
4502
|
] }) });
|
|
4503
4503
|
}
|
|
4504
|
-
const
|
|
4504
|
+
const mo = Pe(null), ho = Pe("dock");
|
|
4505
4505
|
function yl({ basePath: e, children: t }) {
|
|
4506
|
-
return /* @__PURE__ */ l(
|
|
4506
|
+
return /* @__PURE__ */ l(mo.Provider, { value: e ?? null, children: t });
|
|
4507
4507
|
}
|
|
4508
|
-
function
|
|
4509
|
-
return /* @__PURE__ */ l(
|
|
4508
|
+
function mf({ mode: e, children: t }) {
|
|
4509
|
+
return /* @__PURE__ */ l(ho.Provider, { value: e, children: t });
|
|
4510
4510
|
}
|
|
4511
4511
|
function bl({ componentId: e, params: t, basePath: n }) {
|
|
4512
4512
|
const [r, o = ""] = n.split("#", 2), [i, s = ""] = r.split("?", 2), u = new URLSearchParams(s);
|
|
@@ -4515,7 +4515,7 @@ function bl({ componentId: e, params: t, basePath: n }) {
|
|
|
4515
4515
|
return `${i}?${u.toString()}${a}`;
|
|
4516
4516
|
}
|
|
4517
4517
|
function hf(e) {
|
|
4518
|
-
const t = ge(
|
|
4518
|
+
const t = ge(mo);
|
|
4519
4519
|
return Y(() => t ? bl({
|
|
4520
4520
|
componentId: e.componentId,
|
|
4521
4521
|
params: e.params,
|
|
@@ -4523,9 +4523,9 @@ function hf(e) {
|
|
|
4523
4523
|
}) : null, [t, e.componentId, e.params]);
|
|
4524
4524
|
}
|
|
4525
4525
|
function wl() {
|
|
4526
|
-
return ge(
|
|
4526
|
+
return ge(ho);
|
|
4527
4527
|
}
|
|
4528
|
-
function
|
|
4528
|
+
function gf() {
|
|
4529
4529
|
return wl() === "full-page";
|
|
4530
4530
|
}
|
|
4531
4531
|
const kl = te.string().max(64).regex(/^[a-zA-Z0-9_-]+$/), Tt = te.string().max(1024), Sl = te.number().nonnegative(), xl = te.object({
|
|
@@ -4613,7 +4613,7 @@ function go(e = {}) {
|
|
|
4613
4613
|
);
|
|
4614
4614
|
},
|
|
4615
4615
|
openPanel: (c) => a((f) => ({
|
|
4616
|
-
panels: f.panels.some((
|
|
4616
|
+
panels: f.panels.some((h) => h.id === c.id) ? f.panels : [...f.panels, c],
|
|
4617
4617
|
activePanel: c.id
|
|
4618
4618
|
})),
|
|
4619
4619
|
closePanel: (c) => a((f) => ({
|
|
@@ -4633,8 +4633,8 @@ function go(e = {}) {
|
|
|
4633
4633
|
}
|
|
4634
4634
|
})),
|
|
4635
4635
|
markClean: (c) => a((f) => {
|
|
4636
|
-
const { [c]: p, ...
|
|
4637
|
-
return { dirtyFiles:
|
|
4636
|
+
const { [c]: p, ...h } = f.dirtyFiles;
|
|
4637
|
+
return { dirtyFiles: h };
|
|
4638
4638
|
}),
|
|
4639
4639
|
showNotification: (c) => a((f) => ({
|
|
4640
4640
|
notifications: [
|
|
@@ -4830,14 +4830,14 @@ function $l({
|
|
|
4830
4830
|
if (!e) return;
|
|
4831
4831
|
const p = (v) => {
|
|
4832
4832
|
v.key === "Escape" && (v.preventDefault(), v.stopPropagation(), t(!1));
|
|
4833
|
-
},
|
|
4833
|
+
}, h = (v) => {
|
|
4834
4834
|
const g = v.target;
|
|
4835
4835
|
if (!g) return;
|
|
4836
|
-
const
|
|
4837
|
-
|
|
4836
|
+
const b = document.querySelector('[data-slot="dialog-content"]');
|
|
4837
|
+
b && !b.contains(g) && (v.preventDefault(), v.stopPropagation(), t(!1));
|
|
4838
4838
|
};
|
|
4839
|
-
return window.addEventListener("keydown", p, { capture: !0 }), window.addEventListener("pointerdown",
|
|
4840
|
-
window.removeEventListener("keydown", p, { capture: !0 }), window.removeEventListener("pointerdown",
|
|
4839
|
+
return window.addEventListener("keydown", p, { capture: !0 }), window.addEventListener("pointerdown", h, { capture: !0 }), () => {
|
|
4840
|
+
window.removeEventListener("keydown", p, { capture: !0 }), window.removeEventListener("pointerdown", h, { capture: !0 });
|
|
4841
4841
|
};
|
|
4842
4842
|
}, [e, t]);
|
|
4843
4843
|
const a = R(() => {
|
|
@@ -4864,9 +4864,9 @@ function $l({
|
|
|
4864
4864
|
u.current = e;
|
|
4865
4865
|
}, [e, r, o]);
|
|
4866
4866
|
const d = R((p) => {
|
|
4867
|
-
r(p), o((
|
|
4868
|
-
var
|
|
4869
|
-
return (
|
|
4867
|
+
r(p), o((h) => h.replace(/^>\s*/, "")), requestAnimationFrame(() => {
|
|
4868
|
+
var h;
|
|
4869
|
+
return (h = i.current) == null ? void 0 : h.focus();
|
|
4870
4870
|
});
|
|
4871
4871
|
}, [r, o]), c = R(() => {
|
|
4872
4872
|
d(n === "commands" ? "catalogs" : "commands");
|
|
@@ -4901,10 +4901,10 @@ function Ml({
|
|
|
4901
4901
|
s((c) => {
|
|
4902
4902
|
const f = new Map(c.map((p) => [p.catalog.id, p]));
|
|
4903
4903
|
return a.map((p) => {
|
|
4904
|
-
const
|
|
4904
|
+
const h = f.get(p.id);
|
|
4905
4905
|
return {
|
|
4906
4906
|
catalog: p,
|
|
4907
|
-
rows: (
|
|
4907
|
+
rows: (h == null ? void 0 : h.rows) ?? [],
|
|
4908
4908
|
loading: !0
|
|
4909
4909
|
};
|
|
4910
4910
|
});
|
|
@@ -4912,7 +4912,7 @@ function Ml({
|
|
|
4912
4912
|
const d = (c, f) => {
|
|
4913
4913
|
u.signal.aborted || s(
|
|
4914
4914
|
(p) => p.map(
|
|
4915
|
-
(
|
|
4915
|
+
(h) => h.catalog.id === c.id ? { catalog: c, ...f } : h
|
|
4916
4916
|
)
|
|
4917
4917
|
);
|
|
4918
4918
|
};
|
|
@@ -4953,16 +4953,16 @@ function Ml({
|
|
|
4953
4953
|
}, [e, r, t]), i;
|
|
4954
4954
|
}
|
|
4955
4955
|
function Wl(e) {
|
|
4956
|
-
const [t, n] = B(!1), [r, o] = B(""), [i, s] = B("catalogs"), u = ks(), a = ws(), d =
|
|
4956
|
+
const [t, n] = B(!1), [r, o] = B(""), [i, s] = B("catalogs"), u = ks(), a = ws(), d = kd(), c = Y(() => {
|
|
4957
4957
|
const L = {};
|
|
4958
4958
|
for (const W of (d == null ? void 0 : d.registeredPlugins) ?? [])
|
|
4959
4959
|
W.label && (L[W.id] = W.label);
|
|
4960
4960
|
return L;
|
|
4961
|
-
}, [d == null ? void 0 : d.registeredPlugins]), f = i === "commands", p = r.trim(),
|
|
4961
|
+
}, [d == null ? void 0 : d.registeredPlugins]), f = i === "commands", p = r.trim(), h = Ml({
|
|
4962
4962
|
catalogs: u,
|
|
4963
4963
|
isCommandMode: f,
|
|
4964
4964
|
searchQuery: p
|
|
4965
|
-
}), { inputRef: v, switchMode: g, handleInputKeyDown:
|
|
4965
|
+
}), { inputRef: v, switchMode: g, handleInputKeyDown: b } = $l({
|
|
4966
4966
|
open: t,
|
|
4967
4967
|
setOpen: n,
|
|
4968
4968
|
mode: i,
|
|
@@ -4978,7 +4978,7 @@ function Wl(e) {
|
|
|
4978
4978
|
recentEntries: M,
|
|
4979
4979
|
handleCatalogSelect: k,
|
|
4980
4980
|
handleCommandSelect: I,
|
|
4981
|
-
handleRecentSelect:
|
|
4981
|
+
handleRecentSelect: m
|
|
4982
4982
|
} = Ll({
|
|
4983
4983
|
catalogs: u,
|
|
4984
4984
|
commands: a,
|
|
@@ -5007,9 +5007,9 @@ function Wl(e) {
|
|
|
5007
5007
|
isCommandMode: f,
|
|
5008
5008
|
query: r,
|
|
5009
5009
|
onQueryChange: y,
|
|
5010
|
-
onInputKeyDown:
|
|
5010
|
+
onInputKeyDown: b,
|
|
5011
5011
|
onSwitchMode: g,
|
|
5012
|
-
loading: !f &&
|
|
5012
|
+
loading: !f && h.some((L) => L.loading)
|
|
5013
5013
|
}
|
|
5014
5014
|
),
|
|
5015
5015
|
/* @__PURE__ */ x(
|
|
@@ -5025,13 +5025,13 @@ function Wl(e) {
|
|
|
5025
5025
|
isCommandMode: f,
|
|
5026
5026
|
recentEntries: M,
|
|
5027
5027
|
searchQuery: p,
|
|
5028
|
-
onRecentSelect:
|
|
5028
|
+
onRecentSelect: m
|
|
5029
5029
|
}
|
|
5030
5030
|
),
|
|
5031
5031
|
/* @__PURE__ */ l(
|
|
5032
5032
|
Bl,
|
|
5033
5033
|
{
|
|
5034
|
-
catalogGroups:
|
|
5034
|
+
catalogGroups: h,
|
|
5035
5035
|
isCommandMode: f,
|
|
5036
5036
|
onCatalogSelect: k
|
|
5037
5037
|
}
|
|
@@ -5263,7 +5263,7 @@ function So({ row: e }) {
|
|
|
5263
5263
|
e.meta ? /* @__PURE__ */ l("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground/70", children: e.meta }) : null
|
|
5264
5264
|
] });
|
|
5265
5265
|
}
|
|
5266
|
-
const
|
|
5266
|
+
const vf = ["/api/v1/tree?path=."], Vl = /* @__PURE__ */ new Set([
|
|
5267
5267
|
"WORKSPACE_NOT_READY",
|
|
5268
5268
|
"AGENT_RUNTIME_NOT_READY",
|
|
5269
5269
|
"RUNTIME_PROVISIONING_LOCKED"
|
|
@@ -5273,10 +5273,10 @@ function Kl(e, t) {
|
|
|
5273
5273
|
const n = e.replace(/\\/g, "/").replace(/\/+$/, ""), r = t.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
5274
5274
|
return n.startsWith("/") ? n === r ? "." : n.startsWith(`${r}/`) ? n.slice(r.length + 1) : e : e;
|
|
5275
5275
|
}
|
|
5276
|
-
function
|
|
5276
|
+
function yf(e, t) {
|
|
5277
5277
|
return /^https?:\/\//i.test(t) || !e ? t : `${e.replace(/\/$/, "")}/${t.replace(/^\//, "")}`;
|
|
5278
5278
|
}
|
|
5279
|
-
function
|
|
5279
|
+
function bf(e, t) {
|
|
5280
5280
|
const n = { ...t ?? {} };
|
|
5281
5281
|
for (const r of Object.keys(n))
|
|
5282
5282
|
r.toLowerCase() === "x-boring-workspace-id" && delete n[r];
|
|
@@ -5286,7 +5286,7 @@ function Gl(e) {
|
|
|
5286
5286
|
const t = new URL(e, "http://workspace.local");
|
|
5287
5287
|
return t.pathname !== "/api/v1/tree" ? null : t.searchParams.get("path") ?? ".";
|
|
5288
5288
|
}
|
|
5289
|
-
function
|
|
5289
|
+
function wf(e, t, n, r) {
|
|
5290
5290
|
const o = Gl(n);
|
|
5291
5291
|
o === null || !r || !Array.isArray(r.entries) || Da(e, t, o, r.entries);
|
|
5292
5292
|
}
|
|
@@ -5301,7 +5301,7 @@ function Yl(e) {
|
|
|
5301
5301
|
requirement: r.requirement ?? n.requirement
|
|
5302
5302
|
};
|
|
5303
5303
|
}
|
|
5304
|
-
function
|
|
5304
|
+
function kf(e) {
|
|
5305
5305
|
const t = Yl(e);
|
|
5306
5306
|
if (typeof (t == null ? void 0 : t.code) != "string" || !Vl.has(t.code) || t.retryable !== !0) return null;
|
|
5307
5307
|
const n = typeof t.requirement == "string" && Jl.has(t.requirement) ? t.requirement : void 0;
|
|
@@ -5311,14 +5311,14 @@ function Xl(e) {
|
|
|
5311
5311
|
const t = new URL(e, "http://workspace.local");
|
|
5312
5312
|
return t.pathname === "/api/v1/agent/pi-chat/sessions" || t.pathname === "/api/v1/ready-status";
|
|
5313
5313
|
}
|
|
5314
|
-
function
|
|
5314
|
+
function Sf(e) {
|
|
5315
5315
|
return new URL(e, "http://workspace.local").pathname === "/api/v1/ready-status";
|
|
5316
5316
|
}
|
|
5317
|
-
function
|
|
5317
|
+
function xf(e, t) {
|
|
5318
5318
|
const n = t ? [...e, "/api/v1/ready-status"] : e.filter((r) => !Xl(r));
|
|
5319
5319
|
return Array.from(new Set(n));
|
|
5320
5320
|
}
|
|
5321
|
-
function
|
|
5321
|
+
function Cf(e) {
|
|
5322
5322
|
if (typeof e == "string") return e || null;
|
|
5323
5323
|
if (!e || typeof e != "object") return null;
|
|
5324
5324
|
const t = e;
|
|
@@ -5340,7 +5340,7 @@ function fr(e) {
|
|
|
5340
5340
|
runtimeDependenciesRequirement: typeof ((f = (c = t.capabilities) == null ? void 0 : c.runtimeDependencies) == null ? void 0 : f.requirement) == "string" ? t.capabilities.runtimeDependencies.requirement : void 0
|
|
5341
5341
|
};
|
|
5342
5342
|
}
|
|
5343
|
-
function
|
|
5343
|
+
function Pf(e) {
|
|
5344
5344
|
if (e && typeof e == "object") return fr(e);
|
|
5345
5345
|
if (typeof e != "string" || !e.trim()) return null;
|
|
5346
5346
|
const t = e.split(/\n\n+/);
|
|
@@ -5357,10 +5357,10 @@ function Cf(e) {
|
|
|
5357
5357
|
}
|
|
5358
5358
|
return null;
|
|
5359
5359
|
}
|
|
5360
|
-
function
|
|
5360
|
+
function Ef(e) {
|
|
5361
5361
|
return e ? e.chatState || e.workspaceState ? e.chatState === "ready" && e.workspaceState === "ready" : e.state === "ready" : !0;
|
|
5362
5362
|
}
|
|
5363
|
-
async function
|
|
5363
|
+
async function If(e) {
|
|
5364
5364
|
const t = await e.text().catch(() => "");
|
|
5365
5365
|
if (!t) return null;
|
|
5366
5366
|
try {
|
|
@@ -5392,7 +5392,7 @@ function tu(e, t) {
|
|
|
5392
5392
|
}
|
|
5393
5393
|
return t ?? void 0;
|
|
5394
5394
|
}
|
|
5395
|
-
function
|
|
5395
|
+
function Tf(e, t, n = {}) {
|
|
5396
5396
|
const r = n.ignoredReasons ?? [_t.sessionSwitch];
|
|
5397
5397
|
if (xo(e) && r.includes(e.reason)) return !1;
|
|
5398
5398
|
const o = tu(e, n.fallbackSessionId);
|
|
@@ -5401,7 +5401,7 @@ function If(e, t, n = {}) {
|
|
|
5401
5401
|
function pr(e) {
|
|
5402
5402
|
return (e == null ? void 0 : e["x-boring-workspace-id"]) ?? (e == null ? void 0 : e["X-Boring-Workspace-Id"]) ?? null;
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function mr(e) {
|
|
5405
5405
|
if (!e) return;
|
|
5406
5406
|
const t = e.replace(/\/$/, ""), n = "/api/v1/ui";
|
|
5407
5407
|
return t.endsWith(n) ? t.slice(0, -n.length) || void 0 : t;
|
|
@@ -5419,15 +5419,15 @@ function nu(e) {
|
|
|
5419
5419
|
};
|
|
5420
5420
|
}
|
|
5421
5421
|
function ru(e) {
|
|
5422
|
-
const t =
|
|
5422
|
+
const t = Sd(), { blockers: n } = Po(), {
|
|
5423
5423
|
surfaceDispatch: r,
|
|
5424
5424
|
bridgeEndpoint: o,
|
|
5425
5425
|
...i
|
|
5426
|
-
} = e, s = N(null), u =
|
|
5426
|
+
} = e, s = N(null), u = mr(o) ?? "", a = pr(i.requestHeaders);
|
|
5427
5427
|
O(() => {
|
|
5428
5428
|
let g = !1;
|
|
5429
|
-
const
|
|
5430
|
-
return fetch(`${u}/api/v1/workspace/meta`, { headers:
|
|
5429
|
+
const b = a ? { "x-boring-workspace-id": a } : {};
|
|
5430
|
+
return fetch(`${u}/api/v1/workspace/meta`, { headers: b }).then((y) => y.ok ? y.json() : null).then((y) => {
|
|
5431
5431
|
g || y && typeof y.workspaceRoot == "string" && (s.current = y.workspaceRoot);
|
|
5432
5432
|
}).catch(() => {
|
|
5433
5433
|
}), () => {
|
|
@@ -5437,15 +5437,15 @@ function ru(e) {
|
|
|
5437
5437
|
const d = R(
|
|
5438
5438
|
(g) => {
|
|
5439
5439
|
var y;
|
|
5440
|
-
const
|
|
5441
|
-
r && cn({ kind: "openFile", params: { path:
|
|
5440
|
+
const b = Kl(g, s.current);
|
|
5441
|
+
r && cn({ kind: "openFile", params: { path: b } }, r), (y = e.onOpenArtifact) == null || y.call(e, b);
|
|
5442
5442
|
},
|
|
5443
5443
|
[r, e.onOpenArtifact]
|
|
5444
5444
|
), c = pr(i.requestHeaders), f = n.filter((g) => !g.sessionId || !i.sessionId || g.sessionId === i.sessionId);
|
|
5445
5445
|
O(() => {
|
|
5446
5446
|
if (!(o === null || !r))
|
|
5447
5447
|
return oa({
|
|
5448
|
-
endpoint:
|
|
5448
|
+
endpoint: mr(o),
|
|
5449
5449
|
query: c ? { workspaceId: c } : void 0,
|
|
5450
5450
|
ctx: r
|
|
5451
5451
|
});
|
|
@@ -5453,10 +5453,10 @@ function ru(e) {
|
|
|
5453
5453
|
const p = R(() => {
|
|
5454
5454
|
var g;
|
|
5455
5455
|
Zl({ sessionId: i.sessionId, reason: _t.userStop }), (g = e.onComposerStop) == null || g.call(e);
|
|
5456
|
-
}, [i.sessionId, e.onComposerStop]),
|
|
5457
|
-
(g,
|
|
5456
|
+
}, [i.sessionId, e.onComposerStop]), h = R(
|
|
5457
|
+
(g, b) => {
|
|
5458
5458
|
const y = g.sessionId ?? i.sessionId;
|
|
5459
|
-
cu({ blockerId: g.id, actionId:
|
|
5459
|
+
cu({ blockerId: g.id, actionId: b, blocker: g, sessionId: y }), !(b !== "open" || !g.surfaceKind) && r && cn(
|
|
5460
5460
|
{
|
|
5461
5461
|
kind: "openSurface",
|
|
5462
5462
|
params: {
|
|
@@ -5471,8 +5471,8 @@ function ru(e) {
|
|
|
5471
5471
|
[i.sessionId, r]
|
|
5472
5472
|
), v = R(
|
|
5473
5473
|
(g) => {
|
|
5474
|
-
var
|
|
5475
|
-
Zs(nu(g)), (
|
|
5474
|
+
var b;
|
|
5475
|
+
Zs(nu(g)), (b = e.onData) == null || b.call(e, g);
|
|
5476
5476
|
},
|
|
5477
5477
|
[e.onData]
|
|
5478
5478
|
);
|
|
@@ -5485,7 +5485,7 @@ function ru(e) {
|
|
|
5485
5485
|
onData: v,
|
|
5486
5486
|
composerBlockers: f,
|
|
5487
5487
|
onComposerStop: p,
|
|
5488
|
-
onComposerBlockerAction:
|
|
5488
|
+
onComposerBlockerAction: h
|
|
5489
5489
|
}
|
|
5490
5490
|
);
|
|
5491
5491
|
}
|
|
@@ -5532,7 +5532,7 @@ const Eo = "chat-pane", fu = 280, pu = 300, Io = Pe(null);
|
|
|
5532
5532
|
function To(e) {
|
|
5533
5533
|
return `${e}:chatPaneLayout`;
|
|
5534
5534
|
}
|
|
5535
|
-
function
|
|
5535
|
+
function mu(e) {
|
|
5536
5536
|
switch (e) {
|
|
5537
5537
|
case "left":
|
|
5538
5538
|
return "left";
|
|
@@ -5546,7 +5546,7 @@ function hu(e) {
|
|
|
5546
5546
|
return "within";
|
|
5547
5547
|
}
|
|
5548
5548
|
}
|
|
5549
|
-
function
|
|
5549
|
+
function hu(e, t) {
|
|
5550
5550
|
var n;
|
|
5551
5551
|
try {
|
|
5552
5552
|
const r = (n = globalThis.localStorage) == null ? void 0 : n.getItem(To(e));
|
|
@@ -5566,7 +5566,7 @@ function gu(e, t) {
|
|
|
5566
5566
|
} catch {
|
|
5567
5567
|
}
|
|
5568
5568
|
}
|
|
5569
|
-
function
|
|
5569
|
+
function hr(e, t, n) {
|
|
5570
5570
|
var o;
|
|
5571
5571
|
(o = e.addPanel({
|
|
5572
5572
|
id: t.id,
|
|
@@ -5587,7 +5587,7 @@ function gr(e, t, n, r) {
|
|
|
5587
5587
|
if (a) {
|
|
5588
5588
|
r == null || r.delete(s.id);
|
|
5589
5589
|
const f = a.referencePanelId ? e.getPanel(a.referencePanelId) : void 0;
|
|
5590
|
-
|
|
5590
|
+
hr(
|
|
5591
5591
|
e,
|
|
5592
5592
|
s,
|
|
5593
5593
|
f ? { referencePanel: f, direction: a.direction } : { direction: a.direction === "within" ? "right" : a.direction }
|
|
@@ -5595,7 +5595,7 @@ function gr(e, t, n, r) {
|
|
|
5595
5595
|
return;
|
|
5596
5596
|
}
|
|
5597
5597
|
const d = u > 0 ? e.getPanel(t[u - 1].id) : void 0, c = !d && u + 1 < t.length ? e.getPanel(t[u + 1].id) : void 0;
|
|
5598
|
-
|
|
5598
|
+
hr(
|
|
5599
5599
|
e,
|
|
5600
5600
|
s,
|
|
5601
5601
|
d ? { referencePanel: d, direction: "right" } : c ? { referencePanel: c, direction: "left" } : void 0
|
|
@@ -5620,23 +5620,23 @@ function vu({
|
|
|
5620
5620
|
storageKey: s,
|
|
5621
5621
|
onDropSession: u
|
|
5622
5622
|
}) {
|
|
5623
|
-
var
|
|
5623
|
+
var b;
|
|
5624
5624
|
const a = N(null), d = N(!1), c = N(null), f = N(/* @__PURE__ */ new Map()), p = N({ panes: e, activePaneId: t ?? null, onActivePaneChange: r, onDropSession: u, storageKey: s });
|
|
5625
5625
|
p.current = { panes: e, activePaneId: t ?? null, onActivePaneChange: r, onDropSession: u, storageKey: s };
|
|
5626
|
-
const
|
|
5626
|
+
const h = t ?? ((b = e[0]) == null ? void 0 : b.id) ?? null, v = Y(() => ({
|
|
5627
5627
|
panes: e,
|
|
5628
|
-
activePaneId:
|
|
5628
|
+
activePaneId: h,
|
|
5629
5629
|
flashPaneId: i ?? null,
|
|
5630
5630
|
renderPane: n,
|
|
5631
5631
|
onActivePaneChange: r,
|
|
5632
5632
|
onClosePane: e.length > 1 ? o : void 0
|
|
5633
|
-
}), [e,
|
|
5633
|
+
}), [e, h, i, n, r, o]), g = R((y) => {
|
|
5634
5634
|
const z = y.api;
|
|
5635
5635
|
a.current = z;
|
|
5636
5636
|
const { panes: M, activePaneId: k, storageKey: I } = p.current;
|
|
5637
5637
|
d.current = !0;
|
|
5638
5638
|
try {
|
|
5639
|
-
const A = I ?
|
|
5639
|
+
const A = I ? hu(I, M.map((P) => P.id)) : null;
|
|
5640
5640
|
if (A)
|
|
5641
5641
|
try {
|
|
5642
5642
|
z.fromJSON(A);
|
|
@@ -5646,7 +5646,7 @@ function vu({
|
|
|
5646
5646
|
} finally {
|
|
5647
5647
|
d.current = !1;
|
|
5648
5648
|
}
|
|
5649
|
-
const
|
|
5649
|
+
const m = z.onDidActivePanelChange((A) => {
|
|
5650
5650
|
var F, V;
|
|
5651
5651
|
if (d.current) return;
|
|
5652
5652
|
const P = A == null ? void 0 : A.id;
|
|
@@ -5660,13 +5660,13 @@ function vu({
|
|
|
5660
5660
|
}), W = z.onUnhandledDragOverEvent((A) => {
|
|
5661
5661
|
var F;
|
|
5662
5662
|
const P = (F = A.nativeEvent.dataTransfer) == null ? void 0 : F.types;
|
|
5663
|
-
P && Array.from(P).includes(
|
|
5663
|
+
P && Array.from(P).includes(mn) && A.accept();
|
|
5664
5664
|
}), _ = z.onDidDrop((A) => {
|
|
5665
5665
|
var F, V, X, pe, ne;
|
|
5666
|
-
const P = (F = A.nativeEvent.dataTransfer) == null ? void 0 : F.getData(
|
|
5666
|
+
const P = (F = A.nativeEvent.dataTransfer) == null ? void 0 : F.getData(mn);
|
|
5667
5667
|
P && (f.current.set(P, {
|
|
5668
5668
|
referencePanelId: ((X = (V = A.group) == null ? void 0 : V.activePanel) == null ? void 0 : X.id) ?? null,
|
|
5669
|
-
direction:
|
|
5669
|
+
direction: mu(A.position)
|
|
5670
5670
|
}), (ne = (pe = p.current).onDropSession) == null || ne.call(pe, P));
|
|
5671
5671
|
});
|
|
5672
5672
|
let j = null;
|
|
@@ -5675,7 +5675,7 @@ function vu({
|
|
|
5675
5675
|
A && (j && clearTimeout(j), j = setTimeout(() => gu(A, z.toJSON()), pu));
|
|
5676
5676
|
});
|
|
5677
5677
|
c.current = () => {
|
|
5678
|
-
j && clearTimeout(j),
|
|
5678
|
+
j && clearTimeout(j), m.dispose(), L.dispose(), W.dispose(), _.dispose(), T.dispose();
|
|
5679
5679
|
};
|
|
5680
5680
|
}, []);
|
|
5681
5681
|
return O(() => () => {
|
|
@@ -5686,12 +5686,12 @@ function vu({
|
|
|
5686
5686
|
if (y) {
|
|
5687
5687
|
d.current = !0;
|
|
5688
5688
|
try {
|
|
5689
|
-
gr(y, e,
|
|
5689
|
+
gr(y, e, h, f.current);
|
|
5690
5690
|
} finally {
|
|
5691
5691
|
d.current = !1;
|
|
5692
5692
|
}
|
|
5693
5693
|
}
|
|
5694
|
-
}, [e,
|
|
5694
|
+
}, [e, h]), e.length === 0 ? null : /* @__PURE__ */ l(Io.Provider, { value: v, children: /* @__PURE__ */ l(
|
|
5695
5695
|
"div",
|
|
5696
5696
|
{
|
|
5697
5697
|
"data-boring-workspace-part": "chat-pane-stage",
|
|
@@ -5795,20 +5795,20 @@ function wu(e) {
|
|
|
5795
5795
|
u.preventDefault(), u.stopPropagation(), (a = t.onClosePane) == null || a.call(t, n.id);
|
|
5796
5796
|
},
|
|
5797
5797
|
"aria-label": `Close ${r} pane`,
|
|
5798
|
-
children: /* @__PURE__ */ l(
|
|
5798
|
+
children: /* @__PURE__ */ l(hn, { className: "h-3 w-3", strokeWidth: 2.25 })
|
|
5799
5799
|
}
|
|
5800
5800
|
) }) : null
|
|
5801
5801
|
]
|
|
5802
5802
|
}
|
|
5803
5803
|
);
|
|
5804
5804
|
}
|
|
5805
|
-
function
|
|
5805
|
+
function Rf(e) {
|
|
5806
5806
|
return /* @__PURE__ */ l(vu, { ...e });
|
|
5807
5807
|
}
|
|
5808
5808
|
function Ft(e) {
|
|
5809
5809
|
return e.title || "Untitled";
|
|
5810
5810
|
}
|
|
5811
|
-
const
|
|
5811
|
+
const mn = "application/x-boring-chat-session";
|
|
5812
5812
|
function ku({ dimmed: e, flash: t }) {
|
|
5813
5813
|
return /* @__PURE__ */ l(
|
|
5814
5814
|
"div",
|
|
@@ -5854,18 +5854,18 @@ function br(e) {
|
|
|
5854
5854
|
function xu(e) {
|
|
5855
5855
|
const n = br(/* @__PURE__ */ new Date()), r = n - yr, o = n - 7 * yr, i = [], s = [], u = [], a = [], d = [];
|
|
5856
5856
|
for (const p of e) {
|
|
5857
|
-
const
|
|
5858
|
-
if (!
|
|
5857
|
+
const h = Rt(p.updatedAt);
|
|
5858
|
+
if (!h) {
|
|
5859
5859
|
d.push(p);
|
|
5860
5860
|
continue;
|
|
5861
5861
|
}
|
|
5862
|
-
const v = br(
|
|
5862
|
+
const v = br(h);
|
|
5863
5863
|
v >= n ? i.push(p) : v >= r ? s.push(p) : v >= o ? u.push(p) : a.push(p);
|
|
5864
5864
|
}
|
|
5865
|
-
const c = (p,
|
|
5866
|
-
var
|
|
5867
|
-
const v = ((
|
|
5868
|
-
return (((y = Rt(
|
|
5865
|
+
const c = (p, h) => {
|
|
5866
|
+
var b, y;
|
|
5867
|
+
const v = ((b = Rt(p.updatedAt)) == null ? void 0 : b.getTime()) ?? 0;
|
|
5868
|
+
return (((y = Rt(h.updatedAt)) == null ? void 0 : y.getTime()) ?? 0) - v;
|
|
5869
5869
|
}, f = [];
|
|
5870
5870
|
return i.length && f.push({ key: "today", label: "Today", items: i.sort(c) }), s.length && f.push({ key: "yesterday", label: "Yesterday", items: s.sort(c) }), u.length && f.push({ key: "week", label: "This week", items: u.sort(c) }), a.length && f.push({ key: "earlier", label: "Earlier", items: a.sort(c) }), d.length && f.push({ key: "undated", label: "Other", items: d }), f;
|
|
5871
5871
|
}
|
|
@@ -5923,9 +5923,9 @@ function Iu({
|
|
|
5923
5923
|
hasMore: c = !1,
|
|
5924
5924
|
loadingMore: f = !1,
|
|
5925
5925
|
onClose: p,
|
|
5926
|
-
className:
|
|
5926
|
+
className: h
|
|
5927
5927
|
}) {
|
|
5928
|
-
const v = Y(() => new Set(n ?? []), [n]), g = Y(() => new Set(r ?? []), [r]),
|
|
5928
|
+
const v = Y(() => new Set(n ?? []), [n]), g = Y(() => new Set(r ?? []), [r]), b = Y(
|
|
5929
5929
|
() => (r ?? []).map((P) => e.find((F) => F.id === P)).filter((P) => !!P),
|
|
5930
5930
|
[r, e]
|
|
5931
5931
|
), y = Y(
|
|
@@ -5934,7 +5934,7 @@ function Iu({
|
|
|
5934
5934
|
), z = Y(
|
|
5935
5935
|
() => v.size > 0 || g.size > 0 ? e.filter((P) => !v.has(P.id) && !g.has(P.id)) : e,
|
|
5936
5936
|
[v, g, e]
|
|
5937
|
-
), M = Y(() => xu(z), [z]), [k, I] = B(!1), [
|
|
5937
|
+
), M = Y(() => xu(z), [z]), [k, I] = B(!1), [m, L] = B(!1), [W, _] = B(
|
|
5938
5938
|
() => ((n == null ? void 0 : n.length) ?? 0) > 0 || ((r == null ? void 0 : r.length) ?? 0) > 0
|
|
5939
5939
|
), j = Su(), { blockers: T } = Po(), A = Y(() => {
|
|
5940
5940
|
const P = /* @__PURE__ */ new Map();
|
|
@@ -5953,7 +5953,7 @@ function Iu({
|
|
|
5953
5953
|
"data-boring-workspace-part": "session-list",
|
|
5954
5954
|
className: re(
|
|
5955
5955
|
"flex h-full min-h-0 flex-col bg-[color:oklch(from_var(--background)_calc(l-0.01)_c_h)]",
|
|
5956
|
-
|
|
5956
|
+
h
|
|
5957
5957
|
),
|
|
5958
5958
|
role: "navigation",
|
|
5959
5959
|
"aria-label": "Session history",
|
|
@@ -5971,18 +5971,18 @@ function Iu({
|
|
|
5971
5971
|
/* @__PURE__ */ l("br", {}),
|
|
5972
5972
|
"Start a new chat to begin."
|
|
5973
5973
|
] }),
|
|
5974
|
-
|
|
5974
|
+
b.length > 0 && /* @__PURE__ */ x("section", { "data-boring-workspace-part": "session-pinned-section", children: [
|
|
5975
5975
|
/* @__PURE__ */ l(
|
|
5976
5976
|
tn,
|
|
5977
5977
|
{
|
|
5978
5978
|
label: "Pinned",
|
|
5979
|
-
count:
|
|
5980
|
-
attentionCount: en(
|
|
5979
|
+
count: b.length,
|
|
5980
|
+
attentionCount: en(b, A),
|
|
5981
5981
|
collapsed: k,
|
|
5982
5982
|
onToggle: () => I((P) => !P)
|
|
5983
5983
|
}
|
|
5984
5984
|
),
|
|
5985
|
-
!k && /* @__PURE__ */ l("ul", { role: "list", className: "flex flex-col", children:
|
|
5985
|
+
!k && /* @__PURE__ */ l("ul", { role: "list", className: "flex flex-col", children: b.map((P) => /* @__PURE__ */ l(
|
|
5986
5986
|
nn,
|
|
5987
5987
|
{
|
|
5988
5988
|
session: P,
|
|
@@ -5999,18 +5999,18 @@ function Iu({
|
|
|
5999
5999
|
P.id
|
|
6000
6000
|
)) })
|
|
6001
6001
|
] }),
|
|
6002
|
-
y.length > 0 && /* @__PURE__ */ x("section", { "data-boring-workspace-part": "session-active-section", className: re(
|
|
6002
|
+
y.length > 0 && /* @__PURE__ */ x("section", { "data-boring-workspace-part": "session-active-section", className: re(b.length > 0 && "mt-3"), children: [
|
|
6003
6003
|
/* @__PURE__ */ l(
|
|
6004
6004
|
tn,
|
|
6005
6005
|
{
|
|
6006
6006
|
label: "Active",
|
|
6007
6007
|
count: y.length,
|
|
6008
6008
|
attentionCount: en(y, A),
|
|
6009
|
-
collapsed:
|
|
6009
|
+
collapsed: m,
|
|
6010
6010
|
onToggle: () => L((P) => !P)
|
|
6011
6011
|
}
|
|
6012
6012
|
),
|
|
6013
|
-
!
|
|
6013
|
+
!m && /* @__PURE__ */ l("ul", { role: "list", className: "flex flex-col", children: y.map((P) => /* @__PURE__ */ l(
|
|
6014
6014
|
nn,
|
|
6015
6015
|
{
|
|
6016
6016
|
session: P,
|
|
@@ -6157,7 +6157,7 @@ function nn({
|
|
|
6157
6157
|
onClick: () => s == null ? void 0 : s(e.id),
|
|
6158
6158
|
draggable: !0,
|
|
6159
6159
|
onDragStart: (f) => {
|
|
6160
|
-
f.dataTransfer.setData(
|
|
6160
|
+
f.dataTransfer.setData(mn, e.id), f.dataTransfer.setData("text/plain", e.title || e.id), f.dataTransfer.effectAllowed = "copyMove";
|
|
6161
6161
|
},
|
|
6162
6162
|
children: [
|
|
6163
6163
|
n && /* @__PURE__ */ l(
|
|
@@ -6318,16 +6318,16 @@ function No({
|
|
|
6318
6318
|
});
|
|
6319
6319
|
}
|
|
6320
6320
|
return U;
|
|
6321
|
-
}, [c]), [p,
|
|
6321
|
+
}, [c]), [p, h] = B(n ?? ""), v = f.some((U) => U.id === p) ? p : ((se = f[0]) == null ? void 0 : se.id) ?? "", [g, b] = B(!1), [y, z] = B(""), [M, k] = B(""), I = N(null), [m, L] = B(null), W = R((U) => {
|
|
6322
6322
|
L(U);
|
|
6323
6323
|
}, []), _ = N(void 0);
|
|
6324
6324
|
O(() => (clearTimeout(_.current), _.current = setTimeout(() => k(y), 180), () => clearTimeout(_.current)), [y]), O(() => {
|
|
6325
6325
|
var U;
|
|
6326
6326
|
g && ((U = I.current) == null || U.focus());
|
|
6327
6327
|
}, [g]), O(() => {
|
|
6328
|
-
f.length > 0 && !f.some((U) => U.id === p) &&
|
|
6328
|
+
f.length > 0 && !f.some((U) => U.id === p) && h(f[0].id);
|
|
6329
6329
|
}, [p, f]), O(() => {
|
|
6330
|
-
r && f.some((U) => U.id === wr) &&
|
|
6330
|
+
r && f.some((U) => U.id === wr) && h(wr);
|
|
6331
6331
|
}, [r, f]);
|
|
6332
6332
|
const j = R((U) => {
|
|
6333
6333
|
var Ee;
|
|
@@ -6340,11 +6340,11 @@ function No({
|
|
|
6340
6340
|
title: de.title
|
|
6341
6341
|
});
|
|
6342
6342
|
}, [o, d]), T = R((U) => {
|
|
6343
|
-
|
|
6343
|
+
h(U.id), j(U);
|
|
6344
6344
|
}, [j]), A = R(() => {
|
|
6345
|
-
|
|
6345
|
+
b((U) => (U && z(""), !U));
|
|
6346
6346
|
}, []), P = R((U) => {
|
|
6347
|
-
U.key === "Escape" && (U.preventDefault(),
|
|
6347
|
+
U.key === "Escape" && (U.preventDefault(), b(!1), z(""));
|
|
6348
6348
|
}, []), F = f.find((U) => U.id === v), V = !!((Z = F == null ? void 0 : F.panel) != null && Z.chromeless), X = !V, pe = Y(
|
|
6349
6349
|
() => ({
|
|
6350
6350
|
rootDir: e,
|
|
@@ -6352,10 +6352,10 @@ function No({
|
|
|
6352
6352
|
query: M,
|
|
6353
6353
|
searchQuery: M || void 0,
|
|
6354
6354
|
chromeless: !0,
|
|
6355
|
-
chromeActionsElement:
|
|
6355
|
+
chromeActionsElement: m,
|
|
6356
6356
|
revealFileTreeRequest: r
|
|
6357
6357
|
}),
|
|
6358
|
-
[t,
|
|
6358
|
+
[t, m, M, r, e]
|
|
6359
6359
|
), ne = /* @__PURE__ */ x(
|
|
6360
6360
|
"nav",
|
|
6361
6361
|
{
|
|
@@ -6446,7 +6446,7 @@ function No({
|
|
|
6446
6446
|
size: "icon-xs",
|
|
6447
6447
|
onClick: () => z(""),
|
|
6448
6448
|
"aria-label": "Clear search",
|
|
6449
|
-
children: /* @__PURE__ */ l(
|
|
6449
|
+
children: /* @__PURE__ */ l(hn, { className: "h-3 w-3" })
|
|
6450
6450
|
}
|
|
6451
6451
|
)
|
|
6452
6452
|
] }),
|
|
@@ -6521,34 +6521,38 @@ const Lu = {
|
|
|
6521
6521
|
groups: [{ id: "artifacts", position: "center", dynamic: !0 }]
|
|
6522
6522
|
};
|
|
6523
6523
|
function Wu(e, t) {
|
|
6524
|
-
if (typeof window > "u") return;
|
|
6524
|
+
if (typeof window > "u") return { status: "empty" };
|
|
6525
6525
|
let n;
|
|
6526
6526
|
try {
|
|
6527
6527
|
n = window.localStorage.getItem(e);
|
|
6528
6528
|
} catch {
|
|
6529
|
-
return;
|
|
6529
|
+
return { status: "empty" };
|
|
6530
6530
|
}
|
|
6531
|
-
if (!n) return;
|
|
6531
|
+
if (!n) return { status: "empty" };
|
|
6532
6532
|
let r;
|
|
6533
6533
|
try {
|
|
6534
6534
|
r = JSON.parse(n);
|
|
6535
6535
|
} catch {
|
|
6536
|
-
return;
|
|
6536
|
+
return { status: "invalid" };
|
|
6537
6537
|
}
|
|
6538
|
-
if (!r || typeof r != "object") return;
|
|
6538
|
+
if (!r || typeof r != "object") return { status: "invalid" };
|
|
6539
6539
|
const o = r;
|
|
6540
|
-
if (o.v !== Ao) return;
|
|
6540
|
+
if (o.v !== Ao) return { status: "invalid" };
|
|
6541
6541
|
const i = o.layout;
|
|
6542
|
-
if (!i || typeof i != "object") return;
|
|
6542
|
+
if (!i || typeof i != "object") return { status: "invalid" };
|
|
6543
6543
|
const s = i.panels;
|
|
6544
|
-
if (!
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
}
|
|
6550
|
-
return i;
|
|
6544
|
+
if (!s || typeof s != "object") return { status: "invalid" };
|
|
6545
|
+
for (const u of Object.values(s)) {
|
|
6546
|
+
if (!u || typeof u != "object") return { status: "invalid" };
|
|
6547
|
+
const a = u.contentComponent;
|
|
6548
|
+
if (typeof a != "string") return { status: "invalid" };
|
|
6549
|
+
if (t && !t.has(a)) return { status: "blocked-by-allowed-panels" };
|
|
6551
6550
|
}
|
|
6551
|
+
return { status: "ready", layout: i };
|
|
6552
|
+
}
|
|
6553
|
+
function ju(e) {
|
|
6554
|
+
const t = e.panels;
|
|
6555
|
+
return !!(t && typeof t == "object" && Object.keys(t).length > 0);
|
|
6552
6556
|
}
|
|
6553
6557
|
function Do({
|
|
6554
6558
|
visible: e = !0,
|
|
@@ -6562,22 +6566,24 @@ function Do({
|
|
|
6562
6566
|
watermarkComponent: a,
|
|
6563
6567
|
className: d
|
|
6564
6568
|
}) {
|
|
6565
|
-
const c = !!(o || r), f = (n == null ? void 0 : n.slice().sort().join("\0")) ?? "*", p = Y(
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
}, [
|
|
6569
|
-
(
|
|
6569
|
+
const c = !!(o || r), f = (n == null ? void 0 : n.slice().sort().join("\0")) ?? "*", p = Y(
|
|
6570
|
+
() => n ? new Set(n) : void 0,
|
|
6571
|
+
[n]
|
|
6572
|
+
), h = Y(() => c ? { status: "empty" } : Wu(t, p), [p, c, t]), v = h.status === "ready" ? h.layout : void 0, g = R(
|
|
6573
|
+
(b) => {
|
|
6570
6574
|
if (o) {
|
|
6571
|
-
o(
|
|
6575
|
+
o(b);
|
|
6572
6576
|
return;
|
|
6573
6577
|
}
|
|
6574
|
-
|
|
6578
|
+
if (h.status === "blocked-by-allowed-panels" && !ju(b))
|
|
6579
|
+
return;
|
|
6580
|
+
const y = { v: Ao, layout: b };
|
|
6575
6581
|
try {
|
|
6576
|
-
window.localStorage.setItem(t, JSON.stringify(
|
|
6582
|
+
window.localStorage.setItem(t, JSON.stringify(y));
|
|
6577
6583
|
} catch {
|
|
6578
6584
|
}
|
|
6579
6585
|
},
|
|
6580
|
-
[o, t]
|
|
6586
|
+
[h.status, o, t]
|
|
6581
6587
|
);
|
|
6582
6588
|
return e ? /* @__PURE__ */ l(
|
|
6583
6589
|
"div",
|
|
@@ -6588,8 +6594,8 @@ function Do({
|
|
|
6588
6594
|
uc,
|
|
6589
6595
|
{
|
|
6590
6596
|
layout: Mu,
|
|
6591
|
-
persistedLayout: r ??
|
|
6592
|
-
onLayoutChange:
|
|
6597
|
+
persistedLayout: r ?? v,
|
|
6598
|
+
onLayoutChange: g,
|
|
6593
6599
|
onReady: i,
|
|
6594
6600
|
allowedPanels: n,
|
|
6595
6601
|
prefixHeaderActions: s,
|
|
@@ -6617,7 +6623,7 @@ function kr(e, t) {
|
|
|
6617
6623
|
}
|
|
6618
6624
|
);
|
|
6619
6625
|
}
|
|
6620
|
-
function
|
|
6626
|
+
function zu(e) {
|
|
6621
6627
|
return e.kind !== Je ? e : {
|
|
6622
6628
|
...e,
|
|
6623
6629
|
target: Nt(e.target)
|
|
@@ -6647,7 +6653,7 @@ function ze() {
|
|
|
6647
6653
|
function xt(e, t) {
|
|
6648
6654
|
return { seq: ++Fo, status: "error", error: { code: e, message: t } };
|
|
6649
6655
|
}
|
|
6650
|
-
function
|
|
6656
|
+
function Bu({
|
|
6651
6657
|
rootDir: e = "",
|
|
6652
6658
|
sidebarDefaultWidth: t = 240,
|
|
6653
6659
|
sidebarMinWidth: n = 180,
|
|
@@ -6662,14 +6668,14 @@ function zu({
|
|
|
6662
6668
|
initialPanels: f,
|
|
6663
6669
|
className: p
|
|
6664
6670
|
}) {
|
|
6665
|
-
const [
|
|
6671
|
+
const [h, v] = B(() => {
|
|
6666
6672
|
if (!o) return !1;
|
|
6667
6673
|
try {
|
|
6668
6674
|
return localStorage.getItem(`${o}:sidebarCollapsed`) === "1";
|
|
6669
6675
|
} catch {
|
|
6670
6676
|
return !1;
|
|
6671
6677
|
}
|
|
6672
|
-
}), [g,
|
|
6678
|
+
}), [g, b] = B(() => {
|
|
6673
6679
|
if (!o) return t;
|
|
6674
6680
|
try {
|
|
6675
6681
|
const C = localStorage.getItem(`${o}:sidebarWidth`);
|
|
@@ -6679,7 +6685,7 @@ function zu({
|
|
|
6679
6685
|
} catch {
|
|
6680
6686
|
return t;
|
|
6681
6687
|
}
|
|
6682
|
-
}), y = N(null), z = N(null), M = N(null), [k, I] = B(null), [
|
|
6688
|
+
}), y = N(null), z = N(null), M = N(null), [k, I] = B(null), [m, L] = B(null), W = N(i);
|
|
6683
6689
|
W.current = i;
|
|
6684
6690
|
const _ = N(s);
|
|
6685
6691
|
_.current = s;
|
|
@@ -6732,9 +6738,9 @@ function zu({
|
|
|
6732
6738
|
});
|
|
6733
6739
|
return;
|
|
6734
6740
|
}
|
|
6735
|
-
const
|
|
6736
|
-
if (
|
|
6737
|
-
|
|
6741
|
+
const he = kr($, D);
|
|
6742
|
+
if (he) {
|
|
6743
|
+
he.api.setActive();
|
|
6738
6744
|
return;
|
|
6739
6745
|
}
|
|
6740
6746
|
console.warn(`[SurfaceShell] openFile: no surface resolver matched "${D}"`);
|
|
@@ -6745,16 +6751,16 @@ function zu({
|
|
|
6745
6751
|
console.warn("[SurfaceShell] openSurface: surface not ready (dockview not initialized)");
|
|
6746
6752
|
return;
|
|
6747
6753
|
}
|
|
6748
|
-
const D =
|
|
6754
|
+
const D = zu(C), H = se.current.resolve(D);
|
|
6749
6755
|
if (!H) {
|
|
6750
6756
|
console.warn(`[SurfaceShell] openSurface: no resolver matched kind="${D.kind}" target="${D.target}"`);
|
|
6751
6757
|
return;
|
|
6752
6758
|
}
|
|
6753
6759
|
const oe = rn(D, H);
|
|
6754
6760
|
D.kind === Je && A.current.add(oe);
|
|
6755
|
-
const
|
|
6756
|
-
if (
|
|
6757
|
-
ve &&
|
|
6761
|
+
const he = $.getPanel(oe), we = ((vt = D.meta) == null ? void 0 : vt.closeWorkbenchOnDone) === !0, le = D.kind === Je ? on(H.params, D.target) : H.params, ve = we && j.current ? { ...le ?? {}, __closeWorkbenchOnDone: j.current } : le;
|
|
6762
|
+
if (he) {
|
|
6763
|
+
ve && he.api.updateParameters(ve), he.api.setActive();
|
|
6758
6764
|
return;
|
|
6759
6765
|
}
|
|
6760
6766
|
const gt = ne.current;
|
|
@@ -6780,7 +6786,7 @@ function zu({
|
|
|
6780
6786
|
}
|
|
6781
6787
|
const H = ne.current;
|
|
6782
6788
|
if (!H.has(C.component)) {
|
|
6783
|
-
const oe = H.list().map((
|
|
6789
|
+
const oe = H.list().map((he) => he.id).join(", ");
|
|
6784
6790
|
throw new Error(
|
|
6785
6791
|
`openPanel: unknown component "${C.component}". Registered panels: [${oe}]. Add the component to WorkspaceProvider's "panels" prop, or pick one of the registered ids.`
|
|
6786
6792
|
);
|
|
@@ -6821,7 +6827,7 @@ function zu({
|
|
|
6821
6827
|
id: le.id,
|
|
6822
6828
|
component: String(le.component ?? ""),
|
|
6823
6829
|
params: le.params ?? void 0
|
|
6824
|
-
})) : [], D = ((we = C == null ? void 0 : C.activePanel) == null ? void 0 : we.id) ?? null, H = A.current, oe = $.find((le) => le.id === D),
|
|
6830
|
+
})) : [], D = ((we = C == null ? void 0 : C.activePanel) == null ? void 0 : we.id) ?? null, H = A.current, oe = $.find((le) => le.id === D), he = Sr(oe, H);
|
|
6825
6831
|
return {
|
|
6826
6832
|
hydrationComplete: !0,
|
|
6827
6833
|
layout: null,
|
|
@@ -6830,7 +6836,7 @@ function zu({
|
|
|
6830
6836
|
preferences: { theme: "dark" },
|
|
6831
6837
|
panels: $,
|
|
6832
6838
|
activePanel: D,
|
|
6833
|
-
activeFile:
|
|
6839
|
+
activeFile: he,
|
|
6834
6840
|
visibleFiles: $.map((le) => Sr(le, H)).filter((le) => le !== null),
|
|
6835
6841
|
dirtyFiles: {},
|
|
6836
6842
|
notifications: []
|
|
@@ -6877,8 +6883,8 @@ function zu({
|
|
|
6877
6883
|
params: le
|
|
6878
6884
|
}), ze());
|
|
6879
6885
|
}
|
|
6880
|
-
const
|
|
6881
|
-
return
|
|
6886
|
+
const he = kr($, D);
|
|
6887
|
+
return he ? (he.api.setActive(), ze()) : xt("NO_SURFACE_RESOLVER", `no registered surface resolver handles ${D}`);
|
|
6882
6888
|
} catch ($) {
|
|
6883
6889
|
return xt(
|
|
6884
6890
|
"INVALID_SURFACE_PATH",
|
|
@@ -6917,27 +6923,27 @@ function zu({
|
|
|
6917
6923
|
}
|
|
6918
6924
|
}), [Ve, ce, Ie]), fe = R(
|
|
6919
6925
|
(C) => {
|
|
6920
|
-
if (
|
|
6926
|
+
if (h) return;
|
|
6921
6927
|
C.preventDefault(), C.currentTarget.setPointerCapture(C.pointerId), M.current = { startX: C.clientX, startWidth: g };
|
|
6922
6928
|
},
|
|
6923
|
-
[
|
|
6929
|
+
[h, g]
|
|
6924
6930
|
), Ae = R(
|
|
6925
6931
|
(C) => {
|
|
6926
6932
|
const $ = M.current;
|
|
6927
6933
|
if (!$) return;
|
|
6928
6934
|
const D = C.clientX - $.startX, H = Math.max(n, Math.min(r, $.startWidth + D));
|
|
6929
|
-
|
|
6935
|
+
b(H);
|
|
6930
6936
|
},
|
|
6931
6937
|
[n, r]
|
|
6932
6938
|
), Re = R((C) => {
|
|
6933
6939
|
M.current && (M.current = null, C.currentTarget.releasePointerCapture(C.pointerId));
|
|
6934
6940
|
}, []), Qe = R(
|
|
6935
6941
|
(C) => {
|
|
6936
|
-
if (
|
|
6942
|
+
if (h) return;
|
|
6937
6943
|
const $ = C.shiftKey ? 32 : 16;
|
|
6938
|
-
C.key === "ArrowLeft" ? (C.preventDefault(),
|
|
6944
|
+
C.key === "ArrowLeft" ? (C.preventDefault(), b((D) => Math.max(n, D - $))) : C.key === "ArrowRight" ? (C.preventDefault(), b((D) => Math.min(r, D + $))) : C.key === "Home" ? (C.preventDefault(), b(n)) : C.key === "End" && (C.preventDefault(), b(r));
|
|
6939
6945
|
},
|
|
6940
|
-
[
|
|
6946
|
+
[h, n, r]
|
|
6941
6947
|
);
|
|
6942
6948
|
return O(() => {
|
|
6943
6949
|
if (o)
|
|
@@ -6948,10 +6954,10 @@ function zu({
|
|
|
6948
6954
|
}, [o, g]), O(() => {
|
|
6949
6955
|
if (o)
|
|
6950
6956
|
try {
|
|
6951
|
-
localStorage.setItem(`${o}:sidebarCollapsed`,
|
|
6957
|
+
localStorage.setItem(`${o}:sidebarCollapsed`, h ? "1" : "0");
|
|
6952
6958
|
} catch {
|
|
6953
6959
|
}
|
|
6954
|
-
}, [o,
|
|
6960
|
+
}, [o, h]), /* @__PURE__ */ x(
|
|
6955
6961
|
"div",
|
|
6956
6962
|
{
|
|
6957
6963
|
ref: z,
|
|
@@ -6959,7 +6965,7 @@ function zu({
|
|
|
6959
6965
|
className: re("flex h-full min-h-0 w-full bg-background", p),
|
|
6960
6966
|
"data-testid": "surface-shell",
|
|
6961
6967
|
children: [
|
|
6962
|
-
|
|
6968
|
+
h ? null : /* @__PURE__ */ x(We, { children: [
|
|
6963
6969
|
/* @__PURE__ */ l(
|
|
6964
6970
|
"aside",
|
|
6965
6971
|
{
|
|
@@ -6974,7 +6980,7 @@ function zu({
|
|
|
6974
6980
|
rootDir: e,
|
|
6975
6981
|
bridge: ye,
|
|
6976
6982
|
defaultTab: d,
|
|
6977
|
-
revealFileTreeRequest:
|
|
6983
|
+
revealFileTreeRequest: m,
|
|
6978
6984
|
onOpenPanel: de,
|
|
6979
6985
|
onReloadAgentPlugins: c,
|
|
6980
6986
|
onCollapse: () => v(!0)
|
|
@@ -7007,9 +7013,9 @@ function zu({
|
|
|
7007
7013
|
"div",
|
|
7008
7014
|
{
|
|
7009
7015
|
"data-boring-workspace-part": "surface-tabs",
|
|
7010
|
-
"data-boring-state":
|
|
7016
|
+
"data-boring-state": h ? "collapsed" : "expanded",
|
|
7011
7017
|
className: "workbench-dockview h-full",
|
|
7012
|
-
"data-collapsed-sources":
|
|
7018
|
+
"data-collapsed-sources": h ? "true" : void 0,
|
|
7013
7019
|
children: /* @__PURE__ */ l(
|
|
7014
7020
|
Do,
|
|
7015
7021
|
{
|
|
@@ -7026,7 +7032,7 @@ function zu({
|
|
|
7026
7032
|
className: "pointer-events-none absolute inset-x-0 top-0 flex items-center justify-between",
|
|
7027
7033
|
style: { height: 44, zIndex: 2e3 },
|
|
7028
7034
|
children: [
|
|
7029
|
-
/* @__PURE__ */ l("div", { children:
|
|
7035
|
+
/* @__PURE__ */ l("div", { children: h && /* @__PURE__ */ l(Oe, { label: "Show workspace menu", side: "right", children: /* @__PURE__ */ l(
|
|
7030
7036
|
xe,
|
|
7031
7037
|
{
|
|
7032
7038
|
type: "button",
|
|
@@ -7038,15 +7044,15 @@ function zu({
|
|
|
7038
7044
|
children: /* @__PURE__ */ l(At, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
7039
7045
|
}
|
|
7040
7046
|
) }) }),
|
|
7041
|
-
u && /* @__PURE__ */ l(
|
|
7047
|
+
u && /* @__PURE__ */ l(Uu, { onClose: u })
|
|
7042
7048
|
]
|
|
7043
7049
|
}
|
|
7044
7050
|
),
|
|
7045
7051
|
/* @__PURE__ */ l(
|
|
7046
|
-
|
|
7052
|
+
qu,
|
|
7047
7053
|
{
|
|
7048
7054
|
api: k,
|
|
7049
|
-
collapsed:
|
|
7055
|
+
collapsed: h,
|
|
7050
7056
|
onExpandFiles: () => v(!1)
|
|
7051
7057
|
}
|
|
7052
7058
|
)
|
|
@@ -7055,7 +7061,7 @@ function zu({
|
|
|
7055
7061
|
}
|
|
7056
7062
|
);
|
|
7057
7063
|
}
|
|
7058
|
-
function
|
|
7064
|
+
function Uu({ onClose: e }) {
|
|
7059
7065
|
return /* @__PURE__ */ l(
|
|
7060
7066
|
xe,
|
|
7061
7067
|
{
|
|
@@ -7070,7 +7076,7 @@ function Bu({ onClose: e }) {
|
|
|
7070
7076
|
}
|
|
7071
7077
|
);
|
|
7072
7078
|
}
|
|
7073
|
-
function
|
|
7079
|
+
function qu({
|
|
7074
7080
|
api: e,
|
|
7075
7081
|
collapsed: t,
|
|
7076
7082
|
onExpandFiles: n
|
|
@@ -7124,21 +7130,21 @@ function Uu({
|
|
|
7124
7130
|
] })
|
|
7125
7131
|
] }) : null;
|
|
7126
7132
|
}
|
|
7127
|
-
function
|
|
7128
|
-
return be(
|
|
7133
|
+
function Hu({ params: e }) {
|
|
7134
|
+
return be(Bu, e ?? {});
|
|
7129
7135
|
}
|
|
7130
|
-
const
|
|
7136
|
+
const Vu = {
|
|
7131
7137
|
id: "artifact-surface",
|
|
7132
7138
|
title: "Surface",
|
|
7133
|
-
component:
|
|
7139
|
+
component: Hu,
|
|
7134
7140
|
placement: "right",
|
|
7135
7141
|
source: "builtin"
|
|
7136
|
-
},
|
|
7142
|
+
}, Ku = [
|
|
7137
7143
|
iu,
|
|
7138
7144
|
Ru,
|
|
7139
7145
|
Lu,
|
|
7140
|
-
|
|
7141
|
-
], $e = "boring-ui:agent-plugins-reloaded",
|
|
7146
|
+
Vu
|
|
7147
|
+
], $e = "boring-ui:agent-plugins-reloaded", Gu = "PLUGIN_LOAD_FAILED";
|
|
7142
7148
|
globalThis.__BORING_RUNTIME_SINGLETONS__ = {
|
|
7143
7149
|
...globalThis.__BORING_RUNTIME_SINGLETONS__,
|
|
7144
7150
|
react: Yo,
|
|
@@ -7155,10 +7161,10 @@ function Oo(e, t) {
|
|
|
7155
7161
|
const n = e.includes("?") ? "&" : "?";
|
|
7156
7162
|
return `${e}${n}workspaceId=${encodeURIComponent(t)}`;
|
|
7157
7163
|
}
|
|
7158
|
-
function
|
|
7164
|
+
function Ju(e) {
|
|
7159
7165
|
return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(e) || e.startsWith("//");
|
|
7160
7166
|
}
|
|
7161
|
-
function
|
|
7167
|
+
function Yu(e, t) {
|
|
7162
7168
|
if (typeof fetch != "function") return;
|
|
7163
7169
|
const n = Oo(
|
|
7164
7170
|
En(e.apiBaseUrl ?? "", `/api/v1/agent-plugins/${encodeURIComponent(t.pluginId)}/front-error`),
|
|
@@ -7172,32 +7178,32 @@ function Ju(e, t) {
|
|
|
7172
7178
|
}).catch(() => {
|
|
7173
7179
|
});
|
|
7174
7180
|
}
|
|
7175
|
-
function
|
|
7176
|
-
return !t ||
|
|
7181
|
+
function Xu(e, t) {
|
|
7182
|
+
return !t || Ju(e) ? e : En(t, e.startsWith("/") ? e : `/${e}`);
|
|
7177
7183
|
}
|
|
7178
7184
|
function xr(e, t) {
|
|
7179
7185
|
var n;
|
|
7180
7186
|
if ((n = e.frontTarget) != null && n.entryUrl)
|
|
7181
|
-
return
|
|
7187
|
+
return Xu(e.frontTarget.entryUrl, t);
|
|
7182
7188
|
}
|
|
7183
|
-
function
|
|
7189
|
+
function Qu(e, t, n, r) {
|
|
7184
7190
|
return { panels: e, commands: t, catalogs: n, surfaceResolvers: r };
|
|
7185
7191
|
}
|
|
7186
|
-
function
|
|
7192
|
+
function Zu(e, t) {
|
|
7187
7193
|
if (!e) return;
|
|
7188
7194
|
const n = t.toLowerCase();
|
|
7189
7195
|
for (const [r, o] of Object.entries(e))
|
|
7190
7196
|
if (r.toLowerCase() === n) return o;
|
|
7191
7197
|
}
|
|
7192
|
-
function
|
|
7193
|
-
return /^Bearer\s+\S+/i.test(
|
|
7198
|
+
function ed(e) {
|
|
7199
|
+
return /^Bearer\s+\S+/i.test(Zu(e, "authorization") ?? "");
|
|
7194
7200
|
}
|
|
7195
|
-
function
|
|
7201
|
+
function td(e, t, n) {
|
|
7196
7202
|
const r = `${e}${e.includes("?") ? "&" : "?"}v=${t}`;
|
|
7197
7203
|
return n === void 0 ? r : `${r}&t=${encodeURIComponent(String(n))}`;
|
|
7198
7204
|
}
|
|
7199
7205
|
const Cr = 3e4;
|
|
7200
|
-
async function
|
|
7206
|
+
async function nd(e, t) {
|
|
7201
7207
|
let n = !1;
|
|
7202
7208
|
const r = new Promise((i, s) => {
|
|
7203
7209
|
setTimeout(() => {
|
|
@@ -7206,13 +7212,13 @@ async function td(e, t) {
|
|
|
7206
7212
|
}), o = await Promise.race([
|
|
7207
7213
|
import(
|
|
7208
7214
|
/* @vite-ignore */
|
|
7209
|
-
|
|
7215
|
+
td(e, t, Date.now())
|
|
7210
7216
|
),
|
|
7211
7217
|
r
|
|
7212
7218
|
]);
|
|
7213
7219
|
return n = !0, o;
|
|
7214
7220
|
}
|
|
7215
|
-
async function
|
|
7221
|
+
async function rd(e, t, n, r = nd) {
|
|
7216
7222
|
const o = await r(t, n);
|
|
7217
7223
|
if (typeof o.default != "function" || typeof o.default.pluginId != "string")
|
|
7218
7224
|
throw new Error(`plugin ${e} front module must default-export definePlugin({ id, ... })`);
|
|
@@ -7221,35 +7227,35 @@ async function nd(e, t, n, r = td) {
|
|
|
7221
7227
|
const i = Lr({ pluginId: e });
|
|
7222
7228
|
return await o.default(i), i.flush();
|
|
7223
7229
|
}
|
|
7224
|
-
const
|
|
7225
|
-
async function
|
|
7230
|
+
const od = 7, id = 750, sd = 1e4;
|
|
7231
|
+
async function ad({
|
|
7226
7232
|
pluginId: e,
|
|
7227
7233
|
frontEntryUrl: t,
|
|
7228
7234
|
revision: n,
|
|
7229
7235
|
importFront: r,
|
|
7230
7236
|
isStale: o,
|
|
7231
|
-
attempts: i =
|
|
7232
|
-
delayMs: s =
|
|
7237
|
+
attempts: i = od,
|
|
7238
|
+
delayMs: s = id
|
|
7233
7239
|
}) {
|
|
7234
7240
|
const u = Math.max(1, i);
|
|
7235
7241
|
let a;
|
|
7236
7242
|
for (let d = 0; d < u; d += 1) {
|
|
7237
7243
|
if (o()) throw a ?? new Error(`plugin ${e} front import superseded`);
|
|
7238
7244
|
try {
|
|
7239
|
-
return await
|
|
7245
|
+
return await rd(e, t, n, r);
|
|
7240
7246
|
} catch (c) {
|
|
7241
7247
|
if (a = c, d === u - 1 || o()) break;
|
|
7242
7248
|
console.warn(
|
|
7243
7249
|
`[boring-ui] plugin ${e} front import failed (attempt ${d + 1}/${u}); retrying`,
|
|
7244
7250
|
c
|
|
7245
7251
|
);
|
|
7246
|
-
const f = Math.min(s * 2 ** d,
|
|
7252
|
+
const f = Math.min(s * 2 ** d, sd);
|
|
7247
7253
|
await new Promise((p) => setTimeout(p, f));
|
|
7248
7254
|
}
|
|
7249
7255
|
}
|
|
7250
7256
|
throw a;
|
|
7251
7257
|
}
|
|
7252
|
-
function
|
|
7258
|
+
function cd(e, t, n) {
|
|
7253
7259
|
const r = [], o = new Map(n.panels.map((a) => [a.id, a]));
|
|
7254
7260
|
for (const a of n.panels)
|
|
7255
7261
|
r.push({
|
|
@@ -7308,7 +7314,7 @@ function ad(e, t, n) {
|
|
|
7308
7314
|
}));
|
|
7309
7315
|
return { panels: r, commands: i, catalogs: s, surfaceResolvers: u };
|
|
7310
7316
|
}
|
|
7311
|
-
function
|
|
7317
|
+
function ld(e, t) {
|
|
7312
7318
|
const n = [
|
|
7313
7319
|
t.providers.length > 0 ? `${t.providers.length} provider(s)` : null,
|
|
7314
7320
|
t.bindings.length > 0 ? `${t.bindings.length} binding(s)` : null
|
|
@@ -7317,16 +7323,16 @@ function cd(e, t) {
|
|
|
7317
7323
|
`[boring-ui] hot-loaded plugin "${e}" registered ${n}. Dynamic provider/binding mounting is not implemented yet, so this plugin's hot-loaded UI contributions were skipped to avoid rendering panels without their required provider tree.`
|
|
7318
7324
|
);
|
|
7319
7325
|
}
|
|
7320
|
-
function
|
|
7326
|
+
function ud(e) {
|
|
7321
7327
|
return e ?? "system/builtin";
|
|
7322
7328
|
}
|
|
7323
7329
|
function Ct(e, t, n, r) {
|
|
7324
7330
|
const o = `${e}.${t === "panel" ? "panel" : t}`;
|
|
7325
7331
|
return new Error(
|
|
7326
|
-
`PLUGIN_OUTPUT_ID_COLLISION: plugin "${e}" tried to register ${t} "${n}" already owned by "${
|
|
7332
|
+
`PLUGIN_OUTPUT_ID_COLLISION: plugin "${e}" tried to register ${t} "${n}" already owned by "${ud(r)}". Use a namespaced id like "${o}".`
|
|
7327
7333
|
);
|
|
7328
7334
|
}
|
|
7329
|
-
function
|
|
7335
|
+
function dd(e, t, n) {
|
|
7330
7336
|
for (const r of t.panels) {
|
|
7331
7337
|
const o = n.panels.get(r.id);
|
|
7332
7338
|
if (o && o.pluginId !== e)
|
|
@@ -7348,66 +7354,66 @@ function ud(e, t, n) {
|
|
|
7348
7354
|
throw Ct(e, "surface-resolver", r.id, o.pluginId);
|
|
7349
7355
|
}
|
|
7350
7356
|
}
|
|
7351
|
-
function
|
|
7352
|
-
(n.providers.length > 0 || n.bindings.length > 0) &&
|
|
7353
|
-
const o =
|
|
7354
|
-
|
|
7357
|
+
function fd(e, t, n, r) {
|
|
7358
|
+
(n.providers.length > 0 || n.bindings.length > 0) && ld(e, n);
|
|
7359
|
+
const o = cd(e, t, n);
|
|
7360
|
+
dd(e, o, r), r.panels.replaceByPluginId(e, o.panels), r.commands.replaceByPluginId(e, o.commands), r.catalogs.replaceByPluginId(e, o.catalogs), r.surfaceResolvers.replaceByPluginId(e, o.surfaceResolvers);
|
|
7355
7361
|
}
|
|
7356
7362
|
function Pt(e, t) {
|
|
7357
7363
|
t.panels.replaceByPluginId(e, []), t.commands.replaceByPluginId(e, []), t.catalogs.replaceByPluginId(e, []), t.surfaceResolvers.replaceByPluginId(e, []);
|
|
7358
7364
|
}
|
|
7359
|
-
function
|
|
7365
|
+
function pd(e) {
|
|
7360
7366
|
if (!e || typeof e != "object") return !0;
|
|
7361
7367
|
const t = e.type;
|
|
7362
7368
|
return typeof t != "string" || !t.startsWith("boring.plugin.");
|
|
7363
7369
|
}
|
|
7364
|
-
function
|
|
7370
|
+
function md(e) {
|
|
7365
7371
|
const t = Bt(), n = yn(), r = Ut(), o = Wr(), i = N(/* @__PURE__ */ new Map()), s = N(/* @__PURE__ */ new Map()), u = N(/* @__PURE__ */ new Set()), a = N(/* @__PURE__ */ new Set()), [d, c] = B(0), f = N(!1);
|
|
7366
7372
|
O(() => {
|
|
7367
7373
|
if (e.enabled === !1 || typeof EventSource > "u") return;
|
|
7368
|
-
const p = (
|
|
7369
|
-
const v =
|
|
7370
|
-
|
|
7374
|
+
const p = (h) => {
|
|
7375
|
+
const v = h.detail;
|
|
7376
|
+
pd(v) && (f.current = !0, c((g) => g + 1));
|
|
7371
7377
|
};
|
|
7372
7378
|
return window.addEventListener($e, p), () => window.removeEventListener($e, p);
|
|
7373
7379
|
}, [e.enabled]), O(() => {
|
|
7374
7380
|
if (e.enabled === !1 || typeof EventSource > "u") return;
|
|
7375
7381
|
const p = f.current;
|
|
7376
|
-
if (f.current = !1,
|
|
7382
|
+
if (f.current = !1, ed(e.authHeaders)) {
|
|
7377
7383
|
console.warn(
|
|
7378
7384
|
"[boring-ui] front plugin hot reload disabled: native EventSource cannot send Authorization bearer headers, and this server does not advertise a token-query fallback for /api/v1/agent-plugins/events."
|
|
7379
7385
|
);
|
|
7380
7386
|
return;
|
|
7381
7387
|
}
|
|
7382
|
-
let
|
|
7383
|
-
const v =
|
|
7388
|
+
let h = !1;
|
|
7389
|
+
const v = Qu(t, n, r, o), g = Oo(En(e.apiBaseUrl ?? "", "/api/v1/agent-plugins/events"), e.workspaceId), b = new EventSource(g, { withCredentials: !0 }), y = (I) => {
|
|
7384
7390
|
(async () => {
|
|
7385
7391
|
var W, _;
|
|
7386
|
-
let
|
|
7392
|
+
let m, L = !1;
|
|
7387
7393
|
try {
|
|
7388
|
-
if (
|
|
7389
|
-
|
|
7390
|
-
const j = p &&
|
|
7391
|
-
if (!j &&
|
|
7392
|
-
s.current.set(
|
|
7393
|
-
const P = xr(
|
|
7394
|
+
if (m = JSON.parse(I.data), h || m.workspaceId && e.workspaceId && m.workspaceId !== e.workspaceId) return;
|
|
7395
|
+
m.replay && u.current.add(m.id);
|
|
7396
|
+
const j = p && m.replay === !0, T = i.current.get(m.id) ?? 0, A = s.current.get(m.id) ?? 0;
|
|
7397
|
+
if (!j && m.revision <= Math.max(T, A)) return;
|
|
7398
|
+
s.current.set(m.id, m.revision);
|
|
7399
|
+
const P = xr(m, e.apiBaseUrl);
|
|
7394
7400
|
P && (L = !0, window.dispatchEvent(new CustomEvent($e, {
|
|
7395
7401
|
detail: {
|
|
7396
7402
|
type: "boring.plugin.front-pending",
|
|
7397
|
-
id:
|
|
7398
|
-
revision:
|
|
7399
|
-
workspaceId:
|
|
7400
|
-
replay:
|
|
7403
|
+
id: m.id,
|
|
7404
|
+
revision: m.revision,
|
|
7405
|
+
workspaceId: m.workspaceId ?? e.workspaceId,
|
|
7406
|
+
replay: m.replay
|
|
7401
7407
|
}
|
|
7402
7408
|
})));
|
|
7403
7409
|
let F = null;
|
|
7404
7410
|
try {
|
|
7405
|
-
F = P ? await
|
|
7406
|
-
pluginId:
|
|
7411
|
+
F = P ? await ad({
|
|
7412
|
+
pluginId: m.id,
|
|
7407
7413
|
frontEntryUrl: P,
|
|
7408
|
-
revision:
|
|
7414
|
+
revision: m.revision,
|
|
7409
7415
|
importFront: e.importFront,
|
|
7410
|
-
isStale: () =>
|
|
7416
|
+
isStale: () => h || s.current.get(m.id) !== m.revision,
|
|
7411
7417
|
...((W = e.frontImportRetry) == null ? void 0 : W.attempts) !== void 0 ? { attempts: e.frontImportRetry.attempts } : {},
|
|
7412
7418
|
...((_ = e.frontImportRetry) == null ? void 0 : _.delayMs) !== void 0 ? { delayMs: e.frontImportRetry.delayMs } : {}
|
|
7413
7419
|
}) : null;
|
|
@@ -7417,90 +7423,90 @@ function pd(e) {
|
|
|
7417
7423
|
error: V
|
|
7418
7424
|
};
|
|
7419
7425
|
}
|
|
7420
|
-
if (
|
|
7426
|
+
if (h || s.current.get(m.id) !== m.revision || !j && m.revision <= (i.current.get(m.id) ?? 0)) return;
|
|
7421
7427
|
if (!F) {
|
|
7422
|
-
a.current.has(
|
|
7428
|
+
a.current.has(m.id) && (Pt(m.id, v), a.current.delete(m.id)), i.current.set(m.id, m.revision);
|
|
7423
7429
|
return;
|
|
7424
7430
|
}
|
|
7425
7431
|
try {
|
|
7426
|
-
|
|
7432
|
+
fd(m.id, m.revision, F, v);
|
|
7427
7433
|
} catch (V) {
|
|
7428
7434
|
throw {
|
|
7429
7435
|
stage: "register",
|
|
7430
7436
|
error: V
|
|
7431
7437
|
};
|
|
7432
7438
|
}
|
|
7433
|
-
a.current.add(
|
|
7439
|
+
a.current.add(m.id), i.current.set(m.id, m.revision), window.dispatchEvent(new CustomEvent($e, { detail: m }));
|
|
7434
7440
|
} catch (j) {
|
|
7435
|
-
|
|
7441
|
+
m && s.current.get(m.id) === m.revision && s.current.delete(m.id);
|
|
7436
7442
|
const T = typeof j == "object" && j && "stage" in j && j.stage === "register" ? "register" : "import", A = typeof j == "object" && j && "error" in j ? j.error : j;
|
|
7437
|
-
if (
|
|
7438
|
-
const P = (
|
|
7439
|
-
if (console.error(`[boring-ui] failed to load plugin ${P}; keeping previous version`, A),
|
|
7440
|
-
const V = xr(
|
|
7441
|
-
pluginId:
|
|
7442
|
-
revision:
|
|
7443
|
+
if (h) return;
|
|
7444
|
+
const P = (m == null ? void 0 : m.id) ?? "<malformed>", F = A instanceof Error ? A.message : String(A);
|
|
7445
|
+
if (console.error(`[boring-ui] failed to load plugin ${P}; keeping previous version`, A), m) {
|
|
7446
|
+
const V = xr(m, e.apiBaseUrl), X = {
|
|
7447
|
+
pluginId: m.id,
|
|
7448
|
+
revision: m.revision,
|
|
7443
7449
|
message: F,
|
|
7444
7450
|
...V ? { url: V } : {}
|
|
7445
7451
|
};
|
|
7446
|
-
e.reportFrontError ? e.reportFrontError(X) :
|
|
7452
|
+
e.reportFrontError ? e.reportFrontError(X) : Yu(e, X), window.dispatchEvent(new CustomEvent($e, {
|
|
7447
7453
|
detail: {
|
|
7448
7454
|
type: "boring.plugin.front-error",
|
|
7449
|
-
id:
|
|
7450
|
-
revision:
|
|
7451
|
-
workspaceId:
|
|
7455
|
+
id: m.id,
|
|
7456
|
+
revision: m.revision,
|
|
7457
|
+
workspaceId: m.workspaceId ?? e.workspaceId,
|
|
7452
7458
|
message: F,
|
|
7453
|
-
code:
|
|
7459
|
+
code: Gu,
|
|
7454
7460
|
stage: T,
|
|
7455
|
-
replay:
|
|
7461
|
+
replay: m.replay
|
|
7456
7462
|
}
|
|
7457
7463
|
}));
|
|
7458
7464
|
}
|
|
7459
7465
|
} finally {
|
|
7460
|
-
L &&
|
|
7466
|
+
L && m && window.dispatchEvent(new CustomEvent($e, {
|
|
7461
7467
|
detail: {
|
|
7462
7468
|
type: "boring.plugin.front-settled",
|
|
7463
|
-
id:
|
|
7464
|
-
revision:
|
|
7465
|
-
workspaceId:
|
|
7466
|
-
replay:
|
|
7469
|
+
id: m.id,
|
|
7470
|
+
revision: m.revision,
|
|
7471
|
+
workspaceId: m.workspaceId ?? e.workspaceId,
|
|
7472
|
+
replay: m.replay
|
|
7467
7473
|
}
|
|
7468
7474
|
}));
|
|
7469
7475
|
}
|
|
7470
7476
|
})();
|
|
7471
7477
|
}, z = (I) => {
|
|
7472
|
-
if (!
|
|
7478
|
+
if (!h)
|
|
7473
7479
|
try {
|
|
7474
|
-
const
|
|
7475
|
-
if (
|
|
7476
|
-
const L = i.current.get(
|
|
7477
|
-
if (
|
|
7478
|
-
s.current.set(
|
|
7479
|
-
} catch (
|
|
7480
|
-
console.error("[boring-ui] failed to process plugin unload event",
|
|
7480
|
+
const m = JSON.parse(I.data);
|
|
7481
|
+
if (m.workspaceId && e.workspaceId && m.workspaceId !== e.workspaceId) return;
|
|
7482
|
+
const L = i.current.get(m.id) ?? 0, W = s.current.get(m.id) ?? 0;
|
|
7483
|
+
if (m.revision <= Math.max(L, W)) return;
|
|
7484
|
+
s.current.set(m.id, m.revision), a.current.has(m.id) && (Pt(m.id, v), a.current.delete(m.id)), i.current.set(m.id, m.revision), window.dispatchEvent(new CustomEvent($e, { detail: m }));
|
|
7485
|
+
} catch (m) {
|
|
7486
|
+
console.error("[boring-ui] failed to process plugin unload event", m);
|
|
7481
7487
|
}
|
|
7482
7488
|
}, M = (I) => {
|
|
7483
|
-
if (!
|
|
7489
|
+
if (!h)
|
|
7484
7490
|
try {
|
|
7485
|
-
const
|
|
7486
|
-
if (
|
|
7487
|
-
console.error(`[boring-ui] plugin ${
|
|
7491
|
+
const m = JSON.parse(I.data);
|
|
7492
|
+
if (m.workspaceId && e.workspaceId && m.workspaceId !== e.workspaceId) return;
|
|
7493
|
+
console.error(`[boring-ui] plugin ${m.id} failed to reload: ${m.message}`), window.dispatchEvent(new CustomEvent($e, {
|
|
7488
7494
|
detail: {
|
|
7489
7495
|
type: "boring.plugin.error",
|
|
7490
|
-
id:
|
|
7491
|
-
revision:
|
|
7492
|
-
workspaceId:
|
|
7493
|
-
message:
|
|
7496
|
+
id: m.id,
|
|
7497
|
+
revision: m.revision,
|
|
7498
|
+
workspaceId: m.workspaceId ?? e.workspaceId,
|
|
7499
|
+
message: m.message
|
|
7494
7500
|
}
|
|
7495
7501
|
}));
|
|
7496
|
-
} catch (
|
|
7497
|
-
console.error("[boring-ui] failed to process plugin error event",
|
|
7502
|
+
} catch (m) {
|
|
7503
|
+
console.error("[boring-ui] failed to process plugin error event", m);
|
|
7498
7504
|
}
|
|
7499
7505
|
}, k = (I) => {
|
|
7500
|
-
if (!
|
|
7506
|
+
if (!h)
|
|
7501
7507
|
try {
|
|
7502
|
-
const
|
|
7503
|
-
if (
|
|
7508
|
+
const m = JSON.parse(I.data);
|
|
7509
|
+
if (m.workspaceId && e.workspaceId && m.workspaceId !== e.workspaceId) return;
|
|
7504
7510
|
const L = u.current;
|
|
7505
7511
|
for (const [W, _] of i.current.entries())
|
|
7506
7512
|
L.has(W) || (a.current.has(W) && (Pt(W, v), a.current.delete(W)), i.current.delete(W), s.current.delete(W), window.dispatchEvent(new CustomEvent($e, {
|
|
@@ -7508,21 +7514,21 @@ function pd(e) {
|
|
|
7508
7514
|
type: "boring.plugin.unload",
|
|
7509
7515
|
id: W,
|
|
7510
7516
|
revision: _ + 1,
|
|
7511
|
-
workspaceId:
|
|
7517
|
+
workspaceId: m.workspaceId ?? e.workspaceId,
|
|
7512
7518
|
replay: !0
|
|
7513
7519
|
}
|
|
7514
7520
|
})));
|
|
7515
|
-
L.clear(), window.dispatchEvent(new CustomEvent($e, { detail:
|
|
7516
|
-
} catch (
|
|
7517
|
-
console.error("[boring-ui] failed to process plugin replay-complete event",
|
|
7521
|
+
L.clear(), window.dispatchEvent(new CustomEvent($e, { detail: m }));
|
|
7522
|
+
} catch (m) {
|
|
7523
|
+
console.error("[boring-ui] failed to process plugin replay-complete event", m);
|
|
7518
7524
|
}
|
|
7519
7525
|
};
|
|
7520
|
-
return
|
|
7521
|
-
if (
|
|
7526
|
+
return b.addEventListener("boring.plugin.load", y), b.addEventListener("boring.plugin.unload", z), b.addEventListener("boring.plugin.error", M), b.addEventListener("boring.plugin.replay-complete", k), () => {
|
|
7527
|
+
if (h = !0, !f.current) {
|
|
7522
7528
|
for (const I of a.current) Pt(I, v);
|
|
7523
7529
|
a.current.clear(), i.current.clear(), s.current.clear(), u.current.clear();
|
|
7524
7530
|
}
|
|
7525
|
-
|
|
7531
|
+
b.close();
|
|
7526
7532
|
};
|
|
7527
7533
|
}, [e.apiBaseUrl, e.workspaceId, e.enabled, e.authHeaders, e.importFront, e.frontImportRetry, t, n, r, o, d]);
|
|
7528
7534
|
}
|
|
@@ -7531,17 +7537,17 @@ function sn(e) {
|
|
|
7531
7537
|
const t = e == null ? void 0 : e.trim();
|
|
7532
7538
|
return !t || /^(?:[a-z][a-z\d+.-]*:\/\/|[a-z]:[\\/]|\\\\|\/|\.\.?[\\/])/i.test(t) || /^(?:::1|localhost(?::\d+)?|\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?|\[[a-f\d:]+\](?::\d+)?|[a-z\d-]+(?:\.[a-z\d-]+)+(?::\d+)?)$/i.test(t) || /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t) ? null : t;
|
|
7533
7539
|
}
|
|
7534
|
-
function
|
|
7540
|
+
function gd(e) {
|
|
7535
7541
|
const t = sn(e.appTitle) ?? hd, n = sn(e.workspaceLabel);
|
|
7536
7542
|
if (n) return `${n} · ${t}`;
|
|
7537
7543
|
const r = sn(e.workspaceId);
|
|
7538
7544
|
return r ? `${r} · ${t}` : t;
|
|
7539
7545
|
}
|
|
7540
|
-
function
|
|
7546
|
+
function vd(e) {
|
|
7541
7547
|
return null;
|
|
7542
7548
|
}
|
|
7543
|
-
function
|
|
7544
|
-
return
|
|
7549
|
+
function yd(e) {
|
|
7550
|
+
return md({
|
|
7545
7551
|
apiBaseUrl: e.apiBaseUrl,
|
|
7546
7552
|
workspaceId: e.workspaceId,
|
|
7547
7553
|
authHeaders: e.authHeaders,
|
|
@@ -7551,13 +7557,13 @@ function vd(e) {
|
|
|
7551
7557
|
function Lo() {
|
|
7552
7558
|
return typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
7553
7559
|
}
|
|
7554
|
-
const Pr = "workspace-provider",
|
|
7555
|
-
function
|
|
7560
|
+
const Pr = "workspace-provider", bd = "workspace-provider", In = Pe(null);
|
|
7561
|
+
function Nf() {
|
|
7556
7562
|
const e = ge(In);
|
|
7557
7563
|
if (!e) throw new Error("useTheme must be used within a WorkspaceProvider");
|
|
7558
7564
|
return { theme: xn(), setTheme: e.setTheme, toggleTheme: e.toggleTheme };
|
|
7559
7565
|
}
|
|
7560
|
-
function
|
|
7566
|
+
function Af({ children: e, defaultTheme: t, onThemeChange: n }) {
|
|
7561
7567
|
const r = N(null);
|
|
7562
7568
|
if (!r.current) {
|
|
7563
7569
|
const d = go({ persistenceEnabled: !1 });
|
|
@@ -7581,27 +7587,27 @@ function Nf({ children: e, defaultTheme: t, onThemeChange: n }) {
|
|
|
7581
7587
|
return /* @__PURE__ */ l(In.Provider, { value: a, children: e });
|
|
7582
7588
|
}
|
|
7583
7589
|
const $o = Pe(null);
|
|
7584
|
-
function
|
|
7590
|
+
function Df() {
|
|
7585
7591
|
const e = ge($o);
|
|
7586
7592
|
if (!e) throw new Error("useWorkspaceBridge must be used within a WorkspaceProvider");
|
|
7587
7593
|
return e;
|
|
7588
7594
|
}
|
|
7589
7595
|
const Tn = Pe(null);
|
|
7590
|
-
function
|
|
7596
|
+
function wd() {
|
|
7591
7597
|
const e = ge(Tn);
|
|
7592
7598
|
if (!e) throw new Error("useWorkspaceContext must be used within a WorkspaceProvider");
|
|
7593
7599
|
return e;
|
|
7594
7600
|
}
|
|
7595
|
-
function
|
|
7601
|
+
function kd() {
|
|
7596
7602
|
return ge(Tn);
|
|
7597
7603
|
}
|
|
7598
|
-
function
|
|
7599
|
-
const { chatPanel: e } =
|
|
7604
|
+
function Sd() {
|
|
7605
|
+
const { chatPanel: e } = wd();
|
|
7600
7606
|
if (!e)
|
|
7601
7607
|
throw new Error("WorkspaceProvider requires a chatPanel prop before rendering ChatPanelHost");
|
|
7602
7608
|
return e;
|
|
7603
7609
|
}
|
|
7604
|
-
function
|
|
7610
|
+
function xd({
|
|
7605
7611
|
store: e
|
|
7606
7612
|
}) {
|
|
7607
7613
|
const t = Y(
|
|
@@ -7635,20 +7641,20 @@ function Sd({
|
|
|
7635
7641
|
);
|
|
7636
7642
|
return ao({ shortcuts: t }), null;
|
|
7637
7643
|
}
|
|
7638
|
-
function
|
|
7644
|
+
function Cd({ commands: e }) {
|
|
7639
7645
|
const t = yn();
|
|
7640
7646
|
return O(() => {
|
|
7641
7647
|
if (!(e != null && e.length)) return;
|
|
7642
7648
|
const n = e.map((r) => r.id);
|
|
7643
7649
|
for (const r of n) t.unregisterCommand(r);
|
|
7644
7650
|
for (const r of e)
|
|
7645
|
-
t.registerCommand({ ...r, pluginId: r.pluginId ??
|
|
7651
|
+
t.registerCommand({ ...r, pluginId: r.pluginId ?? bd });
|
|
7646
7652
|
return () => {
|
|
7647
7653
|
for (const r of n) t.unregisterCommand(r);
|
|
7648
7654
|
};
|
|
7649
7655
|
}, [t, e]), null;
|
|
7650
7656
|
}
|
|
7651
|
-
function
|
|
7657
|
+
function Pd({
|
|
7652
7658
|
catalogs: e
|
|
7653
7659
|
}) {
|
|
7654
7660
|
const t = Ut();
|
|
@@ -7662,7 +7668,7 @@ function Cd({
|
|
|
7662
7668
|
}
|
|
7663
7669
|
}, [t, e]), null;
|
|
7664
7670
|
}
|
|
7665
|
-
function
|
|
7671
|
+
function Ed({ plugins: e }) {
|
|
7666
7672
|
return /* @__PURE__ */ l(We, { children: e.flatMap(
|
|
7667
7673
|
(t) => t.registrations.bindings.map((n) => {
|
|
7668
7674
|
const r = n.component;
|
|
@@ -7670,7 +7676,7 @@ function Pd({ plugins: e }) {
|
|
|
7670
7676
|
})
|
|
7671
7677
|
) });
|
|
7672
7678
|
}
|
|
7673
|
-
function
|
|
7679
|
+
function Id({
|
|
7674
7680
|
plugins: e,
|
|
7675
7681
|
apiBaseUrl: t,
|
|
7676
7682
|
authHeaders: n,
|
|
@@ -7699,7 +7705,7 @@ function Ed({
|
|
|
7699
7705
|
);
|
|
7700
7706
|
}, u);
|
|
7701
7707
|
}
|
|
7702
|
-
function
|
|
7708
|
+
function Td({ onOpenFile: e }) {
|
|
7703
7709
|
return O(() => {
|
|
7704
7710
|
if (e)
|
|
7705
7711
|
return J.on(Te.uiCommand, ({ command: t }) => {
|
|
@@ -7709,10 +7715,10 @@ function Id({ onOpenFile: e }) {
|
|
|
7709
7715
|
});
|
|
7710
7716
|
}, [e]), null;
|
|
7711
7717
|
}
|
|
7712
|
-
function
|
|
7718
|
+
function Rd(e, t) {
|
|
7713
7719
|
return !e || (t == null ? void 0 : t["x-boring-workspace-id"]) != null || (t == null ? void 0 : t["X-Boring-Workspace-Id"]) != null ? t : { "x-boring-workspace-id": e, ...t };
|
|
7714
7720
|
}
|
|
7715
|
-
function
|
|
7721
|
+
function _f({
|
|
7716
7722
|
children: e,
|
|
7717
7723
|
chatPanel: t,
|
|
7718
7724
|
plugins: n,
|
|
@@ -7726,16 +7732,16 @@ function Df({
|
|
|
7726
7732
|
apiTimeout: c,
|
|
7727
7733
|
activeSessionId: f,
|
|
7728
7734
|
openSessionIds: p,
|
|
7729
|
-
defaultTheme:
|
|
7735
|
+
defaultTheme: h,
|
|
7730
7736
|
onThemeChange: v,
|
|
7731
7737
|
workspaceId: g,
|
|
7732
|
-
workspaceLabel:
|
|
7738
|
+
workspaceLabel: b,
|
|
7733
7739
|
appTitle: y,
|
|
7734
7740
|
storageKey: z,
|
|
7735
7741
|
persistenceEnabled: M = !0,
|
|
7736
7742
|
manageDocumentTitle: k = !0,
|
|
7737
7743
|
bridgeEndpoint: I,
|
|
7738
|
-
onAuthError:
|
|
7744
|
+
onAuthError: m,
|
|
7739
7745
|
onOpenFile: L,
|
|
7740
7746
|
debug: W = !1,
|
|
7741
7747
|
frontPluginHotReload: _ = !1,
|
|
@@ -7749,13 +7755,13 @@ function Df({
|
|
|
7749
7755
|
persistenceEnabled: M
|
|
7750
7756
|
});
|
|
7751
7757
|
no(ce);
|
|
7752
|
-
const ye =
|
|
7758
|
+
const ye = h ?? Lo();
|
|
7753
7759
|
ye !== "light" && !M ? ce.getState().setTheme(ye) : ye !== "light" && (typeof localStorage < "u" && localStorage.getItem("boring-ui-v2:preferences") !== null || ce.getState().setTheme(ye)), T.current = ce;
|
|
7754
7760
|
}
|
|
7755
7761
|
const A = T.current, P = N(null), F = N(d);
|
|
7756
7762
|
F.current = d;
|
|
7757
|
-
const V = N(
|
|
7758
|
-
V.current =
|
|
7763
|
+
const V = N(m);
|
|
7764
|
+
V.current = m, O(() => () => {
|
|
7759
7765
|
var ce;
|
|
7760
7766
|
(ce = P.current) == null || ce.disconnect(), P.current = null, A.cleanup();
|
|
7761
7767
|
}, [A]), O(() => {
|
|
@@ -7778,12 +7784,12 @@ function Df({
|
|
|
7778
7784
|
}, [I, A]);
|
|
7779
7785
|
const { panelRegistry: X, commandRegistry: pe, catalogRegistry: ne, surfaceResolverRegistry: se, pluginMetas: Z, pluginsWithBindings: U } = Y(() => {
|
|
7780
7786
|
const ce = new Ka(u), ye = new vl(), fe = new $r(), Ae = new Mr();
|
|
7781
|
-
for (const H of
|
|
7782
|
-
const { id: oe, ...
|
|
7783
|
-
ce.register(oe,
|
|
7787
|
+
for (const H of Ku) {
|
|
7788
|
+
const { id: oe, ...he } = H;
|
|
7789
|
+
ce.register(oe, he);
|
|
7784
7790
|
}
|
|
7785
7791
|
const Qe = new Set(r ?? []).has(rr.pluginId) ? [] : [rr], $ = vs({
|
|
7786
|
-
chatPanel: t ??
|
|
7792
|
+
chatPanel: t ?? vd,
|
|
7787
7793
|
plugins: n ?? [],
|
|
7788
7794
|
defaults: Qe,
|
|
7789
7795
|
excludeDefaults: r,
|
|
@@ -7798,8 +7804,8 @@ function Df({
|
|
|
7798
7804
|
];
|
|
7799
7805
|
if (o)
|
|
7800
7806
|
for (const H of o) {
|
|
7801
|
-
const { id: oe, ...
|
|
7802
|
-
ce.register(oe,
|
|
7807
|
+
const { id: oe, ...he } = H;
|
|
7808
|
+
ce.register(oe, he);
|
|
7803
7809
|
}
|
|
7804
7810
|
return {
|
|
7805
7811
|
panelRegistry: ce,
|
|
@@ -7828,12 +7834,12 @@ function Df({
|
|
|
7828
7834
|
() => ({ setTheme: de, toggleTheme: Ee }),
|
|
7829
7835
|
[de, Ee]
|
|
7830
7836
|
), Le = Y(
|
|
7831
|
-
() =>
|
|
7837
|
+
() => Rd(g, d),
|
|
7832
7838
|
[d, g]
|
|
7833
7839
|
);
|
|
7834
7840
|
O(() => {
|
|
7835
|
-
k && (document.title =
|
|
7836
|
-
}, [y, k, g,
|
|
7841
|
+
k && (document.title = gd({ appTitle: y, workspaceLabel: b, workspaceId: g }));
|
|
7842
|
+
}, [y, k, g, b]);
|
|
7837
7843
|
const [Ie, at] = B(!1), et = Y(
|
|
7838
7844
|
() => ({ connected: Ie }),
|
|
7839
7845
|
[Ie]
|
|
@@ -7849,27 +7855,27 @@ function Df({
|
|
|
7849
7855
|
catalogRegistry: ne,
|
|
7850
7856
|
surfaceResolverRegistry: se,
|
|
7851
7857
|
children: /* @__PURE__ */ l(Ua, { apiBaseUrl: a, workspaceId: g, authHeaders: Le, children: /* @__PURE__ */ x(
|
|
7852
|
-
|
|
7858
|
+
Id,
|
|
7853
7859
|
{
|
|
7854
7860
|
plugins: U,
|
|
7855
7861
|
apiBaseUrl: a,
|
|
7856
7862
|
authHeaders: Le,
|
|
7857
|
-
onAuthError:
|
|
7863
|
+
onAuthError: m,
|
|
7858
7864
|
apiTimeout: c,
|
|
7859
7865
|
activeSessionId: f,
|
|
7860
7866
|
openSessionIds: p,
|
|
7861
7867
|
children: [
|
|
7862
|
-
/* @__PURE__ */ l(
|
|
7863
|
-
/* @__PURE__ */ l(
|
|
7864
|
-
/* @__PURE__ */ l(
|
|
7865
|
-
/* @__PURE__ */ l(
|
|
7868
|
+
/* @__PURE__ */ l(Ed, { plugins: U }),
|
|
7869
|
+
/* @__PURE__ */ l(yd, { apiBaseUrl: a, workspaceId: g, mode: _, authHeaders: Le }),
|
|
7870
|
+
/* @__PURE__ */ l(Td, { onOpenFile: L }),
|
|
7871
|
+
/* @__PURE__ */ l(Cd, { commands: i }),
|
|
7866
7872
|
/* @__PURE__ */ l(
|
|
7867
|
-
|
|
7873
|
+
Pd,
|
|
7868
7874
|
{
|
|
7869
7875
|
catalogs: s
|
|
7870
7876
|
}
|
|
7871
7877
|
),
|
|
7872
|
-
/* @__PURE__ */ l(
|
|
7878
|
+
/* @__PURE__ */ l(xd, { store: A }),
|
|
7873
7879
|
/* @__PURE__ */ l(Wl, {}),
|
|
7874
7880
|
/* @__PURE__ */ l(Li, {}),
|
|
7875
7881
|
e,
|
|
@@ -7901,76 +7907,76 @@ export {
|
|
|
7901
7907
|
J as Q,
|
|
7902
7908
|
bs as R,
|
|
7903
7909
|
Iu as S,
|
|
7904
|
-
|
|
7910
|
+
Af as T,
|
|
7905
7911
|
ea as U,
|
|
7906
7912
|
Fs as V,
|
|
7907
7913
|
su as W,
|
|
7908
7914
|
ee as X,
|
|
7909
7915
|
rr as Y,
|
|
7910
|
-
|
|
7916
|
+
pf as Z,
|
|
7911
7917
|
Ga as _,
|
|
7912
|
-
|
|
7918
|
+
sf as a,
|
|
7913
7919
|
eu as a0,
|
|
7914
7920
|
_s as a1,
|
|
7915
7921
|
Ds as a2,
|
|
7916
|
-
|
|
7922
|
+
ff as a3,
|
|
7917
7923
|
Rs as a4,
|
|
7918
7924
|
Ns as a5,
|
|
7919
|
-
|
|
7920
|
-
|
|
7925
|
+
rf as a6,
|
|
7926
|
+
of as a7,
|
|
7921
7927
|
Ye as a8,
|
|
7922
7928
|
Tc as a9,
|
|
7923
7929
|
Xe as aA,
|
|
7924
7930
|
Ze as aB,
|
|
7925
7931
|
lu as aC,
|
|
7926
|
-
|
|
7932
|
+
Tf as aD,
|
|
7927
7933
|
tu as aE,
|
|
7928
7934
|
Te as aF,
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7935
|
+
bf as aG,
|
|
7936
|
+
vf as aH,
|
|
7937
|
+
xf as aI,
|
|
7938
|
+
yf as aJ,
|
|
7939
|
+
Sf as aK,
|
|
7940
|
+
If as aL,
|
|
7941
|
+
kf as aM,
|
|
7942
|
+
Cf as aN,
|
|
7943
|
+
wf as aO,
|
|
7944
|
+
Ef as aP,
|
|
7945
|
+
Pf as aQ,
|
|
7940
7946
|
cn as aR,
|
|
7941
7947
|
ds as aS,
|
|
7942
7948
|
$e as aT,
|
|
7943
7949
|
Gl as aU,
|
|
7944
|
-
|
|
7945
|
-
|
|
7950
|
+
mf as aV,
|
|
7951
|
+
Rf as aW,
|
|
7946
7952
|
Oe as aX,
|
|
7947
7953
|
Ut as aa,
|
|
7948
7954
|
ks as ab,
|
|
7949
7955
|
yn as ac,
|
|
7950
7956
|
ws as ad,
|
|
7951
|
-
|
|
7952
|
-
|
|
7957
|
+
lf as ae,
|
|
7958
|
+
df as af,
|
|
7953
7959
|
_c as ag,
|
|
7954
7960
|
ln as ah,
|
|
7955
7961
|
co as ai,
|
|
7956
7962
|
hf as aj,
|
|
7957
|
-
|
|
7963
|
+
nf as ak,
|
|
7958
7964
|
Ja as al,
|
|
7959
|
-
|
|
7965
|
+
gf as am,
|
|
7960
7966
|
ao as an,
|
|
7961
|
-
|
|
7967
|
+
cf as ao,
|
|
7962
7968
|
wl as ap,
|
|
7963
|
-
|
|
7964
|
-
|
|
7969
|
+
tf as aq,
|
|
7970
|
+
uf as ar,
|
|
7965
7971
|
Wr as as,
|
|
7966
|
-
|
|
7972
|
+
Nf as at,
|
|
7967
7973
|
xn as au,
|
|
7968
7974
|
Po as av,
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7975
|
+
Df as aw,
|
|
7976
|
+
Sd as ax,
|
|
7977
|
+
wd as ay,
|
|
7978
|
+
kd as az,
|
|
7979
|
+
af as b,
|
|
7974
7980
|
Uc as c,
|
|
7975
7981
|
Zn as d,
|
|
7976
7982
|
Wl as e,
|
|
@@ -7982,7 +7988,7 @@ export {
|
|
|
7982
7988
|
qt as k,
|
|
7983
7989
|
xs as l,
|
|
7984
7990
|
Mr as m,
|
|
7985
|
-
|
|
7991
|
+
Bu as n,
|
|
7986
7992
|
Ql as o,
|
|
7987
7993
|
zr as p,
|
|
7988
7994
|
_t as q,
|
|
@@ -7991,7 +7997,7 @@ export {
|
|
|
7991
7997
|
No as t,
|
|
7992
7998
|
Bt as u,
|
|
7993
7999
|
Ta as v,
|
|
7994
|
-
|
|
8000
|
+
_f as w,
|
|
7995
8001
|
Qs as x,
|
|
7996
8002
|
no as y,
|
|
7997
8003
|
vs as z
|