@hachej/boring-workspace 0.1.75 → 0.1.77
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/app-front.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { B as e, C as t, E as n, F as r, G as i, H as a, I as o, Kt as s, L as c, Lt as l, M as u, N as d, P as f, Q as p, R as m, Rt as h, S as g, Sn as _, T as ee, V as v, an as
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { ChevronRight as
|
|
7
|
-
import { DropdownMenu as
|
|
8
|
-
import { PiChatPanel as
|
|
1
|
+
import { B as e, C as t, E as n, F as r, G as i, H as a, I as o, Kt as s, L as c, Lt as l, M as u, N as d, P as f, Q as p, R as m, Rt as h, S as g, Sn as _, T as ee, V as v, an as te, c as ne, cn as re, g as ie, hn as ae, j as oe, kt as se, m as ce, mn as le, n as ue, on as de, r as fe, x as pe, xn as me, z as he } from "./WorkspaceProvider-DcOiZU24.js";
|
|
2
|
+
import { t as y } from "./utils-BRcxFdrz.js";
|
|
3
|
+
import { a as ge, c as _e, f as ve, l as ye, n as be, o as xe, r as Se, s as Ce, t as we, u as Te } from "./WorkspaceLoadingState-TgOWTNJC.js";
|
|
4
|
+
import { createElement as Ee, useCallback as b, useEffect as x, useLayoutEffect as De, useMemo as S, useRef as C, useState as w, useSyncExternalStore as Oe } from "react";
|
|
5
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronRight as ke, Clock3 as Ae, ExternalLink as je, FileText as Me, Maximize2 as Ne, MessageSquare as Pe, MessageSquarePlus as O, Moon as Fe, MoreHorizontal as Ie, PanelLeftClose as Le, PanelLeftOpen as Re, Pin as ze, PinOff as Be, Plug as Ve, Plus as He, RefreshCw as Ue, Search as We, Settings as Ge, Sparkles as Ke, Sun as qe, X as Je } from "lucide-react";
|
|
7
|
+
import { DropdownMenu as Ye, DropdownMenuContent as Xe, DropdownMenuItem as Ze, DropdownMenuSeparator as k, DropdownMenuTrigger as A, ErrorState as Qe, IconButton as $e } from "@hachej/boring-ui-kit";
|
|
8
|
+
import { PiChatPanel as et, searchPiSessions as tt, usePiSessions as nt } from "@hachej/boring-agent/front";
|
|
9
9
|
//#region src/front/layout/ThemeToggle.tsx
|
|
10
|
-
function
|
|
11
|
-
let { theme: e, toggleTheme: t } =
|
|
12
|
-
return
|
|
10
|
+
function rt() {
|
|
11
|
+
let { theme: e, toggleTheme: t } = fe(), n = e === "dark";
|
|
12
|
+
return x(() => {
|
|
13
13
|
typeof document > "u" || document.documentElement.classList.toggle("dark", n);
|
|
14
|
-
}, [n]), /* @__PURE__ */
|
|
14
|
+
}, [n]), /* @__PURE__ */ E($e, {
|
|
15
15
|
type: "button",
|
|
16
16
|
variant: "ghost",
|
|
17
17
|
size: "icon-sm",
|
|
18
18
|
onClick: t,
|
|
19
19
|
"aria-label": "Toggle theme",
|
|
20
20
|
title: n ? "Switch to light theme" : "Switch to dark theme",
|
|
21
|
-
children:
|
|
21
|
+
children: E(n ? qe : Fe, { className: "h-4 w-4" })
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/front/chrome/management/ManagementOverlaySurface.tsx
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
function it({ part: e, icon: t, title: n, description: r, actions: i, headerInsetStart: a = !1, headerInsetEnd: o = !1, children: s }) {
|
|
27
|
+
return /* @__PURE__ */ D("div", {
|
|
28
28
|
"data-boring-workspace-part": e,
|
|
29
29
|
className: "flex h-full min-h-0 flex-col bg-background",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
className:
|
|
32
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ D("header", {
|
|
31
|
+
className: y("flex h-12 shrink-0 items-center justify-between border-b border-border/60", a ? "pl-12" : "pl-4", o ? "pr-16" : "pr-4"),
|
|
32
|
+
children: [/* @__PURE__ */ D("div", {
|
|
33
33
|
className: "flex min-w-0 items-center gap-2",
|
|
34
|
-
children: [t, /* @__PURE__ */
|
|
34
|
+
children: [t, /* @__PURE__ */ D("div", {
|
|
35
35
|
className: "min-w-0",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
37
37
|
className: "truncate text-sm font-semibold tracking-tight text-foreground",
|
|
38
38
|
children: n
|
|
39
|
-
}), /* @__PURE__ */
|
|
39
|
+
}), /* @__PURE__ */ E("p", {
|
|
40
40
|
className: "truncate text-xs text-muted-foreground",
|
|
41
41
|
children: r
|
|
42
42
|
})]
|
|
43
43
|
})]
|
|
44
|
-
}), i ? /* @__PURE__ */
|
|
44
|
+
}), i ? /* @__PURE__ */ E("div", {
|
|
45
45
|
className: "flex shrink-0 items-center gap-0.5",
|
|
46
46
|
children: i
|
|
47
47
|
}) : null]
|
|
@@ -50,11 +50,11 @@ function rt({ part: e, icon: t, title: n, description: r, actions: i, headerInse
|
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/front/chrome/skills/SkillsPage.tsx
|
|
53
|
-
function
|
|
54
|
-
let r =
|
|
53
|
+
function at({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
54
|
+
let r = te(), [i, a] = w({
|
|
55
55
|
status: "loading",
|
|
56
56
|
skills: []
|
|
57
|
-
}), o =
|
|
57
|
+
}), o = b((e) => {
|
|
58
58
|
e.filePath && h({
|
|
59
59
|
kind: "openFile",
|
|
60
60
|
params: {
|
|
@@ -62,7 +62,7 @@ function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
62
62
|
mode: "view"
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
}, []), s =
|
|
65
|
+
}, []), s = b(async (e = !1) => {
|
|
66
66
|
a((e) => ({
|
|
67
67
|
status: "loading",
|
|
68
68
|
skills: e.skills
|
|
@@ -81,25 +81,25 @@ function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
83
83
|
}, [r]);
|
|
84
|
-
|
|
84
|
+
x(() => {
|
|
85
85
|
s(!1);
|
|
86
86
|
}, [s]);
|
|
87
|
-
let c =
|
|
88
|
-
return /* @__PURE__ */
|
|
87
|
+
let c = S(() => [...i.skills].sort((e, t) => e.name.localeCompare(t.name)), [i.skills]);
|
|
88
|
+
return /* @__PURE__ */ E(it, {
|
|
89
89
|
part: "skills-page",
|
|
90
90
|
title: "Skills",
|
|
91
91
|
description: "Workspace skills available to slash commands",
|
|
92
92
|
headerInsetStart: t,
|
|
93
93
|
headerInsetEnd: n,
|
|
94
|
-
icon: /* @__PURE__ */
|
|
94
|
+
icon: /* @__PURE__ */ E("span", {
|
|
95
95
|
className: "grid size-7 place-items-center rounded-lg bg-[color:oklch(from_var(--accent)_l_c_h/0.12)] text-[color:var(--accent)]",
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ E(Ke, {
|
|
97
97
|
className: "h-4 w-4",
|
|
98
98
|
strokeWidth: 1.75,
|
|
99
99
|
"aria-hidden": "true"
|
|
100
100
|
})
|
|
101
101
|
}),
|
|
102
|
-
actions: /* @__PURE__ */
|
|
102
|
+
actions: /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E($e, {
|
|
103
103
|
type: "button",
|
|
104
104
|
variant: "ghost",
|
|
105
105
|
size: "icon-xs",
|
|
@@ -108,11 +108,11 @@ function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
108
108
|
"aria-label": "Refresh skills",
|
|
109
109
|
title: "Refresh skills",
|
|
110
110
|
className: "text-muted-foreground hover:text-foreground",
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
className:
|
|
111
|
+
children: /* @__PURE__ */ E(Ue, {
|
|
112
|
+
className: y("size-3", i.status === "loading" && "animate-spin"),
|
|
113
113
|
strokeWidth: 1.75
|
|
114
114
|
})
|
|
115
|
-
}), e ? /* @__PURE__ */
|
|
115
|
+
}), e ? /* @__PURE__ */ E($e, {
|
|
116
116
|
type: "button",
|
|
117
117
|
variant: "ghost",
|
|
118
118
|
size: "icon-xs",
|
|
@@ -120,52 +120,52 @@ function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
120
120
|
"aria-label": "Close skills",
|
|
121
121
|
title: "Close",
|
|
122
122
|
className: "text-muted-foreground hover:text-foreground",
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ E(Je, {
|
|
124
124
|
className: "size-3",
|
|
125
125
|
strokeWidth: 1.75
|
|
126
126
|
})
|
|
127
127
|
}) : null] }),
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ D("div", {
|
|
129
129
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto p-4",
|
|
130
130
|
"aria-live": "polite",
|
|
131
|
-
children: [i.status === "error" ? /* @__PURE__ */
|
|
131
|
+
children: [i.status === "error" ? /* @__PURE__ */ E("div", {
|
|
132
132
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/8 px-3 py-2 text-sm text-destructive",
|
|
133
133
|
children: i.error
|
|
134
|
-
}) : null, i.status === "loading" && c.length === 0 ? /* @__PURE__ */
|
|
134
|
+
}) : null, i.status === "loading" && c.length === 0 ? /* @__PURE__ */ E("div", {
|
|
135
135
|
className: "flex h-full min-h-[180px] items-center justify-center text-sm text-muted-foreground",
|
|
136
136
|
children: "Loading skills…"
|
|
137
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
137
|
+
}) : c.length === 0 ? /* @__PURE__ */ E("div", {
|
|
138
138
|
className: "flex h-full min-h-[180px] items-center justify-center text-center text-sm text-muted-foreground",
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("div", {
|
|
140
140
|
className: "font-medium text-foreground/80",
|
|
141
141
|
children: "No skills found"
|
|
142
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ E("p", {
|
|
143
143
|
className: "mt-1 max-w-xs",
|
|
144
144
|
children: "Reload plugins or add workspace skills to make them available in chat."
|
|
145
145
|
})] })
|
|
146
|
-
}) : /* @__PURE__ */
|
|
146
|
+
}) : /* @__PURE__ */ E("ul", {
|
|
147
147
|
role: "list",
|
|
148
148
|
className: "grid gap-2",
|
|
149
|
-
children: c.map((e) => /* @__PURE__ */
|
|
149
|
+
children: c.map((e) => /* @__PURE__ */ E("li", {
|
|
150
150
|
className: "rounded-xl border border-border/60 bg-card/70 px-3 py-2.5 cursor-pointer transition-colors hover:border-border hover:bg-muted/60",
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ E("button", {
|
|
152
152
|
type: "button",
|
|
153
153
|
onClick: () => o(e),
|
|
154
154
|
title: "Open skill",
|
|
155
155
|
"aria-label": `Open skill ${e.name} in workspace`,
|
|
156
156
|
className: "block w-full text-left",
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ D("div", {
|
|
158
158
|
className: "flex items-start justify-between gap-3",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ D("div", {
|
|
160
160
|
className: "min-w-0",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ D("div", {
|
|
162
162
|
className: "truncate text-sm font-medium text-foreground",
|
|
163
163
|
children: ["/", e.name]
|
|
164
|
-
}), e.description ? /* @__PURE__ */
|
|
164
|
+
}), e.description ? /* @__PURE__ */ E("p", {
|
|
165
165
|
className: "mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
166
166
|
children: e.description
|
|
167
167
|
}) : null]
|
|
168
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ E(Me, {
|
|
169
169
|
className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground",
|
|
170
170
|
strokeWidth: 1.75,
|
|
171
171
|
"aria-hidden": "true"
|
|
@@ -179,48 +179,48 @@ function it({ onClose: e, headerInsetStart: t = !1, headerInsetEnd: n = !1 }) {
|
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/front/detached/useDetachedPanelPosition.ts
|
|
182
|
-
var
|
|
182
|
+
var ot = {
|
|
183
183
|
width: 520,
|
|
184
184
|
height: 720
|
|
185
|
-
},
|
|
186
|
-
function
|
|
185
|
+
}, st = 16;
|
|
186
|
+
function ct(e, t, n) {
|
|
187
187
|
return Math.max(t, Math.min(n, e));
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function lt(e, t) {
|
|
190
190
|
if (typeof window > "u") return e;
|
|
191
|
-
let n = Math.max(
|
|
191
|
+
let n = Math.max(st, window.innerWidth - t.width - st), r = Math.max(st, window.innerHeight - t.height - st);
|
|
192
192
|
return {
|
|
193
|
-
left:
|
|
194
|
-
top:
|
|
193
|
+
left: ct(e.left, st, n),
|
|
194
|
+
top: ct(e.top, st, r)
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function ut(e, t = {}) {
|
|
198
198
|
let n = {
|
|
199
|
-
...
|
|
199
|
+
...ot,
|
|
200
200
|
...t
|
|
201
|
-
}, [r, i] =
|
|
201
|
+
}, [r, i] = w(() => lt(e, n)), a = C(null), o = b(() => {
|
|
202
202
|
a.current && (a.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
203
|
-
}, []), s =
|
|
203
|
+
}, []), s = b((e) => {
|
|
204
204
|
let t = a.current;
|
|
205
205
|
if (!t) return;
|
|
206
206
|
let r = e.clientX - t.x, o = e.clientY - t.y;
|
|
207
207
|
a.current = {
|
|
208
208
|
x: e.clientX,
|
|
209
209
|
y: e.clientY
|
|
210
|
-
}, i((e) =>
|
|
210
|
+
}, i((e) => lt({
|
|
211
211
|
left: e.left + r,
|
|
212
212
|
top: e.top + o
|
|
213
213
|
}, n));
|
|
214
|
-
}, [n.height, n.width]), c =
|
|
214
|
+
}, [n.height, n.width]), c = b((e) => {
|
|
215
215
|
e.target?.closest("button,a,input,textarea,select") || (a.current = {
|
|
216
216
|
x: e.clientX,
|
|
217
217
|
y: e.clientY
|
|
218
218
|
}, document.body.style.cursor = "grabbing", document.body.style.userSelect = "none");
|
|
219
219
|
}, []);
|
|
220
|
-
return
|
|
220
|
+
return x(() => (window.addEventListener("pointermove", s), window.addEventListener("pointerup", o), () => {
|
|
221
221
|
window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", o), o();
|
|
222
|
-
}), [s, o]),
|
|
223
|
-
i((e) =>
|
|
222
|
+
}), [s, o]), x(() => {
|
|
223
|
+
i((e) => lt(e, n));
|
|
224
224
|
}, [n.height, n.width]), {
|
|
225
225
|
position: r,
|
|
226
226
|
size: n,
|
|
@@ -229,9 +229,9 @@ function lt(e, t = {}) {
|
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/front/detached/DetachedPanelPopover.tsx
|
|
232
|
-
function
|
|
233
|
-
let { position: u, size: d, startDrag: f } =
|
|
234
|
-
return /* @__PURE__ */
|
|
232
|
+
function dt({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaLabel: a, onClose: o, onDock: s, children: c, footer: l }) {
|
|
233
|
+
let { position: u, size: d, startDrag: f } = ut(r, i);
|
|
234
|
+
return /* @__PURE__ */ D("div", {
|
|
235
235
|
"data-boring-workspace-part": "detached-panel-popover",
|
|
236
236
|
className: "absolute z-[90] flex max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-2xl border border-border/70 bg-background shadow-2xl",
|
|
237
237
|
style: {
|
|
@@ -243,54 +243,54 @@ function ut({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaL
|
|
|
243
243
|
role: "dialog",
|
|
244
244
|
"aria-label": a,
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ D("div", {
|
|
247
247
|
className: "flex h-11 shrink-0 cursor-grab items-center justify-between border-b border-border/60 bg-[color:oklch(from_var(--background)_calc(l-0.01)_c_h)] px-3 active:cursor-grabbing",
|
|
248
248
|
onPointerDown: f,
|
|
249
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ D("div", {
|
|
250
250
|
className: "flex min-w-0 items-center gap-2",
|
|
251
|
-
children: [n ? /* @__PURE__ */
|
|
251
|
+
children: [n ? /* @__PURE__ */ E("span", {
|
|
252
252
|
className: "grid size-7 place-items-center rounded-lg bg-[color:oklch(from_var(--accent)_l_c_h/0.14)] text-[color:var(--accent)]",
|
|
253
253
|
children: n
|
|
254
|
-
}) : null, /* @__PURE__ */
|
|
254
|
+
}) : null, /* @__PURE__ */ D("div", {
|
|
255
255
|
className: "min-w-0",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ E("div", {
|
|
257
257
|
className: "truncate text-sm font-semibold tracking-tight text-foreground",
|
|
258
258
|
children: e
|
|
259
|
-
}), t ? /* @__PURE__ */
|
|
259
|
+
}), t ? /* @__PURE__ */ E("div", {
|
|
260
260
|
className: "truncate text-[11px] text-muted-foreground",
|
|
261
261
|
children: t
|
|
262
262
|
}) : null]
|
|
263
263
|
})]
|
|
264
|
-
}), /* @__PURE__ */
|
|
264
|
+
}), /* @__PURE__ */ D("div", {
|
|
265
265
|
className: "flex shrink-0 items-center gap-1",
|
|
266
|
-
children: [s ? /* @__PURE__ */
|
|
266
|
+
children: [s ? /* @__PURE__ */ E("button", {
|
|
267
267
|
type: "button",
|
|
268
268
|
"aria-label": "Dock panel",
|
|
269
269
|
title: "Dock",
|
|
270
|
-
className:
|
|
270
|
+
className: y("grid size-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"),
|
|
271
271
|
onClick: s,
|
|
272
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ E(Ne, {
|
|
273
273
|
className: "size-3.5",
|
|
274
274
|
strokeWidth: 1.75
|
|
275
275
|
})
|
|
276
|
-
}) : null, /* @__PURE__ */
|
|
276
|
+
}) : null, /* @__PURE__ */ E("button", {
|
|
277
277
|
type: "button",
|
|
278
278
|
"aria-label": "Close panel",
|
|
279
279
|
title: "Close",
|
|
280
280
|
className: "grid size-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
281
281
|
onClick: o,
|
|
282
|
-
children: /* @__PURE__ */
|
|
282
|
+
children: /* @__PURE__ */ E(Je, {
|
|
283
283
|
className: "size-3.5",
|
|
284
284
|
strokeWidth: 1.75
|
|
285
285
|
})
|
|
286
286
|
})]
|
|
287
287
|
})]
|
|
288
288
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ E("div", {
|
|
290
290
|
className: "min-h-0 flex-1",
|
|
291
291
|
children: c
|
|
292
292
|
}),
|
|
293
|
-
l ? /* @__PURE__ */
|
|
293
|
+
l ? /* @__PURE__ */ E("div", {
|
|
294
294
|
className: "shrink-0 border-t border-border/60",
|
|
295
295
|
children: l
|
|
296
296
|
}) : null
|
|
@@ -299,7 +299,7 @@ function ut({ title: e, subtitle: t, icon: n, initialPosition: r, size: i, ariaL
|
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/front/chrome/chat/DetachedChatPopover.tsx
|
|
302
|
-
var
|
|
302
|
+
var ft = {
|
|
303
303
|
id: "detached-chat-read-only",
|
|
304
304
|
reason: "detached-chat.read-only",
|
|
305
305
|
label: "Dock this chat to reply.",
|
|
@@ -310,15 +310,15 @@ var dt = {
|
|
|
310
310
|
priority: -10
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
-
function
|
|
313
|
+
function pt({ sessionId: e, title: n, chatParams: r, initialPosition: i, onClose: a, onDock: o, composingEnabled: s = !1 }) {
|
|
314
314
|
let c = s ? r : {
|
|
315
315
|
...r,
|
|
316
|
-
composerBlockers: [
|
|
316
|
+
composerBlockers: [ft, ...r.composerBlockers ?? []]
|
|
317
317
|
};
|
|
318
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ E(dt, {
|
|
319
319
|
title: n,
|
|
320
320
|
subtitle: s ? "Detached chat" : "Detached chat · dock to reply",
|
|
321
|
-
icon: /* @__PURE__ */
|
|
321
|
+
icon: /* @__PURE__ */ E(Pe, {
|
|
322
322
|
className: "size-4",
|
|
323
323
|
strokeWidth: 1.75,
|
|
324
324
|
"aria-hidden": "true"
|
|
@@ -331,7 +331,7 @@ function ft({ sessionId: e, title: n, chatParams: r, initialPosition: i, onClose
|
|
|
331
331
|
},
|
|
332
332
|
onClose: a,
|
|
333
333
|
onDock: o,
|
|
334
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ E(t, {
|
|
335
335
|
...c,
|
|
336
336
|
sessionId: e
|
|
337
337
|
}, e)
|
|
@@ -339,15 +339,15 @@ function ft({ sessionId: e, title: n, chatParams: r, initialPosition: i, onClose
|
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region src/app/front/useWorkspaceShellCapabilitiesController.ts
|
|
342
|
-
function
|
|
342
|
+
function mt(e, t) {
|
|
343
343
|
return `${e}.${t.replace(/[^A-Za-z0-9_.:-]/g, "_").slice(0, 96) || "item"}`;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
return
|
|
345
|
+
function ht({ setFloatingChatSession: e, openChatPane: t, surfaceDispatch: n }) {
|
|
346
|
+
return S(() => ({
|
|
347
347
|
openArtifact: (e, r) => e ? e.type === "panel" ? (s({
|
|
348
348
|
kind: "openPanel",
|
|
349
349
|
params: {
|
|
350
|
-
id:
|
|
350
|
+
id: mt(e.panelComponentId, r?.instanceId ?? e.panelComponentId),
|
|
351
351
|
component: e.panelComponentId,
|
|
352
352
|
title: r?.title ?? e.panelComponentId,
|
|
353
353
|
params: e.params
|
|
@@ -371,7 +371,12 @@ function mt({ setFloatingChatSessionId: e, openChatPane: t, surfaceDispatch: n }
|
|
|
371
371
|
reason: "no-artifact",
|
|
372
372
|
message: "This item has no artifact target."
|
|
373
373
|
},
|
|
374
|
-
openDetachedChat: (t) => t ? (e(
|
|
374
|
+
openDetachedChat: (t, n) => t ? (e({
|
|
375
|
+
sessionId: t,
|
|
376
|
+
title: n?.title,
|
|
377
|
+
initialDraft: n?.initialDraft,
|
|
378
|
+
composingEnabled: n?.composingEnabled
|
|
379
|
+
}), { success: !0 }) : {
|
|
375
380
|
success: !1,
|
|
376
381
|
reason: "invalid-session",
|
|
377
382
|
message: "Missing chat session id."
|
|
@@ -384,54 +389,69 @@ function mt({ setFloatingChatSessionId: e, openChatPane: t, surfaceDispatch: n }
|
|
|
384
389
|
}
|
|
385
390
|
//#endregion
|
|
386
391
|
//#region src/app/front/WorkspaceShellCapabilitiesHost.tsx
|
|
387
|
-
function
|
|
388
|
-
let [l, u] =
|
|
389
|
-
|
|
392
|
+
function gt({ appLeftPaneCollapsed: e, workspaceId: t, effectiveAppLeftPaneWidth: n, sessionTitleById: r, defaultSessionTitle: i, makeCenterParams: a, openChatPane: o, surfaceDispatch: s, onDockOverlay: c }) {
|
|
393
|
+
let [l, u] = w(null);
|
|
394
|
+
x(() => {
|
|
390
395
|
u(null);
|
|
391
396
|
}, [t]);
|
|
392
|
-
let d =
|
|
393
|
-
|
|
397
|
+
let d = ht({
|
|
398
|
+
setFloatingChatSession: u,
|
|
394
399
|
openChatPane: o,
|
|
395
400
|
surfaceDispatch: s
|
|
396
|
-
})
|
|
401
|
+
});
|
|
402
|
+
x(() => {
|
|
403
|
+
let e = (e) => {
|
|
404
|
+
let t = e.detail;
|
|
405
|
+
!t || typeof t.sessionId != "string" || d.openDetachedChat(t.sessionId, {
|
|
406
|
+
...typeof t.title == "string" ? { title: t.title } : {},
|
|
407
|
+
...typeof t.initialDraft == "string" ? { initialDraft: t.initialDraft } : {},
|
|
408
|
+
...typeof t.composingEnabled == "boolean" ? { composingEnabled: t.composingEnabled } : {}
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
return window.addEventListener("boring-workspace:open-detached-chat", e), () => window.removeEventListener("boring-workspace:open-detached-chat", e);
|
|
412
|
+
}, [d]);
|
|
413
|
+
let f = l?.sessionId ?? null, p = f ? l?.title ?? r.get(f) ?? (f === "default" ? i : f) : null, m = f ? {
|
|
414
|
+
...a(f, { bridgeEnabled: !1 }),
|
|
415
|
+
...l?.initialDraft === void 0 ? {} : { initialDraft: l.initialDraft }
|
|
416
|
+
} : null;
|
|
397
417
|
return {
|
|
398
|
-
floatingChatNode:
|
|
399
|
-
sessionId:
|
|
400
|
-
title:
|
|
401
|
-
chatParams:
|
|
418
|
+
floatingChatNode: f && m ? /* @__PURE__ */ E(pt, {
|
|
419
|
+
sessionId: f,
|
|
420
|
+
title: p ?? f,
|
|
421
|
+
chatParams: m,
|
|
402
422
|
initialPosition: {
|
|
403
423
|
left: e ? 24 : n + 24,
|
|
404
424
|
top: 72
|
|
405
425
|
},
|
|
406
|
-
composingEnabled: !1,
|
|
426
|
+
composingEnabled: l?.composingEnabled ?? !1,
|
|
407
427
|
onClose: () => u(null),
|
|
408
428
|
onDock: () => {
|
|
409
|
-
o(
|
|
429
|
+
o(f), u(null), c?.();
|
|
410
430
|
}
|
|
411
|
-
},
|
|
431
|
+
}, f) : null,
|
|
412
432
|
shellCapabilities: d
|
|
413
433
|
};
|
|
414
434
|
}
|
|
415
435
|
//#endregion
|
|
416
436
|
//#region src/front/chrome/plugins/PluginsOverlay.tsx
|
|
417
|
-
function
|
|
437
|
+
function _t(e) {
|
|
418
438
|
return e.boring?.label || e.boring?.id || e.id;
|
|
419
439
|
}
|
|
420
|
-
function
|
|
440
|
+
function vt(e, t) {
|
|
421
441
|
let n = e.filter((e) => e.id !== t.id);
|
|
422
|
-
return n.push(t), n.sort((e, t) =>
|
|
442
|
+
return n.push(t), n.sort((e, t) => _t(e).localeCompare(_t(t)));
|
|
423
443
|
}
|
|
424
|
-
function
|
|
425
|
-
let i =
|
|
444
|
+
function yt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1, headerInsetEnd: r = !1 }) {
|
|
445
|
+
let i = te(), [a, o] = w({
|
|
426
446
|
status: "loading",
|
|
427
447
|
plugins: []
|
|
428
|
-
}), [s, c] =
|
|
448
|
+
}), [s, c] = w(() => /* @__PURE__ */ new Set()), [l, u] = w(!1), [d, f] = w(null), p = b(async () => {
|
|
429
449
|
o((e) => ({
|
|
430
450
|
status: "loading",
|
|
431
451
|
plugins: e.plugins
|
|
432
452
|
}));
|
|
433
453
|
try {
|
|
434
|
-
let e = await i.getJson("/api/v1/agent-plugins?external=1", { missingMessage: "Failed to load external plugins." }), t = Array.isArray(e) ? [...e].sort((e, t) =>
|
|
454
|
+
let e = await i.getJson("/api/v1/agent-plugins?external=1", { missingMessage: "Failed to load external plugins." }), t = Array.isArray(e) ? [...e].sort((e, t) => _t(e).localeCompare(_t(t))) : [];
|
|
435
455
|
o({
|
|
436
456
|
status: "ready",
|
|
437
457
|
plugins: t
|
|
@@ -452,16 +472,16 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
452
472
|
}));
|
|
453
473
|
}
|
|
454
474
|
}, [i]);
|
|
455
|
-
|
|
475
|
+
x(() => {
|
|
456
476
|
p();
|
|
457
|
-
}, [p]),
|
|
477
|
+
}, [p]), x(() => {
|
|
458
478
|
let e = (e) => {
|
|
459
479
|
let t = e.detail;
|
|
460
480
|
if (!(!t || typeof t != "object")) switch (t.type) {
|
|
461
481
|
case "boring.plugin.load":
|
|
462
482
|
o((e) => ({
|
|
463
483
|
...e,
|
|
464
|
-
plugins:
|
|
484
|
+
plugins: vt(e.plugins, t)
|
|
465
485
|
})), c((e) => {
|
|
466
486
|
let n = new Set(e);
|
|
467
487
|
return n.delete(t.id), n;
|
|
@@ -497,9 +517,9 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
497
517
|
break;
|
|
498
518
|
}
|
|
499
519
|
};
|
|
500
|
-
return window.addEventListener(
|
|
520
|
+
return window.addEventListener(ne, e), () => window.removeEventListener(ne, e);
|
|
501
521
|
}, [p]);
|
|
502
|
-
let m =
|
|
522
|
+
let m = S(() => [...a.plugins].sort((e, t) => _t(e).localeCompare(_t(t))), [a.plugins]), h = b(async () => {
|
|
503
523
|
u(!0), f(null);
|
|
504
524
|
try {
|
|
505
525
|
let e = t ? await t() : void 0;
|
|
@@ -510,21 +530,21 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
510
530
|
u(!1);
|
|
511
531
|
}
|
|
512
532
|
}, [p, t]);
|
|
513
|
-
return /* @__PURE__ */
|
|
533
|
+
return /* @__PURE__ */ E(it, {
|
|
514
534
|
part: "plugins-overlay",
|
|
515
535
|
title: "Plugins",
|
|
516
536
|
description: "External plugins loaded for this workspace",
|
|
517
537
|
headerInsetStart: n,
|
|
518
538
|
headerInsetEnd: r,
|
|
519
|
-
icon: /* @__PURE__ */
|
|
539
|
+
icon: /* @__PURE__ */ E("span", {
|
|
520
540
|
className: "grid size-7 place-items-center rounded-lg bg-foreground/[0.06] text-muted-foreground",
|
|
521
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ E(Ve, {
|
|
522
542
|
className: "h-4 w-4",
|
|
523
543
|
strokeWidth: 1.75,
|
|
524
544
|
"aria-hidden": "true"
|
|
525
545
|
})
|
|
526
546
|
}),
|
|
527
|
-
actions: /* @__PURE__ */
|
|
547
|
+
actions: /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E($e, {
|
|
528
548
|
type: "button",
|
|
529
549
|
variant: "ghost",
|
|
530
550
|
size: "icon-xs",
|
|
@@ -533,11 +553,11 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
533
553
|
"aria-label": "Reload plugins",
|
|
534
554
|
title: "Reload plugins",
|
|
535
555
|
className: "text-muted-foreground hover:text-foreground",
|
|
536
|
-
children: /* @__PURE__ */
|
|
537
|
-
className:
|
|
556
|
+
children: /* @__PURE__ */ E(Ue, {
|
|
557
|
+
className: y("size-3", (l || a.status === "loading") && "animate-spin"),
|
|
538
558
|
strokeWidth: 1.75
|
|
539
559
|
})
|
|
540
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ E($e, {
|
|
541
561
|
type: "button",
|
|
542
562
|
variant: "ghost",
|
|
543
563
|
size: "icon-xs",
|
|
@@ -545,71 +565,71 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
545
565
|
"aria-label": "Close plugins",
|
|
546
566
|
title: "Close",
|
|
547
567
|
className: "text-muted-foreground hover:text-foreground",
|
|
548
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ E(Je, {
|
|
549
569
|
className: "size-3",
|
|
550
570
|
strokeWidth: 1.75
|
|
551
571
|
})
|
|
552
572
|
})] }),
|
|
553
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ D("div", {
|
|
554
574
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto p-4",
|
|
555
575
|
"aria-live": "polite",
|
|
556
576
|
children: [
|
|
557
|
-
a.status === "error" ? /* @__PURE__ */
|
|
577
|
+
a.status === "error" ? /* @__PURE__ */ E("div", {
|
|
558
578
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/8 px-3 py-2 text-sm text-destructive",
|
|
559
579
|
children: a.error
|
|
560
580
|
}) : null,
|
|
561
|
-
d ? /* @__PURE__ */
|
|
581
|
+
d ? /* @__PURE__ */ E("div", {
|
|
562
582
|
className: "mb-4 rounded-lg border border-border/70 bg-muted/40 px-3 py-2 text-xs text-muted-foreground",
|
|
563
583
|
children: d
|
|
564
584
|
}) : null,
|
|
565
|
-
a.status === "loading" && m.length === 0 ? /* @__PURE__ */
|
|
585
|
+
a.status === "loading" && m.length === 0 ? /* @__PURE__ */ E("div", {
|
|
566
586
|
className: "flex h-full min-h-[180px] items-center justify-center text-sm text-muted-foreground",
|
|
567
587
|
children: "Loading external plugins…"
|
|
568
|
-
}) : m.length === 0 ? /* @__PURE__ */
|
|
588
|
+
}) : m.length === 0 ? /* @__PURE__ */ E("div", {
|
|
569
589
|
className: "flex h-full min-h-[180px] items-center justify-center text-center text-sm text-muted-foreground",
|
|
570
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("div", {
|
|
571
591
|
className: "font-medium text-foreground/80",
|
|
572
592
|
children: "No external plugins loaded"
|
|
573
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ E("p", {
|
|
574
594
|
className: "mt-1 max-w-xs",
|
|
575
595
|
children: "Create or install an external plugin, then reload external plugins."
|
|
576
596
|
})] })
|
|
577
|
-
}) : /* @__PURE__ */
|
|
597
|
+
}) : /* @__PURE__ */ E("ul", {
|
|
578
598
|
role: "list",
|
|
579
599
|
className: "grid gap-2",
|
|
580
600
|
children: m.map((e) => {
|
|
581
601
|
let t = s.has(e.id);
|
|
582
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ D("li", {
|
|
583
603
|
className: "rounded-xl border border-border/60 bg-card/70 px-3 py-2.5",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ D("div", {
|
|
585
605
|
className: "flex items-start justify-between gap-3",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ D("div", {
|
|
587
607
|
className: "min-w-0",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
608
|
+
children: [/* @__PURE__ */ E("div", {
|
|
589
609
|
className: "truncate text-sm font-medium text-foreground",
|
|
590
|
-
children:
|
|
591
|
-
}), /* @__PURE__ */
|
|
610
|
+
children: _t(e)
|
|
611
|
+
}), /* @__PURE__ */ E("div", {
|
|
592
612
|
className: "mt-0.5 truncate text-[11px] text-muted-foreground/80",
|
|
593
613
|
children: e.id
|
|
594
614
|
})]
|
|
595
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ D("div", {
|
|
596
616
|
className: "flex shrink-0 items-center gap-1",
|
|
597
617
|
children: [
|
|
598
|
-
t ? /* @__PURE__ */
|
|
618
|
+
t ? /* @__PURE__ */ E("span", {
|
|
599
619
|
className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
600
620
|
children: "loading"
|
|
601
621
|
}) : null,
|
|
602
|
-
e.frontTarget ? /* @__PURE__ */
|
|
622
|
+
e.frontTarget ? /* @__PURE__ */ E("span", {
|
|
603
623
|
className: "rounded bg-foreground/[0.06] px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
604
624
|
children: "front"
|
|
605
625
|
}) : null,
|
|
606
|
-
typeof e.revision == "number" ? /* @__PURE__ */
|
|
626
|
+
typeof e.revision == "number" ? /* @__PURE__ */ D("span", {
|
|
607
627
|
className: "rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",
|
|
608
628
|
children: ["r", e.revision]
|
|
609
629
|
}) : null
|
|
610
630
|
]
|
|
611
631
|
})]
|
|
612
|
-
}), e.version ? /* @__PURE__ */
|
|
632
|
+
}), e.version ? /* @__PURE__ */ D("div", {
|
|
613
633
|
className: "mt-2 text-xs text-muted-foreground",
|
|
614
634
|
children: ["Version ", e.version]
|
|
615
635
|
}) : null]
|
|
@@ -622,31 +642,31 @@ function vt({ onClose: e, onReloadExternalPlugins: t, headerInsetStart: n = !1,
|
|
|
622
642
|
}
|
|
623
643
|
//#endregion
|
|
624
644
|
//#region src/front/layout/plugin-tabs/AppLeftPaneHeader.tsx
|
|
625
|
-
function
|
|
645
|
+
function bt({ appTitle: e, workspaceLabel: t, topSlot: n, showBrand: r = !0 }) {
|
|
626
646
|
let i = e || "Boring UI";
|
|
627
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ D("div", {
|
|
628
648
|
className: "shrink-0 px-2 pb-2 pt-2",
|
|
629
|
-
children: [r ? /* @__PURE__ */
|
|
649
|
+
children: [r ? /* @__PURE__ */ D("div", {
|
|
630
650
|
className: "flex h-8 min-w-0 items-center gap-2 pr-1",
|
|
631
651
|
style: { paddingLeft: "2.5rem" },
|
|
632
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ E("span", {
|
|
633
653
|
"aria-hidden": "true",
|
|
634
654
|
className: "grid size-7 shrink-0 place-items-center rounded-lg bg-foreground text-[12px] font-semibold text-background",
|
|
635
655
|
children: (i[0] ?? "B").toUpperCase()
|
|
636
|
-
}), /* @__PURE__ */
|
|
656
|
+
}), /* @__PURE__ */ E("span", {
|
|
637
657
|
className: "truncate text-[15px] font-semibold tracking-tight text-foreground",
|
|
638
658
|
"data-boring-workspace-part": "app-left-pane-brand",
|
|
639
659
|
children: i
|
|
640
660
|
})]
|
|
641
|
-
}) : null, n ? /* @__PURE__ */
|
|
661
|
+
}) : null, n ? /* @__PURE__ */ E("div", {
|
|
642
662
|
className: r ? "mt-1 min-w-0" : "min-w-0 pr-1",
|
|
643
663
|
style: r ? void 0 : { paddingLeft: "2.5rem" },
|
|
644
664
|
"data-boring-workspace-part": "app-left-pane-workspace",
|
|
645
665
|
children: n
|
|
646
|
-
}) : t ? /* @__PURE__ */
|
|
666
|
+
}) : t ? /* @__PURE__ */ E("div", {
|
|
647
667
|
className: "mt-0.5 flex min-h-8 items-center gap-2 rounded-md px-2 text-[13px] text-foreground/72",
|
|
648
668
|
"data-boring-workspace-part": "app-left-pane-workspace",
|
|
649
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ E("span", {
|
|
650
670
|
className: "truncate",
|
|
651
671
|
children: t
|
|
652
672
|
})
|
|
@@ -655,30 +675,30 @@ function yt({ appTitle: e, workspaceLabel: t, topSlot: n, showBrand: r = !0 }) {
|
|
|
655
675
|
}
|
|
656
676
|
//#endregion
|
|
657
677
|
//#region src/front/layout/plugin-tabs/AppLeftPaneActions.tsx
|
|
658
|
-
function
|
|
659
|
-
return /* @__PURE__ */
|
|
678
|
+
function xt({ icon: e, label: t, onClick: n, emphasis: r = !1, active: i = !1, trailing: a }) {
|
|
679
|
+
return /* @__PURE__ */ D("button", {
|
|
660
680
|
type: "button",
|
|
661
681
|
onClick: n,
|
|
662
|
-
className:
|
|
682
|
+
className: y("flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40", i ? "bg-foreground/[0.08] text-foreground shadow-sm ring-1 ring-border/60" : r ? "bg-foreground/[0.06] text-foreground hover:bg-foreground/[0.1]" : "text-foreground/82 hover:bg-foreground/[0.055] hover:text-foreground"),
|
|
663
683
|
children: [
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
className:
|
|
684
|
+
/* @__PURE__ */ E("span", {
|
|
685
|
+
className: y("grid size-5 shrink-0 place-items-center", i || r ? "text-foreground/90" : "text-muted-foreground"),
|
|
666
686
|
"aria-hidden": "true",
|
|
667
687
|
children: e
|
|
668
688
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ E("span", {
|
|
670
690
|
className: "min-w-0 flex-1 truncate",
|
|
671
691
|
children: t
|
|
672
692
|
}),
|
|
673
|
-
a ? /* @__PURE__ */
|
|
693
|
+
a ? /* @__PURE__ */ E("span", {
|
|
674
694
|
className: "shrink-0",
|
|
675
695
|
children: a
|
|
676
696
|
}) : null
|
|
677
697
|
]
|
|
678
698
|
});
|
|
679
699
|
}
|
|
680
|
-
function
|
|
681
|
-
return /* @__PURE__ */
|
|
700
|
+
function St({ keys: e }) {
|
|
701
|
+
return /* @__PURE__ */ E("kbd", {
|
|
682
702
|
"aria-hidden": "true",
|
|
683
703
|
className: "rounded border border-border/60 bg-foreground/[0.08] px-1.5 py-px text-[10px] font-medium leading-[1.4] tracking-wide text-muted-foreground",
|
|
684
704
|
children: e
|
|
@@ -686,7 +706,7 @@ function xt({ keys: e }) {
|
|
|
686
706
|
}
|
|
687
707
|
//#endregion
|
|
688
708
|
//#region src/front/layout/plugin-tabs/AppLeftPaneSessionRow.tsx
|
|
689
|
-
function
|
|
709
|
+
function j(e) {
|
|
690
710
|
switch (e) {
|
|
691
711
|
case "danger": return "bg-destructive/12 text-destructive";
|
|
692
712
|
case "warning": return "bg-amber-500/12 text-amber-700 dark:text-amber-300";
|
|
@@ -694,7 +714,7 @@ function M(e) {
|
|
|
694
714
|
default: return "bg-[color:var(--accent)]/12 text-[color:var(--accent)]";
|
|
695
715
|
}
|
|
696
716
|
}
|
|
697
|
-
function
|
|
717
|
+
function Ct(e) {
|
|
698
718
|
switch (e) {
|
|
699
719
|
case "danger": return "bg-destructive";
|
|
700
720
|
case "warning": return "bg-amber-500";
|
|
@@ -702,26 +722,26 @@ function St(e) {
|
|
|
702
722
|
default: return "bg-[color:var(--accent)]";
|
|
703
723
|
}
|
|
704
724
|
}
|
|
705
|
-
function
|
|
725
|
+
function M({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0, working: a = !1, attentionBadge: o, onSwitch: s, onOpenAsPane: c, onTogglePinned: l, onDelete: u }) {
|
|
706
726
|
let d = e.title || "Untitled", f = () => {
|
|
707
727
|
t !== "active" && s(e.id);
|
|
708
728
|
};
|
|
709
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ D("div", {
|
|
710
730
|
"data-boring-workspace-part": "app-session-row",
|
|
711
731
|
"data-boring-session-state": t,
|
|
712
732
|
draggable: r,
|
|
713
733
|
onDragStart: r ? (t) => {
|
|
714
|
-
t.dataTransfer.setData(
|
|
734
|
+
t.dataTransfer.setData(ie, e.id), t.dataTransfer.setData("text/plain", d), t.dataTransfer.effectAllowed = "copyMove";
|
|
715
735
|
} : void 0,
|
|
716
736
|
onClick: f,
|
|
717
|
-
className:
|
|
737
|
+
className: y("group flex min-h-8 w-full items-center gap-2 rounded-md border px-2.5 py-1 text-left transition-colors", t === "active" ? "border-transparent bg-[color:oklch(from_var(--accent)_l_c_h/0.14)] text-foreground" : t === "open" ? "cursor-pointer border-transparent bg-foreground/[0.05] text-foreground/90 hover:bg-foreground/[0.07]" : "cursor-pointer border-transparent text-foreground/78 hover:bg-foreground/[0.055] hover:text-foreground"),
|
|
718
738
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
className:
|
|
739
|
+
/* @__PURE__ */ E(Ae, {
|
|
740
|
+
className: y("h-3.5 w-3.5 shrink-0", t === "active" ? "text-[color:var(--accent)]" : "text-muted-foreground/65"),
|
|
721
741
|
strokeWidth: 1.75,
|
|
722
742
|
"aria-hidden": "true"
|
|
723
743
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ E("button", {
|
|
725
745
|
type: "button",
|
|
726
746
|
onClick: (e) => {
|
|
727
747
|
e.stopPropagation(), f();
|
|
@@ -731,27 +751,27 @@ function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
731
751
|
title: d,
|
|
732
752
|
children: d
|
|
733
753
|
}),
|
|
734
|
-
o ? /* @__PURE__ */
|
|
754
|
+
o ? /* @__PURE__ */ D("span", {
|
|
735
755
|
"data-boring-workspace-part": "app-session-badge",
|
|
736
756
|
"data-boring-badge": o.kind,
|
|
737
|
-
className:
|
|
738
|
-
children: [/* @__PURE__ */
|
|
757
|
+
className: y("pointer-events-none inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium leading-none", j(o.tone)),
|
|
758
|
+
children: [/* @__PURE__ */ E("span", {
|
|
739
759
|
"aria-hidden": "true",
|
|
740
|
-
className:
|
|
760
|
+
className: y("h-1.5 w-1.5 animate-pulse rounded-full", Ct(o.tone))
|
|
741
761
|
}), o.label]
|
|
742
|
-
}) : a ? /* @__PURE__ */
|
|
762
|
+
}) : a ? /* @__PURE__ */ D("span", {
|
|
743
763
|
"data-boring-workspace-part": "app-session-badge",
|
|
744
764
|
"data-boring-badge": "working",
|
|
745
765
|
className: "pointer-events-none inline-flex shrink-0 items-center gap-1 rounded-full bg-foreground/[0.07] px-1.5 py-0.5 text-[10px] font-medium leading-none text-muted-foreground",
|
|
746
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ E("span", {
|
|
747
767
|
"aria-hidden": "true",
|
|
748
768
|
className: "h-1.5 w-1.5 animate-pulse rounded-full bg-[color:var(--accent)]"
|
|
749
769
|
}), "working"]
|
|
750
770
|
}) : null,
|
|
751
|
-
i ? /* @__PURE__ */
|
|
771
|
+
i ? /* @__PURE__ */ E("span", {
|
|
752
772
|
"data-boring-workspace-part": "app-session-pin-action",
|
|
753
|
-
className:
|
|
754
|
-
children: /* @__PURE__ */
|
|
773
|
+
className: y("flex w-0 shrink-0 items-center overflow-hidden opacity-0 transition-[width,opacity,margin] group-hover:ml-1 group-hover:w-auto group-hover:opacity-100 group-focus-within:ml-1 group-focus-within:w-auto group-focus-within:opacity-100", n && "ml-1 w-auto opacity-100"),
|
|
774
|
+
children: /* @__PURE__ */ E("button", {
|
|
755
775
|
type: "button",
|
|
756
776
|
"aria-label": n ? `Unpin ${d}` : `Pin ${d}`,
|
|
757
777
|
title: n ? "Unpin" : "Pin",
|
|
@@ -759,17 +779,17 @@ function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
759
779
|
onClick: (t) => {
|
|
760
780
|
t.stopPropagation(), l(e.id);
|
|
761
781
|
},
|
|
762
|
-
className:
|
|
763
|
-
children: /* @__PURE__ */
|
|
764
|
-
className:
|
|
782
|
+
className: y("grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40", n && "text-[color:var(--accent)]"),
|
|
783
|
+
children: /* @__PURE__ */ E(ze, {
|
|
784
|
+
className: y("h-3.5 w-3.5", n && "fill-current"),
|
|
765
785
|
strokeWidth: 1.75
|
|
766
786
|
})
|
|
767
787
|
})
|
|
768
788
|
}) : null,
|
|
769
|
-
t === "normal" && r || u ? /* @__PURE__ */
|
|
789
|
+
t === "normal" && r || u ? /* @__PURE__ */ D("span", {
|
|
770
790
|
"data-boring-workspace-part": "app-session-actions",
|
|
771
791
|
className: "flex w-0 shrink-0 items-center gap-0.5 overflow-hidden opacity-0 transition-[width,opacity,margin] group-hover:ml-1 group-hover:w-auto group-hover:opacity-100 group-focus-within:ml-1 group-focus-within:w-auto group-focus-within:opacity-100",
|
|
772
|
-
children: [t === "normal" && r ? /* @__PURE__ */
|
|
792
|
+
children: [t === "normal" && r ? /* @__PURE__ */ E("button", {
|
|
773
793
|
type: "button",
|
|
774
794
|
"aria-label": `Open ${d} in new chat pane`,
|
|
775
795
|
title: "Open in new chat pane",
|
|
@@ -777,11 +797,11 @@ function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
777
797
|
t.stopPropagation(), c(e.id);
|
|
778
798
|
},
|
|
779
799
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
780
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ E(O, {
|
|
781
801
|
className: "h-3.5 w-3.5",
|
|
782
802
|
strokeWidth: 1.75
|
|
783
803
|
})
|
|
784
|
-
}) : null, u ? /* @__PURE__ */
|
|
804
|
+
}) : null, u ? /* @__PURE__ */ E("button", {
|
|
785
805
|
type: "button",
|
|
786
806
|
"aria-label": `Delete ${d}`,
|
|
787
807
|
title: "Delete",
|
|
@@ -789,7 +809,7 @@ function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
789
809
|
t.stopPropagation(), u(e.id);
|
|
790
810
|
},
|
|
791
811
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-background hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
792
|
-
children: /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ E(Je, {
|
|
793
813
|
className: "h-3.5 w-3.5",
|
|
794
814
|
strokeWidth: 1.75
|
|
795
815
|
})
|
|
@@ -800,10 +820,10 @@ function N({ session: e, state: t, pinned: n, canSplit: r = !0, canPin: i = !0,
|
|
|
800
820
|
}
|
|
801
821
|
//#endregion
|
|
802
822
|
//#region src/front/layout/plugin-tabs/AppLeftPaneProjects.tsx
|
|
803
|
-
var
|
|
804
|
-
function
|
|
823
|
+
var N = "boring-workspace:pinned-projects";
|
|
824
|
+
function wt() {
|
|
805
825
|
try {
|
|
806
|
-
let e = globalThis.localStorage?.getItem(
|
|
826
|
+
let e = globalThis.localStorage?.getItem(N);
|
|
807
827
|
if (!e) return [];
|
|
808
828
|
let t = JSON.parse(e);
|
|
809
829
|
return Array.isArray(t?.ids) ? t.ids.filter((e) => typeof e == "string") : [];
|
|
@@ -811,23 +831,23 @@ function Ct() {
|
|
|
811
831
|
return [];
|
|
812
832
|
}
|
|
813
833
|
}
|
|
814
|
-
function
|
|
834
|
+
function Tt(e) {
|
|
815
835
|
try {
|
|
816
|
-
globalThis.localStorage?.setItem(
|
|
836
|
+
globalThis.localStorage?.setItem(N, JSON.stringify({ ids: e }));
|
|
817
837
|
} catch {}
|
|
818
838
|
}
|
|
819
|
-
function
|
|
820
|
-
let [e, t] =
|
|
839
|
+
function Et() {
|
|
840
|
+
let [e, t] = w(() => wt());
|
|
821
841
|
return [e, (e) => t((t) => {
|
|
822
842
|
let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
|
|
823
|
-
return
|
|
843
|
+
return Tt(n), n;
|
|
824
844
|
})];
|
|
825
845
|
}
|
|
826
|
-
function
|
|
846
|
+
function Dt({ projects: e, activeProjectId: t, fallbackName: n, expandedIds: r, onToggleExpanded: i, pinnedProjectIds: a, onTogglePinnedProject: o, onOpenProjectSession: s, onShowMoreProjectSessions: c, onCreateProjectSession: l, onOpenProjectSettings: u, onOpenProjectInNewTab: d, renderProjectSession: f }) {
|
|
827
847
|
let p = t ?? e[0]?.id ?? null;
|
|
828
|
-
return /* @__PURE__ */
|
|
848
|
+
return /* @__PURE__ */ E("div", {
|
|
829
849
|
className: "space-y-0.5",
|
|
830
|
-
children: e.map((e) => /* @__PURE__ */
|
|
850
|
+
children: e.map((e) => /* @__PURE__ */ E(Ot, {
|
|
831
851
|
project: e,
|
|
832
852
|
fallbackName: n,
|
|
833
853
|
active: e.id === p,
|
|
@@ -845,26 +865,26 @@ function Et({ projects: e, activeProjectId: t, fallbackName: n, expandedIds: r,
|
|
|
845
865
|
}, e.id))
|
|
846
866
|
});
|
|
847
867
|
}
|
|
848
|
-
function
|
|
849
|
-
let [m, h] =
|
|
850
|
-
return /* @__PURE__ */
|
|
868
|
+
function Ot({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, onTogglePinned: a, onToggleExpanded: o, onActivate: s, onOpenSession: c, onShowMore: l, onCreateSession: u, onOpenSettings: d, onOpenInNewTab: f, renderProjectSession: p }) {
|
|
869
|
+
let [m, h] = w(!1), g = e.sessions ?? [], _ = e.blockedCount ?? 0, ee = e.available === !1, v = e.name || t;
|
|
870
|
+
return /* @__PURE__ */ D("div", {
|
|
851
871
|
className: "space-y-0.5",
|
|
852
|
-
children: [/* @__PURE__ */
|
|
853
|
-
className:
|
|
872
|
+
children: [/* @__PURE__ */ D("div", {
|
|
873
|
+
className: y("group relative flex min-h-8 w-full items-center gap-2 rounded-md py-1 pl-2 pr-2 transition-colors", n ? "bg-foreground/[0.07] text-foreground" : ee ? "text-muted-foreground/45" : "text-foreground/82 hover:bg-foreground/[0.05] hover:text-foreground"),
|
|
854
874
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ E("button", {
|
|
856
876
|
type: "button",
|
|
857
877
|
"aria-label": r ? `Collapse ${v}` : `Expand ${v}`,
|
|
858
878
|
"aria-expanded": r,
|
|
859
879
|
onClick: o,
|
|
860
880
|
className: "grid size-5 shrink-0 place-items-center rounded text-muted-foreground/55 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
861
|
-
children: /* @__PURE__ */
|
|
862
|
-
className:
|
|
881
|
+
children: /* @__PURE__ */ E(ke, {
|
|
882
|
+
className: y("h-3.5 w-3.5 transition-transform duration-150", r && "rotate-90"),
|
|
863
883
|
strokeWidth: 2,
|
|
864
884
|
"aria-hidden": "true"
|
|
865
885
|
})
|
|
866
886
|
}),
|
|
867
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ E("button", {
|
|
868
888
|
type: "button",
|
|
869
889
|
"aria-current": n ? "page" : void 0,
|
|
870
890
|
disabled: ee,
|
|
@@ -874,18 +894,18 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
874
894
|
className: "min-w-0 flex-1 truncate rounded text-left text-[13px] font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-default",
|
|
875
895
|
children: v
|
|
876
896
|
}),
|
|
877
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ D("span", {
|
|
878
898
|
className: "relative flex h-6 w-[3.25rem] shrink-0 items-center justify-end",
|
|
879
|
-
children: [_ > 0 ? /* @__PURE__ */
|
|
880
|
-
className:
|
|
881
|
-
children: /* @__PURE__ */
|
|
899
|
+
children: [_ > 0 ? /* @__PURE__ */ E("span", {
|
|
900
|
+
className: y("pointer-events-none absolute inset-0 flex items-center justify-end transition-opacity", "group-hover:opacity-0 group-focus-within:opacity-0", m && "opacity-0"),
|
|
901
|
+
children: /* @__PURE__ */ E("span", {
|
|
882
902
|
title: `${_} session${_ === 1 ? "" : "s"} waiting`,
|
|
883
903
|
className: "grid min-w-5 place-items-center rounded-full bg-[color:oklch(from_var(--accent)_l_c_h/0.18)] px-1.5 py-0.5 text-[11px] font-semibold text-[color:var(--accent)]",
|
|
884
904
|
children: _ > 99 ? "99+" : _
|
|
885
905
|
})
|
|
886
|
-
}) : null, /* @__PURE__ */
|
|
887
|
-
className:
|
|
888
|
-
children: [u ? /* @__PURE__ */
|
|
906
|
+
}) : null, /* @__PURE__ */ D("span", {
|
|
907
|
+
className: y("flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100", m && "opacity-100"),
|
|
908
|
+
children: [u ? /* @__PURE__ */ E("button", {
|
|
889
909
|
type: "button",
|
|
890
910
|
"aria-label": `New chat in ${v}`,
|
|
891
911
|
title: "New chat",
|
|
@@ -893,59 +913,59 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
893
913
|
t.stopPropagation(), u(e.id);
|
|
894
914
|
},
|
|
895
915
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
896
|
-
children: /* @__PURE__ */
|
|
916
|
+
children: /* @__PURE__ */ E(He, {
|
|
897
917
|
className: "h-3.5 w-3.5",
|
|
898
918
|
strokeWidth: 2
|
|
899
919
|
})
|
|
900
|
-
}) : null, /* @__PURE__ */
|
|
920
|
+
}) : null, /* @__PURE__ */ D(Ye, {
|
|
901
921
|
open: m,
|
|
902
922
|
onOpenChange: h,
|
|
903
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ E(A, {
|
|
904
924
|
asChild: !0,
|
|
905
|
-
children: /* @__PURE__ */
|
|
925
|
+
children: /* @__PURE__ */ E("button", {
|
|
906
926
|
type: "button",
|
|
907
927
|
"aria-label": `${v} options`,
|
|
908
928
|
title: "More",
|
|
909
929
|
onClick: (e) => e.stopPropagation(),
|
|
910
930
|
className: "grid size-6 place-items-center rounded-md text-muted-foreground hover:bg-foreground/[0.08] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
911
|
-
children: /* @__PURE__ */
|
|
931
|
+
children: /* @__PURE__ */ E(Ie, {
|
|
912
932
|
className: "h-3.5 w-3.5",
|
|
913
933
|
strokeWidth: 2
|
|
914
934
|
})
|
|
915
935
|
})
|
|
916
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ D(Xe, {
|
|
917
937
|
align: "end",
|
|
918
938
|
sideOffset: 6,
|
|
919
939
|
className: "w-48 border-border/50 shadow-[0_12px_28px_-6px_rgba(0,0,0,0.55)]",
|
|
920
940
|
children: [
|
|
921
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ D(Ze, {
|
|
922
942
|
onSelect: a,
|
|
923
943
|
className: "gap-2 text-[13px]",
|
|
924
|
-
children: [
|
|
944
|
+
children: [E(i ? Be : ze, {
|
|
925
945
|
className: "h-3.5 w-3.5",
|
|
926
946
|
"aria-hidden": "true"
|
|
927
947
|
}), i ? "Unpin project" : "Pin project"]
|
|
928
948
|
}),
|
|
929
|
-
u ? /* @__PURE__ */
|
|
949
|
+
u ? /* @__PURE__ */ D(Ze, {
|
|
930
950
|
onSelect: () => u(e.id),
|
|
931
951
|
className: "gap-2 text-[13px]",
|
|
932
|
-
children: [/* @__PURE__ */
|
|
952
|
+
children: [/* @__PURE__ */ E(O, {
|
|
933
953
|
className: "h-3.5 w-3.5",
|
|
934
954
|
"aria-hidden": "true"
|
|
935
955
|
}), "New chat"]
|
|
936
956
|
}) : null,
|
|
937
|
-
d ? /* @__PURE__ */
|
|
957
|
+
d ? /* @__PURE__ */ D(Ze, {
|
|
938
958
|
onSelect: () => d(e.id),
|
|
939
959
|
className: "gap-2 text-[13px]",
|
|
940
|
-
children: [/* @__PURE__ */
|
|
960
|
+
children: [/* @__PURE__ */ E(Ge, {
|
|
941
961
|
className: "h-3.5 w-3.5",
|
|
942
962
|
"aria-hidden": "true"
|
|
943
963
|
}), "Workspace settings"]
|
|
944
964
|
}) : null,
|
|
945
|
-
f ? /* @__PURE__ */
|
|
965
|
+
f ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(k, {}), /* @__PURE__ */ D(Ze, {
|
|
946
966
|
onSelect: () => f(e.id),
|
|
947
967
|
className: "gap-2 text-[13px]",
|
|
948
|
-
children: [/* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ E(je, {
|
|
949
969
|
className: "h-3.5 w-3.5",
|
|
950
970
|
"aria-hidden": "true"
|
|
951
971
|
}), "Open in new tab"]
|
|
@@ -956,22 +976,22 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
956
976
|
})]
|
|
957
977
|
})
|
|
958
978
|
]
|
|
959
|
-
}), r ? /* @__PURE__ */
|
|
979
|
+
}), r ? /* @__PURE__ */ D("div", {
|
|
960
980
|
className: "space-y-0.5 pl-6",
|
|
961
|
-
children: [e.loadingSessions && g.length === 0 ? /* @__PURE__ */
|
|
981
|
+
children: [e.loadingSessions && g.length === 0 ? /* @__PURE__ */ E("div", {
|
|
962
982
|
className: "px-1 py-1.5 text-xs text-muted-foreground",
|
|
963
983
|
children: "Loading chats…"
|
|
964
|
-
}) : g.length === 0 ? /* @__PURE__ */
|
|
984
|
+
}) : g.length === 0 ? /* @__PURE__ */ E("div", {
|
|
965
985
|
className: "px-1 py-1.5 text-xs text-muted-foreground",
|
|
966
986
|
children: "No chats yet."
|
|
967
|
-
}) : g.map((t) => /* @__PURE__ */
|
|
987
|
+
}) : g.map((t) => /* @__PURE__ */ E("div", { children: p ? p(e, t) : /* @__PURE__ */ E(M, {
|
|
968
988
|
session: t,
|
|
969
989
|
state: "normal",
|
|
970
990
|
pinned: !1,
|
|
971
991
|
onSwitch: () => c?.(e.id, t.id),
|
|
972
992
|
onOpenAsPane: () => c?.(e.id, t.id),
|
|
973
993
|
onTogglePinned: () => void 0
|
|
974
|
-
}) }, t.id)), e.hasMoreSessions ? /* @__PURE__ */
|
|
994
|
+
}) }, t.id)), e.hasMoreSessions ? /* @__PURE__ */ E("button", {
|
|
975
995
|
type: "button",
|
|
976
996
|
onClick: () => l?.(e.id),
|
|
977
997
|
className: "rounded-md px-1 py-1 text-left text-[13px] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
@@ -982,16 +1002,16 @@ function Dt({ project: e, fallbackName: t, active: n, expanded: r, pinned: i, on
|
|
|
982
1002
|
}
|
|
983
1003
|
//#endregion
|
|
984
1004
|
//#region src/front/layout/plugin-tabs/AppLeftPaneSections.tsx
|
|
985
|
-
function
|
|
1005
|
+
function kt({ title: e, empty: t, children: n }) {
|
|
986
1006
|
let r = Array.isArray(n) ? n.length > 0 : !!n;
|
|
987
|
-
return !r && !t ? null : /* @__PURE__ */
|
|
1007
|
+
return !r && !t ? null : /* @__PURE__ */ D("div", {
|
|
988
1008
|
className: "space-y-1",
|
|
989
|
-
children: [/* @__PURE__ */
|
|
1009
|
+
children: [/* @__PURE__ */ E("div", {
|
|
990
1010
|
className: "px-2 pb-0.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/65",
|
|
991
1011
|
children: e
|
|
992
|
-
}), /* @__PURE__ */
|
|
1012
|
+
}), /* @__PURE__ */ E("div", {
|
|
993
1013
|
className: "space-y-0.5",
|
|
994
|
-
children: r ? n : /* @__PURE__ */
|
|
1014
|
+
children: r ? n : /* @__PURE__ */ E("div", {
|
|
995
1015
|
className: "px-2 py-1.5 text-xs text-muted-foreground/60",
|
|
996
1016
|
children: t
|
|
997
1017
|
})
|
|
@@ -1000,10 +1020,10 @@ function Ot({ title: e, empty: t, children: n }) {
|
|
|
1000
1020
|
}
|
|
1001
1021
|
//#endregion
|
|
1002
1022
|
//#region src/front/layout/plugin-tabs/AppLeftPane.tsx
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1005
|
-
let [e, t] =
|
|
1006
|
-
return
|
|
1023
|
+
var At = "boring:chat-session-status";
|
|
1024
|
+
function jt() {
|
|
1025
|
+
let [e, t] = w(() => /* @__PURE__ */ new Set());
|
|
1026
|
+
return x(() => {
|
|
1007
1027
|
let e = (e) => {
|
|
1008
1028
|
let n = e.detail;
|
|
1009
1029
|
if (typeof n?.sessionId != "string") return;
|
|
@@ -1014,13 +1034,13 @@ function At() {
|
|
|
1014
1034
|
return r ? t.add(n.sessionId) : t.delete(n.sessionId), t;
|
|
1015
1035
|
});
|
|
1016
1036
|
};
|
|
1017
|
-
return window.addEventListener(
|
|
1037
|
+
return window.addEventListener(At, e), () => window.removeEventListener(At, e);
|
|
1018
1038
|
}, []), e;
|
|
1019
1039
|
}
|
|
1020
|
-
function
|
|
1021
|
-
let
|
|
1040
|
+
function Mt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTitle: r = "Workspaces", projects: i, activeProjectId: a, onOpenProjectSession: o, onShowMoreProjectSessions: s, onCreateProject: c, onCreateProjectSession: l, onOpenProjectSettings: u, onOpenProjectInNewTab: d, topSlot: f, bottomSlot: p, headerMode: m = "full", sessions: h, activeSessionId: _, openSessionIds: ee, pinnedSessionIds: v, onCreateSession: te, onOpenCommandPalette: ne, onSwitchSession: re, onOpenSessionAsPane: ie, onToggleSessionPinned: ae, onDeleteSession: oe, actions: se = [], layoutMode: ce = "single-project" }) {
|
|
1041
|
+
let le = S(() => new Set(ee), [ee]), ue = S(() => new Set(v), [v]), de = jt(), { blockers: fe } = pe(), me = S(() => {
|
|
1022
1042
|
let e = /* @__PURE__ */ new Map();
|
|
1023
|
-
for (let t of
|
|
1043
|
+
for (let t of fe) {
|
|
1024
1044
|
if (!t.sessionId) continue;
|
|
1025
1045
|
let n = g(t);
|
|
1026
1046
|
if (!n) continue;
|
|
@@ -1028,65 +1048,65 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1028
1048
|
(!r || (n.priority ?? 0) > (r.priority ?? 0)) && e.set(t.sessionId, n);
|
|
1029
1049
|
}
|
|
1030
1050
|
return e;
|
|
1031
|
-
}, [
|
|
1051
|
+
}, [fe]), he = S(() => v.map((e) => h.find((t) => t.id === e)).filter((e) => !!e), [v, h]), y = S(() => h.filter((e) => !ue.has(e.id)), [ue, h]), ge = S(() => {
|
|
1032
1052
|
let e = i ?? [];
|
|
1033
|
-
return
|
|
1053
|
+
return ce === "multi-project" ? e.map((e) => e.id === a ? {
|
|
1034
1054
|
...e,
|
|
1035
|
-
sessions: e.sessions ??
|
|
1055
|
+
sessions: e.sessions ?? y.map((e) => ({
|
|
1036
1056
|
id: e.id,
|
|
1037
1057
|
title: e.title,
|
|
1038
1058
|
updatedAt: e.updatedAt
|
|
1039
1059
|
})),
|
|
1040
|
-
sessionCount: e.sessionCount ??
|
|
1060
|
+
sessionCount: e.sessionCount ?? y.length
|
|
1041
1061
|
} : e) : e;
|
|
1042
1062
|
}, [
|
|
1043
1063
|
a,
|
|
1044
|
-
|
|
1064
|
+
ce,
|
|
1045
1065
|
i,
|
|
1046
|
-
|
|
1047
|
-
]), [
|
|
1066
|
+
y
|
|
1067
|
+
]), [_e, ve] = w(() => {
|
|
1048
1068
|
let e = a ?? i?.[0]?.id;
|
|
1049
1069
|
return new Set(e ? [e] : []);
|
|
1050
|
-
}),
|
|
1070
|
+
}), ye = (e) => ve((t) => {
|
|
1051
1071
|
let n = new Set(t);
|
|
1052
1072
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1053
|
-
}), [
|
|
1073
|
+
}), [be, xe] = Et(), Se = S(() => new Set(be), [be]), Ce = S(() => be.map((e) => ge.find((t) => t.id === e)).filter((e) => !!e), [be, ge]), we = S(() => ge.filter((e) => !Se.has(e.id)), [ge, Se]), Te = m !== "hidden" && (ce !== "multi-project" || m === "workspace"), Ee = m === "full" && ce !== "multi-project", b = (e, t, n = a ?? void 0) => {
|
|
1054
1074
|
let r = !n || n === a;
|
|
1055
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ E(M, {
|
|
1056
1076
|
session: e,
|
|
1057
|
-
state: r && e.id === _ ? "active" : r &&
|
|
1077
|
+
state: r && e.id === _ ? "active" : r && le.has(e.id) ? "open" : "normal",
|
|
1058
1078
|
pinned: t,
|
|
1059
1079
|
canSplit: r,
|
|
1060
1080
|
canPin: r,
|
|
1061
|
-
working: r &&
|
|
1062
|
-
attentionBadge: r ?
|
|
1063
|
-
onSwitch: r ?
|
|
1064
|
-
onOpenAsPane: r ?
|
|
1065
|
-
onTogglePinned:
|
|
1066
|
-
onDelete: r ?
|
|
1081
|
+
working: r && de.has(e.id),
|
|
1082
|
+
attentionBadge: r ? me.get(e.id) : void 0,
|
|
1083
|
+
onSwitch: r ? re : () => o?.(n, e.id),
|
|
1084
|
+
onOpenAsPane: r ? ie : () => o?.(n, e.id),
|
|
1085
|
+
onTogglePinned: ae,
|
|
1086
|
+
onDelete: r ? oe : void 0
|
|
1067
1087
|
}, e.id);
|
|
1068
|
-
},
|
|
1088
|
+
}, x = (e) => /* @__PURE__ */ E(Dt, {
|
|
1069
1089
|
projects: e,
|
|
1070
1090
|
activeProjectId: a,
|
|
1071
1091
|
fallbackName: n || t || "Boring UI",
|
|
1072
|
-
expandedIds:
|
|
1073
|
-
onToggleExpanded:
|
|
1074
|
-
pinnedProjectIds:
|
|
1075
|
-
onTogglePinnedProject:
|
|
1092
|
+
expandedIds: _e,
|
|
1093
|
+
onToggleExpanded: ye,
|
|
1094
|
+
pinnedProjectIds: Se,
|
|
1095
|
+
onTogglePinnedProject: xe,
|
|
1076
1096
|
onOpenProjectSession: (e, t) => {
|
|
1077
|
-
e === a ?
|
|
1097
|
+
e === a ? re(t) : o?.(e, t);
|
|
1078
1098
|
},
|
|
1079
1099
|
onShowMoreProjectSessions: s,
|
|
1080
1100
|
onCreateProjectSession: l,
|
|
1081
1101
|
onOpenProjectSettings: u,
|
|
1082
1102
|
onOpenProjectInNewTab: d,
|
|
1083
|
-
renderProjectSession: (e, t) =>
|
|
1103
|
+
renderProjectSession: (e, t) => b({
|
|
1084
1104
|
id: t.id,
|
|
1085
1105
|
title: t.title,
|
|
1086
1106
|
updatedAt: t.updatedAt
|
|
1087
|
-
},
|
|
1107
|
+
}, ue.has(t.id), e.id)
|
|
1088
1108
|
});
|
|
1089
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ D("aside", {
|
|
1090
1110
|
"data-boring-workspace-part": "app-left-pane",
|
|
1091
1111
|
className: "flex h-full min-h-0 shrink-0 flex-col border-r border-border bg-[color:oklch(from_var(--background)_calc(l-0.012)_c_h)] text-sm",
|
|
1092
1112
|
style: {
|
|
@@ -1096,38 +1116,38 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1096
1116
|
},
|
|
1097
1117
|
"aria-label": "App navigation",
|
|
1098
1118
|
children: [
|
|
1099
|
-
|
|
1119
|
+
Te ? /* @__PURE__ */ E(bt, {
|
|
1100
1120
|
appTitle: t,
|
|
1101
1121
|
workspaceLabel: n,
|
|
1102
1122
|
topSlot: f,
|
|
1103
|
-
showBrand:
|
|
1104
|
-
}) : /* @__PURE__ */
|
|
1123
|
+
showBrand: Ee
|
|
1124
|
+
}) : /* @__PURE__ */ E("div", {
|
|
1105
1125
|
className: "h-12 shrink-0",
|
|
1106
1126
|
"aria-hidden": "true"
|
|
1107
1127
|
}),
|
|
1108
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ D("nav", {
|
|
1109
1129
|
className: "shrink-0 space-y-0.5 px-2 pb-1 pt-1",
|
|
1110
1130
|
"aria-label": "Primary workspace actions",
|
|
1111
1131
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
icon: /* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ E(xt, {
|
|
1133
|
+
icon: /* @__PURE__ */ E(He, {
|
|
1114
1134
|
className: "h-4 w-4",
|
|
1115
1135
|
strokeWidth: 2
|
|
1116
1136
|
}),
|
|
1117
1137
|
label: "New chat",
|
|
1118
|
-
onClick:
|
|
1138
|
+
onClick: te,
|
|
1119
1139
|
emphasis: !0
|
|
1120
1140
|
}),
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
icon: /* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ E(xt, {
|
|
1142
|
+
icon: /* @__PURE__ */ E(We, {
|
|
1123
1143
|
className: "h-4 w-4",
|
|
1124
1144
|
strokeWidth: 1.75
|
|
1125
1145
|
}),
|
|
1126
1146
|
label: "Search",
|
|
1127
|
-
onClick:
|
|
1128
|
-
trailing: /* @__PURE__ */
|
|
1147
|
+
onClick: ne,
|
|
1148
|
+
trailing: /* @__PURE__ */ E(St, { keys: "⌘K" })
|
|
1129
1149
|
}),
|
|
1130
|
-
|
|
1150
|
+
se.map((e) => /* @__PURE__ */ E(xt, {
|
|
1131
1151
|
icon: e.icon,
|
|
1132
1152
|
label: e.label,
|
|
1133
1153
|
onClick: e.onClick,
|
|
@@ -1137,48 +1157,48 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1137
1157
|
}, e.id))
|
|
1138
1158
|
]
|
|
1139
1159
|
}),
|
|
1140
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ E("div", {
|
|
1141
1161
|
className: "boring-scrollbar-discreet min-h-0 flex-1 overflow-y-auto px-2 py-2",
|
|
1142
|
-
children:
|
|
1162
|
+
children: ce === "multi-project" ? /* @__PURE__ */ D("div", {
|
|
1143
1163
|
className: "space-y-3 py-1",
|
|
1144
|
-
children: [
|
|
1164
|
+
children: [he.length > 0 || Ce.length > 0 ? /* @__PURE__ */ D(kt, {
|
|
1145
1165
|
title: "Pinned",
|
|
1146
|
-
children: [
|
|
1147
|
-
}) : null, /* @__PURE__ */
|
|
1166
|
+
children: [he.map((e) => b(e, !0)), Ce.length > 0 ? x(Ce) : null]
|
|
1167
|
+
}) : null, /* @__PURE__ */ D("section", {
|
|
1148
1168
|
"data-boring-workspace-part": "app-left-pane-section",
|
|
1149
1169
|
className: "space-y-1",
|
|
1150
|
-
children: [/* @__PURE__ */
|
|
1170
|
+
children: [/* @__PURE__ */ D("div", {
|
|
1151
1171
|
className: "flex items-center justify-between gap-1 px-2 pb-0.5",
|
|
1152
|
-
children: [/* @__PURE__ */
|
|
1172
|
+
children: [/* @__PURE__ */ E("span", {
|
|
1153
1173
|
className: "text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/65",
|
|
1154
1174
|
children: r
|
|
1155
|
-
}), c ? /* @__PURE__ */
|
|
1175
|
+
}), c ? /* @__PURE__ */ E("button", {
|
|
1156
1176
|
type: "button",
|
|
1157
1177
|
"aria-label": "New project",
|
|
1158
1178
|
title: "New project",
|
|
1159
1179
|
onClick: c,
|
|
1160
1180
|
className: "grid size-6 shrink-0 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/[0.055] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1181
|
+
children: /* @__PURE__ */ E(He, {
|
|
1162
1182
|
className: "h-3.5 w-3.5",
|
|
1163
1183
|
strokeWidth: 2,
|
|
1164
1184
|
"aria-hidden": "true"
|
|
1165
1185
|
})
|
|
1166
1186
|
}) : null]
|
|
1167
|
-
}),
|
|
1187
|
+
}), x(we)]
|
|
1168
1188
|
})]
|
|
1169
|
-
}) : /* @__PURE__ */
|
|
1189
|
+
}) : /* @__PURE__ */ D("div", {
|
|
1170
1190
|
className: "space-y-4 py-1",
|
|
1171
|
-
children: [
|
|
1191
|
+
children: [he.length > 0 ? /* @__PURE__ */ E(kt, {
|
|
1172
1192
|
title: "Pinned",
|
|
1173
|
-
children:
|
|
1174
|
-
}) : null, /* @__PURE__ */
|
|
1193
|
+
children: he.map((e) => b(e, !0))
|
|
1194
|
+
}) : null, /* @__PURE__ */ E(kt, {
|
|
1175
1195
|
title: "Chats",
|
|
1176
1196
|
empty: "No chats yet.",
|
|
1177
|
-
children:
|
|
1197
|
+
children: y.map((e) => b(e, !1))
|
|
1178
1198
|
})]
|
|
1179
1199
|
})
|
|
1180
1200
|
}),
|
|
1181
|
-
p ? /* @__PURE__ */
|
|
1201
|
+
p ? /* @__PURE__ */ E("footer", {
|
|
1182
1202
|
className: "shrink-0 border-t border-border/40 p-2",
|
|
1183
1203
|
children: p
|
|
1184
1204
|
}) : null
|
|
@@ -1187,17 +1207,17 @@ function jt({ width: e = 268, appTitle: t, workspaceLabel: n, workspaceSectionTi
|
|
|
1187
1207
|
}
|
|
1188
1208
|
//#endregion
|
|
1189
1209
|
//#region src/front/layout/plugin-tabs/PluginTabsWorkspaceShell.tsx
|
|
1190
|
-
function
|
|
1191
|
-
let i =
|
|
1210
|
+
function Nt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
1211
|
+
let i = C(null), a = b((e) => {
|
|
1192
1212
|
if (i.current == null) return;
|
|
1193
1213
|
let t = e.clientX - i.current;
|
|
1194
1214
|
i.current = e.clientX, t !== 0 && r(t);
|
|
1195
|
-
}, [r]), o =
|
|
1215
|
+
}, [r]), o = b(() => {
|
|
1196
1216
|
i.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
|
|
1197
|
-
}, [a]), s =
|
|
1217
|
+
}, [a]), s = b((e) => {
|
|
1198
1218
|
e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), i.current = e.clientX, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
|
|
1199
1219
|
}, [a, o]);
|
|
1200
|
-
return /* @__PURE__ */
|
|
1220
|
+
return /* @__PURE__ */ E("div", {
|
|
1201
1221
|
role: "separator",
|
|
1202
1222
|
"aria-label": "Resize app navigation",
|
|
1203
1223
|
"aria-orientation": "vertical",
|
|
@@ -1205,7 +1225,7 @@ function Mt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
|
1205
1225
|
"aria-valuemax": n,
|
|
1206
1226
|
"aria-valuenow": e,
|
|
1207
1227
|
tabIndex: 0,
|
|
1208
|
-
onKeyDown:
|
|
1228
|
+
onKeyDown: b((i) => {
|
|
1209
1229
|
i.key === "ArrowLeft" ? (i.preventDefault(), r(i.shiftKey ? -48 : -16)) : i.key === "ArrowRight" ? (i.preventDefault(), r(i.shiftKey ? 48 : 16)) : i.key === "Home" ? (i.preventDefault(), r(t - e)) : i.key === "End" && (i.preventDefault(), r(n - e));
|
|
1210
1230
|
}, [
|
|
1211
1231
|
n,
|
|
@@ -1215,34 +1235,34 @@ function Mt({ width: e, minWidth: t, maxWidth: n, onResize: r }) {
|
|
|
1215
1235
|
]),
|
|
1216
1236
|
onPointerDown: s,
|
|
1217
1237
|
className: "group relative z-20 -ml-px w-1 shrink-0 cursor-col-resize touch-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
1218
|
-
children: /* @__PURE__ */
|
|
1238
|
+
children: /* @__PURE__ */ E("span", { className: "absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors group-hover:bg-foreground/30 group-active:bg-foreground/45" })
|
|
1219
1239
|
});
|
|
1220
1240
|
}
|
|
1221
|
-
function
|
|
1222
|
-
let [d, f] =
|
|
1223
|
-
return /* @__PURE__ */
|
|
1241
|
+
function Pt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i, onResizeLeftPane: a, leftPaneWidth: o, minLeftPaneWidth: s = 220, maxLeftPaneWidth: c = 420, className: l, mobileShellEnabled: u }) {
|
|
1242
|
+
let [d, f] = w(!1), [p, m] = w(!1), h = ge(), g = u === !0 && h < 640, _ = g ? !p : e;
|
|
1243
|
+
return /* @__PURE__ */ D("div", {
|
|
1224
1244
|
"data-boring-workspace-part": "plugin-tabs-shell",
|
|
1225
1245
|
"data-boring-state": _ ? "collapsed" : "expanded",
|
|
1226
1246
|
"data-mobile-shell": g ? "true" : "false",
|
|
1227
|
-
className:
|
|
1247
|
+
className: y("relative flex h-full min-h-0 w-full overflow-hidden bg-background", l),
|
|
1228
1248
|
children: [
|
|
1229
1249
|
g || e ? null : t,
|
|
1230
|
-
!g && !e && a && o != null ? /* @__PURE__ */
|
|
1250
|
+
!g && !e && a && o != null ? /* @__PURE__ */ E(Nt, {
|
|
1231
1251
|
width: o,
|
|
1232
1252
|
minWidth: s,
|
|
1233
1253
|
maxWidth: c,
|
|
1234
1254
|
onResize: a
|
|
1235
1255
|
}) : null,
|
|
1236
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ E("div", {
|
|
1237
1257
|
className: "relative min-w-0 flex-1",
|
|
1238
1258
|
children: n
|
|
1239
1259
|
}),
|
|
1240
|
-
g ? p ? /* @__PURE__ */
|
|
1260
|
+
g ? p ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
|
|
1241
1261
|
"aria-hidden": "true",
|
|
1242
1262
|
"data-boring-workspace-part": "app-left-mobile-scrim",
|
|
1243
1263
|
className: "absolute inset-0 z-[64] bg-foreground/30",
|
|
1244
1264
|
onClick: () => m(!1)
|
|
1245
|
-
}), /* @__PURE__ */
|
|
1265
|
+
}), /* @__PURE__ */ E("div", {
|
|
1246
1266
|
"data-boring-workspace-part": "app-left-mobile-overlay",
|
|
1247
1267
|
"data-boring-state": "open",
|
|
1248
1268
|
onClick: (e) => {
|
|
@@ -1250,25 +1270,25 @@ function Nt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i
|
|
|
1250
1270
|
},
|
|
1251
1271
|
className: "absolute inset-y-0 left-0 z-[65] flex w-[min(86vw,360px)] max-w-[360px] shadow-2xl",
|
|
1252
1272
|
children: t
|
|
1253
|
-
})] }) : null : e ? /* @__PURE__ */
|
|
1273
|
+
})] }) : null : e ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
|
|
1254
1274
|
"data-boring-workspace-part": "app-left-peek-trigger",
|
|
1255
1275
|
className: "absolute inset-y-0 left-0 z-[60] w-3",
|
|
1256
1276
|
onMouseEnter: () => f(!0),
|
|
1257
1277
|
"aria-hidden": "true"
|
|
1258
|
-
}), d ? /* @__PURE__ */
|
|
1278
|
+
}), d ? /* @__PURE__ */ E("div", {
|
|
1259
1279
|
"data-boring-workspace-part": "app-left-peek",
|
|
1260
1280
|
"data-boring-state": "open",
|
|
1261
1281
|
onMouseLeave: () => f(!1),
|
|
1262
1282
|
className: "absolute inset-y-0 left-0 z-[65] flex shadow-2xl",
|
|
1263
1283
|
children: t
|
|
1264
1284
|
}) : null] }) : null,
|
|
1265
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ E("div", {
|
|
1266
1286
|
className: "pointer-events-none absolute left-1.5 top-2 z-[70]",
|
|
1267
|
-
children: /* @__PURE__ */
|
|
1287
|
+
children: /* @__PURE__ */ E(ce, {
|
|
1268
1288
|
label: _ ? "Open app navigation" : "Hide app navigation",
|
|
1269
1289
|
side: "right",
|
|
1270
1290
|
onClick: g ? () => m((e) => !e) : e ? r : i,
|
|
1271
|
-
children:
|
|
1291
|
+
children: E(_ ? Re : Le, {
|
|
1272
1292
|
className: "h-4 w-4",
|
|
1273
1293
|
strokeWidth: 1.75
|
|
1274
1294
|
})
|
|
@@ -1279,19 +1299,19 @@ function Nt({ collapsed: e, leftPane: t, children: n, onExpand: r, onCollapse: i
|
|
|
1279
1299
|
}
|
|
1280
1300
|
//#endregion
|
|
1281
1301
|
//#region src/app/front/workspaceBuiltinPlugins.ts
|
|
1282
|
-
var
|
|
1283
|
-
function
|
|
1284
|
-
let n = (t ?? []).includes(p.pluginId) ? [] : [p], r =
|
|
1302
|
+
var Ft = /* @__PURE__ */ new Set(["plugins", "skills"]);
|
|
1303
|
+
function It({ plugins: e, excludeDefaults: t }) {
|
|
1304
|
+
let n = (t ?? []).includes(p.pluginId) ? [] : [p], r = me({
|
|
1285
1305
|
plugins: e ?? [],
|
|
1286
1306
|
defaults: n,
|
|
1287
1307
|
excludeDefaults: t
|
|
1288
1308
|
});
|
|
1289
|
-
for (let e of r) for (let t of e.registrations.appLeftActions) if (
|
|
1309
|
+
for (let e of r) for (let t of e.registrations.appLeftActions) if (Ft.has(t.id)) throw new _("duplicate-id", `app-left action "${t.id}" from plugin "${e.id}" collides with a reserved workspace app-left action`);
|
|
1290
1310
|
return r;
|
|
1291
1311
|
}
|
|
1292
1312
|
//#endregion
|
|
1293
1313
|
//#region src/app/front/localStorageSessions.ts
|
|
1294
|
-
function
|
|
1314
|
+
function Lt() {
|
|
1295
1315
|
let e = `s${Date.now()}`;
|
|
1296
1316
|
return {
|
|
1297
1317
|
sessions: [{
|
|
@@ -1302,7 +1322,7 @@ function It() {
|
|
|
1302
1322
|
activeId: e
|
|
1303
1323
|
};
|
|
1304
1324
|
}
|
|
1305
|
-
function
|
|
1325
|
+
function Rt(e, t) {
|
|
1306
1326
|
if (typeof localStorage > "u") return t();
|
|
1307
1327
|
try {
|
|
1308
1328
|
let t = localStorage.getItem(e);
|
|
@@ -1316,14 +1336,14 @@ function Lt(e, t) {
|
|
|
1316
1336
|
} catch {}
|
|
1317
1337
|
return t();
|
|
1318
1338
|
}
|
|
1319
|
-
function
|
|
1339
|
+
function zt(e, t) {
|
|
1320
1340
|
if (!(typeof localStorage > "u")) try {
|
|
1321
1341
|
localStorage.setItem(e, JSON.stringify(t));
|
|
1322
1342
|
} catch {}
|
|
1323
1343
|
}
|
|
1324
|
-
function
|
|
1325
|
-
let t = e.storageKey ?? "workspace:sessions", n =
|
|
1326
|
-
n = e,
|
|
1344
|
+
function Bt(e = {}) {
|
|
1345
|
+
let t = e.storageKey ?? "workspace:sessions", n = Rt(t, e.initial ?? Lt), r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1346
|
+
n = e, zt(t, n), r.forEach((e) => e());
|
|
1327
1347
|
};
|
|
1328
1348
|
return {
|
|
1329
1349
|
getState: () => n,
|
|
@@ -1358,13 +1378,13 @@ function zt(e = {}) {
|
|
|
1358
1378
|
}
|
|
1359
1379
|
};
|
|
1360
1380
|
}
|
|
1361
|
-
function
|
|
1362
|
-
return
|
|
1381
|
+
function Vt(e) {
|
|
1382
|
+
return Oe(e.subscribe, e.getState, e.getState);
|
|
1363
1383
|
}
|
|
1364
1384
|
//#endregion
|
|
1365
1385
|
//#region src/app/front/WorkspaceBackgroundBoot.tsx
|
|
1366
|
-
var
|
|
1367
|
-
function
|
|
1386
|
+
var Ht = 500, Ut = 1e4;
|
|
1387
|
+
function Wt(e) {
|
|
1368
1388
|
return new Promise((t, n) => {
|
|
1369
1389
|
let r, i = () => {
|
|
1370
1390
|
r && globalThis.clearTimeout(r), e.removeEventListener("abort", a);
|
|
@@ -1377,10 +1397,10 @@ function Ut(e) {
|
|
|
1377
1397
|
}
|
|
1378
1398
|
r = globalThis.setTimeout(() => {
|
|
1379
1399
|
i(), t();
|
|
1380
|
-
},
|
|
1400
|
+
}, Ht), e.addEventListener("abort", a, { once: !0 });
|
|
1381
1401
|
});
|
|
1382
1402
|
}
|
|
1383
|
-
async function
|
|
1403
|
+
async function Gt(e) {
|
|
1384
1404
|
let t = e.body;
|
|
1385
1405
|
if (!t) return f(await c(e));
|
|
1386
1406
|
let n = t.getReader(), r = new TextDecoder(), i = "";
|
|
@@ -1398,20 +1418,20 @@ async function Wt(e) {
|
|
|
1398
1418
|
await n.cancel().catch(() => void 0);
|
|
1399
1419
|
}
|
|
1400
1420
|
}
|
|
1401
|
-
function
|
|
1421
|
+
function P(e) {
|
|
1402
1422
|
if (!(e?.runtimeDependenciesState !== "preparing" && e?.runtimeDependenciesState !== "ready" && e?.runtimeDependenciesState !== "failed")) return {
|
|
1403
1423
|
state: e.runtimeDependenciesState,
|
|
1404
1424
|
...e.runtimeDependenciesMessage ? { message: e.runtimeDependenciesMessage } : {},
|
|
1405
1425
|
...e.runtimeDependenciesRequirement ? { requirement: e.runtimeDependenciesRequirement } : {}
|
|
1406
1426
|
};
|
|
1407
1427
|
}
|
|
1408
|
-
async function
|
|
1428
|
+
async function F(e) {
|
|
1409
1429
|
if (!e.ok) {
|
|
1410
1430
|
let t = await c(e);
|
|
1411
1431
|
if (r(t)) return { status: "preparing" };
|
|
1412
1432
|
throw Error(u(t) ?? `/api/v1/ready-status failed with ${e.status}`);
|
|
1413
1433
|
}
|
|
1414
|
-
let t = await
|
|
1434
|
+
let t = await Gt(e), n = P(t), i = m(t);
|
|
1415
1435
|
if (t?.state === "degraded" || t?.state === "failed") {
|
|
1416
1436
|
if (i && n?.state === "failed") return {
|
|
1417
1437
|
status: "ready",
|
|
@@ -1428,14 +1448,14 @@ async function Gt(e) {
|
|
|
1428
1448
|
};
|
|
1429
1449
|
}
|
|
1430
1450
|
async function Kt({ apiBaseUrl: t, path: n, headers: i, signal: a, workspaceId: s }) {
|
|
1431
|
-
let l = new AbortController(), f = globalThis.setTimeout(() => l.abort(new DOMException("Warmup attempt timed out", "TimeoutError")),
|
|
1451
|
+
let l = new AbortController(), f = globalThis.setTimeout(() => l.abort(new DOMException("Warmup attempt timed out", "TimeoutError")), Ut), p = () => l.abort(a.reason);
|
|
1432
1452
|
a.aborted && p(), a.addEventListener("abort", p, { once: !0 });
|
|
1433
1453
|
try {
|
|
1434
1454
|
let a = await fetch(o(t, n), {
|
|
1435
1455
|
headers: i,
|
|
1436
1456
|
signal: l.signal
|
|
1437
1457
|
});
|
|
1438
|
-
if (d(n)) return await
|
|
1458
|
+
if (d(n)) return await F(a);
|
|
1439
1459
|
let f = await c(a);
|
|
1440
1460
|
if (!a.ok) {
|
|
1441
1461
|
let e = r(f);
|
|
@@ -1454,13 +1474,13 @@ async function Kt({ apiBaseUrl: t, path: n, headers: i, signal: a, workspaceId:
|
|
|
1454
1474
|
globalThis.clearTimeout(f), a.removeEventListener("abort", p);
|
|
1455
1475
|
}
|
|
1456
1476
|
}
|
|
1457
|
-
function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r =
|
|
1458
|
-
return
|
|
1477
|
+
function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r = oe, provisionWorkspace: i = !0, onStatusChange: o }) {
|
|
1478
|
+
return x(() => {
|
|
1459
1479
|
let s = !1, c = new AbortController(), l = a(e, t);
|
|
1460
1480
|
async function u() {
|
|
1461
1481
|
o?.({ status: "preparing" });
|
|
1462
1482
|
try {
|
|
1463
|
-
let t =
|
|
1483
|
+
let t = he(r, i), a = (t) => Kt({
|
|
1464
1484
|
apiBaseUrl: n,
|
|
1465
1485
|
path: t,
|
|
1466
1486
|
headers: l,
|
|
@@ -1482,7 +1502,7 @@ function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r
|
|
|
1482
1502
|
status: "preparing",
|
|
1483
1503
|
message: "Workspace is still preparing",
|
|
1484
1504
|
...e ? { requirement: e } : {}
|
|
1485
|
-
}), await
|
|
1505
|
+
}), await Wt(c.signal), s || c.signal.aborted || (u = await Promise.all(f.map(async (e) => ({
|
|
1486
1506
|
path: e.path,
|
|
1487
1507
|
result: await a(e.path)
|
|
1488
1508
|
}))), s || c.signal.aborted)) return;
|
|
@@ -1492,7 +1512,7 @@ function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r
|
|
|
1492
1512
|
status: "ready",
|
|
1493
1513
|
...d ? { runtimeDependencies: d } : {}
|
|
1494
1514
|
}); d?.state === "preparing";) {
|
|
1495
|
-
if (await
|
|
1515
|
+
if (await Wt(c.signal), s || c.signal.aborted) return;
|
|
1496
1516
|
let e = await a("/api/v1/ready-status");
|
|
1497
1517
|
if (s || c.signal.aborted) return;
|
|
1498
1518
|
d = e.runtimeDependencies, d && o?.({
|
|
@@ -1524,24 +1544,24 @@ function qt({ workspaceId: e, requestHeaders: t, apiBaseUrl: n, preloadPaths: r
|
|
|
1524
1544
|
//#region src/app/front/WorkspaceAgentStatusStates.tsx
|
|
1525
1545
|
function Jt({ status: e }) {
|
|
1526
1546
|
let t = e.status === "ready" ? void 0 : e.requirement, n = e.status !== "failed", r = n ? t === "workspace-fs" ? "Preparing files…" : t === "sandbox-exec" ? "Preparing secure runtime…" : t === "ui-bridge" ? "Connecting workspace…" : "Preparing workspace…" : "Workspace workbench failed", i = e.status === "failed" ? e.message : "Chat is ready while files, tools, and workspace panels finish warming up.";
|
|
1527
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ E("div", {
|
|
1528
1548
|
className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center",
|
|
1529
|
-
children: /* @__PURE__ */
|
|
1549
|
+
children: /* @__PURE__ */ D("div", {
|
|
1530
1550
|
className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm",
|
|
1531
1551
|
children: [
|
|
1532
|
-
n ? /* @__PURE__ */
|
|
1552
|
+
n ? /* @__PURE__ */ E("div", {
|
|
1533
1553
|
className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin",
|
|
1534
1554
|
"aria-hidden": "true"
|
|
1535
1555
|
}) : null,
|
|
1536
|
-
/* @__PURE__ */
|
|
1556
|
+
/* @__PURE__ */ E("div", {
|
|
1537
1557
|
className: "text-sm font-semibold text-foreground",
|
|
1538
1558
|
children: r
|
|
1539
1559
|
}),
|
|
1540
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ E("p", {
|
|
1541
1561
|
className: "mt-2 text-sm text-muted-foreground",
|
|
1542
1562
|
children: i
|
|
1543
1563
|
}),
|
|
1544
|
-
e.status === "failed" ? /* @__PURE__ */
|
|
1564
|
+
e.status === "failed" ? /* @__PURE__ */ E("p", {
|
|
1545
1565
|
className: "mt-3 text-xs text-muted-foreground",
|
|
1546
1566
|
children: "Reload the workspace to retry."
|
|
1547
1567
|
}) : null
|
|
@@ -1550,20 +1570,20 @@ function Jt({ status: e }) {
|
|
|
1550
1570
|
});
|
|
1551
1571
|
}
|
|
1552
1572
|
function Yt() {
|
|
1553
|
-
return /* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ E("div", {
|
|
1554
1574
|
className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center",
|
|
1555
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ D("div", {
|
|
1556
1576
|
className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm",
|
|
1557
1577
|
children: [
|
|
1558
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ E("div", {
|
|
1559
1579
|
className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin",
|
|
1560
1580
|
"aria-hidden": "true"
|
|
1561
1581
|
}),
|
|
1562
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ E("div", {
|
|
1563
1583
|
className: "text-sm font-semibold text-foreground",
|
|
1564
1584
|
children: "Loading sessions…"
|
|
1565
1585
|
}),
|
|
1566
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ E("p", {
|
|
1567
1587
|
className: "mt-2 text-sm text-muted-foreground",
|
|
1568
1588
|
children: "Finding this workspace’s saved chats."
|
|
1569
1589
|
})
|
|
@@ -1586,8 +1606,8 @@ function Qt(e) {
|
|
|
1586
1606
|
return typeof t == "string" ? t : null;
|
|
1587
1607
|
}
|
|
1588
1608
|
function $t({ bridgeEndpoint: e, requestHeaders: t, navOpen: n, surfaceOpen: r, surfaceReady: i, snapshot: a }) {
|
|
1589
|
-
let o =
|
|
1590
|
-
return
|
|
1609
|
+
let o = le(), s = ae(), c = Oe(o.subscribe, o.getSnapshot, o.getSnapshot), l = Oe(s.subscribe, s.getSnapshot, s.getSnapshot), u = C(null);
|
|
1610
|
+
return x(() => {
|
|
1591
1611
|
if (e === null || r && !i) return;
|
|
1592
1612
|
u.current?.abort();
|
|
1593
1613
|
let o = new AbortController();
|
|
@@ -1601,7 +1621,7 @@ function $t({ bridgeEndpoint: e, requestHeaders: t, navOpen: n, surfaceOpen: r,
|
|
|
1601
1621
|
activeFile: Qt(a),
|
|
1602
1622
|
availablePanels: c.map((e) => e.id),
|
|
1603
1623
|
availableSurfaces: l.flatMap((e) => {
|
|
1604
|
-
let t =
|
|
1624
|
+
let t = se(e);
|
|
1605
1625
|
return t ? [t] : [];
|
|
1606
1626
|
})
|
|
1607
1627
|
};
|
|
@@ -1644,7 +1664,7 @@ function tn(e) {
|
|
|
1644
1664
|
}
|
|
1645
1665
|
}
|
|
1646
1666
|
function nn({ plugins: e, activeOverlay: t, setActiveOverlay: n }) {
|
|
1647
|
-
return
|
|
1667
|
+
return S(() => e.flatMap((e) => e.registrations.appLeftActions.map((t) => ({
|
|
1648
1668
|
plugin: e,
|
|
1649
1669
|
action: t
|
|
1650
1670
|
}))).sort((e, t) => (e.action.order ?? 0) - (t.action.order ?? 0) || (e.plugin.label ?? e.plugin.id).localeCompare(t.plugin.label ?? t.plugin.id) || e.action.label.localeCompare(t.action.label) || e.action.id.localeCompare(t.action.id)).map(({ plugin: e, action: r }) => {
|
|
@@ -1652,16 +1672,16 @@ function nn({ plugins: e, activeOverlay: t, setActiveOverlay: n }) {
|
|
|
1652
1672
|
return {
|
|
1653
1673
|
id: r.id,
|
|
1654
1674
|
label: r.label,
|
|
1655
|
-
icon: i ?
|
|
1675
|
+
icon: i ? Ee(de, {
|
|
1656
1676
|
pluginId: e.id,
|
|
1657
1677
|
contributionKind: "app-left-action",
|
|
1658
1678
|
contributionId: `${r.id}:icon`
|
|
1659
|
-
},
|
|
1660
|
-
trailing: a ?
|
|
1679
|
+
}, Ee(i, { className: "h-4 w-4" })) : null,
|
|
1680
|
+
trailing: a ? Ee(de, {
|
|
1661
1681
|
pluginId: e.id,
|
|
1662
1682
|
contributionKind: "app-left-action",
|
|
1663
1683
|
contributionId: `${r.id}:trailing`
|
|
1664
|
-
},
|
|
1684
|
+
}, Ee(a)) : void 0,
|
|
1665
1685
|
emphasis: r.emphasis,
|
|
1666
1686
|
active: t === r.id,
|
|
1667
1687
|
onClick: () => {
|
|
@@ -1676,20 +1696,20 @@ function rn({ plugins: e, activeOverlay: t, onClose: n, headerInsetStart: r, hea
|
|
|
1676
1696
|
plugin: e,
|
|
1677
1697
|
action: t
|
|
1678
1698
|
}))).find(({ action: e }) => e.id === t);
|
|
1679
|
-
return a?.action.overlay ?
|
|
1699
|
+
return a?.action.overlay ? Ee(ve, { value: {
|
|
1680
1700
|
headerInsetStart: !!r,
|
|
1681
1701
|
headerInsetEnd: !!i
|
|
1682
|
-
} },
|
|
1702
|
+
} }, Ee(de, {
|
|
1683
1703
|
pluginId: a.plugin.id,
|
|
1684
1704
|
contributionKind: "app-left-action",
|
|
1685
1705
|
contributionId: a.action.id
|
|
1686
|
-
},
|
|
1706
|
+
}, Ee(a.action.overlay, { onClose: n }))) : null;
|
|
1687
1707
|
}
|
|
1688
1708
|
//#endregion
|
|
1689
1709
|
//#region src/app/front/CloseLeftPaneOnAttention.tsx
|
|
1690
1710
|
function an({ activeSessionId: e, onAttentionOpen: t }) {
|
|
1691
|
-
let { blockers: n } =
|
|
1692
|
-
return
|
|
1711
|
+
let { blockers: n } = pe(), r = n.some((t) => t.sessionId && e && t.sessionId !== e ? !1 : t.focus?.closeWorkbenchLeftPane === !0), i = C(!1);
|
|
1712
|
+
return x(() => {
|
|
1693
1713
|
r && !i.current && t(), i.current = r;
|
|
1694
1714
|
}, [r, t]), null;
|
|
1695
1715
|
}
|
|
@@ -1719,42 +1739,71 @@ function ln(e, t) {
|
|
|
1719
1739
|
return e.endsWith(":surface") ? e.slice(0, -8) : t;
|
|
1720
1740
|
}
|
|
1721
1741
|
function un(e, t, n) {
|
|
1722
|
-
let [r, i] =
|
|
1723
|
-
return
|
|
1724
|
-
i(
|
|
1742
|
+
let [r, i] = w(() => Ce(e, t, n));
|
|
1743
|
+
return x(() => {
|
|
1744
|
+
i(Ce(e, t, n));
|
|
1725
1745
|
}, [
|
|
1726
1746
|
e,
|
|
1727
1747
|
t,
|
|
1728
1748
|
n
|
|
1729
|
-
]), [r,
|
|
1749
|
+
]), [r, b((t) => {
|
|
1730
1750
|
i((r) => {
|
|
1731
1751
|
let i = typeof t == "function" ? t(r) : t;
|
|
1732
|
-
return
|
|
1752
|
+
return ye(e, i, n), i;
|
|
1733
1753
|
});
|
|
1734
1754
|
}, [n, e])];
|
|
1735
1755
|
}
|
|
1736
1756
|
function dn(e, t, n) {
|
|
1737
|
-
let [r, i] =
|
|
1738
|
-
return
|
|
1739
|
-
i(
|
|
1757
|
+
let [r, i] = w(() => xe(e, t, n));
|
|
1758
|
+
return x(() => {
|
|
1759
|
+
i(xe(e, t, n));
|
|
1740
1760
|
}, [
|
|
1741
1761
|
e,
|
|
1742
1762
|
t,
|
|
1743
1763
|
n
|
|
1744
|
-
]), [r,
|
|
1745
|
-
i(t),
|
|
1764
|
+
]), [r, b((t) => {
|
|
1765
|
+
i(t), _e(e, t, n);
|
|
1746
1766
|
}, [n, e])];
|
|
1747
1767
|
}
|
|
1748
|
-
|
|
1749
|
-
|
|
1768
|
+
function fn(e, t, n) {
|
|
1769
|
+
if (!n || typeof window > "u") return t;
|
|
1770
|
+
try {
|
|
1771
|
+
let n = window.localStorage.getItem(e);
|
|
1772
|
+
return n === null ? t : n || null;
|
|
1773
|
+
} catch {
|
|
1774
|
+
return t;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
function pn(e, t, n) {
|
|
1778
|
+
if (!(!n || typeof window > "u")) try {
|
|
1779
|
+
t ? window.localStorage.setItem(e, t) : window.localStorage.removeItem(e);
|
|
1780
|
+
} catch {}
|
|
1781
|
+
}
|
|
1782
|
+
function mn(e, t, n) {
|
|
1783
|
+
let [r, i] = w(() => fn(e, t, n));
|
|
1784
|
+
return x(() => {
|
|
1785
|
+
i(fn(e, t, n));
|
|
1786
|
+
}, [
|
|
1787
|
+
n,
|
|
1788
|
+
t,
|
|
1789
|
+
e
|
|
1790
|
+
]), [r, b((t) => {
|
|
1791
|
+
i((r) => {
|
|
1792
|
+
let i = typeof t == "function" ? t(r) : t;
|
|
1793
|
+
return pn(e, i, n), i;
|
|
1794
|
+
});
|
|
1795
|
+
}, [n, e])];
|
|
1796
|
+
}
|
|
1797
|
+
var hn = {}, gn = [], _n = { status: "preparing" };
|
|
1798
|
+
function vn(e, t, n) {
|
|
1750
1799
|
return Math.min(n, Math.max(t, e));
|
|
1751
1800
|
}
|
|
1752
|
-
var
|
|
1801
|
+
var yn = {
|
|
1753
1802
|
openTabs: [],
|
|
1754
1803
|
activeTab: null
|
|
1755
1804
|
};
|
|
1756
|
-
function
|
|
1757
|
-
let t = e.workspaceId ??
|
|
1805
|
+
function bn(e) {
|
|
1806
|
+
let t = e.workspaceId ?? xn(e.requestHeaders) ?? e.storageKey, n = nt({
|
|
1758
1807
|
apiBaseUrl: e.apiBaseUrl,
|
|
1759
1808
|
workspaceId: t,
|
|
1760
1809
|
storageScope: t,
|
|
@@ -1768,21 +1817,21 @@ function _n(e) {
|
|
|
1768
1817
|
workspaceId: n.dataStorageScope
|
|
1769
1818
|
};
|
|
1770
1819
|
}
|
|
1771
|
-
function
|
|
1820
|
+
function xn(e) {
|
|
1772
1821
|
return e?.["x-boring-workspace-id"] ?? e?.["X-Boring-Workspace-Id"] ?? null;
|
|
1773
1822
|
}
|
|
1774
|
-
function
|
|
1823
|
+
function Sn(e) {
|
|
1775
1824
|
let t = e.reloaded ? "Extensions reloaded." : "Extensions will reload on the next message.", n = Array.isArray(e.diagnostics) ? e.diagnostics.map((e) => e.message).filter((e) => !!e) : [];
|
|
1776
1825
|
return n.length > 0 ? `${t}\n\nWarnings:\n${n.join("\n")}` : t;
|
|
1777
1826
|
}
|
|
1778
|
-
function
|
|
1827
|
+
function Cn(e) {
|
|
1779
1828
|
try {
|
|
1780
1829
|
return globalThis.localStorage?.getItem(e) ?? null;
|
|
1781
1830
|
} catch {
|
|
1782
1831
|
return null;
|
|
1783
1832
|
}
|
|
1784
1833
|
}
|
|
1785
|
-
function
|
|
1834
|
+
function wn(e, t) {
|
|
1786
1835
|
try {
|
|
1787
1836
|
let n = globalThis.localStorage?.getItem(e);
|
|
1788
1837
|
if (!n) return null;
|
|
@@ -1796,7 +1845,7 @@ function xn(e, t) {
|
|
|
1796
1845
|
return null;
|
|
1797
1846
|
}
|
|
1798
1847
|
}
|
|
1799
|
-
function
|
|
1848
|
+
function Tn(e, t) {
|
|
1800
1849
|
try {
|
|
1801
1850
|
if (t.ids.length === 0) {
|
|
1802
1851
|
globalThis.localStorage?.removeItem(e);
|
|
@@ -1808,7 +1857,7 @@ function Sn(e, t) {
|
|
|
1808
1857
|
}));
|
|
1809
1858
|
} catch {}
|
|
1810
1859
|
}
|
|
1811
|
-
function
|
|
1860
|
+
function En(e, t) {
|
|
1812
1861
|
try {
|
|
1813
1862
|
let n = globalThis.localStorage?.getItem(e);
|
|
1814
1863
|
if (!n) return null;
|
|
@@ -1821,7 +1870,7 @@ function Cn(e, t) {
|
|
|
1821
1870
|
return null;
|
|
1822
1871
|
}
|
|
1823
1872
|
}
|
|
1824
|
-
function
|
|
1873
|
+
function Dn(e, t) {
|
|
1825
1874
|
try {
|
|
1826
1875
|
if (t.length === 0) {
|
|
1827
1876
|
globalThis.localStorage?.removeItem(e);
|
|
@@ -1830,94 +1879,94 @@ function wn(e, t) {
|
|
|
1830
1879
|
globalThis.localStorage?.setItem(e, JSON.stringify({ ids: t }));
|
|
1831
1880
|
} catch {}
|
|
1832
1881
|
}
|
|
1833
|
-
function
|
|
1834
|
-
let
|
|
1835
|
-
...i ??
|
|
1836
|
-
...
|
|
1882
|
+
function On({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, sessionStorageKey: o, providerStorageKey: c, surfaceStorageKey: u, beforeShell: d, afterShell: f, panels: p, commands: m, catalogs: h, plugins: g, excludeDefaults: _, capabilities: v, apiBaseUrl: te, authHeaders: re, apiTimeout: ie, defaultTheme: ae, onThemeChange: oe, persistenceEnabled: se, debug: ce, bridgeEndpoint: le, fullPageBasePath: de, onAuthError: fe, sessions: pe, activeSessionId: me, onSwitchSession: he, onCreateSession: y, onDeleteSession: _e, onActiveSessionIdChange: ve, appTitle: ye = "Boring UI", workspaceLabel: xe, workspaceSectionTitle: Ce = "Workspaces", appLeftLayoutMode: we = "single-project", appLeftHeaderMode: Ee = "full", appLeftProjects: De, appLeftActiveProjectId: Oe, onSwitchAppLeftProject: ke, onOpenAppLeftProjectSession: Ae, onShowMoreAppLeftProjectSessions: je, onCreateAppLeftProject: Me, onOpenAppLeftProjectSettings: Ne, onOpenAppLeftProjectInNewTab: Pe, defaultSessionTitle: O = "New session", workspaceLayout: Fe = "classic", navEnabled: Ie = !0, defaultNavOpen: Le = !1, defaultAppLeftPaneCollapsed: Re, defaultSurfaceOpen: ze, defaultWorkbenchLeftTab: Be, defaultWorkbenchLeftOpen: He, surfaceInitialPanels: Ue, topBarLeft: We, topBarRight: Ge, showThemeToggle: qe = !0, defaultLeftOverlay: Je = null, showSkills: Ye = !0, showPlugins: Xe = !0, appLeftActions: Ze, appLeftOverlayActions: k, chatParams: A, externalPlugins: Qe, hotReloadEnabled: $e, frontPluginHotReload: nt, extraPanels: it, extraCommands: ot, provisionWorkspace: st, bootPreloadPaths: ct, onWorkspaceWarmupStatusChange: lt, onOpenNav: ut, onOpenSurface: dt, surfaceButtonBottomOffset: ft, mobileShellEnabled: pt = !0, className: mt }) {
|
|
1883
|
+
let ht = ge(), _t = pt && ht < 640, vt = Qe !== !1, bt = vt ? nt : !1, xt = vt ? $e : !1, St = c ?? `boring-ui-v2:layout:${e}`, j = u ?? `${St}:surface`, Ct = ln(j, St), M = se !== !1, N = Fe === "plugin-tabs", wt = Ye !== !1, Tt = Xe !== !1, Et = p, Dt = o ?? `boring-workspace:sessions:${e}`, Ot = S(() => a(e, i ?? hn), [i, e]), kt = S(() => a(e, {
|
|
1884
|
+
...i ?? hn,
|
|
1885
|
+
...re ?? hn
|
|
1837
1886
|
}), [
|
|
1838
|
-
|
|
1887
|
+
re,
|
|
1839
1888
|
i,
|
|
1840
1889
|
e
|
|
1841
|
-
]),
|
|
1890
|
+
]), At = S(() => Bt({ storageKey: Dt }), [Dt]), jt = Vt(At), [Nt, Ft] = w(() => ({
|
|
1842
1891
|
workspaceId: e,
|
|
1843
|
-
status:
|
|
1844
|
-
})), [
|
|
1892
|
+
status: _n
|
|
1893
|
+
})), [Lt, Rt] = w(() => ({
|
|
1845
1894
|
workspaceId: e,
|
|
1846
1895
|
expired: !1
|
|
1847
|
-
})), [
|
|
1896
|
+
})), [zt, Ht] = w(() => ({
|
|
1848
1897
|
workspaceId: e,
|
|
1849
1898
|
creating: !1
|
|
1850
|
-
})), [
|
|
1899
|
+
})), [Ut, Wt] = w(() => ({
|
|
1851
1900
|
workspaceId: e,
|
|
1852
1901
|
failed: !1
|
|
1853
|
-
})),
|
|
1902
|
+
})), Gt = `boring-workspace:chat-panes:${e}`, [P, F] = w(() => (M ? wn(Gt, e) : null) ?? {
|
|
1854
1903
|
workspaceId: e,
|
|
1855
1904
|
ids: [],
|
|
1856
1905
|
activeId: null
|
|
1857
|
-
}), [Kt, Xt] =
|
|
1858
|
-
|
|
1906
|
+
}), [Kt, Xt] = w(null);
|
|
1907
|
+
x(() => {
|
|
1859
1908
|
if (!Kt) return;
|
|
1860
1909
|
let e = setTimeout(() => Xt(null), 700);
|
|
1861
1910
|
return () => clearTimeout(e);
|
|
1862
1911
|
}, [Kt]);
|
|
1863
|
-
let Zt = `boring-workspace:pinned-sessions:${e}`, [Qt,
|
|
1912
|
+
let Zt = `boring-workspace:pinned-sessions:${e}`, [Qt, fn] = w(() => (M ? En(Zt, e) : null) ?? {
|
|
1864
1913
|
workspaceId: e,
|
|
1865
1914
|
ids: []
|
|
1866
|
-
}),
|
|
1867
|
-
|
|
1868
|
-
|
|
1915
|
+
}), pn = Qt.workspaceId === e ? Qt.ids : gn;
|
|
1916
|
+
x(() => {
|
|
1917
|
+
fn((t) => t.workspaceId === e ? t : (M ? En(Zt, e) : null) ?? {
|
|
1869
1918
|
workspaceId: e,
|
|
1870
1919
|
ids: []
|
|
1871
1920
|
});
|
|
1872
1921
|
}, [
|
|
1873
1922
|
Zt,
|
|
1874
|
-
|
|
1923
|
+
M,
|
|
1875
1924
|
e
|
|
1876
1925
|
]);
|
|
1877
|
-
let
|
|
1878
|
-
|
|
1926
|
+
let xn = b((t) => {
|
|
1927
|
+
fn((n) => {
|
|
1879
1928
|
let r = n.workspaceId === e ? n.ids : [], i = r.includes(t) ? r.filter((e) => e !== t) : [t, ...r];
|
|
1880
|
-
return
|
|
1929
|
+
return M && Dn(Zt, i), {
|
|
1881
1930
|
workspaceId: e,
|
|
1882
1931
|
ids: i
|
|
1883
1932
|
};
|
|
1884
1933
|
});
|
|
1885
1934
|
}, [
|
|
1886
1935
|
Zt,
|
|
1887
|
-
|
|
1936
|
+
M,
|
|
1888
1937
|
e
|
|
1889
1938
|
]);
|
|
1890
|
-
|
|
1891
|
-
|
|
1939
|
+
x(() => {
|
|
1940
|
+
M && P.workspaceId === e && Tn(Gt, P);
|
|
1892
1941
|
}, [
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1942
|
+
P,
|
|
1943
|
+
Gt,
|
|
1944
|
+
M,
|
|
1896
1945
|
e
|
|
1897
|
-
]),
|
|
1898
|
-
|
|
1946
|
+
]), x(() => {
|
|
1947
|
+
F((t) => t.workspaceId === e ? t : (M ? wn(Gt, e) : null) ?? {
|
|
1899
1948
|
workspaceId: e,
|
|
1900
1949
|
ids: [],
|
|
1901
1950
|
activeId: null
|
|
1902
1951
|
});
|
|
1903
1952
|
}, [
|
|
1904
|
-
|
|
1905
|
-
|
|
1953
|
+
Gt,
|
|
1954
|
+
M,
|
|
1906
1955
|
e
|
|
1907
1956
|
]);
|
|
1908
|
-
let
|
|
1909
|
-
requestHeaders:
|
|
1910
|
-
storageKey:
|
|
1957
|
+
let On = Nt.workspaceId === e ? Nt.status : _n, kn = t ?? et, An = r ?? bn, jn = !t || !!r, Mn = jn && st !== !1, Nn = () => void 0, I = An({
|
|
1958
|
+
requestHeaders: Ot,
|
|
1959
|
+
storageKey: Dt,
|
|
1911
1960
|
workspaceId: e,
|
|
1912
|
-
apiBaseUrl:
|
|
1913
|
-
enabled:
|
|
1914
|
-
}), [
|
|
1961
|
+
apiBaseUrl: te,
|
|
1962
|
+
enabled: Mn
|
|
1963
|
+
}), [Pn, Fn] = w(() => ({
|
|
1915
1964
|
workspaceId: e,
|
|
1916
1965
|
sessions: [],
|
|
1917
1966
|
activeSessionId: null
|
|
1918
|
-
})),
|
|
1919
|
-
|
|
1920
|
-
|
|
1967
|
+
})), In = Mn && I.workspaceId != null && I.workspaceId !== e, L = Mn && !I.loading && !I.error && !In, R = Mn && !L;
|
|
1968
|
+
x(() => {
|
|
1969
|
+
L && Fn((t) => {
|
|
1921
1970
|
let n = t.workspaceId === e, r = t.activeSessionId === I.activeSessionId, i = t.sessions.length === I.sessions.length && t.sessions.every((e, t) => e.id === I.sessions[t]?.id);
|
|
1922
1971
|
return n && r && i ? t : {
|
|
1923
1972
|
workspaceId: e,
|
|
@@ -1928,151 +1977,151 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
1928
1977
|
}, [
|
|
1929
1978
|
I.activeSessionId,
|
|
1930
1979
|
I.sessions,
|
|
1931
|
-
|
|
1980
|
+
L,
|
|
1932
1981
|
e
|
|
1933
1982
|
]);
|
|
1934
|
-
let
|
|
1935
|
-
|
|
1936
|
-
if (!
|
|
1937
|
-
|
|
1983
|
+
let z = R && Pn.workspaceId === e && Pn.sessions.length > 0, Ln = R ? Cn(Dt) : null, Rn = R && !In ? I.activeSessionId ?? null : null, B = L ? I.sessions : z ? Pn.sessions : [], zn = L ? I.activeSessionId : z ? Pn.activeSessionId : null, V = jn && (L || z) ? I : void 0, Bn = pe !== void 0 || me !== void 0 || he !== void 0 || y !== void 0 || _e !== void 0, Vn = Lt.workspaceId === e && Lt.expired, Hn = C(!1), Un = !!(L && V && !Bn && B.length === 0 && !Vn), Wn = zt.workspaceId === e && zt.creating, Gn = Ut.workspaceId === e && Ut.failed, Kn = !!(L && V && !Bn && B.length === 0 && Vn && !Hn.current && !Gn), qn = !!(R && I.loading && !I.error && jn && !Bn && !z && !Ln && !Rn) || Un || Wn || Kn;
|
|
1984
|
+
x(() => {
|
|
1985
|
+
if (!Un) {
|
|
1986
|
+
Lt.workspaceId !== e && Rt({
|
|
1938
1987
|
workspaceId: e,
|
|
1939
1988
|
expired: !1
|
|
1940
1989
|
});
|
|
1941
1990
|
return;
|
|
1942
1991
|
}
|
|
1943
|
-
|
|
1992
|
+
Rt({
|
|
1944
1993
|
workspaceId: e,
|
|
1945
1994
|
expired: !1
|
|
1946
1995
|
});
|
|
1947
1996
|
let t = globalThis.setTimeout(() => {
|
|
1948
|
-
|
|
1997
|
+
Rt({
|
|
1949
1998
|
workspaceId: e,
|
|
1950
1999
|
expired: !0
|
|
1951
2000
|
});
|
|
1952
2001
|
}, 2e3);
|
|
1953
2002
|
return () => globalThis.clearTimeout(t);
|
|
1954
2003
|
}, [
|
|
1955
|
-
|
|
1956
|
-
|
|
2004
|
+
Lt.workspaceId,
|
|
2005
|
+
Un,
|
|
1957
2006
|
e
|
|
1958
2007
|
]);
|
|
1959
|
-
let
|
|
2008
|
+
let Jn = V ? B.map((e) => ({
|
|
1960
2009
|
...e,
|
|
1961
2010
|
title: e.title ?? "New session"
|
|
1962
|
-
})) : void 0,
|
|
1963
|
-
id:
|
|
2011
|
+
})) : void 0, Yn = Ln ? [{
|
|
2012
|
+
id: Ln,
|
|
1964
2013
|
title: "Loading sessions…",
|
|
1965
2014
|
createdAt: (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
1966
2015
|
updatedAt: (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
1967
2016
|
turnCount: 0
|
|
1968
|
-
}] : [], H = V ?
|
|
1969
|
-
|
|
1970
|
-
if (
|
|
1971
|
-
|
|
2017
|
+
}] : [], H = V ? Jn ?? [] : R ? Yn : Bn ? pe ?? [] : jt.sessions, Xn = V ? zn ?? null : R ? Ln ?? Rn : Bn ? me ?? null : jt.activeId, Zn = A?.autoSubmitInitialDraft === !0, Qn = Zn && jn && !Bn, [U, $n] = w(() => Qn ? null : void 0), er = C(e), tr = C(!1);
|
|
2018
|
+
x(() => {
|
|
2019
|
+
if (er.current !== e) {
|
|
2020
|
+
er.current = e, tr.current = !1, $n(Qn ? null : void 0);
|
|
1972
2021
|
return;
|
|
1973
2022
|
}
|
|
1974
|
-
|
|
2023
|
+
Qn && U === void 0 && (tr.current = !1, $n(null));
|
|
1975
2024
|
}, [
|
|
1976
2025
|
U,
|
|
1977
|
-
|
|
2026
|
+
Qn,
|
|
1978
2027
|
e
|
|
1979
|
-
]),
|
|
1980
|
-
!V || U !== null ||
|
|
2028
|
+
]), x(() => {
|
|
2029
|
+
!V || U !== null || tr.current || (tr.current = !0, Promise.resolve(V.create({ title: O })).then((e) => {
|
|
1981
2030
|
if (typeof e?.id != "string") throw Error("auto_submit_session_create_failed");
|
|
1982
|
-
|
|
2031
|
+
$n(e.id);
|
|
1983
2032
|
}).catch(() => {
|
|
1984
|
-
|
|
2033
|
+
tr.current = !1, $n(void 0);
|
|
1985
2034
|
}));
|
|
1986
2035
|
}, [
|
|
1987
2036
|
U,
|
|
1988
|
-
|
|
2037
|
+
O,
|
|
1989
2038
|
V
|
|
1990
2039
|
]);
|
|
1991
|
-
let W = U === void 0 ?
|
|
2040
|
+
let W = U === void 0 ? Xn : U ?? null, G = R ? Nn : V?.switch ?? he ?? At.switchTo, nr = b((e) => (W && e !== W && n({
|
|
1992
2041
|
sessionId: W,
|
|
1993
2042
|
reason: ee.sessionSwitch
|
|
1994
|
-
}), G(e)), [W, G]),
|
|
1995
|
-
if (V &&
|
|
1996
|
-
if (V && !
|
|
1997
|
-
if (V.hasMore) return
|
|
1998
|
-
if (
|
|
1999
|
-
|
|
2043
|
+
}), G(e)), [W, G]), rr = R ? Nn : V ? () => V.create() : y ? () => y() : () => At.create(), ir = R ? Nn : V?.delete ?? _e ?? At.remove, ar = b((t) => {
|
|
2044
|
+
if (V && R && B.length <= 1) return Hn.current = !0, ir(t);
|
|
2045
|
+
if (V && !R && B.length <= 1) {
|
|
2046
|
+
if (V.hasMore) return Hn.current = !0, ir(t);
|
|
2047
|
+
if (Tr.current.has(t)) return Promise.resolve();
|
|
2048
|
+
Tr.current.add(t), wr.current = !0, Wt({
|
|
2000
2049
|
workspaceId: e,
|
|
2001
2050
|
failed: !1
|
|
2002
2051
|
});
|
|
2003
|
-
let n = V.create({ title:
|
|
2004
|
-
return Promise.resolve(n && typeof n.then == "function" ? Promise.resolve(n).then(() =>
|
|
2005
|
-
throw
|
|
2052
|
+
let n = V.create({ title: O });
|
|
2053
|
+
return Promise.resolve(n && typeof n.then == "function" ? Promise.resolve(n).then(() => ir(t)) : ir(t)).catch((t) => {
|
|
2054
|
+
throw wr.current = !1, Wt({
|
|
2006
2055
|
workspaceId: e,
|
|
2007
2056
|
failed: !0
|
|
2008
2057
|
}), t;
|
|
2009
2058
|
}).finally(() => {
|
|
2010
|
-
|
|
2059
|
+
Tr.current.delete(t);
|
|
2011
2060
|
});
|
|
2012
2061
|
}
|
|
2013
|
-
return
|
|
2062
|
+
return ir(t);
|
|
2014
2063
|
}, [
|
|
2015
2064
|
B.length,
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2065
|
+
O,
|
|
2066
|
+
ir,
|
|
2067
|
+
R,
|
|
2019
2068
|
V,
|
|
2020
2069
|
e
|
|
2021
|
-
]),
|
|
2070
|
+
]), or = H.find((e) => e.id === W)?.title ?? void 0, [sr, cr] = dn(`${Ct}:drawer`, Le, M), [lr, ur] = dn(`${Ct}:appLeftPaneCollapsed`, Re ?? !1, M), [dr, fr] = un(`${Ct}:appLeftPaneWidth`, 268, M), pr = vn(dr, 220, 420), K = S(() => It({
|
|
2022
2071
|
plugins: g,
|
|
2023
2072
|
excludeDefaults: _
|
|
2024
|
-
}), [_, g]), [q, J] =
|
|
2025
|
-
|
|
2026
|
-
let e = !!(q &&
|
|
2027
|
-
(q === "skills" && !
|
|
2073
|
+
}), [_, g]), [q, J] = mn(`${Ct}:appLeftOverlay`, Je, M), mr = S(() => en(K), [K]);
|
|
2074
|
+
x(() => {
|
|
2075
|
+
let e = !!(q && k?.some((e) => e.id === q));
|
|
2076
|
+
(q === "skills" && !wt || q === "plugins" && !Tt || q !== null && q !== "skills" && q !== "plugins" && !mr.has(q) && !e) && J(null);
|
|
2028
2077
|
}, [
|
|
2029
|
-
|
|
2078
|
+
k,
|
|
2030
2079
|
q,
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2080
|
+
mr,
|
|
2081
|
+
Tt,
|
|
2082
|
+
wt
|
|
2034
2083
|
]);
|
|
2035
|
-
let
|
|
2036
|
-
|
|
2037
|
-
}, [
|
|
2038
|
-
|
|
2039
|
-
let [
|
|
2040
|
-
key:
|
|
2041
|
-
snapshot:
|
|
2042
|
-
})),
|
|
2043
|
-
|
|
2044
|
-
|
|
2084
|
+
let hr = Ie && sr, [Y, X] = dn(`${Ct}:workbenchOpen`, ze ?? !1, M), [gr, _r] = w(!1), [vr, yr] = dn(`${Ct}:workbenchLeftOpen`, He ?? !1, M), [br, xr] = w(() => He ?? !1), Sr = He === !1 ? br : vr, Cr = b(() => {
|
|
2085
|
+
yr(!1), xr(!1), J(null);
|
|
2086
|
+
}, [yr]), wr = C(!1), Tr = C(/* @__PURE__ */ new Set()), Er = C(null), Dr = C(Y), Or = C(j), kr = C(null), Ar = C([]);
|
|
2087
|
+
Or.current = j;
|
|
2088
|
+
let [jr, Mr] = w(() => ({
|
|
2089
|
+
key: j,
|
|
2090
|
+
snapshot: yn
|
|
2091
|
+
})), Nr = jr.key === j ? jr.snapshot : yn;
|
|
2092
|
+
x(() => {
|
|
2093
|
+
wr.current = !1, Tr.current.clear(), Hn.current = !1, Ht({
|
|
2045
2094
|
workspaceId: e,
|
|
2046
2095
|
creating: !1
|
|
2047
|
-
}),
|
|
2096
|
+
}), Wt({
|
|
2048
2097
|
workspaceId: e,
|
|
2049
2098
|
failed: !1
|
|
2050
2099
|
});
|
|
2051
|
-
}, [e]),
|
|
2052
|
-
|
|
2053
|
-
}, [
|
|
2054
|
-
if (!(!V || V.loading) && !
|
|
2100
|
+
}, [e]), x(() => {
|
|
2101
|
+
_r(!1), Ar.current = [];
|
|
2102
|
+
}, [j]), x(() => {
|
|
2103
|
+
if (!(!V || V.loading) && !Un && U === void 0) {
|
|
2055
2104
|
if (B.length > 0) {
|
|
2056
|
-
|
|
2105
|
+
wr.current = !1, Hn.current = !1, Ht((t) => t.workspaceId === e && t.creating ? {
|
|
2057
2106
|
workspaceId: e,
|
|
2058
2107
|
creating: !1
|
|
2059
|
-
} : t),
|
|
2108
|
+
} : t), Wt((t) => t.workspaceId === e && t.failed ? {
|
|
2060
2109
|
workspaceId: e,
|
|
2061
2110
|
failed: !1
|
|
2062
2111
|
} : t);
|
|
2063
2112
|
return;
|
|
2064
2113
|
}
|
|
2065
|
-
|
|
2114
|
+
Hn.current || wr.current || (wr.current = !0, Ht({
|
|
2066
2115
|
workspaceId: e,
|
|
2067
2116
|
creating: !0
|
|
2068
|
-
}),
|
|
2117
|
+
}), Wt({
|
|
2069
2118
|
workspaceId: e,
|
|
2070
2119
|
failed: !1
|
|
2071
|
-
}), Promise.resolve(V.create({ title:
|
|
2072
|
-
|
|
2120
|
+
}), Promise.resolve(V.create({ title: O })).catch(() => {
|
|
2121
|
+
wr.current = !1, Ht({
|
|
2073
2122
|
workspaceId: e,
|
|
2074
2123
|
creating: !1
|
|
2075
|
-
}),
|
|
2124
|
+
}), Wt({
|
|
2076
2125
|
workspaceId: e,
|
|
2077
2126
|
failed: !0
|
|
2078
2127
|
});
|
|
@@ -2081,101 +2130,101 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2081
2130
|
}, [
|
|
2082
2131
|
B.length,
|
|
2083
2132
|
U,
|
|
2084
|
-
|
|
2085
|
-
|
|
2133
|
+
O,
|
|
2134
|
+
Un,
|
|
2086
2135
|
V,
|
|
2087
2136
|
e
|
|
2088
|
-
]),
|
|
2089
|
-
|
|
2137
|
+
]), x(() => {
|
|
2138
|
+
Dr.current = Y;
|
|
2090
2139
|
}, [Y]);
|
|
2091
|
-
let
|
|
2092
|
-
|
|
2093
|
-
key:
|
|
2140
|
+
let Pr = b((e) => {
|
|
2141
|
+
kr.current = {
|
|
2142
|
+
key: j,
|
|
2094
2143
|
api: e
|
|
2095
|
-
},
|
|
2096
|
-
key:
|
|
2144
|
+
}, _r(!0), Mr({
|
|
2145
|
+
key: j,
|
|
2097
2146
|
snapshot: e.getSnapshot()
|
|
2098
2147
|
});
|
|
2099
|
-
let t =
|
|
2148
|
+
let t = Ar.current.splice(0);
|
|
2100
2149
|
for (let n of t) n(e);
|
|
2101
|
-
}, [
|
|
2102
|
-
|
|
2103
|
-
}, []),
|
|
2104
|
-
|
|
2105
|
-
key:
|
|
2150
|
+
}, [j]), Fr = b((e) => {
|
|
2151
|
+
Ar.current.push(e);
|
|
2152
|
+
}, []), Ir = b((e) => {
|
|
2153
|
+
Mr({
|
|
2154
|
+
key: j,
|
|
2106
2155
|
snapshot: e
|
|
2107
2156
|
});
|
|
2108
|
-
}, [
|
|
2109
|
-
let e =
|
|
2110
|
-
return e?.key ===
|
|
2111
|
-
}, []),
|
|
2112
|
-
|
|
2113
|
-
}, [X]),
|
|
2114
|
-
|
|
2115
|
-
}, [X,
|
|
2116
|
-
|
|
2117
|
-
}, [X]),
|
|
2157
|
+
}, [j]), Lr = b(() => {
|
|
2158
|
+
let e = kr.current;
|
|
2159
|
+
return e?.key === Or.current ? e.api : null;
|
|
2160
|
+
}, []), Rr = b(() => Dr.current, []), zr = b(() => {
|
|
2161
|
+
Dr.current = !0, X(!0);
|
|
2162
|
+
}, [X]), Br = b(() => {
|
|
2163
|
+
Dr.current = !0, X(!0), yr(!0), xr(!0);
|
|
2164
|
+
}, [X, yr]), Vr = b(() => {
|
|
2165
|
+
Dr.current = !1, kr.current = null, _r(!1), X(!1);
|
|
2166
|
+
}, [X]), Hr = C(/* @__PURE__ */ new Set()), Ur = C(() => void 0), Wr = b((e) => {
|
|
2118
2167
|
let t = e.meta;
|
|
2119
2168
|
if (!t || t.openOnlyWhenSessionOpen !== !0) return !0;
|
|
2120
2169
|
let n = typeof t.sessionId == "string" ? t.sessionId : null;
|
|
2121
|
-
return n ? (
|
|
2122
|
-
}, []),
|
|
2123
|
-
surface:
|
|
2124
|
-
isWorkbenchOpen:
|
|
2125
|
-
openWorkbench:
|
|
2126
|
-
openWorkbenchSources:
|
|
2127
|
-
closeWorkbench:
|
|
2128
|
-
enqueue:
|
|
2129
|
-
shouldOpenSurface:
|
|
2170
|
+
return n ? (Hr.current.has(n) || Ur.current(n), !0) : !1;
|
|
2171
|
+
}, []), Gr = S(() => ({
|
|
2172
|
+
surface: Lr,
|
|
2173
|
+
isWorkbenchOpen: Rr,
|
|
2174
|
+
openWorkbench: zr,
|
|
2175
|
+
openWorkbenchSources: Br,
|
|
2176
|
+
closeWorkbench: Vr,
|
|
2177
|
+
enqueue: Fr,
|
|
2178
|
+
shouldOpenSurface: Wr
|
|
2130
2179
|
}), [
|
|
2131
|
-
Ir,
|
|
2132
2180
|
Lr,
|
|
2133
2181
|
Rr,
|
|
2134
2182
|
zr,
|
|
2135
2183
|
Br,
|
|
2136
|
-
|
|
2137
|
-
|
|
2184
|
+
Vr,
|
|
2185
|
+
Fr,
|
|
2186
|
+
Wr
|
|
2138
2187
|
]);
|
|
2139
|
-
|
|
2140
|
-
if (
|
|
2141
|
-
let t = (t) => t.openPanel(e), n =
|
|
2142
|
-
n ? t(n) :
|
|
2188
|
+
b((e) => {
|
|
2189
|
+
if (Dr.current = !0, X(!0), dt?.(), !e) return;
|
|
2190
|
+
let t = (t) => t.openPanel(e), n = Lr();
|
|
2191
|
+
n ? t(n) : Fr(t);
|
|
2143
2192
|
}, [
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2193
|
+
Fr,
|
|
2194
|
+
Lr,
|
|
2195
|
+
dt,
|
|
2147
2196
|
X
|
|
2148
2197
|
]);
|
|
2149
|
-
let
|
|
2198
|
+
let Kr = S(() => ({
|
|
2150
2199
|
openFile: async (e, t) => (s({
|
|
2151
2200
|
kind: "openFile",
|
|
2152
2201
|
params: {
|
|
2153
2202
|
path: e,
|
|
2154
2203
|
...t?.filesystem ? { filesystem: t.filesystem } : {}
|
|
2155
2204
|
}
|
|
2156
|
-
},
|
|
2205
|
+
}, Gr), {
|
|
2157
2206
|
seq: 0,
|
|
2158
2207
|
status: "ok"
|
|
2159
2208
|
}),
|
|
2160
|
-
getActiveFile: () =>
|
|
2209
|
+
getActiveFile: () => Lr()?.getSnapshot().activeTab ?? null,
|
|
2161
2210
|
select: () => () => {}
|
|
2162
|
-
}), [
|
|
2211
|
+
}), [Lr, Gr]), qr = S(() => !N && K.some((e) => e.registrations.workspaceSources.length > 0), [K, N]), Jr = S(() => K.flatMap((e) => e.registrations.panels.map((e) => e.id)), [K]), Yr = S(() => {
|
|
2163
2212
|
let e = {};
|
|
2164
2213
|
for (let t of K) for (let n of t.registrations.toolRenderers) e[n.id] = n.render;
|
|
2165
2214
|
return e;
|
|
2166
|
-
}, [K]),
|
|
2167
|
-
|
|
2168
|
-
if (
|
|
2169
|
-
let t =
|
|
2170
|
-
r && n.has(r) && (
|
|
2171
|
-
let i = Z === "default" && U !== void 0, a =
|
|
2172
|
-
|
|
2215
|
+
}, [K]), Xr = S(() => [...it ?? [], ...Jr], [it, Jr]), Z = jn && !r && Pn.workspaceId !== e ? "default" : W ?? (U === void 0 ? H[0]?.id ?? "default" : "default"), Zr = !V?.hasMore && !R;
|
|
2216
|
+
x(() => {
|
|
2217
|
+
if (qn) return;
|
|
2218
|
+
let t = Er.current, n = new Set(H.map((e) => e.id)), r = t ? t.createdId ?? (n.has(Z) && !t.knownIds.has(Z) ? Z : H.find((e) => !t.knownIds.has(e.id))?.id ?? null) : null;
|
|
2219
|
+
r && n.has(r) && (Er.current = null);
|
|
2220
|
+
let i = Z === "default" && U !== void 0, a = Zr && n.size > 0 && !i, o = r ?? (a && !n.has(Z) ? H[0]?.id ?? Z : Z);
|
|
2221
|
+
F((i) => {
|
|
2173
2222
|
let s = i.workspaceId === e ? i : {
|
|
2174
2223
|
workspaceId: e,
|
|
2175
2224
|
ids: [],
|
|
2176
2225
|
activeId: null
|
|
2177
2226
|
};
|
|
2178
|
-
if (
|
|
2227
|
+
if (R && s.ids.length > 0 && !r) return s;
|
|
2179
2228
|
let c = s.ids.length > 0 ? s.ids : [o], l = a ? c.filter((e) => n.has(e) || e === r) : c, u = l.length > 0 ? l : [o], d = s.activeId && u.includes(s.activeId) ? s.activeId : u[0] ?? o, f = r ? sn(u, t?.afterId, r) : o === d || u.includes(o) ? u : cn(u, d, o), p = f.includes(o) ? o : f[0] ?? o;
|
|
2180
2229
|
return i.workspaceId === e && i.activeId === p && i.ids.length === f.length && i.ids.every((e, t) => e === f[t]) ? i : {
|
|
2181
2230
|
workspaceId: e,
|
|
@@ -2186,53 +2235,53 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2186
2235
|
}, [
|
|
2187
2236
|
U,
|
|
2188
2237
|
Z,
|
|
2189
|
-
|
|
2190
|
-
|
|
2238
|
+
R,
|
|
2239
|
+
qn,
|
|
2191
2240
|
H,
|
|
2192
|
-
|
|
2241
|
+
Zr,
|
|
2193
2242
|
e
|
|
2194
2243
|
]);
|
|
2195
|
-
let
|
|
2244
|
+
let Qr = S(() => {
|
|
2196
2245
|
let e = /* @__PURE__ */ new Map();
|
|
2197
2246
|
for (let t of H) e.set(t.id, t.title);
|
|
2198
2247
|
return e;
|
|
2199
|
-
}, [H]), [
|
|
2248
|
+
}, [H]), [$r, ei] = w(() => ({
|
|
2200
2249
|
workspaceId: e,
|
|
2201
2250
|
ids: /* @__PURE__ */ new Set()
|
|
2202
|
-
})),
|
|
2251
|
+
})), ti = S(() => {
|
|
2203
2252
|
let t = /* @__PURE__ */ new Set();
|
|
2204
|
-
if (!
|
|
2205
|
-
let n =
|
|
2253
|
+
if (!L) return t;
|
|
2254
|
+
let n = $r.workspaceId === e ? $r.ids : /* @__PURE__ */ new Set();
|
|
2206
2255
|
for (let e of B) e.turnCount === 0 && !n.has(e.id) && t.add(e.id);
|
|
2207
2256
|
return t;
|
|
2208
2257
|
}, [
|
|
2209
2258
|
B,
|
|
2210
|
-
|
|
2211
|
-
|
|
2259
|
+
$r,
|
|
2260
|
+
L,
|
|
2212
2261
|
e
|
|
2213
2262
|
]);
|
|
2214
|
-
|
|
2215
|
-
|
|
2263
|
+
x(() => {
|
|
2264
|
+
ei((t) => t.workspaceId === e ? t : {
|
|
2216
2265
|
workspaceId: e,
|
|
2217
2266
|
ids: /* @__PURE__ */ new Set()
|
|
2218
2267
|
});
|
|
2219
2268
|
}, [e]);
|
|
2220
|
-
let
|
|
2269
|
+
let ni = P.workspaceId === e ? P : {
|
|
2221
2270
|
workspaceId: e,
|
|
2222
2271
|
ids: [],
|
|
2223
2272
|
activeId: null
|
|
2224
|
-
}, Q =
|
|
2225
|
-
|
|
2226
|
-
|
|
2273
|
+
}, Q = ni.ids.length > 0 ? ni.ids : [Z];
|
|
2274
|
+
x(() => {
|
|
2275
|
+
Hr.current = new Set(Q);
|
|
2227
2276
|
}, [Q]);
|
|
2228
|
-
let $ =
|
|
2277
|
+
let $ = ni.activeId ?? Q[0] ?? Z, ri = b((t) => {
|
|
2229
2278
|
J(null);
|
|
2230
|
-
let n = (
|
|
2279
|
+
let n = (P.workspaceId === e ? P : {
|
|
2231
2280
|
workspaceId: e,
|
|
2232
2281
|
ids: [Z],
|
|
2233
2282
|
activeId: Z
|
|
2234
2283
|
}).ids.includes(t);
|
|
2235
|
-
return
|
|
2284
|
+
return F((n) => {
|
|
2236
2285
|
let r = n.workspaceId === e ? n : {
|
|
2237
2286
|
workspaceId: e,
|
|
2238
2287
|
ids: [Z],
|
|
@@ -2243,18 +2292,18 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2243
2292
|
ids: r.ids.includes(t) ? r.ids : cn(r.ids, r.activeId, t),
|
|
2244
2293
|
activeId: t
|
|
2245
2294
|
};
|
|
2246
|
-
}), n ? G(t) :
|
|
2295
|
+
}), n ? G(t) : nr(t);
|
|
2247
2296
|
}, [
|
|
2248
|
-
|
|
2297
|
+
P,
|
|
2249
2298
|
Z,
|
|
2250
2299
|
G,
|
|
2251
|
-
|
|
2300
|
+
nr,
|
|
2252
2301
|
e
|
|
2253
2302
|
]);
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
}, [
|
|
2257
|
-
let
|
|
2303
|
+
x(() => {
|
|
2304
|
+
Ur.current = ri;
|
|
2305
|
+
}, [ri]);
|
|
2306
|
+
let ii = b((t) => (J(null), F((n) => {
|
|
2258
2307
|
let r = n.workspaceId === e ? n : {
|
|
2259
2308
|
workspaceId: e,
|
|
2260
2309
|
ids: [Z],
|
|
@@ -2269,14 +2318,14 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2269
2318
|
Z,
|
|
2270
2319
|
G,
|
|
2271
2320
|
e
|
|
2272
|
-
]),
|
|
2321
|
+
]), ai = b((t) => (J(null), (P.workspaceId === e ? P : {
|
|
2273
2322
|
workspaceId: e,
|
|
2274
2323
|
ids: [Z],
|
|
2275
2324
|
activeId: Z
|
|
2276
2325
|
}).ids.includes(t) && Xt({
|
|
2277
2326
|
workspaceId: e,
|
|
2278
2327
|
id: t
|
|
2279
|
-
}),
|
|
2328
|
+
}), F((n) => {
|
|
2280
2329
|
let r = n.workspaceId === e ? n : {
|
|
2281
2330
|
workspaceId: e,
|
|
2282
2331
|
ids: [Z],
|
|
@@ -2288,12 +2337,12 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2288
2337
|
activeId: t
|
|
2289
2338
|
};
|
|
2290
2339
|
}), G(t)), [
|
|
2291
|
-
|
|
2340
|
+
P,
|
|
2292
2341
|
Z,
|
|
2293
2342
|
G,
|
|
2294
2343
|
e
|
|
2295
|
-
]),
|
|
2296
|
-
let n =
|
|
2344
|
+
]), oi = b((t) => {
|
|
2345
|
+
let n = P.workspaceId === e ? P : {
|
|
2297
2346
|
workspaceId: e,
|
|
2298
2347
|
ids: [Z],
|
|
2299
2348
|
activeId: Z
|
|
@@ -2302,21 +2351,21 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2302
2351
|
let r = n.ids.indexOf(t);
|
|
2303
2352
|
if (r < 0) return;
|
|
2304
2353
|
let i = n.ids.filter((e) => e !== t), a = n.activeId === t ? i[Math.max(0, r - 1)] ?? i[0] ?? null : n.activeId;
|
|
2305
|
-
|
|
2354
|
+
F({
|
|
2306
2355
|
workspaceId: e,
|
|
2307
2356
|
ids: i,
|
|
2308
2357
|
activeId: a
|
|
2309
2358
|
}), a && n.activeId === t && G(a);
|
|
2310
2359
|
}, [
|
|
2311
|
-
|
|
2360
|
+
P,
|
|
2312
2361
|
Z,
|
|
2313
2362
|
G,
|
|
2314
2363
|
e
|
|
2315
|
-
]),
|
|
2316
|
-
let t =
|
|
2364
|
+
]), si = b(() => {
|
|
2365
|
+
let t = rr();
|
|
2317
2366
|
return Promise.resolve(t).then((t) => {
|
|
2318
2367
|
let n = on(t);
|
|
2319
|
-
n && (
|
|
2368
|
+
n && (F((t) => {
|
|
2320
2369
|
let r = t.workspaceId === e ? t : {
|
|
2321
2370
|
workspaceId: e,
|
|
2322
2371
|
ids: [Z],
|
|
@@ -2332,21 +2381,21 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2332
2381
|
}, [
|
|
2333
2382
|
Z,
|
|
2334
2383
|
G,
|
|
2335
|
-
|
|
2384
|
+
rr,
|
|
2336
2385
|
e
|
|
2337
|
-
]),
|
|
2386
|
+
]), ci = b((t) => {
|
|
2338
2387
|
let n = {
|
|
2339
2388
|
afterId: t,
|
|
2340
2389
|
knownIds: new Set(H.map((e) => e.id))
|
|
2341
2390
|
};
|
|
2342
|
-
|
|
2343
|
-
let r =
|
|
2391
|
+
Er.current = n;
|
|
2392
|
+
let r = rr();
|
|
2344
2393
|
return Promise.resolve(r).then((r) => {
|
|
2345
2394
|
let i = on(r);
|
|
2346
|
-
i && (
|
|
2395
|
+
i && (Er.current === n && (Er.current = {
|
|
2347
2396
|
...n,
|
|
2348
2397
|
createdId: i
|
|
2349
|
-
}),
|
|
2398
|
+
}), F((n) => ({
|
|
2350
2399
|
workspaceId: e,
|
|
2351
2400
|
ids: sn((n.workspaceId === e ? n : {
|
|
2352
2401
|
workspaceId: e,
|
|
@@ -2356,117 +2405,117 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2356
2405
|
activeId: i
|
|
2357
2406
|
})));
|
|
2358
2407
|
}).catch(() => {
|
|
2359
|
-
|
|
2408
|
+
Er.current === n && (Er.current = null);
|
|
2360
2409
|
}), r;
|
|
2361
2410
|
}, [
|
|
2362
2411
|
Z,
|
|
2363
|
-
|
|
2412
|
+
rr,
|
|
2364
2413
|
H,
|
|
2365
2414
|
e
|
|
2366
|
-
]),
|
|
2367
|
-
let n =
|
|
2415
|
+
]), li = b((t) => {
|
|
2416
|
+
let n = P.workspaceId === e ? P : {
|
|
2368
2417
|
workspaceId: e,
|
|
2369
2418
|
ids: [Z],
|
|
2370
2419
|
activeId: Z
|
|
2371
2420
|
}, r = n.ids.indexOf(t), i = n.activeId;
|
|
2372
2421
|
if (r >= 0) {
|
|
2373
2422
|
let a = n.ids.filter((e) => e !== t);
|
|
2374
|
-
i = n.activeId === t ? a[Math.max(0, r - 1)] ?? a[0] ?? null : n.activeId,
|
|
2423
|
+
i = n.activeId === t ? a[Math.max(0, r - 1)] ?? a[0] ?? null : n.activeId, F({
|
|
2375
2424
|
workspaceId: e,
|
|
2376
2425
|
ids: a,
|
|
2377
2426
|
activeId: i
|
|
2378
|
-
}), i && n.activeId === t &&
|
|
2427
|
+
}), i && n.activeId === t && nr(i);
|
|
2379
2428
|
}
|
|
2380
|
-
return
|
|
2429
|
+
return ar(t);
|
|
2381
2430
|
}, [
|
|
2382
|
-
|
|
2431
|
+
P,
|
|
2383
2432
|
Z,
|
|
2384
|
-
|
|
2385
|
-
|
|
2433
|
+
ar,
|
|
2434
|
+
nr,
|
|
2386
2435
|
e
|
|
2387
|
-
]),
|
|
2436
|
+
]), ui = b(() => Q.length >= 2 ? ci($) : si(), [
|
|
2388
2437
|
$,
|
|
2389
2438
|
Q.length,
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
]), [
|
|
2393
|
-
|
|
2394
|
-
if (
|
|
2395
|
-
|
|
2439
|
+
ci,
|
|
2440
|
+
si
|
|
2441
|
+
]), [di, fi] = w(Zn), pi = C(e);
|
|
2442
|
+
x(() => {
|
|
2443
|
+
if (pi.current !== e) {
|
|
2444
|
+
pi.current = e, fi(Zn);
|
|
2396
2445
|
return;
|
|
2397
2446
|
}
|
|
2398
|
-
|
|
2399
|
-
}, [
|
|
2400
|
-
let
|
|
2401
|
-
|
|
2447
|
+
Zn && fi(!0);
|
|
2448
|
+
}, [Zn, e]);
|
|
2449
|
+
let mi = Zn && jn && !W, hi = !di && st !== !1 && (!jn || !!W), gi = b((t) => {
|
|
2450
|
+
Ft({
|
|
2402
2451
|
workspaceId: e,
|
|
2403
2452
|
status: t
|
|
2404
|
-
}),
|
|
2405
|
-
}, [
|
|
2406
|
-
|
|
2453
|
+
}), lt?.(t);
|
|
2454
|
+
}, [lt, e]);
|
|
2455
|
+
x(() => {
|
|
2407
2456
|
let e = (e) => {
|
|
2408
2457
|
let t = e.detail;
|
|
2409
|
-
!t || typeof t != "object" || s(t,
|
|
2458
|
+
!t || typeof t != "object" || s(t, Gr);
|
|
2410
2459
|
};
|
|
2411
2460
|
return globalThis.addEventListener?.(l, e), () => globalThis.removeEventListener?.(l, e);
|
|
2412
|
-
}, [
|
|
2413
|
-
|
|
2461
|
+
}, [Gr]), x(() => {
|
|
2462
|
+
R || ve?.(W ?? null);
|
|
2414
2463
|
}, [
|
|
2415
2464
|
W,
|
|
2416
|
-
|
|
2417
|
-
|
|
2465
|
+
ve,
|
|
2466
|
+
R
|
|
2418
2467
|
]);
|
|
2419
|
-
let
|
|
2420
|
-
let t = `${
|
|
2468
|
+
let _i = On.status !== "ready", vi = _i ? /* @__PURE__ */ E(Jt, { status: On }) : void 0, yi = b(async (e) => {
|
|
2469
|
+
let t = `${te?.replace(/\/$/, "") ?? ""}/api/v1/agent/reload`;
|
|
2421
2470
|
try {
|
|
2422
2471
|
let n = await fetch(t, {
|
|
2423
2472
|
method: "POST",
|
|
2424
2473
|
headers: {
|
|
2425
|
-
...
|
|
2474
|
+
...Ot,
|
|
2426
2475
|
"content-type": "application/json"
|
|
2427
2476
|
},
|
|
2428
2477
|
body: JSON.stringify({ sessionId: e })
|
|
2429
2478
|
});
|
|
2430
2479
|
if (!n.ok) return (await n.json().catch(() => ({}))).error || `reload failed (${n.status})`;
|
|
2431
2480
|
let r = await n.json().catch(() => ({}));
|
|
2432
|
-
return window.dispatchEvent(new CustomEvent(
|
|
2481
|
+
return window.dispatchEvent(new CustomEvent(ne, { detail: r })), Sn(r);
|
|
2433
2482
|
} catch (e) {
|
|
2434
2483
|
return e instanceof Error ? e.message : "Agent plugin reload failed.";
|
|
2435
2484
|
}
|
|
2436
|
-
}, [
|
|
2437
|
-
let e =
|
|
2438
|
-
return
|
|
2485
|
+
}, [te, Ot]), bi = S(() => {
|
|
2486
|
+
let e = A?.remoteSessionOptions && typeof A.remoteSessionOptions == "object" ? A.remoteSessionOptions : void 0;
|
|
2487
|
+
return ie ? {
|
|
2439
2488
|
...e ?? {},
|
|
2440
|
-
requestTimeoutMs:
|
|
2489
|
+
requestTimeoutMs: ie
|
|
2441
2490
|
} : e;
|
|
2442
|
-
}, [
|
|
2443
|
-
let r = n.bridgeEnabled ?? !0, i =
|
|
2491
|
+
}, [ie, A?.remoteSessionOptions]), xi = b((t, n = {}) => {
|
|
2492
|
+
let r = n.bridgeEnabled ?? !0, i = A?.toolRenderers && typeof A.toolRenderers == "object" ? A.toolRenderers : void 0;
|
|
2444
2493
|
return {
|
|
2445
|
-
...
|
|
2446
|
-
...
|
|
2494
|
+
...A,
|
|
2495
|
+
...mi ? {
|
|
2447
2496
|
autoSubmitInitialDraft: !1,
|
|
2448
2497
|
initialDraft: void 0
|
|
2449
2498
|
} : {},
|
|
2450
2499
|
sessionId: t,
|
|
2451
|
-
apiBaseUrl:
|
|
2500
|
+
apiBaseUrl: te,
|
|
2452
2501
|
workspaceId: e,
|
|
2453
2502
|
storageScope: e,
|
|
2454
|
-
requestHeaders:
|
|
2455
|
-
remoteSessionOptions:
|
|
2503
|
+
requestHeaders: Ot,
|
|
2504
|
+
remoteSessionOptions: bi,
|
|
2456
2505
|
showSessions: !1,
|
|
2457
|
-
onReloadAgentPlugins:
|
|
2506
|
+
onReloadAgentPlugins: A?.onReloadAgentPlugins ?? (() => yi(t)),
|
|
2458
2507
|
toolRenderers: {
|
|
2459
|
-
...
|
|
2508
|
+
...Yr,
|
|
2460
2509
|
...i ?? {}
|
|
2461
2510
|
},
|
|
2462
|
-
bridgeEndpoint: r ?
|
|
2463
|
-
surfaceDispatch:
|
|
2464
|
-
extraCommands:
|
|
2465
|
-
workspaceWarmupStatus:
|
|
2466
|
-
hydrateMessages:
|
|
2467
|
-
allowPromptDuringInitialHydration:
|
|
2511
|
+
bridgeEndpoint: r ? le : null,
|
|
2512
|
+
surfaceDispatch: Gr,
|
|
2513
|
+
extraCommands: ot,
|
|
2514
|
+
workspaceWarmupStatus: On,
|
|
2515
|
+
hydrateMessages: hi,
|
|
2516
|
+
allowPromptDuringInitialHydration: ti.has(t),
|
|
2468
2517
|
onPromptSubmitStarted: ({ sessionId: t }) => {
|
|
2469
|
-
|
|
2518
|
+
ei((n) => {
|
|
2470
2519
|
let r = n.workspaceId === e ? n.ids : /* @__PURE__ */ new Set();
|
|
2471
2520
|
if (r.has(t)) return n.workspaceId === e ? n : {
|
|
2472
2521
|
workspaceId: e,
|
|
@@ -2481,44 +2530,44 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2481
2530
|
},
|
|
2482
2531
|
onTurnComplete: () => {
|
|
2483
2532
|
V?.refresh?.({ background: !0 });
|
|
2484
|
-
let e =
|
|
2533
|
+
let e = A?.onTurnComplete;
|
|
2485
2534
|
typeof e == "function" && e();
|
|
2486
2535
|
},
|
|
2487
2536
|
onAutoSubmitInitialDraftSettled: () => {
|
|
2488
|
-
|
|
2489
|
-
let e =
|
|
2537
|
+
tr.current = !1, fi(!1), $n(void 0);
|
|
2538
|
+
let e = A?.onAutoSubmitInitialDraftSettled;
|
|
2490
2539
|
typeof e == "function" && e();
|
|
2491
2540
|
},
|
|
2492
|
-
...
|
|
2541
|
+
...xt === void 0 ? {} : { hotReloadEnabled: xt }
|
|
2493
2542
|
};
|
|
2494
2543
|
}, [
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
pi,
|
|
2499
|
-
Dt,
|
|
2500
|
-
ce,
|
|
2501
|
-
Wr,
|
|
2502
|
-
at,
|
|
2503
|
-
Dn,
|
|
2544
|
+
te,
|
|
2545
|
+
A,
|
|
2546
|
+
bi,
|
|
2504
2547
|
mi,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2548
|
+
Ot,
|
|
2549
|
+
le,
|
|
2550
|
+
Gr,
|
|
2551
|
+
ot,
|
|
2552
|
+
On,
|
|
2553
|
+
hi,
|
|
2554
|
+
ti,
|
|
2555
|
+
xt,
|
|
2556
|
+
Yr,
|
|
2557
|
+
yi,
|
|
2509
2558
|
V,
|
|
2510
2559
|
e
|
|
2511
|
-
]),
|
|
2512
|
-
(!
|
|
2513
|
-
make:
|
|
2560
|
+
]), Si = S(() => xi(Z), [Z, xi]), Ci = C(null), wi = S(() => {
|
|
2561
|
+
(!Ci.current || Ci.current.make !== xi) && (Ci.current = {
|
|
2562
|
+
make: xi,
|
|
2514
2563
|
cache: /* @__PURE__ */ new Map()
|
|
2515
2564
|
});
|
|
2516
|
-
let { cache: e } =
|
|
2565
|
+
let { cache: e } = Ci.current;
|
|
2517
2566
|
return Q.map((t) => {
|
|
2518
2567
|
let n = t === $, r = `${t}:${n}`, i = e.get(r);
|
|
2519
|
-
return i || (i =
|
|
2568
|
+
return i || (i = xi(t, { bridgeEnabled: n }), e.set(r, i)), {
|
|
2520
2569
|
id: t,
|
|
2521
|
-
title:
|
|
2570
|
+
title: Qr.get(t) ?? (t === "default" ? O : t),
|
|
2522
2571
|
panel: "chat",
|
|
2523
2572
|
params: i
|
|
2524
2573
|
};
|
|
@@ -2526,10 +2575,10 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2526
2575
|
}, [
|
|
2527
2576
|
$,
|
|
2528
2577
|
Q,
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
]),
|
|
2578
|
+
O,
|
|
2579
|
+
xi,
|
|
2580
|
+
Qr
|
|
2581
|
+
]), Ti = S(() => {
|
|
2533
2582
|
let e = /* @__PURE__ */ new Set();
|
|
2534
2583
|
for (let t of H) e.add(t.id);
|
|
2535
2584
|
for (let t of Q) e.add(t);
|
|
@@ -2538,29 +2587,29 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2538
2587
|
Q,
|
|
2539
2588
|
W,
|
|
2540
2589
|
H
|
|
2541
|
-
]),
|
|
2542
|
-
storageKey:
|
|
2543
|
-
defaultLeftTab:
|
|
2544
|
-
initialPanels:
|
|
2545
|
-
extraPanels:
|
|
2546
|
-
onReloadAgentPlugins: () =>
|
|
2547
|
-
onReady:
|
|
2548
|
-
onChange:
|
|
2549
|
-
onClose:
|
|
2590
|
+
]), Ei = !R && !(V?.hasMore ?? !1), Di = S(() => ({
|
|
2591
|
+
storageKey: j,
|
|
2592
|
+
defaultLeftTab: Be,
|
|
2593
|
+
initialPanels: Ue,
|
|
2594
|
+
extraPanels: Xr,
|
|
2595
|
+
onReloadAgentPlugins: () => yi(W ?? Z),
|
|
2596
|
+
onReady: Pr,
|
|
2597
|
+
onChange: Ir,
|
|
2598
|
+
onClose: Vr,
|
|
2550
2599
|
showCloseAction: !1
|
|
2551
2600
|
}), [
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2601
|
+
Vr,
|
|
2602
|
+
Be,
|
|
2603
|
+
Ue,
|
|
2604
|
+
yi,
|
|
2556
2605
|
W,
|
|
2557
2606
|
Z,
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2607
|
+
Ir,
|
|
2608
|
+
Pr,
|
|
2609
|
+
j,
|
|
2610
|
+
Xr,
|
|
2562
2611
|
X
|
|
2563
|
-
]),
|
|
2612
|
+
]), Oi = () => {
|
|
2564
2613
|
document.dispatchEvent(new KeyboardEvent("keydown", {
|
|
2565
2614
|
key: "k",
|
|
2566
2615
|
metaKey: !0,
|
|
@@ -2568,51 +2617,51 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2568
2617
|
bubbles: !0,
|
|
2569
2618
|
cancelable: !0
|
|
2570
2619
|
}));
|
|
2571
|
-
},
|
|
2620
|
+
}, ki = /* @__PURE__ */ D(T, { children: [qe ? /* @__PURE__ */ E(rt, {}) : null, Ge] }), Ai = {
|
|
2572
2621
|
sessions: H,
|
|
2573
2622
|
activeId: $,
|
|
2574
2623
|
openIds: Q,
|
|
2575
|
-
pinnedIds:
|
|
2576
|
-
onTogglePin:
|
|
2577
|
-
onSwitch:
|
|
2578
|
-
onOpenAsTab:
|
|
2579
|
-
onCreate:
|
|
2580
|
-
onDelete:
|
|
2624
|
+
pinnedIds: pn,
|
|
2625
|
+
onTogglePin: xn,
|
|
2626
|
+
onSwitch: ri,
|
|
2627
|
+
onOpenAsTab: ai,
|
|
2628
|
+
onCreate: rr,
|
|
2629
|
+
onDelete: li,
|
|
2581
2630
|
onLoadMore: V?.loadMore,
|
|
2582
2631
|
hasMore: V?.hasMore,
|
|
2583
2632
|
loadingMore: V?.loadingMore,
|
|
2584
|
-
onClose: () =>
|
|
2585
|
-
},
|
|
2633
|
+
onClose: () => cr(!1)
|
|
2634
|
+
}, ji = !!(V || _e || !Bn), Mi = S(() => N ? {
|
|
2586
2635
|
sessions: H,
|
|
2587
2636
|
activeId: $,
|
|
2588
2637
|
openIds: Q,
|
|
2589
|
-
search: (e, t) =>
|
|
2590
|
-
onSwitch:
|
|
2591
|
-
onOpenAsTab:
|
|
2638
|
+
search: (e, t) => tt(e, t, { limit: 8 }),
|
|
2639
|
+
onSwitch: ri,
|
|
2640
|
+
onOpenAsTab: ai
|
|
2592
2641
|
} : void 0, [
|
|
2593
2642
|
$,
|
|
2594
2643
|
Q,
|
|
2595
|
-
|
|
2596
|
-
|
|
2644
|
+
N,
|
|
2645
|
+
ai,
|
|
2597
2646
|
H,
|
|
2598
|
-
|
|
2599
|
-
]),
|
|
2600
|
-
appLeftPaneCollapsed:
|
|
2647
|
+
ri
|
|
2648
|
+
]), Ni = gt({
|
|
2649
|
+
appLeftPaneCollapsed: lr,
|
|
2601
2650
|
workspaceId: e,
|
|
2602
|
-
effectiveAppLeftPaneWidth:
|
|
2603
|
-
sessionTitleById:
|
|
2604
|
-
defaultSessionTitle:
|
|
2605
|
-
makeCenterParams:
|
|
2606
|
-
openChatPane:
|
|
2607
|
-
surfaceDispatch:
|
|
2651
|
+
effectiveAppLeftPaneWidth: pr,
|
|
2652
|
+
sessionTitleById: Qr,
|
|
2653
|
+
defaultSessionTitle: O,
|
|
2654
|
+
makeCenterParams: xi,
|
|
2655
|
+
openChatPane: ai,
|
|
2656
|
+
surfaceDispatch: Gr,
|
|
2608
2657
|
onDockOverlay: () => J(null)
|
|
2609
|
-
}),
|
|
2658
|
+
}), Pi = Et, Fi = nn({
|
|
2610
2659
|
plugins: K,
|
|
2611
2660
|
activeOverlay: q,
|
|
2612
2661
|
setActiveOverlay: J
|
|
2613
|
-
}),
|
|
2662
|
+
}), Ii = S(() => !N || !k?.length ? null : /* @__PURE__ */ E("div", {
|
|
2614
2663
|
className: "flex items-center gap-1",
|
|
2615
|
-
children:
|
|
2664
|
+
children: k.map((e) => /* @__PURE__ */ D("button", {
|
|
2616
2665
|
type: "button",
|
|
2617
2666
|
"data-boring-workspace-part": "chat-pane-control",
|
|
2618
2667
|
className: "inline-flex h-5 items-center gap-1 rounded-md px-1.5 text-[11px] font-medium text-muted-foreground/80 transition-colors hover:bg-muted/70 hover:text-foreground aria-pressed:bg-muted aria-pressed:text-foreground",
|
|
@@ -2624,18 +2673,18 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2624
2673
|
onClick: (t) => {
|
|
2625
2674
|
t.preventDefault(), t.stopPropagation(), J((t) => t === e.id ? null : e.id);
|
|
2626
2675
|
},
|
|
2627
|
-
children: [e.icon ? /* @__PURE__ */
|
|
2676
|
+
children: [e.icon ? /* @__PURE__ */ E("span", {
|
|
2628
2677
|
className: "grid size-3.5 place-items-center",
|
|
2629
2678
|
children: e.icon
|
|
2630
|
-
}) : null, /* @__PURE__ */
|
|
2679
|
+
}) : null, /* @__PURE__ */ E("span", { children: e.label })]
|
|
2631
2680
|
}, e.id))
|
|
2632
2681
|
}), [
|
|
2633
|
-
|
|
2634
|
-
|
|
2682
|
+
k,
|
|
2683
|
+
N,
|
|
2635
2684
|
q
|
|
2636
|
-
]),
|
|
2637
|
-
let e = [...
|
|
2638
|
-
for (let t of
|
|
2685
|
+
]), Li = S(() => {
|
|
2686
|
+
let e = [...Fi, ...Ze ?? []];
|
|
2687
|
+
for (let t of k ?? []) e.push({
|
|
2639
2688
|
id: t.id,
|
|
2640
2689
|
label: t.label,
|
|
2641
2690
|
icon: t.icon,
|
|
@@ -2643,214 +2692,214 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2643
2692
|
emphasis: t.emphasis,
|
|
2644
2693
|
onClick: () => J((e) => e === t.id ? null : t.id)
|
|
2645
2694
|
});
|
|
2646
|
-
return
|
|
2695
|
+
return Tt && e.push({
|
|
2647
2696
|
id: "plugins",
|
|
2648
2697
|
label: "Plugins",
|
|
2649
|
-
icon: /* @__PURE__ */
|
|
2698
|
+
icon: /* @__PURE__ */ E(Ve, {
|
|
2650
2699
|
className: "h-4 w-4",
|
|
2651
2700
|
strokeWidth: 1.75
|
|
2652
2701
|
}),
|
|
2653
2702
|
onClick: () => J((e) => e === "plugins" ? null : "plugins")
|
|
2654
|
-
}),
|
|
2703
|
+
}), wt && e.push({
|
|
2655
2704
|
id: "skills",
|
|
2656
2705
|
label: "Skills",
|
|
2657
|
-
icon: /* @__PURE__ */
|
|
2706
|
+
icon: /* @__PURE__ */ E(Ke, {
|
|
2658
2707
|
className: "h-4 w-4",
|
|
2659
2708
|
strokeWidth: 1.75
|
|
2660
2709
|
}),
|
|
2661
2710
|
onClick: () => J((e) => e === "skills" ? null : "skills")
|
|
2662
2711
|
}), tn(e), e;
|
|
2663
2712
|
}, [
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
]),
|
|
2713
|
+
Ze,
|
|
2714
|
+
k,
|
|
2715
|
+
Fi,
|
|
2716
|
+
Tt,
|
|
2717
|
+
wt
|
|
2718
|
+
]), Ri = rn({
|
|
2670
2719
|
plugins: K,
|
|
2671
2720
|
activeOverlay: q,
|
|
2672
2721
|
onClose: () => J(null),
|
|
2673
|
-
headerInsetStart:
|
|
2722
|
+
headerInsetStart: lr,
|
|
2674
2723
|
headerInsetEnd: !Y
|
|
2675
|
-
}),
|
|
2676
|
-
let t =
|
|
2724
|
+
}), zi = S(() => {
|
|
2725
|
+
let t = k?.find((e) => e.id === q);
|
|
2677
2726
|
return t ? t.render({
|
|
2678
2727
|
onClose: () => J(null),
|
|
2679
|
-
headerInsetStart:
|
|
2728
|
+
headerInsetStart: lr,
|
|
2680
2729
|
headerInsetEnd: !Y,
|
|
2681
2730
|
workspaceId: e
|
|
2682
2731
|
}) : null;
|
|
2683
2732
|
}, [
|
|
2684
|
-
|
|
2685
|
-
|
|
2733
|
+
k,
|
|
2734
|
+
lr,
|
|
2686
2735
|
q,
|
|
2687
2736
|
Y,
|
|
2688
2737
|
e
|
|
2689
|
-
]),
|
|
2738
|
+
]), Bi = Ri ?? zi ?? (q === "skills" && wt ? /* @__PURE__ */ E(at, {
|
|
2690
2739
|
onClose: () => J(null),
|
|
2691
|
-
headerInsetStart:
|
|
2740
|
+
headerInsetStart: lr,
|
|
2692
2741
|
headerInsetEnd: !Y
|
|
2693
|
-
}) : q === "plugins" &&
|
|
2742
|
+
}) : q === "plugins" && Tt ? /* @__PURE__ */ E(yt, {
|
|
2694
2743
|
onClose: () => J(null),
|
|
2695
|
-
onReloadExternalPlugins: () =>
|
|
2696
|
-
headerInsetStart:
|
|
2744
|
+
onReloadExternalPlugins: () => yi(W ?? Z),
|
|
2745
|
+
headerInsetStart: lr,
|
|
2697
2746
|
headerInsetEnd: !Y
|
|
2698
|
-
}) : null),
|
|
2699
|
-
className:
|
|
2700
|
-
nav:
|
|
2701
|
-
navParams:
|
|
2747
|
+
}) : null), Vi = qn ? /* @__PURE__ */ E(Yt, {}) : /* @__PURE__ */ E(Se, {
|
|
2748
|
+
className: mt,
|
|
2749
|
+
nav: N ? null : hr ? "session-list" : null,
|
|
2750
|
+
navParams: Ai,
|
|
2702
2751
|
center: "chat",
|
|
2703
|
-
centerParams:
|
|
2704
|
-
chatPanes:
|
|
2705
|
-
chatTopActions:
|
|
2752
|
+
centerParams: Si,
|
|
2753
|
+
chatPanes: wi,
|
|
2754
|
+
chatTopActions: Ii,
|
|
2706
2755
|
activeChatPaneId: $,
|
|
2707
|
-
onActiveChatPaneChange:
|
|
2708
|
-
onCloseChatPane:
|
|
2709
|
-
onCreateChatPaneAfter:
|
|
2710
|
-
onDropChatSession:
|
|
2756
|
+
onActiveChatPaneChange: ii,
|
|
2757
|
+
onCloseChatPane: oi,
|
|
2758
|
+
onCreateChatPaneAfter: N ? void 0 : ci,
|
|
2759
|
+
onDropChatSession: ai,
|
|
2711
2760
|
flashChatPaneId: Kt?.workspaceId === e ? Kt.id : null,
|
|
2712
2761
|
surface: Y ? "artifact-surface" : null,
|
|
2713
|
-
surfaceParams:
|
|
2714
|
-
chatOverlay:
|
|
2762
|
+
surfaceParams: Di,
|
|
2763
|
+
chatOverlay: N ? Bi : null,
|
|
2715
2764
|
onCloseChatOverlay: () => J(null),
|
|
2716
|
-
surfaceOverlay:
|
|
2717
|
-
sidebar: Y && !
|
|
2718
|
-
sidebarParams: Y && !
|
|
2719
|
-
...
|
|
2720
|
-
bridge:
|
|
2765
|
+
surfaceOverlay: vi,
|
|
2766
|
+
sidebar: Y && !_i && qr && Sr ? "workbench-left" : null,
|
|
2767
|
+
sidebarParams: Y && !_i && qr ? {
|
|
2768
|
+
...Be ? { defaultTab: Be } : {},
|
|
2769
|
+
bridge: Kr,
|
|
2721
2770
|
onClose: () => {
|
|
2722
|
-
|
|
2771
|
+
yr(!1), xr(!1);
|
|
2723
2772
|
},
|
|
2724
2773
|
onCollapse: () => {
|
|
2725
|
-
|
|
2774
|
+
yr(!1), xr(!1);
|
|
2726
2775
|
}
|
|
2727
2776
|
} : void 0,
|
|
2728
|
-
storageKey:
|
|
2729
|
-
onOpenNav: !
|
|
2730
|
-
|
|
2777
|
+
storageKey: M ? Ct : void 0,
|
|
2778
|
+
onOpenNav: !N && Ie ? () => {
|
|
2779
|
+
cr(!0), ut?.();
|
|
2731
2780
|
} : void 0,
|
|
2732
2781
|
onOpenSurface: () => {
|
|
2733
|
-
|
|
2782
|
+
Dr.current = !0, X(!0), dt?.();
|
|
2734
2783
|
},
|
|
2735
|
-
surfaceButtonBottomOffset:
|
|
2736
|
-
mobileShellEnabled:
|
|
2737
|
-
onOpenSidebar:
|
|
2738
|
-
|
|
2784
|
+
surfaceButtonBottomOffset: ft,
|
|
2785
|
+
mobileShellEnabled: pt,
|
|
2786
|
+
onOpenSidebar: qr ? () => {
|
|
2787
|
+
Dr.current = !0, X(!0), yr(!0), xr(!0);
|
|
2739
2788
|
} : void 0
|
|
2740
|
-
}),
|
|
2741
|
-
collapsed:
|
|
2742
|
-
onExpand: () =>
|
|
2743
|
-
onCollapse: () =>
|
|
2744
|
-
onResizeLeftPane: (e) =>
|
|
2745
|
-
leftPaneWidth:
|
|
2789
|
+
}), Hi = N ? /* @__PURE__ */ E(Pt, {
|
|
2790
|
+
collapsed: lr,
|
|
2791
|
+
onExpand: () => ur(!1),
|
|
2792
|
+
onCollapse: () => ur(!0),
|
|
2793
|
+
onResizeLeftPane: (e) => fr((t) => vn(t + e, 220, 420)),
|
|
2794
|
+
leftPaneWidth: pr,
|
|
2746
2795
|
minLeftPaneWidth: 220,
|
|
2747
2796
|
maxLeftPaneWidth: 420,
|
|
2748
|
-
mobileShellEnabled:
|
|
2749
|
-
leftPane: /* @__PURE__ */
|
|
2750
|
-
width:
|
|
2751
|
-
appTitle:
|
|
2752
|
-
workspaceLabel:
|
|
2753
|
-
workspaceSectionTitle:
|
|
2754
|
-
layoutMode:
|
|
2755
|
-
headerMode:
|
|
2756
|
-
projects:
|
|
2757
|
-
activeProjectId:
|
|
2758
|
-
onOpenProjectSession:
|
|
2759
|
-
onShowMoreProjectSessions:
|
|
2760
|
-
onCreateProject:
|
|
2797
|
+
mobileShellEnabled: pt,
|
|
2798
|
+
leftPane: /* @__PURE__ */ E(Mt, {
|
|
2799
|
+
width: pr,
|
|
2800
|
+
appTitle: ye,
|
|
2801
|
+
workspaceLabel: xe,
|
|
2802
|
+
workspaceSectionTitle: Ce,
|
|
2803
|
+
layoutMode: we,
|
|
2804
|
+
headerMode: Ee,
|
|
2805
|
+
projects: De,
|
|
2806
|
+
activeProjectId: Oe ?? e,
|
|
2807
|
+
onOpenProjectSession: Ae,
|
|
2808
|
+
onShowMoreProjectSessions: je,
|
|
2809
|
+
onCreateProject: Me,
|
|
2761
2810
|
onCreateProjectSession: (t) => {
|
|
2762
|
-
t === (
|
|
2811
|
+
t === (Oe ?? e) ? (J(null), ui()) : ke?.(t);
|
|
2763
2812
|
},
|
|
2764
|
-
onOpenProjectSettings:
|
|
2765
|
-
onOpenProjectInNewTab:
|
|
2766
|
-
sessionTitle:
|
|
2767
|
-
topSlot:
|
|
2768
|
-
bottomSlot:
|
|
2813
|
+
onOpenProjectSettings: Ne,
|
|
2814
|
+
onOpenProjectInNewTab: Pe,
|
|
2815
|
+
sessionTitle: qn ? "Loading sessions…" : or ?? O,
|
|
2816
|
+
topSlot: We,
|
|
2817
|
+
bottomSlot: qe || Ge != null ? /* @__PURE__ */ E("div", {
|
|
2769
2818
|
className: "flex w-full min-w-0 items-center gap-2",
|
|
2770
|
-
children:
|
|
2819
|
+
children: ki
|
|
2771
2820
|
}) : void 0,
|
|
2772
2821
|
sessions: H,
|
|
2773
2822
|
activeSessionId: $,
|
|
2774
2823
|
openSessionIds: Q,
|
|
2775
|
-
pinnedSessionIds:
|
|
2824
|
+
pinnedSessionIds: pn,
|
|
2776
2825
|
onCreateSession: () => {
|
|
2777
|
-
J(null),
|
|
2826
|
+
J(null), ui();
|
|
2778
2827
|
},
|
|
2779
|
-
onOpenCommandPalette:
|
|
2780
|
-
onSwitchSession:
|
|
2781
|
-
onOpenSessionAsPane:
|
|
2782
|
-
onToggleSessionPinned:
|
|
2783
|
-
onDeleteSession:
|
|
2784
|
-
actions:
|
|
2828
|
+
onOpenCommandPalette: Oi,
|
|
2829
|
+
onSwitchSession: ri,
|
|
2830
|
+
onOpenSessionAsPane: ai,
|
|
2831
|
+
onToggleSessionPinned: xn,
|
|
2832
|
+
onDeleteSession: ji ? li : void 0,
|
|
2833
|
+
actions: Li
|
|
2785
2834
|
}),
|
|
2786
|
-
children:
|
|
2787
|
-
}) : /* @__PURE__ */
|
|
2835
|
+
children: Vi
|
|
2836
|
+
}) : /* @__PURE__ */ D("div", {
|
|
2788
2837
|
className: "flex h-full min-h-0 flex-col",
|
|
2789
|
-
children: [/* @__PURE__ */
|
|
2790
|
-
appTitle:
|
|
2791
|
-
sessionTitle:
|
|
2792
|
-
onCommandPalette:
|
|
2793
|
-
topBarLeft:
|
|
2794
|
-
topBarRight:
|
|
2795
|
-
}),
|
|
2796
|
-
}),
|
|
2797
|
-
return /* @__PURE__ */
|
|
2838
|
+
children: [/* @__PURE__ */ E(be, {
|
|
2839
|
+
appTitle: ye,
|
|
2840
|
+
sessionTitle: qn ? "Loading sessions…" : or ?? O,
|
|
2841
|
+
onCommandPalette: Oi,
|
|
2842
|
+
topBarLeft: We,
|
|
2843
|
+
topBarRight: ki
|
|
2844
|
+
}), Vi]
|
|
2845
|
+
}), Ui = Ni.floatingChatNode, Wi = N ? !lr : hr;
|
|
2846
|
+
return /* @__PURE__ */ E("div", {
|
|
2798
2847
|
className: "relative h-full bg-background text-foreground",
|
|
2799
|
-
children: /* @__PURE__ */
|
|
2800
|
-
value:
|
|
2801
|
-
children: /* @__PURE__ */
|
|
2802
|
-
chatPanel:
|
|
2803
|
-
panels:
|
|
2848
|
+
children: /* @__PURE__ */ E(Te, {
|
|
2849
|
+
value: Ni.shellCapabilities,
|
|
2850
|
+
children: /* @__PURE__ */ D(ue, {
|
|
2851
|
+
chatPanel: kn,
|
|
2852
|
+
panels: Pi,
|
|
2804
2853
|
commands: m,
|
|
2805
2854
|
catalogs: h,
|
|
2806
2855
|
plugins: g,
|
|
2807
2856
|
capturedPlugins: K,
|
|
2808
2857
|
excludeDefaults: _,
|
|
2809
2858
|
capabilities: v,
|
|
2810
|
-
apiBaseUrl:
|
|
2811
|
-
authHeaders:
|
|
2812
|
-
apiTimeout:
|
|
2859
|
+
apiBaseUrl: te,
|
|
2860
|
+
authHeaders: kt,
|
|
2861
|
+
apiTimeout: ie,
|
|
2813
2862
|
activeSessionId: $,
|
|
2814
2863
|
openSessionIds: Q,
|
|
2815
|
-
attentionSessionIds:
|
|
2816
|
-
attentionSessionsAuthoritative:
|
|
2817
|
-
defaultTheme:
|
|
2818
|
-
onThemeChange:
|
|
2864
|
+
attentionSessionIds: Ti,
|
|
2865
|
+
attentionSessionsAuthoritative: Ei,
|
|
2866
|
+
defaultTheme: ae,
|
|
2867
|
+
onThemeChange: oe,
|
|
2819
2868
|
workspaceId: e,
|
|
2820
|
-
workspaceLabel:
|
|
2821
|
-
appTitle:
|
|
2822
|
-
storageKey:
|
|
2823
|
-
persistenceEnabled:
|
|
2824
|
-
debug: !
|
|
2869
|
+
workspaceLabel: xe,
|
|
2870
|
+
appTitle: ye,
|
|
2871
|
+
storageKey: St,
|
|
2872
|
+
persistenceEnabled: se,
|
|
2873
|
+
debug: !_t && ce,
|
|
2825
2874
|
bridgeEndpoint: null,
|
|
2826
|
-
onAuthError:
|
|
2827
|
-
frontPluginHotReload:
|
|
2828
|
-
fullPageBasePath:
|
|
2829
|
-
commandPaletteSessionSearch:
|
|
2875
|
+
onAuthError: fe,
|
|
2876
|
+
frontPluginHotReload: bt,
|
|
2877
|
+
fullPageBasePath: de,
|
|
2878
|
+
commandPaletteSessionSearch: Mi,
|
|
2830
2879
|
children: [
|
|
2831
2880
|
d,
|
|
2832
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ E(qt, {
|
|
2833
2882
|
workspaceId: e,
|
|
2834
|
-
requestHeaders:
|
|
2835
|
-
apiBaseUrl:
|
|
2836
|
-
preloadPaths:
|
|
2837
|
-
provisionWorkspace:
|
|
2838
|
-
onStatusChange:
|
|
2883
|
+
requestHeaders: Ot,
|
|
2884
|
+
apiBaseUrl: te,
|
|
2885
|
+
preloadPaths: ct,
|
|
2886
|
+
provisionWorkspace: st,
|
|
2887
|
+
onStatusChange: gi
|
|
2839
2888
|
}),
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
bridgeEndpoint:
|
|
2842
|
-
requestHeaders:
|
|
2843
|
-
navOpen:
|
|
2889
|
+
/* @__PURE__ */ E($t, {
|
|
2890
|
+
bridgeEndpoint: le,
|
|
2891
|
+
requestHeaders: Ot,
|
|
2892
|
+
navOpen: Wi,
|
|
2844
2893
|
surfaceOpen: Y,
|
|
2845
|
-
surfaceReady:
|
|
2846
|
-
snapshot:
|
|
2894
|
+
surfaceReady: gr,
|
|
2895
|
+
snapshot: Nr
|
|
2847
2896
|
}),
|
|
2848
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ E(an, {
|
|
2849
2898
|
activeSessionId: $,
|
|
2850
|
-
onAttentionOpen:
|
|
2899
|
+
onAttentionOpen: Cr
|
|
2851
2900
|
}),
|
|
2852
|
-
Vi,
|
|
2853
2901
|
Hi,
|
|
2902
|
+
Ui,
|
|
2854
2903
|
f
|
|
2855
2904
|
]
|
|
2856
2905
|
})
|
|
@@ -2859,8 +2908,8 @@ function Tn({ workspaceId: e, chatPanel: t, useSessions: r, requestHeaders: i, s
|
|
|
2859
2908
|
}
|
|
2860
2909
|
//#endregion
|
|
2861
2910
|
//#region src/app/front/WorkspaceBootGate.tsx
|
|
2862
|
-
var
|
|
2863
|
-
function
|
|
2911
|
+
var kn = 500;
|
|
2912
|
+
function An(e) {
|
|
2864
2913
|
return new Promise((t, n) => {
|
|
2865
2914
|
let r, i = () => {
|
|
2866
2915
|
r && globalThis.clearTimeout(r), e.removeEventListener("abort", a);
|
|
@@ -2873,15 +2922,15 @@ function Dn(e) {
|
|
|
2873
2922
|
}
|
|
2874
2923
|
r = globalThis.setTimeout(() => {
|
|
2875
2924
|
i(), t();
|
|
2876
|
-
},
|
|
2925
|
+
}, kn), e.addEventListener("abort", a, { once: !0 });
|
|
2877
2926
|
});
|
|
2878
2927
|
}
|
|
2879
|
-
function
|
|
2880
|
-
let [g, _] =
|
|
2928
|
+
function jn({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s = oe, provisionWorkspace: l = !0, loadingFallback: p, errorFallback: m, children: h }) {
|
|
2929
|
+
let [g, _] = w({
|
|
2881
2930
|
status: "loading",
|
|
2882
2931
|
label: "Waking workspace runtime"
|
|
2883
2932
|
});
|
|
2884
|
-
return
|
|
2933
|
+
return x(() => {
|
|
2885
2934
|
let p = new AbortController(), m = a(t, n);
|
|
2886
2935
|
async function h(n) {
|
|
2887
2936
|
let a = await fetch(o(i, n), {
|
|
@@ -2904,7 +2953,7 @@ function On({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s
|
|
|
2904
2953
|
label: "Waking workspace runtime"
|
|
2905
2954
|
});
|
|
2906
2955
|
try {
|
|
2907
|
-
let e =
|
|
2956
|
+
let e = he(s, l), t = await Promise.all(e.map(async (e) => ({
|
|
2908
2957
|
path: e,
|
|
2909
2958
|
status: await h(e)
|
|
2910
2959
|
}))), n = t.filter((e) => e.status === "preparing").map((e) => e.path);
|
|
@@ -2912,7 +2961,7 @@ function On({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s
|
|
|
2912
2961
|
if (_({
|
|
2913
2962
|
status: "loading",
|
|
2914
2963
|
label: "Workspace is still preparing"
|
|
2915
|
-
}), await
|
|
2964
|
+
}), await An(p.signal), p.signal.aborted) return;
|
|
2916
2965
|
t = await Promise.all(n.map(async (e) => ({
|
|
2917
2966
|
path: e,
|
|
2918
2967
|
status: await h(e)
|
|
@@ -2934,11 +2983,11 @@ function On({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s
|
|
|
2934
2983
|
l,
|
|
2935
2984
|
n,
|
|
2936
2985
|
t
|
|
2937
|
-
]), g.status === "ready" ? /* @__PURE__ */
|
|
2986
|
+
]), g.status === "ready" ? /* @__PURE__ */ E(T, { children: h }) : g.status === "error" ? typeof m == "function" ? /* @__PURE__ */ E(T, { children: m(g.message) }) : m ? /* @__PURE__ */ E(T, { children: m }) : /* @__PURE__ */ E(we, {
|
|
2938
2987
|
title: "Workspace failed to open",
|
|
2939
2988
|
description: g.message,
|
|
2940
2989
|
status: "Retry by reloading the page"
|
|
2941
|
-
}) : typeof p == "function" ? /* @__PURE__ */
|
|
2990
|
+
}) : typeof p == "function" ? /* @__PURE__ */ E(T, { children: p(g.label) }) : p ? /* @__PURE__ */ E(T, { children: p }) : /* @__PURE__ */ E(we, {
|
|
2942
2991
|
title: "Opening workspace",
|
|
2943
2992
|
description: "Preparing secure runtime, files, sessions, and layout.",
|
|
2944
2993
|
status: g.label
|
|
@@ -2946,12 +2995,12 @@ function On({ workspaceId: t, requestHeaders: n, apiBaseUrl: i, preloadPaths: s
|
|
|
2946
2995
|
}
|
|
2947
2996
|
//#endregion
|
|
2948
2997
|
//#region src/app/front/fullPageRouteErrors.ts
|
|
2949
|
-
var
|
|
2998
|
+
var Mn = "FULL_PAGE_PANEL_MISSING_COMPONENT", Nn = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON", I = "FULL_PAGE_PANEL_PARAMS_NOT_OBJECT", Pn = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT", Fn = "FULL_PAGE_PANEL_NOT_SUPPORTED", In = "FULL_PAGE_PANEL_RENDER_FAILED";
|
|
2950
2999
|
//#endregion
|
|
2951
3000
|
//#region src/app/front/WorkspaceFullPagePanel.tsx
|
|
2952
3001
|
function L() {}
|
|
2953
|
-
var
|
|
2954
|
-
function
|
|
3002
|
+
var R = { dispose: L }, z = () => R;
|
|
3003
|
+
function Ln(e) {
|
|
2955
3004
|
return {
|
|
2956
3005
|
id: `full-page:${e}`,
|
|
2957
3006
|
title: e,
|
|
@@ -2977,18 +3026,18 @@ function z(e) {
|
|
|
2977
3026
|
exitMaximized: L,
|
|
2978
3027
|
isMaximized: () => !1,
|
|
2979
3028
|
minimize: L,
|
|
2980
|
-
onDidActiveChange:
|
|
2981
|
-
onDidVisibilityChange:
|
|
2982
|
-
onDidDimensionsChange:
|
|
2983
|
-
onDidFocusChange:
|
|
2984
|
-
onDidLocationChange:
|
|
2985
|
-
onDidParametersChange:
|
|
2986
|
-
onDidTitleChange:
|
|
2987
|
-
onDidRenamed:
|
|
2988
|
-
onWillFocus:
|
|
3029
|
+
onDidActiveChange: z,
|
|
3030
|
+
onDidVisibilityChange: z,
|
|
3031
|
+
onDidDimensionsChange: z,
|
|
3032
|
+
onDidFocusChange: z,
|
|
3033
|
+
onDidLocationChange: z,
|
|
3034
|
+
onDidParametersChange: z,
|
|
3035
|
+
onDidTitleChange: z,
|
|
3036
|
+
onDidRenamed: z,
|
|
3037
|
+
onWillFocus: z
|
|
2989
3038
|
};
|
|
2990
3039
|
}
|
|
2991
|
-
function
|
|
3040
|
+
function Rn() {
|
|
2992
3041
|
return {
|
|
2993
3042
|
width: window.innerWidth,
|
|
2994
3043
|
height: window.innerHeight,
|
|
@@ -3012,45 +3061,45 @@ function Fn() {
|
|
|
3012
3061
|
clear: L,
|
|
3013
3062
|
focus: L,
|
|
3014
3063
|
layout: L,
|
|
3015
|
-
onDidLayoutChange:
|
|
3016
|
-
onDidLayoutFromJSON:
|
|
3017
|
-
onDidAddPanel:
|
|
3018
|
-
onDidRemovePanel:
|
|
3019
|
-
onDidActivePanelChange:
|
|
3020
|
-
onDidAddGroup:
|
|
3021
|
-
onDidRemoveGroup:
|
|
3022
|
-
onDidActiveGroupChange:
|
|
3023
|
-
onUnhandledDragOverEvent:
|
|
3024
|
-
onDidDrop:
|
|
3025
|
-
onWillDrop:
|
|
3026
|
-
onWillDragGroup:
|
|
3027
|
-
onWillDragPanel:
|
|
3028
|
-
onDidActivePanelChange_:
|
|
3064
|
+
onDidLayoutChange: z,
|
|
3065
|
+
onDidLayoutFromJSON: z,
|
|
3066
|
+
onDidAddPanel: z,
|
|
3067
|
+
onDidRemovePanel: z,
|
|
3068
|
+
onDidActivePanelChange: z,
|
|
3069
|
+
onDidAddGroup: z,
|
|
3070
|
+
onDidRemoveGroup: z,
|
|
3071
|
+
onDidActiveGroupChange: z,
|
|
3072
|
+
onUnhandledDragOverEvent: z,
|
|
3073
|
+
onDidDrop: z,
|
|
3074
|
+
onWillDrop: z,
|
|
3075
|
+
onWillDragGroup: z,
|
|
3076
|
+
onWillDragPanel: z,
|
|
3077
|
+
onDidActivePanelChange_: z
|
|
3029
3078
|
};
|
|
3030
3079
|
}
|
|
3031
|
-
function
|
|
3032
|
-
return /* @__PURE__ */
|
|
3080
|
+
function B({ code: e, title: t, description: n }) {
|
|
3081
|
+
return /* @__PURE__ */ E("div", {
|
|
3033
3082
|
className: "flex min-h-screen items-center justify-center bg-background p-6 text-foreground",
|
|
3034
3083
|
"data-testid": "full-page-error-state",
|
|
3035
3084
|
"data-full-page-error-code": e,
|
|
3036
|
-
children: /* @__PURE__ */
|
|
3085
|
+
children: /* @__PURE__ */ E(Qe, {
|
|
3037
3086
|
className: "w-full max-w-lg",
|
|
3038
3087
|
title: t,
|
|
3039
3088
|
description: n
|
|
3040
3089
|
})
|
|
3041
3090
|
});
|
|
3042
3091
|
}
|
|
3043
|
-
function
|
|
3044
|
-
let n =
|
|
3045
|
-
|
|
3092
|
+
function zn({ componentId: e, params: t = {} }) {
|
|
3093
|
+
let n = le(), { errors: r } = re(), a = n.get(e), o = n.getComponents()[e];
|
|
3094
|
+
De(() => {
|
|
3046
3095
|
document.title = a?.title ?? e;
|
|
3047
3096
|
}, [e, a?.title]);
|
|
3048
|
-
let s =
|
|
3097
|
+
let s = S(() => ({
|
|
3049
3098
|
params: t,
|
|
3050
|
-
api:
|
|
3051
|
-
containerApi:
|
|
3099
|
+
api: Ln(e),
|
|
3100
|
+
containerApi: Rn(),
|
|
3052
3101
|
className: "h-full"
|
|
3053
|
-
}), [e, t]), c =
|
|
3102
|
+
}), [e, t]), c = S(() => {
|
|
3054
3103
|
if (!a) return null;
|
|
3055
3104
|
let t = a.pluginId ?? a.id;
|
|
3056
3105
|
for (let n = r.length - 1; n >= 0; --n) {
|
|
@@ -3063,35 +3112,35 @@ function Ln({ componentId: e, params: t = {} }) {
|
|
|
3063
3112
|
r,
|
|
3064
3113
|
a
|
|
3065
3114
|
]);
|
|
3066
|
-
return a ? !a.supportsFullPage || !o ? /* @__PURE__ */
|
|
3067
|
-
code:
|
|
3115
|
+
return a ? !a.supportsFullPage || !o ? /* @__PURE__ */ E(B, {
|
|
3116
|
+
code: Fn,
|
|
3068
3117
|
title: "Panel does not support full-page mode",
|
|
3069
3118
|
description: `Panel "${e}" can render in the workspace, but it has not opted into the dedicated full-page pane route.`
|
|
3070
|
-
}) : c ? /* @__PURE__ */
|
|
3071
|
-
code:
|
|
3119
|
+
}) : c ? /* @__PURE__ */ E(B, {
|
|
3120
|
+
code: In,
|
|
3072
3121
|
title: "Panel failed to render",
|
|
3073
3122
|
description: `Panel "${e}" crashed while rendering in full-page mode: ${c.error.message}`
|
|
3074
|
-
}) : /* @__PURE__ */
|
|
3123
|
+
}) : /* @__PURE__ */ E("div", {
|
|
3075
3124
|
className: "min-h-screen bg-background text-foreground",
|
|
3076
|
-
children: /* @__PURE__ */
|
|
3125
|
+
children: /* @__PURE__ */ E(i, {
|
|
3077
3126
|
mode: "full-page",
|
|
3078
|
-
children: /* @__PURE__ */
|
|
3127
|
+
children: /* @__PURE__ */ E(o, { ...s })
|
|
3079
3128
|
})
|
|
3080
|
-
}) : /* @__PURE__ */
|
|
3081
|
-
code:
|
|
3129
|
+
}) : /* @__PURE__ */ E(B, {
|
|
3130
|
+
code: Pn,
|
|
3082
3131
|
title: "Unknown panel",
|
|
3083
3132
|
description: `No full-page panel component is registered as "${e}".`
|
|
3084
3133
|
});
|
|
3085
3134
|
}
|
|
3086
3135
|
//#endregion
|
|
3087
3136
|
//#region src/app/front/fullPageRoute.ts
|
|
3088
|
-
function
|
|
3137
|
+
function V(e) {
|
|
3089
3138
|
let t = new URLSearchParams(e), n = t.get("component")?.trim() ?? "";
|
|
3090
3139
|
if (!n) return {
|
|
3091
3140
|
componentId: null,
|
|
3092
3141
|
params: {},
|
|
3093
3142
|
error: {
|
|
3094
|
-
code:
|
|
3143
|
+
code: Mn,
|
|
3095
3144
|
message: "Missing full-page panel component id."
|
|
3096
3145
|
}
|
|
3097
3146
|
};
|
|
@@ -3108,7 +3157,7 @@ function B(e) {
|
|
|
3108
3157
|
componentId: null,
|
|
3109
3158
|
params: {},
|
|
3110
3159
|
error: {
|
|
3111
|
-
code:
|
|
3160
|
+
code: Nn,
|
|
3112
3161
|
message: "Invalid full-page panel params JSON."
|
|
3113
3162
|
}
|
|
3114
3163
|
};
|
|
@@ -3117,7 +3166,7 @@ function B(e) {
|
|
|
3117
3166
|
componentId: null,
|
|
3118
3167
|
params: {},
|
|
3119
3168
|
error: {
|
|
3120
|
-
code:
|
|
3169
|
+
code: I,
|
|
3121
3170
|
message: "Full-page panel params must be a JSON object."
|
|
3122
3171
|
}
|
|
3123
3172
|
} : {
|
|
@@ -3126,4 +3175,4 @@ function B(e) {
|
|
|
3126
3175
|
};
|
|
3127
3176
|
}
|
|
3128
3177
|
//#endregion
|
|
3129
|
-
export {
|
|
3178
|
+
export { Nn as FULL_PAGE_PANEL_INVALID_PARAMS_JSON, Mn as FULL_PAGE_PANEL_MISSING_COMPONENT, Fn as FULL_PAGE_PANEL_NOT_SUPPORTED, I as FULL_PAGE_PANEL_PARAMS_NOT_OBJECT, In as FULL_PAGE_PANEL_RENDER_FAILED, Pn as FULL_PAGE_PANEL_UNKNOWN_COMPONENT, On as WorkspaceAgentFront, qt as WorkspaceBackgroundBoot, jn as WorkspaceBootGate, zn as WorkspaceFullPagePanel, Bt as createLocalStorageSessions, V as parseFullPagePanelLocation, Vt as useLocalStorageSessions };
|