@hachej/boring-workspace 0.1.56 → 0.1.57

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.
Files changed (2) hide show
  1. package/dist/app-front.js +316 -316
  2. package/package.json +4 -4
package/dist/app-front.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { jsx as d, jsxs as Ae, Fragment as fe } from "react/jsx-runtime";
2
- import { useEffect as A, useSyncExternalStore as Cr, useMemo as L, useState as x, useCallback as E, useRef as $, useLayoutEffect as Fr } from "react";
3
- import { PiChatPanel as Wr, usePiSessions as Ir } from "@hachej/boring-agent/front";
4
- import { at as Gr, aG as ze, aH as Ln, aI as xn, aJ as Mn, aK as Cn, aL as ke, aM as vt, aN as bt, aO as Fn, aP as $r, aQ as Ve, O as Ur, q as Kr, aR as Pn, aS as Hr, U as En, aT as Jr, w as qr, u as Wn, aU as jr, aq as Br, aV as Vr } from "./WorkspaceProvider-Bp1Sm40K.js";
5
- import { T as zr, C as kr, r as An, w as Yr, W as Rn } from "./WorkspaceLoadingState-BYTO4wdt.js";
6
- import { Sun as Qr, Moon as Xr } from "lucide-react";
7
- import { IconButton as Zr, ErrorState as es } from "@hachej/boring-ui-kit";
8
- function ts() {
9
- const { theme: e, toggleTheme: n } = Gr(), r = e === "dark";
2
+ import { useEffect as A, useSyncExternalStore as Mr, useMemo as L, useState as x, useCallback as E, useRef as $, useLayoutEffect as Cr } from "react";
3
+ import { PiChatPanel as Fr, usePiSessions as Wr } from "@hachej/boring-agent/front";
4
+ import { at as Ir, aG as ze, aH as On, aI as Ln, aJ as xn, aK as Mn, aL as ke, aM as St, aN as vt, aO as Cn, aP as Gr, aQ as Ve, O as $r, q as Ur, aR as yn, aS as Kr, U as Pn, aT as Hr, w as Jr, u as Fn, aU as qr, aq as jr, aV as Br } from "./WorkspaceProvider-Bp1Sm40K.js";
5
+ import { T as Vr, C as zr, r as En, w as kr, W as An } from "./WorkspaceLoadingState-BYTO4wdt.js";
6
+ import { Sun as Yr, Moon as Qr } from "lucide-react";
7
+ import { IconButton as Xr, ErrorState as Zr } from "@hachej/boring-ui-kit";
8
+ function es() {
9
+ const { theme: e, toggleTheme: n } = Ir(), r = e === "dark";
10
10
  return A(() => {
11
11
  typeof document > "u" || document.documentElement.classList.toggle("dark", r);
12
12
  }, [r]), /* @__PURE__ */ d(
13
- Zr,
13
+ Xr,
14
14
  {
15
15
  type: "button",
16
16
  variant: "ghost",
@@ -18,18 +18,18 @@ function ts() {
18
18
  onClick: n,
19
19
  "aria-label": "Toggle theme",
20
20
  title: r ? "Switch to light theme" : "Switch to dark theme",
21
- children: r ? /* @__PURE__ */ d(Qr, { className: "h-4 w-4" }) : /* @__PURE__ */ d(Xr, { className: "h-4 w-4" })
21
+ children: r ? /* @__PURE__ */ d(Yr, { className: "h-4 w-4" }) : /* @__PURE__ */ d(Qr, { className: "h-4 w-4" })
22
22
  }
23
23
  );
24
24
  }
25
- function ns() {
25
+ function ts() {
26
26
  const e = `s${Date.now()}`;
27
27
  return {
28
28
  sessions: [{ id: e, title: "New session", updatedAt: Date.now() }],
29
29
  activeId: e
30
30
  };
31
31
  }
32
- function rs(e, n) {
32
+ function ns(e, n) {
33
33
  var r;
34
34
  if (typeof localStorage > "u") return n();
35
35
  try {
@@ -43,18 +43,18 @@ function rs(e, n) {
43
43
  }
44
44
  return n();
45
45
  }
46
- function ss(e, n) {
46
+ function rs(e, n) {
47
47
  if (!(typeof localStorage > "u"))
48
48
  try {
49
49
  localStorage.setItem(e, JSON.stringify(n));
50
50
  } catch {
51
51
  }
52
52
  }
53
- function is(e = {}) {
54
- const n = e.storageKey ?? "workspace:sessions", r = e.initial ?? ns;
55
- let s = rs(n, r);
53
+ function ss(e = {}) {
54
+ const n = e.storageKey ?? "workspace:sessions", r = e.initial ?? ts;
55
+ let s = ns(n, r);
56
56
  const i = /* @__PURE__ */ new Set(), o = (c) => {
57
- s = c, ss(n, s), i.forEach((u) => u());
57
+ s = c, rs(n, s), i.forEach((u) => u());
58
58
  };
59
59
  return {
60
60
  getState: () => s,
@@ -81,11 +81,11 @@ function is(e = {}) {
81
81
  }
82
82
  };
83
83
  }
84
- function os(e) {
85
- return Cr(e.subscribe, e.getState, e.getState);
84
+ function is(e) {
85
+ return Mr(e.subscribe, e.getState, e.getState);
86
86
  }
87
- const as = 500, ls = 1e4;
88
- function Tn(e) {
87
+ const os = 500, as = 1e4;
88
+ function Rn(e) {
89
89
  return new Promise((n, r) => {
90
90
  let s;
91
91
  const i = () => {
@@ -99,10 +99,10 @@ function Tn(e) {
99
99
  }
100
100
  s = globalThis.setTimeout(() => {
101
101
  i(), n();
102
- }, as), e.addEventListener("abort", o, { once: !0 });
102
+ }, os), e.addEventListener("abort", o, { once: !0 });
103
103
  });
104
104
  }
105
- async function cs(e) {
105
+ async function ls(e) {
106
106
  const n = e.body;
107
107
  if (!n) return Ve(await ke(e));
108
108
  const r = n.getReader(), s = new TextDecoder();
@@ -123,7 +123,7 @@ async function cs(e) {
123
123
  });
124
124
  }
125
125
  }
126
- function us(e) {
126
+ function cs(e) {
127
127
  if (!((e == null ? void 0 : e.runtimeDependenciesState) !== "preparing" && (e == null ? void 0 : e.runtimeDependenciesState) !== "ready" && (e == null ? void 0 : e.runtimeDependenciesState) !== "failed"))
128
128
  return {
129
129
  state: e.runtimeDependenciesState,
@@ -131,13 +131,13 @@ function us(e) {
131
131
  ...e.runtimeDependenciesRequirement ? { requirement: e.runtimeDependenciesRequirement } : {}
132
132
  };
133
133
  }
134
- async function ds(e) {
134
+ async function us(e) {
135
135
  if (!e.ok) {
136
136
  const i = await ke(e);
137
- if (vt(i)) return { status: "preparing" };
138
- throw new Error(bt(i) ?? `/api/v1/ready-status failed with ${e.status}`);
137
+ if (St(i)) return { status: "preparing" };
138
+ throw new Error(vt(i) ?? `/api/v1/ready-status failed with ${e.status}`);
139
139
  }
140
- const n = await cs(e), r = us(n), s = $r(n);
140
+ const n = await ls(e), r = cs(n), s = Gr(n);
141
141
  if ((n == null ? void 0 : n.state) === "degraded" || (n == null ? void 0 : n.state) === "failed") {
142
142
  if (s && (r == null ? void 0 : r.state) === "failed")
143
143
  return { status: "ready", runtimeDependencies: r };
@@ -145,25 +145,25 @@ async function ds(e) {
145
145
  }
146
146
  return s ? { status: "ready", ...r ? { runtimeDependencies: r } : {} } : { status: "preparing", ...r ? { runtimeDependencies: r } : {} };
147
147
  }
148
- async function fs({
148
+ async function ds({
149
149
  apiBaseUrl: e,
150
150
  path: n,
151
151
  headers: r,
152
152
  signal: s,
153
153
  workspaceId: i
154
154
  }) {
155
- const o = new AbortController(), c = globalThis.setTimeout(() => o.abort(new DOMException("Warmup attempt timed out", "TimeoutError")), ls), u = () => o.abort(s.reason);
155
+ const o = new AbortController(), c = globalThis.setTimeout(() => o.abort(new DOMException("Warmup attempt timed out", "TimeoutError")), as), u = () => o.abort(s.reason);
156
156
  s.aborted && u(), s.addEventListener("abort", u, { once: !0 });
157
157
  try {
158
- const v = await fetch(Mn(e, n), { headers: r, signal: o.signal });
159
- if (Cn(n)) return await ds(v);
158
+ const v = await fetch(xn(e, n), { headers: r, signal: o.signal });
159
+ if (Mn(n)) return await us(v);
160
160
  const y = await ke(v);
161
161
  if (!v.ok) {
162
- const b = vt(y);
162
+ const b = St(y);
163
163
  if (b) return { status: "preparing", ...b };
164
- throw new Error(bt(y) ?? `${n} failed with ${v.status}`);
164
+ throw new Error(vt(y) ?? `${n} failed with ${v.status}`);
165
165
  }
166
- return y && typeof y == "object" && Fn(e, r["x-boring-workspace-id"] ?? i, n, y), { status: "ready" };
166
+ return y && typeof y == "object" && Cn(e, r["x-boring-workspace-id"] ?? i, n, y), { status: "ready" };
167
167
  } catch (v) {
168
168
  if (s.aborted) throw v;
169
169
  if (o.signal.aborted || v instanceof TypeError) return { status: "preparing" };
@@ -172,11 +172,11 @@ async function fs({
172
172
  globalThis.clearTimeout(c), s.removeEventListener("abort", u);
173
173
  }
174
174
  }
175
- function gs({
175
+ function fs({
176
176
  workspaceId: e,
177
177
  requestHeaders: n,
178
178
  apiBaseUrl: r,
179
- preloadPaths: s = Ln,
179
+ preloadPaths: s = On,
180
180
  provisionWorkspace: i = !0,
181
181
  onStatusChange: o
182
182
  }) {
@@ -187,7 +187,7 @@ function gs({
187
187
  var b, q;
188
188
  o == null || o({ status: "preparing" });
189
189
  try {
190
- const W = xn(s, i), z = (p) => fs({
190
+ const W = Ln(s, i), z = (p) => ds({
191
191
  apiBaseUrl: r,
192
192
  path: p,
193
193
  headers: v,
@@ -204,11 +204,11 @@ function gs({
204
204
  p = N.result.requirement;
205
205
  break;
206
206
  }
207
- if (o == null || o({ status: "preparing", message: "Workspace is still preparing", ...p ? { requirement: p } : {} }), await Tn(u.signal), c || u.signal.aborted || (T = await Promise.all(w.map(async (N) => ({ path: N.path, result: await z(N.path) }))), c || u.signal.aborted)) return;
207
+ if (o == null || o({ status: "preparing", message: "Workspace is still preparing", ...p ? { requirement: p } : {} }), await Rn(u.signal), c || u.signal.aborted || (T = await Promise.all(w.map(async (N) => ({ path: N.path, result: await z(N.path) }))), c || u.signal.aborted)) return;
208
208
  h = ((q = T.find((N) => N.result.runtimeDependencies)) == null ? void 0 : q.result.runtimeDependencies) ?? h, w = T.filter((N) => N.result.status === "preparing");
209
209
  }
210
210
  for (o == null || o({ status: "ready", ...h ? { runtimeDependencies: h } : {} }); (h == null ? void 0 : h.state) === "preparing"; ) {
211
- if (await Tn(u.signal), c || u.signal.aborted) return;
211
+ if (await Rn(u.signal), c || u.signal.aborted) return;
212
212
  const p = await z("/api/v1/ready-status");
213
213
  if (c || u.signal.aborted) return;
214
214
  h = p.runtimeDependencies, h && (o == null || o({ status: "ready", runtimeDependencies: h }));
@@ -226,7 +226,7 @@ function gs({
226
226
  };
227
227
  }, [r, o, s, i, n, e]), null;
228
228
  }
229
- function ms(e) {
229
+ function gs(e) {
230
230
  return typeof (e == null ? void 0 : e.id) == "string" ? e.id : null;
231
231
  }
232
232
  function Be(e, n, r) {
@@ -234,33 +234,33 @@ function Be(e, n, r) {
234
234
  const s = n ? e.indexOf(n) : -1, i = s >= 0 ? s + 1 : e.length;
235
235
  return [...e.slice(0, i), r, ...e.slice(i)];
236
236
  }
237
- function wn(e, n, r) {
237
+ function Tn(e, n, r) {
238
238
  if (e.includes(r)) return e;
239
239
  if (e.length === 0) return [r];
240
240
  const s = n ? e.indexOf(n) : -1, i = s >= 0 ? s : 0;
241
241
  return e.map((o, c) => c === i ? r : o);
242
242
  }
243
- function ps(e, n) {
243
+ function ms(e, n) {
244
244
  return e.endsWith(":surface") ? e.slice(0, -8) : n;
245
245
  }
246
- function pt(e, n, r) {
247
- const [s, i] = x(() => An(e, n, r));
246
+ function mt(e, n, r) {
247
+ const [s, i] = x(() => En(e, n, r));
248
248
  A(() => {
249
- i(An(e, n, r));
249
+ i(En(e, n, r));
250
250
  }, [e, n, r]);
251
251
  const o = E(
252
252
  (c) => {
253
- i(c), Yr(e, c, r);
253
+ i(c), kr(e, c, r);
254
254
  },
255
255
  [r, e]
256
256
  );
257
257
  return [s, o];
258
258
  }
259
- const ht = {}, hs = [], Nn = { status: "preparing" }, Dn = {
259
+ const pt = {}, ps = [], wn = { status: "preparing" }, Nn = {
260
260
  openTabs: [],
261
261
  activeTab: null
262
262
  };
263
- function Ss({ status: e }) {
263
+ function hs({ status: e }) {
264
264
  const n = e.status === "ready" ? void 0 : e.requirement, r = e.status !== "failed", s = r ? n === "workspace-fs" ? "Preparing files…" : n === "sandbox-exec" ? "Preparing secure runtime…" : n === "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.";
265
265
  return /* @__PURE__ */ d("div", { className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center", children: /* @__PURE__ */ Ae("div", { className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm", children: [
266
266
  r ? /* @__PURE__ */ d("div", { className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin", "aria-hidden": "true" }) : null,
@@ -269,8 +269,8 @@ function Ss({ status: e }) {
269
269
  e.status === "failed" ? /* @__PURE__ */ d("p", { className: "mt-3 text-xs text-muted-foreground", children: "Reload the workspace to retry." }) : null
270
270
  ] }) });
271
271
  }
272
- function vs(e) {
273
- const n = e.workspaceId ?? bs(e.requestHeaders) ?? e.storageKey, r = Ir({
272
+ function Ss(e) {
273
+ const n = e.workspaceId ?? vs(e.requestHeaders) ?? e.storageKey, r = Wr({
274
274
  apiBaseUrl: e.apiBaseUrl,
275
275
  workspaceId: n,
276
276
  storageScope: n,
@@ -281,10 +281,10 @@ function vs(e) {
281
281
  });
282
282
  return { ...r, workspaceId: r.dataStorageScope };
283
283
  }
284
- function bs(e) {
284
+ function vs(e) {
285
285
  return (e == null ? void 0 : e["x-boring-workspace-id"]) ?? (e == null ? void 0 : e["X-Boring-Workspace-Id"]) ?? null;
286
286
  }
287
- function ys(e) {
287
+ function bs(e) {
288
288
  const n = e.reloaded ? "Extensions reloaded." : "Extensions will reload on the next message.", r = Array.isArray(e.diagnostics) ? e.diagnostics.map((s) => s.message).filter((s) => !!s) : [];
289
289
  return r.length > 0 ? `${n}
290
290
 
@@ -292,7 +292,7 @@ Warnings:
292
292
  ${r.join(`
293
293
  `)}` : n;
294
294
  }
295
- function Ps(e) {
295
+ function ys(e) {
296
296
  var n;
297
297
  try {
298
298
  return ((n = globalThis.localStorage) == null ? void 0 : n.getItem(e)) ?? null;
@@ -300,7 +300,7 @@ function Ps(e) {
300
300
  return null;
301
301
  }
302
302
  }
303
- function _n(e, n) {
303
+ function Dn(e, n) {
304
304
  var r;
305
305
  try {
306
306
  const s = (r = globalThis.localStorage) == null ? void 0 : r.getItem(e);
@@ -313,7 +313,7 @@ function _n(e, n) {
313
313
  return null;
314
314
  }
315
315
  }
316
- function Es(e, n) {
316
+ function Ps(e, n) {
317
317
  var r, s;
318
318
  try {
319
319
  if (n.ids.length === 0) {
@@ -327,7 +327,7 @@ function Es(e, n) {
327
327
  } catch {
328
328
  }
329
329
  }
330
- function On(e, n) {
330
+ function _n(e, n) {
331
331
  var r;
332
332
  try {
333
333
  const s = (r = globalThis.localStorage) == null ? void 0 : r.getItem(e);
@@ -338,7 +338,7 @@ function On(e, n) {
338
338
  return null;
339
339
  }
340
340
  }
341
- function As(e, n) {
341
+ function Es(e, n) {
342
342
  var r, s;
343
343
  try {
344
344
  if (n.length === 0) {
@@ -349,27 +349,27 @@ function As(e, n) {
349
349
  } catch {
350
350
  }
351
351
  }
352
- function Rs() {
352
+ function As() {
353
353
  return /* @__PURE__ */ d("div", { className: "flex h-full min-h-0 items-center justify-center bg-background px-6 text-center", children: /* @__PURE__ */ Ae("div", { className: "max-w-sm rounded-2xl border border-border bg-card p-5 shadow-sm", children: [
354
354
  /* @__PURE__ */ d("div", { className: "mx-auto mb-3 h-7 w-7 rounded-full border-2 border-muted-foreground/20 border-t-foreground animate-spin", "aria-hidden": "true" }),
355
355
  /* @__PURE__ */ d("div", { className: "text-sm font-semibold text-foreground", children: "Loading sessions…" }),
356
356
  /* @__PURE__ */ d("p", { className: "mt-2 text-sm text-muted-foreground", children: "Finding this workspace’s saved chats." })
357
357
  ] }) });
358
358
  }
359
- function Ts(e) {
359
+ function Rs(e) {
360
360
  if (!e) return "/api/v1/ui";
361
361
  const n = e.replace(/\/$/, ""), r = "/api/v1/ui";
362
362
  return n.endsWith(r) ? n : `${n}${r}`;
363
363
  }
364
- function ws(e) {
365
- return `${Ts(e)}/state`;
364
+ function Ts(e) {
365
+ return `${Rs(e)}/state`;
366
366
  }
367
- function Ns(e) {
367
+ function ws(e) {
368
368
  var s;
369
369
  const n = e.openTabs.find((i) => i.id === e.activeTab), r = (s = n == null ? void 0 : n.params) == null ? void 0 : s.path;
370
370
  return typeof r == "string" ? r : null;
371
371
  }
372
- function Ds({
372
+ function Ns({
373
373
  bridgeEndpoint: e,
374
374
  requestHeaders: n,
375
375
  navOpen: r,
@@ -377,7 +377,7 @@ function Ds({
377
377
  surfaceReady: i,
378
378
  snapshot: o
379
379
  }) {
380
- const c = Wn(), u = $(null);
380
+ const c = Fn(), u = $(null);
381
381
  return A(() => {
382
382
  var b;
383
383
  if (e === null || s && !i) return;
@@ -390,10 +390,10 @@ function Ds({
390
390
  workbenchOpen: s,
391
391
  openTabs: o.openTabs,
392
392
  activeTab: o.activeTab,
393
- activeFile: Ns(o),
393
+ activeFile: ws(o),
394
394
  availablePanels: c.list().map((q) => q.id)
395
395
  };
396
- return fetch(ws(e), {
396
+ return fetch(Ts(e), {
397
397
  method: "PUT",
398
398
  headers: { ...n, "Content-Type": "application/json" },
399
399
  body: JSON.stringify({ state: y, causedBy: "user" }),
@@ -404,7 +404,7 @@ function Ds({
404
404
  };
405
405
  }, [e, r, c, n, o, s, i]), null;
406
406
  }
407
- function Qs({
407
+ function Ys({
408
408
  workspaceId: e,
409
409
  chatPanel: n,
410
410
  useSessions: r,
@@ -424,104 +424,104 @@ function Qs({
424
424
  authHeaders: w,
425
425
  apiTimeout: p,
426
426
  defaultTheme: N,
427
- onThemeChange: In,
428
- persistenceEnabled: yt,
429
- debug: Gn,
427
+ onThemeChange: Wn,
428
+ persistenceEnabled: bt,
429
+ debug: In,
430
430
  bridgeEndpoint: Ye,
431
- fullPageBasePath: $n,
432
- onAuthError: Un,
433
- sessions: Pt,
434
- activeSessionId: Et,
435
- onSwitchSession: At,
431
+ fullPageBasePath: Gn,
432
+ onAuthError: $n,
433
+ sessions: yt,
434
+ activeSessionId: Pt,
435
+ onSwitchSession: Et,
436
436
  onCreateSession: Qe,
437
- onDeleteSession: Rt,
437
+ onDeleteSession: At,
438
438
  onActiveSessionIdChange: Re,
439
- appTitle: Tt = "Boring UI",
440
- workspaceLabel: Kn,
439
+ appTitle: Rt = "Boring UI",
440
+ workspaceLabel: Un,
441
441
  defaultSessionTitle: k = "New session",
442
- navEnabled: wt = !0,
443
- defaultNavOpen: Hn = !1,
444
- defaultSurfaceOpen: Jn,
442
+ navEnabled: Tt = !0,
443
+ defaultNavOpen: Kn = !1,
444
+ defaultSurfaceOpen: Hn,
445
445
  defaultWorkbenchLeftTab: Te,
446
446
  defaultWorkbenchLeftOpen: Xe,
447
- surfaceInitialPanels: Nt,
448
- topBarLeft: qn,
449
- topBarRight: jn,
450
- showThemeToggle: Bn = !0,
447
+ surfaceInitialPanels: wt,
448
+ topBarLeft: Jn,
449
+ topBarRight: qn,
450
+ showThemeToggle: jn = !0,
451
451
  chatParams: O,
452
- externalPlugins: Vn,
453
- hotReloadEnabled: zn,
454
- frontPluginHotReload: kn,
455
- extraPanels: Dt,
456
- extraCommands: _t,
452
+ externalPlugins: Bn,
453
+ hotReloadEnabled: Vn,
454
+ frontPluginHotReload: zn,
455
+ extraPanels: Nt,
456
+ extraCommands: Dt,
457
457
  provisionWorkspace: Ze,
458
- bootPreloadPaths: Yn,
458
+ bootPreloadPaths: kn,
459
459
  onWorkspaceWarmupStatusChange: we,
460
460
  onOpenNav: et,
461
461
  onOpenSurface: tt,
462
- surfaceButtonBottomOffset: Qn,
463
- className: Xn
462
+ surfaceButtonBottomOffset: Yn,
463
+ className: Qn
464
464
  }) {
465
- var mn, pn;
466
- const Ot = Vn !== !1, Zn = Ot ? kn : !1, nt = Ot ? zn : !1, rt = o ?? `boring-ui-v2:layout:${e}`, I = c ?? `${rt}:surface`, Ne = ps(
465
+ var gn, mn;
466
+ const _t = Bn !== !1, Xn = _t ? zn : !1, nt = _t ? Vn : !1, rt = o ?? `boring-ui-v2:layout:${e}`, I = c ?? `${rt}:surface`, Ne = ms(
467
467
  I,
468
468
  rt
469
- ), C = yt !== !1, De = i ?? `boring-workspace:sessions:${e}`, Y = L(
470
- () => ze(e, s ?? ht),
469
+ ), C = bt !== !1, De = i ?? `boring-workspace:sessions:${e}`, Y = L(
470
+ () => ze(e, s ?? pt),
471
471
  [s, e]
472
- ), er = L(
473
- () => ze(e, { ...s ?? ht, ...w ?? ht }),
472
+ ), Zn = L(
473
+ () => ze(e, { ...s ?? pt, ...w ?? pt }),
474
474
  [w, s, e]
475
475
  ), _e = L(
476
- () => is({ storageKey: De }),
476
+ () => ss({ storageKey: De }),
477
477
  [De]
478
- ), Lt = os(_e), [xt, tr] = x(() => ({
478
+ ), Ot = is(_e), [Lt, er] = x(() => ({
479
479
  workspaceId: e,
480
- status: Nn
480
+ status: wn
481
481
  })), [Oe, st] = x(() => ({
482
482
  workspaceId: e,
483
483
  expired: !1
484
- })), [Mt, Le] = x(() => ({
484
+ })), [xt, Le] = x(() => ({
485
485
  workspaceId: e,
486
486
  creating: !1
487
- })), [Ct, xe] = x(() => ({
487
+ })), [Mt, xe] = x(() => ({
488
488
  workspaceId: e,
489
489
  failed: !1
490
- })), [it, Ft] = x(null), ge = `boring-workspace:chat-panes:${e}`, [D, B] = x(
491
- () => (C ? _n(ge, e) : null) ?? { workspaceId: e, ids: [], activeId: null }
492
- ), [ie, Wt] = x(null);
490
+ })), [$s, Ct] = x(null), ge = `boring-workspace:chat-panes:${e}`, [D, B] = x(
491
+ () => (C ? Dn(ge, e) : null) ?? { workspaceId: e, ids: [], activeId: null }
492
+ ), [ie, Ft] = x(null);
493
493
  A(() => {
494
494
  if (!ie) return;
495
- const t = setTimeout(() => Wt(null), 700);
495
+ const t = setTimeout(() => Ft(null), 700);
496
496
  return () => clearTimeout(t);
497
497
  }, [ie]);
498
- const me = `boring-workspace:pinned-sessions:${e}`, [It, Gt] = x(
499
- () => (C ? On(me, e) : null) ?? { workspaceId: e, ids: [] }
500
- ), nr = It.workspaceId === e ? It.ids : hs;
498
+ const me = `boring-workspace:pinned-sessions:${e}`, [Wt, It] = x(
499
+ () => (C ? _n(me, e) : null) ?? { workspaceId: e, ids: [] }
500
+ ), tr = Wt.workspaceId === e ? Wt.ids : ps;
501
501
  A(() => {
502
- Gt((t) => t.workspaceId === e ? t : (C ? On(me, e) : null) ?? { workspaceId: e, ids: [] });
502
+ It((t) => t.workspaceId === e ? t : (C ? _n(me, e) : null) ?? { workspaceId: e, ids: [] });
503
503
  }, [me, C, e]);
504
- const rr = E((t) => {
505
- Gt((a) => {
504
+ const nr = E((t) => {
505
+ It((a) => {
506
506
  const l = a.workspaceId === e ? a.ids : [], g = l.includes(t) ? l.filter((S) => S !== t) : [t, ...l];
507
- return C && As(me, g), { workspaceId: e, ids: g };
507
+ return C && Es(me, g), { workspaceId: e, ids: g };
508
508
  });
509
509
  }, [me, C, e]);
510
510
  A(() => {
511
- C && D.workspaceId === e && Es(ge, D);
511
+ C && D.workspaceId === e && Ps(ge, D);
512
512
  }, [D, ge, C, e]), A(() => {
513
- B((t) => t.workspaceId === e ? t : (C ? _n(ge, e) : null) ?? { workspaceId: e, ids: [], activeId: null });
513
+ B((t) => t.workspaceId === e ? t : (C ? Dn(ge, e) : null) ?? { workspaceId: e, ids: [], activeId: null });
514
514
  }, [ge, C, e]);
515
- const Me = xt.workspaceId === e ? xt.status : Nn, sr = n ?? Wr, ir = r ?? vs, Q = !n || !!r, Ce = Q && Ze !== !1, ot = () => {
516
- }, _ = ir({
515
+ const Me = Lt.workspaceId === e ? Lt.status : wn, rr = n ?? Fr, sr = r ?? Ss, Q = !n || !!r, Ce = Q && Ze !== !1, it = () => {
516
+ }, _ = sr({
517
517
  requestHeaders: Y,
518
518
  storageKey: De,
519
519
  workspaceId: e,
520
520
  apiBaseUrl: h,
521
521
  enabled: Ce
522
- }), [pe, or] = x(() => ({ workspaceId: e, sessions: [], activeSessionId: null })), $t = Ce && _.workspaceId != null && _.workspaceId !== e, V = Ce && !_.loading && !_.error && !$t, F = Ce && !V;
522
+ }), [pe, ir] = x(() => ({ workspaceId: e, sessions: [], activeSessionId: null })), Gt = Ce && _.workspaceId != null && _.workspaceId !== e, V = Ce && !_.loading && !_.error && !Gt, F = Ce && !V;
523
523
  A(() => {
524
- V && or((t) => {
524
+ V && ir((t) => {
525
525
  const a = t.workspaceId === e, l = t.activeSessionId === _.activeSessionId, g = t.sessions.length === _.sessions.length && t.sessions.every((S, R) => {
526
526
  var re;
527
527
  return S.id === ((re = _.sessions[R]) == null ? void 0 : re.id);
@@ -533,7 +533,7 @@ function Qs({
533
533
  };
534
534
  });
535
535
  }, [_.activeSessionId, _.sessions, V, e]);
536
- const Fe = F && pe.workspaceId === e && pe.sessions.length > 0, We = F ? Ps(De) : null, Ut = F && !$t ? _.activeSessionId ?? null : null, X = V ? _.sessions : Fe ? pe.sessions : [], ar = V ? _.activeSessionId : Fe ? pe.activeSessionId : null, f = Q && (V || Fe) ? _ : void 0, oe = Pt !== void 0 || Et !== void 0 || At !== void 0 || Qe !== void 0 || Rt !== void 0, Kt = Oe.workspaceId === e && Oe.expired, he = $(!1), Se = !!(V && f && !oe && X.length === 0 && !Kt), lr = Mt.workspaceId === e && Mt.creating, cr = Ct.workspaceId === e && Ct.failed, ur = !!(V && f && !oe && X.length === 0 && Kt && !he.current && !cr), Ie = !!(F && _.loading && !_.error && Q && !oe && !Fe && !We && !Ut) || Se || lr || ur;
536
+ const Fe = F && pe.workspaceId === e && pe.sessions.length > 0, We = F ? ys(De) : null, $t = F && !Gt ? _.activeSessionId ?? null : null, X = V ? _.sessions : Fe ? pe.sessions : [], or = V ? _.activeSessionId : Fe ? pe.activeSessionId : null, f = Q && (V || Fe) ? _ : void 0, oe = yt !== void 0 || Pt !== void 0 || Et !== void 0 || Qe !== void 0 || At !== void 0, Ut = Oe.workspaceId === e && Oe.expired, he = $(!1), Se = !!(V && f && !oe && X.length === 0 && !Ut), ar = xt.workspaceId === e && xt.creating, lr = Mt.workspaceId === e && Mt.failed, cr = !!(V && f && !oe && X.length === 0 && Ut && !he.current && !lr), Ie = !!(F && _.loading && !_.error && Q && !oe && !Fe && !We && !$t) || Se || ar || cr;
537
537
  A(() => {
538
538
  if (!Se) {
539
539
  Oe.workspaceId !== e && st({ workspaceId: e, expired: !1 });
@@ -545,19 +545,19 @@ function Qs({
545
545
  }, 2e3);
546
546
  return () => globalThis.clearTimeout(t);
547
547
  }, [Oe.workspaceId, Se, e]);
548
- const dr = f ? X.map((t) => ({
548
+ const ur = f ? X.map((t) => ({
549
549
  ...t,
550
550
  title: t.title ?? "New session"
551
- })) : void 0, fr = We ? [{
551
+ })) : void 0, dr = We ? [{
552
552
  id: We,
553
553
  title: "Loading sessions…",
554
554
  createdAt: (/* @__PURE__ */ new Date(0)).toISOString(),
555
555
  updatedAt: (/* @__PURE__ */ new Date(0)).toISOString(),
556
556
  turnCount: 0
557
- }] : [], U = f ? dr ?? [] : F ? fr : oe ? Pt ?? [] : Lt.sessions, gr = f ? ar ?? null : F ? We ?? Ut : oe ? Et ?? null : Lt.activeId, ae = (O == null ? void 0 : O.autoSubmitInitialDraft) === !0, Ge = ae && Q && !oe, [K, ve] = x(() => Ge ? null : void 0), Ht = $(e), le = $(!1);
557
+ }] : [], U = f ? ur ?? [] : F ? dr : oe ? yt ?? [] : Ot.sessions, fr = f ? or ?? null : F ? We ?? $t : oe ? Pt ?? null : Ot.activeId, ae = (O == null ? void 0 : O.autoSubmitInitialDraft) === !0, Ge = ae && Q && !oe, [K, ve] = x(() => Ge ? null : void 0), Kt = $(e), le = $(!1);
558
558
  A(() => {
559
- if (Ht.current !== e) {
560
- Ht.current = e, le.current = !1, ve(Ge ? null : void 0);
559
+ if (Kt.current !== e) {
560
+ Kt.current = e, le.current = !1, ve(Ge ? null : void 0);
561
561
  return;
562
562
  }
563
563
  Ge && K === void 0 && (le.current = !1, ve(null));
@@ -570,31 +570,31 @@ function Qs({
570
570
  le.current = !1, ve(void 0);
571
571
  }));
572
572
  }, [K, k, f]);
573
- const G = K !== void 0 ? K ?? null : gr, J = F ? ot : (f == null ? void 0 : f.switch) ?? At ?? _e.switchTo, $e = E((t) => (G && t !== G && Ur({ sessionId: G, reason: Kr.sessionSwitch }), J(t)), [G, J]), at = F ? ot : f ? () => f.create() : Qe ? () => Qe() : () => _e.create(), Jt = F ? ot : (f == null ? void 0 : f.delete) ?? Rt ?? _e.remove, qt = E((t) => (f && X.length <= 1 && (he.current = !0), Jt(t)), [X.length, Jt, f]), mr = ((mn = U.find((t) => t.id === G)) == null ? void 0 : mn.title) ?? void 0, [pr, jt] = pt(
573
+ const G = K !== void 0 ? K ?? null : fr, J = F ? it : (f == null ? void 0 : f.switch) ?? Et ?? _e.switchTo, $e = E((t) => (G && t !== G && $r({ sessionId: G, reason: Ur.sessionSwitch }), J(t)), [G, J]), ot = F ? it : f ? () => f.create() : Qe ? () => Qe() : () => _e.create(), Ht = F ? it : (f == null ? void 0 : f.delete) ?? At ?? _e.remove, Jt = E((t) => (f && X.length <= 1 && (he.current = !0), Ht(t)), [X.length, Ht, f]), gr = ((gn = U.find((t) => t.id === G)) == null ? void 0 : gn.title) ?? void 0, [mr, qt] = mt(
574
574
  `${Ne}:drawer`,
575
- Hn,
575
+ Kn,
576
576
  C
577
- ), Bt = wt && pr, [Z, j] = pt(
577
+ ), jt = Tt && mr, [Z, j] = mt(
578
578
  // Key must NOT match resolvedSurfaceStorageKey (which stores the dockview
579
579
  // layout JSON at the same ":surface" suffix). Writing "1"/"0" to the same
580
580
  // key corrupts the JSON and drops the persisted workbench layout on reload.
581
581
  `${Ne}:workbenchOpen`,
582
- Jn ?? !1,
582
+ Hn ?? !1,
583
583
  C
584
- ), [hr, lt] = x(!1), [Sr, be] = pt(
584
+ ), [pr, at] = x(!1), [hr, be] = mt(
585
585
  `${Ne}:workbenchLeftOpen`,
586
586
  Xe ?? !1,
587
587
  C
588
- ), [vr, Ue] = x(() => Xe ?? !1), br = Xe === !1 ? vr : Sr, ye = $(!1), ee = $(null), te = $(Z), Vt = $(I), ct = $(null), ut = $([]);
589
- Vt.current = I;
590
- const [zt, kt] = x(() => ({
588
+ ), [Sr, Ue] = x(() => Xe ?? !1), vr = Xe === !1 ? Sr : hr, ye = $(!1), ee = $(null), te = $(Z), Bt = $(I), lt = $(null), ct = $([]);
589
+ Bt.current = I;
590
+ const [Vt, zt] = x(() => ({
591
591
  key: I,
592
- snapshot: Dn
593
- })), yr = zt.key === I ? zt.snapshot : Dn;
592
+ snapshot: Nn
593
+ })), br = Vt.key === I ? Vt.snapshot : Nn;
594
594
  A(() => {
595
- ye.current = !1, he.current = !1, Le({ workspaceId: e, creating: !1 }), xe({ workspaceId: e, failed: !1 }), Ft(null);
595
+ ye.current = !1, he.current = !1, Le({ workspaceId: e, creating: !1 }), xe({ workspaceId: e, failed: !1 }), Ct(null);
596
596
  }, [e]), A(() => {
597
- lt(!1), ut.current = [];
597
+ at(!1), ct.current = [];
598
598
  }, [I]), A(() => {
599
599
  if (!(!f || f.loading) && !Se && K === void 0) {
600
600
  if (X.length > 0) {
@@ -603,7 +603,7 @@ function Qs({
603
603
  }
604
604
  he.current || ye.current || (ye.current = !0, Le({ workspaceId: e, creating: !0 }), xe({ workspaceId: e, failed: !1 }), Promise.resolve(f.create({ title: k })).then((t) => {
605
605
  const a = t == null ? void 0 : t.id;
606
- typeof a == "string" && Ft({ workspaceId: e, id: a });
606
+ typeof a == "string" && Ct({ workspaceId: e, id: a });
607
607
  }).catch(() => {
608
608
  ye.current = !1, Le({ workspaceId: e, creating: !1 }), xe({ workspaceId: e, failed: !0 });
609
609
  }));
@@ -611,44 +611,44 @@ function Qs({
611
611
  }, [X.length, K, k, Se, f, e]), A(() => {
612
612
  te.current = Z;
613
613
  }, [Z]);
614
- const Yt = E((t) => {
615
- ct.current = { key: I, api: t }, lt(!0), kt({
614
+ const kt = E((t) => {
615
+ lt.current = { key: I, api: t }, at(!0), zt({
616
616
  key: I,
617
617
  snapshot: t.getSnapshot()
618
618
  });
619
- const a = ut.current.splice(0);
619
+ const a = ct.current.splice(0);
620
620
  for (const l of a) l(t);
621
- }, [I]), Qt = E((t) => {
622
- ut.current.push(t);
623
- }, []), Xt = E((t) => {
624
- kt({
621
+ }, [I]), Yt = E((t) => {
622
+ ct.current.push(t);
623
+ }, []), Qt = E((t) => {
624
+ zt({
625
625
  key: I,
626
626
  snapshot: t
627
627
  });
628
628
  }, [I]), Ke = E(() => {
629
- const t = ct.current;
630
- return (t == null ? void 0 : t.key) === Vt.current ? t.api : null;
631
- }, []), Zt = E(() => te.current, []), en = E(() => {
629
+ const t = lt.current;
630
+ return (t == null ? void 0 : t.key) === Bt.current ? t.api : null;
631
+ }, []), Xt = E(() => te.current, []), Zt = E(() => {
632
632
  te.current = !0, j(!0);
633
- }, [j]), tn = E(() => {
633
+ }, [j]), en = E(() => {
634
634
  te.current = !0, j(!0), be(!0), Ue(!0);
635
635
  }, [j, be]), He = E(() => {
636
- te.current = !1, ct.current = null, lt(!1), j(!1);
637
- }, [j]), nn = $(/* @__PURE__ */ new Set()), rn = E((t) => {
636
+ te.current = !1, lt.current = null, at(!1), j(!1);
637
+ }, [j]), tn = $(/* @__PURE__ */ new Set()), nn = E((t) => {
638
638
  const a = t.meta;
639
639
  if (!a || a.openOnlyWhenSessionOpen !== !0) return !0;
640
640
  const l = typeof a.sessionId == "string" ? a.sessionId : null;
641
- return l ? nn.current.has(l) : !1;
641
+ return l ? tn.current.has(l) : !1;
642
642
  }, []), ce = L(() => ({
643
643
  surface: Ke,
644
- isWorkbenchOpen: Zt,
645
- openWorkbench: en,
646
- openWorkbenchSources: tn,
644
+ isWorkbenchOpen: Xt,
645
+ openWorkbench: Zt,
646
+ openWorkbenchSources: en,
647
647
  closeWorkbench: He,
648
- enqueue: Qt,
649
- shouldOpenSurface: rn
650
- }), [Ke, Zt, en, tn, He, Qt, rn]), Pr = L(() => ({
651
- openFile: async (t) => (Pn({ kind: "openFile", params: { path: t } }, ce), { seq: 0, status: "ok" }),
648
+ enqueue: Yt,
649
+ shouldOpenSurface: nn
650
+ }), [Ke, Xt, Zt, en, He, Yt, nn]), yr = L(() => ({
651
+ openFile: async (t) => (yn({ kind: "openFile", params: { path: t } }, ce), { seq: 0, status: "ok" }),
652
652
  getActiveFile: () => {
653
653
  var t;
654
654
  return ((t = Ke()) == null ? void 0 : t.getSnapshot().activeTab) ?? null;
@@ -656,81 +656,81 @@ function Qs({
656
656
  select: () => () => {
657
657
  }
658
658
  }), [Ke, ce]), ue = L(
659
- () => (W == null ? void 0 : W.map(Hr)) ?? [],
659
+ () => (W == null ? void 0 : W.map(Kr)) ?? [],
660
660
  [W]
661
- ), dt = L(
661
+ ), ut = L(
662
662
  () => ue.some((t) => t.registrations.leftTabs.length > 0),
663
663
  [ue]
664
- ), sn = L(
664
+ ), rn = L(
665
665
  () => ue.flatMap((t) => t.registrations.panels.map((a) => a.id)),
666
666
  [ue]
667
- ), on = L(() => {
667
+ ), sn = L(() => {
668
668
  const t = {};
669
669
  for (const a of ue)
670
670
  for (const l of a.registrations.toolRenderers)
671
671
  t[l.id] = l.render;
672
672
  return t;
673
- }, [ue]), an = L(
674
- () => [...Dt ?? [], ...sn],
675
- [Dt, sn]
676
- ), m = Q && !r && pe.workspaceId !== e ? "default" : G ?? (K !== void 0 ? "default" : ((pn = U[0]) == null ? void 0 : pn.id) ?? "default"), ln = !(f != null && f.hasMore) && !F;
673
+ }, [ue]), on = L(
674
+ () => [...Nt ?? [], ...rn],
675
+ [Nt, rn]
676
+ ), m = Q && !r && pe.workspaceId !== e ? "default" : G ?? (K !== void 0 ? "default" : ((mn = U[0]) == null ? void 0 : mn.id) ?? "default"), an = !(f != null && f.hasMore) && !F;
677
677
  A(() => {
678
- var re, hn;
678
+ var re, pn;
679
679
  if (Ie) return;
680
680
  const t = ee.current, a = new Set(U.map((H) => H.id)), l = t ? t.createdId ?? (a.has(m) && !t.knownIds.has(m) ? m : ((re = U.find((H) => !t.knownIds.has(H.id))) == null ? void 0 : re.id) ?? null) : null;
681
681
  l && a.has(l) && (ee.current = null);
682
- const g = m === "default" && K !== void 0, S = ln && a.size > 0 && !g, R = l ?? (S && !a.has(m) ? ((hn = U[0]) == null ? void 0 : hn.id) ?? m : m);
682
+ const g = m === "default" && K !== void 0, S = an && a.size > 0 && !g, R = l ?? (S && !a.has(m) ? ((pn = U[0]) == null ? void 0 : pn.id) ?? m : m);
683
683
  B((H) => {
684
684
  const se = H.workspaceId === e ? H : { workspaceId: e, ids: [], activeId: null };
685
685
  if (F && se.ids.length > 0 && !l) return se;
686
- const Sn = se.ids.length > 0 ? se.ids : [R], vn = S ? Sn.filter((je) => a.has(je) || je === l) : Sn, de = vn.length > 0 ? vn : [R], bn = se.activeId && de.includes(se.activeId) ? se.activeId : de[0] ?? R, Ee = l ? Be(de, t == null ? void 0 : t.afterId, l) : R === bn || de.includes(R) ? de : wn(de, bn, R), yn = Ee.includes(R) ? R : Ee[0] ?? R;
687
- return H.workspaceId === e && H.activeId === yn && H.ids.length === Ee.length && H.ids.every((je, Mr) => je === Ee[Mr]) ? H : { workspaceId: e, ids: Ee, activeId: yn };
686
+ const hn = se.ids.length > 0 ? se.ids : [R], Sn = S ? hn.filter((je) => a.has(je) || je === l) : hn, de = Sn.length > 0 ? Sn : [R], vn = se.activeId && de.includes(se.activeId) ? se.activeId : de[0] ?? R, Ee = l ? Be(de, t == null ? void 0 : t.afterId, l) : R === vn || de.includes(R) ? de : Tn(de, vn, R), bn = Ee.includes(R) ? R : Ee[0] ?? R;
687
+ return H.workspaceId === e && H.activeId === bn && H.ids.length === Ee.length && H.ids.every((je, xr) => je === Ee[xr]) ? H : { workspaceId: e, ids: Ee, activeId: bn };
688
688
  });
689
- }, [K, m, F, Ie, U, ln, e]);
690
- const cn = L(() => {
689
+ }, [K, m, F, Ie, U, an, e]);
690
+ const ln = L(() => {
691
691
  const t = /* @__PURE__ */ new Map();
692
692
  for (const a of U) t.set(a.id, a.title);
693
693
  return t;
694
- }, [U]), ft = D.workspaceId === e ? D : { ids: [], activeId: null }, ne = ft.ids.length > 0 ? ft.ids : [m];
694
+ }, [U]), dt = D.workspaceId === e ? D : { ids: [], activeId: null }, ne = dt.ids.length > 0 ? dt.ids : [m];
695
695
  A(() => {
696
- nn.current = new Set(ne);
696
+ tn.current = new Set(ne);
697
697
  }, [ne]);
698
- const Pe = ft.activeId ?? ne[0] ?? m, Er = E((t) => {
698
+ const Pe = dt.activeId ?? ne[0] ?? m, Pr = E((t) => {
699
699
  const l = (D.workspaceId === e ? D : { ids: [m] }).ids.includes(t);
700
700
  return B((g) => {
701
- const S = g.workspaceId === e ? g : { ids: [m], activeId: m }, R = S.ids.includes(t) ? S.ids : wn(S.ids, S.activeId, t);
701
+ const S = g.workspaceId === e ? g : { ids: [m], activeId: m }, R = S.ids.includes(t) ? S.ids : Tn(S.ids, S.activeId, t);
702
702
  return { workspaceId: e, ids: R, activeId: t };
703
703
  }), l ? J(t) : $e(t);
704
- }, [D, m, J, $e, e]), Ar = E((t) => (B((a) => {
704
+ }, [D, m, J, $e, e]), Er = E((t) => (B((a) => {
705
705
  const l = a.workspaceId === e ? a : { ids: [m], activeId: m };
706
706
  return {
707
707
  workspaceId: e,
708
708
  ids: l.ids.includes(t) ? l.ids : Be(l.ids, l.activeId, t),
709
709
  activeId: t
710
710
  };
711
- }), J(t)), [m, J, e]), un = E((t) => ((D.workspaceId === e ? D : { ids: [m] }).ids.includes(t) && Wt({ workspaceId: e, id: t }), B((l) => {
711
+ }), J(t)), [m, J, e]), cn = E((t) => ((D.workspaceId === e ? D : { ids: [m] }).ids.includes(t) && Ft({ workspaceId: e, id: t }), B((l) => {
712
712
  const g = l.workspaceId === e ? l : { ids: [m], activeId: m };
713
713
  return {
714
714
  workspaceId: e,
715
715
  ids: Be(g.ids, g.activeId, t),
716
716
  activeId: t
717
717
  };
718
- }), J(t)), [D, m, J, e]), Rr = E((t) => {
718
+ }), J(t)), [D, m, J, e]), Ar = E((t) => {
719
719
  const a = D.workspaceId === e ? D : { ids: [m], activeId: m };
720
720
  if (a.ids.length <= 1) return;
721
721
  const l = a.ids.indexOf(t);
722
722
  if (l < 0) return;
723
723
  const g = a.ids.filter((R) => R !== t), S = a.activeId === t ? g[Math.max(0, l - 1)] ?? g[0] ?? null : a.activeId;
724
724
  B({ workspaceId: e, ids: g, activeId: S }), S && a.activeId === t && J(S);
725
- }, [D, m, J, e]), Tr = E((t) => {
725
+ }, [D, m, J, e]), Rr = E((t) => {
726
726
  const a = {
727
727
  afterId: t,
728
728
  knownIds: new Set(U.map((g) => g.id))
729
729
  };
730
730
  ee.current = a;
731
- const l = at();
731
+ const l = ot();
732
732
  return Promise.resolve(l).then((g) => {
733
- const S = ms(g);
733
+ const S = gs(g);
734
734
  S && (ee.current === a && (ee.current = { ...a, createdId: S }), B((R) => {
735
735
  const re = R.workspaceId === e ? R : { ids: [m] };
736
736
  return {
@@ -742,39 +742,39 @@ function Qs({
742
742
  }).catch(() => {
743
743
  ee.current === a && (ee.current = null);
744
744
  }), l;
745
- }, [m, at, U, e]), wr = E((t) => {
745
+ }, [m, ot, U, e]), Tr = E((t) => {
746
746
  const a = D.workspaceId === e ? D : { ids: [m], activeId: m }, l = a.ids.indexOf(t);
747
747
  let g = a.activeId;
748
748
  if (l >= 0) {
749
749
  const S = a.ids.filter((R) => R !== t);
750
750
  g = a.activeId === t ? S[Math.max(0, l - 1)] ?? S[0] ?? null : a.activeId, B({ workspaceId: e, ids: S, activeId: g }), g && a.activeId === t && $e(g);
751
751
  }
752
- return qt(t);
753
- }, [D, m, qt, $e, e]), [Nr, gt] = x(ae), dn = $(e);
752
+ return Jt(t);
753
+ }, [D, m, Jt, $e, e]), [wr, ft] = x(ae), un = $(e);
754
754
  A(() => {
755
- if (dn.current !== e) {
756
- dn.current = e, gt(ae);
755
+ if (un.current !== e) {
756
+ un.current = e, ft(ae);
757
757
  return;
758
758
  }
759
- ae && gt(!0);
759
+ ae && ft(!0);
760
760
  }, [ae, e]);
761
- const fn = ae && Q && !G, gn = !!!(it && it.workspaceId === e && it.id === G) && !Nr && Ze !== !1 && (Q ? !!G : !0), Dr = E((t) => {
762
- tr({ workspaceId: e, status: t }), we == null || we(t);
761
+ const dn = ae && Q && !G, fn = !wr && Ze !== !1 && (Q ? !!G : !0), Nr = E((t) => {
762
+ er({ workspaceId: e, status: t }), we == null || we(t);
763
763
  }, [we, e]);
764
764
  A(() => {
765
765
  var a;
766
766
  const t = (l) => {
767
767
  const g = l.detail;
768
- !g || typeof g != "object" || Pn(g, ce);
768
+ !g || typeof g != "object" || yn(g, ce);
769
769
  };
770
- return (a = globalThis.addEventListener) == null || a.call(globalThis, En, t), () => {
770
+ return (a = globalThis.addEventListener) == null || a.call(globalThis, Pn, t), () => {
771
771
  var l;
772
- return (l = globalThis.removeEventListener) == null ? void 0 : l.call(globalThis, En, t);
772
+ return (l = globalThis.removeEventListener) == null ? void 0 : l.call(globalThis, Pn, t);
773
773
  };
774
774
  }, [ce]), A(() => {
775
775
  F || Re == null || Re(G ?? null);
776
776
  }, [G, Re, F]);
777
- const mt = Me.status !== "ready", _r = mt ? /* @__PURE__ */ d(Ss, { status: Me }) : void 0, Je = E(async (t) => {
777
+ const gt = Me.status !== "ready", Dr = gt ? /* @__PURE__ */ d(hs, { status: Me }) : void 0, Je = E(async (t) => {
778
778
  const a = `${(h == null ? void 0 : h.replace(/\/$/, "")) ?? ""}/api/v1/agent/reload`;
779
779
  try {
780
780
  const l = await fetch(a, {
@@ -785,7 +785,7 @@ function Qs({
785
785
  if (!l.ok)
786
786
  return (await l.json().catch(() => ({}))).error || `reload failed (${l.status})`;
787
787
  const g = await l.json().catch(() => ({}));
788
- return window.dispatchEvent(new CustomEvent(Jr, { detail: g })), ys(g);
788
+ return window.dispatchEvent(new CustomEvent(Hr, { detail: g })), bs(g);
789
789
  } catch (l) {
790
790
  return l instanceof Error ? l.message : "Agent plugin reload failed.";
791
791
  }
@@ -794,7 +794,7 @@ function Qs({
794
794
  const l = a.bridgeEnabled ?? !0, g = O != null && O.toolRenderers && typeof O.toolRenderers == "object" ? O.toolRenderers : void 0;
795
795
  return {
796
796
  ...O,
797
- ...fn ? { autoSubmitInitialDraft: !1, initialDraft: void 0 } : {},
797
+ ...dn ? { autoSubmitInitialDraft: !1, initialDraft: void 0 } : {},
798
798
  sessionId: t,
799
799
  apiBaseUrl: h,
800
800
  workspaceId: e,
@@ -802,14 +802,14 @@ function Qs({
802
802
  requestHeaders: Y,
803
803
  showSessions: !1,
804
804
  onReloadAgentPlugins: (O == null ? void 0 : O.onReloadAgentPlugins) ?? (() => Je(t)),
805
- toolRenderers: { ...on, ...g ?? {} },
805
+ toolRenderers: { ...sn, ...g ?? {} },
806
806
  bridgeEndpoint: l ? Ye : null,
807
807
  surfaceDispatch: ce,
808
- extraCommands: _t,
808
+ extraCommands: Dt,
809
809
  workspaceWarmupStatus: Me,
810
- hydrateMessages: gn,
810
+ hydrateMessages: fn,
811
811
  onAutoSubmitInitialDraftSettled: () => {
812
- le.current = !1, gt(!1), ve(void 0);
812
+ le.current = !1, ft(!1), ve(void 0);
813
813
  const S = O == null ? void 0 : O.onAutoSubmitInitialDraftSettled;
814
814
  typeof S == "function" && S();
815
815
  },
@@ -819,41 +819,41 @@ function Qs({
819
819
  ...nt !== void 0 ? { hotReloadEnabled: nt } : {}
820
820
  };
821
821
  },
822
- [h, O, fn, Y, Ye, ce, _t, Me, gn, nt, on, Je, e]
823
- ), Or = L(
822
+ [h, O, dn, Y, Ye, ce, Dt, Me, fn, nt, sn, Je, e]
823
+ ), _r = L(
824
824
  () => qe(m),
825
825
  [m, qe]
826
- ), Lr = L(() => ne.map((t) => ({
826
+ ), Or = L(() => ne.map((t) => ({
827
827
  id: t,
828
- title: cn.get(t) ?? (t === "default" ? k : t),
828
+ title: ln.get(t) ?? (t === "default" ? k : t),
829
829
  panel: "chat",
830
830
  params: qe(t, { bridgeEnabled: t === Pe })
831
- })), [Pe, ne, k, qe, cn]), xr = L(() => ({
831
+ })), [Pe, ne, k, qe, ln]), Lr = L(() => ({
832
832
  storageKey: I,
833
833
  defaultLeftTab: Te,
834
- initialPanels: Nt,
835
- extraPanels: an,
834
+ initialPanels: wt,
835
+ extraPanels: on,
836
836
  onReloadAgentPlugins: () => Je(G ?? m),
837
- onReady: Yt,
838
- onChange: Xt,
837
+ onReady: kt,
838
+ onChange: Qt,
839
839
  onClose: He
840
840
  }), [
841
841
  He,
842
842
  Te,
843
- Nt,
843
+ wt,
844
844
  Je,
845
845
  G,
846
846
  m,
847
- Xt,
848
- Yt,
847
+ Qt,
848
+ kt,
849
849
  I,
850
- an,
850
+ on,
851
851
  j
852
852
  ]);
853
853
  return /* @__PURE__ */ d("div", { className: "h-full bg-background text-foreground", children: /* @__PURE__ */ Ae(
854
- qr,
854
+ Jr,
855
855
  {
856
- chatPanel: sr,
856
+ chatPanel: rr,
857
857
  panels: y,
858
858
  commands: b,
859
859
  catalogs: q,
@@ -861,52 +861,52 @@ function Qs({
861
861
  excludeDefaults: z,
862
862
  capabilities: T,
863
863
  apiBaseUrl: h,
864
- authHeaders: er,
864
+ authHeaders: Zn,
865
865
  apiTimeout: p,
866
866
  activeSessionId: Pe,
867
867
  openSessionIds: ne,
868
868
  defaultTheme: N,
869
- onThemeChange: In,
869
+ onThemeChange: Wn,
870
870
  workspaceId: e,
871
- workspaceLabel: Kn,
872
- appTitle: Tt,
871
+ workspaceLabel: Un,
872
+ appTitle: Rt,
873
873
  storageKey: rt,
874
- persistenceEnabled: yt,
875
- debug: Gn,
874
+ persistenceEnabled: bt,
875
+ debug: In,
876
876
  bridgeEndpoint: null,
877
- onAuthError: Un,
878
- frontPluginHotReload: Zn,
879
- fullPageBasePath: $n,
877
+ onAuthError: $n,
878
+ frontPluginHotReload: Xn,
879
+ fullPageBasePath: Gn,
880
880
  children: [
881
881
  u,
882
882
  /* @__PURE__ */ d(
883
- gs,
883
+ fs,
884
884
  {
885
885
  workspaceId: e,
886
886
  requestHeaders: Y,
887
887
  apiBaseUrl: h,
888
- preloadPaths: Yn,
888
+ preloadPaths: kn,
889
889
  provisionWorkspace: Ze,
890
- onStatusChange: Dr
890
+ onStatusChange: Nr
891
891
  }
892
892
  ),
893
893
  /* @__PURE__ */ d(
894
- Ds,
894
+ Ns,
895
895
  {
896
896
  bridgeEndpoint: Ye,
897
897
  requestHeaders: Y,
898
- navOpen: Bt,
898
+ navOpen: jt,
899
899
  surfaceOpen: Z,
900
- surfaceReady: hr,
901
- snapshot: yr
900
+ surfaceReady: pr,
901
+ snapshot: br
902
902
  }
903
903
  ),
904
904
  /* @__PURE__ */ Ae("div", { className: "flex h-full min-h-0 flex-col", children: [
905
905
  /* @__PURE__ */ d(
906
- zr,
906
+ Vr,
907
907
  {
908
- appTitle: Tt,
909
- sessionTitle: Ie ? "Loading sessions…" : mr ?? k,
908
+ appTitle: Rt,
909
+ sessionTitle: Ie ? "Loading sessions…" : gr ?? k,
910
910
  onCommandPalette: () => {
911
911
  document.dispatchEvent(new KeyboardEvent("keydown", {
912
912
  key: "k",
@@ -916,49 +916,49 @@ function Qs({
916
916
  cancelable: !0
917
917
  }));
918
918
  },
919
- topBarLeft: qn,
919
+ topBarLeft: Jn,
920
920
  topBarRight: /* @__PURE__ */ Ae(fe, { children: [
921
- Bn ? /* @__PURE__ */ d(ts, {}) : null,
922
- jn
921
+ jn ? /* @__PURE__ */ d(es, {}) : null,
922
+ qn
923
923
  ] })
924
924
  }
925
925
  ),
926
- Ie ? /* @__PURE__ */ d(Rs, {}) : /* @__PURE__ */ d(
927
- kr,
926
+ Ie ? /* @__PURE__ */ d(As, {}) : /* @__PURE__ */ d(
927
+ zr,
928
928
  {
929
- className: Xn,
930
- nav: Bt ? "session-list" : null,
929
+ className: Qn,
930
+ nav: jt ? "session-list" : null,
931
931
  navParams: {
932
932
  sessions: U,
933
933
  activeId: Pe,
934
934
  openIds: ne,
935
- pinnedIds: nr,
936
- onTogglePin: rr,
937
- onSwitch: Er,
938
- onOpenAsTab: un,
939
- onCreate: at,
940
- onDelete: wr,
935
+ pinnedIds: tr,
936
+ onTogglePin: nr,
937
+ onSwitch: Pr,
938
+ onOpenAsTab: cn,
939
+ onCreate: ot,
940
+ onDelete: Tr,
941
941
  onLoadMore: f == null ? void 0 : f.loadMore,
942
942
  hasMore: f == null ? void 0 : f.hasMore,
943
943
  loadingMore: f == null ? void 0 : f.loadingMore,
944
- onClose: () => jt(!1)
944
+ onClose: () => qt(!1)
945
945
  },
946
946
  center: "chat",
947
- centerParams: Or,
948
- chatPanes: Lr,
947
+ centerParams: _r,
948
+ chatPanes: Or,
949
949
  activeChatPaneId: Pe,
950
- onActiveChatPaneChange: Ar,
951
- onCloseChatPane: Rr,
952
- onCreateChatPaneAfter: Tr,
953
- onDropChatSession: un,
950
+ onActiveChatPaneChange: Er,
951
+ onCloseChatPane: Ar,
952
+ onCreateChatPaneAfter: Rr,
953
+ onDropChatSession: cn,
954
954
  flashChatPaneId: (ie == null ? void 0 : ie.workspaceId) === e ? ie.id : null,
955
955
  surface: Z ? "artifact-surface" : null,
956
- surfaceParams: xr,
957
- surfaceOverlay: _r,
958
- sidebar: Z && !mt && dt && br ? "workbench-left" : null,
959
- sidebarParams: Z && !mt && dt ? {
956
+ surfaceParams: Lr,
957
+ surfaceOverlay: Dr,
958
+ sidebar: Z && !gt && ut && vr ? "workbench-left" : null,
959
+ sidebarParams: Z && !gt && ut ? {
960
960
  ...Te ? { defaultTab: Te } : {},
961
- bridge: Pr,
961
+ bridge: yr,
962
962
  onClose: () => {
963
963
  be(!1), Ue(!1);
964
964
  },
@@ -967,14 +967,14 @@ function Qs({
967
967
  }
968
968
  } : void 0,
969
969
  storageKey: C ? Ne : void 0,
970
- onOpenNav: wt ? () => {
971
- jt(!0), et == null || et();
970
+ onOpenNav: Tt ? () => {
971
+ qt(!0), et == null || et();
972
972
  } : void 0,
973
973
  onOpenSurface: () => {
974
974
  te.current = !0, j(!0), tt == null || tt();
975
975
  },
976
- surfaceButtonBottomOffset: Qn,
977
- onOpenSidebar: dt ? () => {
976
+ surfaceButtonBottomOffset: Yn,
977
+ onOpenSidebar: ut ? () => {
978
978
  te.current = !0, j(!0), be(!0), Ue(!0);
979
979
  } : void 0
980
980
  }
@@ -985,8 +985,8 @@ function Qs({
985
985
  }
986
986
  ) });
987
987
  }
988
- const _s = 500;
989
- function Os(e) {
988
+ const Ds = 500;
989
+ function _s(e) {
990
990
  return new Promise((n, r) => {
991
991
  let s;
992
992
  const i = () => {
@@ -1000,14 +1000,14 @@ function Os(e) {
1000
1000
  }
1001
1001
  s = globalThis.setTimeout(() => {
1002
1002
  i(), n();
1003
- }, _s), e.addEventListener("abort", o, { once: !0 });
1003
+ }, Ds), e.addEventListener("abort", o, { once: !0 });
1004
1004
  });
1005
1005
  }
1006
- function Xs({
1006
+ function Qs({
1007
1007
  workspaceId: e,
1008
1008
  requestHeaders: n,
1009
1009
  apiBaseUrl: r,
1010
- preloadPaths: s = Ln,
1010
+ preloadPaths: s = On,
1011
1011
  provisionWorkspace: i = !0,
1012
1012
  loadingFallback: o,
1013
1013
  errorFallback: c,
@@ -1020,27 +1020,27 @@ function Xs({
1020
1020
  return A(() => {
1021
1021
  const b = new AbortController(), q = ze(e, n);
1022
1022
  async function W(T) {
1023
- const h = await fetch(Mn(r, T), {
1023
+ const h = await fetch(xn(r, T), {
1024
1024
  headers: q,
1025
1025
  signal: b.signal
1026
1026
  }), w = await ke(h);
1027
1027
  if (!h.ok) {
1028
- if (vt(w)) return "preparing";
1029
- throw new Error(bt(w) ?? `${T} failed with ${h.status}`);
1028
+ if (St(w)) return "preparing";
1029
+ throw new Error(vt(w) ?? `${T} failed with ${h.status}`);
1030
1030
  }
1031
- if (Cn(T)) {
1031
+ if (Mn(T)) {
1032
1032
  const N = Ve(w);
1033
1033
  if ((N == null ? void 0 : N.state) === "degraded") throw new Error(N.message ?? "Workspace failed to prepare");
1034
1034
  }
1035
- return jr(T) !== null && w && typeof w == "object" && Fn(r, q["x-boring-workspace-id"] ?? e, T, w), "ready";
1035
+ return qr(T) !== null && w && typeof w == "object" && Cn(r, q["x-boring-workspace-id"] ?? e, T, w), "ready";
1036
1036
  }
1037
1037
  async function z() {
1038
1038
  y({ status: "loading", label: "Waking workspace runtime" });
1039
1039
  try {
1040
- const T = xn(s, i);
1040
+ const T = Ln(s, i);
1041
1041
  let h = await Promise.all(T.map(async (p) => ({ path: p, status: await W(p) }))), w = h.filter((p) => p.status === "preparing").map((p) => p.path);
1042
1042
  for (; w.length > 0; ) {
1043
- if (y({ status: "loading", label: "Workspace is still preparing" }), await Os(b.signal), b.signal.aborted) return;
1043
+ if (y({ status: "loading", label: "Workspace is still preparing" }), await _s(b.signal), b.signal.aborted) return;
1044
1044
  h = await Promise.all(w.map(async (p) => ({ path: p, status: await W(p) }))), w = h.filter((p) => p.status === "preparing").map((p) => p.path);
1045
1045
  }
1046
1046
  b.signal.aborted || y({ status: "ready" });
@@ -1054,14 +1054,14 @@ function Xs({
1054
1054
  }
1055
1055
  return z(), () => b.abort();
1056
1056
  }, [r, s, i, n, e]), v.status === "ready" ? /* @__PURE__ */ d(fe, { children: u }) : v.status === "error" ? typeof c == "function" ? /* @__PURE__ */ d(fe, { children: c(v.message) }) : c ? /* @__PURE__ */ d(fe, { children: c }) : /* @__PURE__ */ d(
1057
- Rn,
1057
+ An,
1058
1058
  {
1059
1059
  title: "Workspace failed to open",
1060
1060
  description: v.message,
1061
1061
  status: "Retry by reloading the page"
1062
1062
  }
1063
1063
  ) : typeof o == "function" ? /* @__PURE__ */ d(fe, { children: o(v.label) }) : o ? /* @__PURE__ */ d(fe, { children: o }) : /* @__PURE__ */ d(
1064
- Rn,
1064
+ An,
1065
1065
  {
1066
1066
  title: "Opening workspace",
1067
1067
  description: "Preparing secure runtime, files, sessions, and layout.",
@@ -1069,11 +1069,11 @@ function Xs({
1069
1069
  }
1070
1070
  );
1071
1071
  }
1072
- const Ls = "FULL_PAGE_PANEL_MISSING_COMPONENT", xs = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON", Ms = "FULL_PAGE_PANEL_PARAMS_NOT_OBJECT", Cs = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT", Fs = "FULL_PAGE_PANEL_NOT_SUPPORTED", Ws = "FULL_PAGE_PANEL_RENDER_FAILED";
1072
+ const Os = "FULL_PAGE_PANEL_MISSING_COMPONENT", Ls = "FULL_PAGE_PANEL_INVALID_PARAMS_JSON", xs = "FULL_PAGE_PANEL_PARAMS_NOT_OBJECT", Ms = "FULL_PAGE_PANEL_UNKNOWN_COMPONENT", Cs = "FULL_PAGE_PANEL_NOT_SUPPORTED", Fs = "FULL_PAGE_PANEL_RENDER_FAILED";
1073
1073
  function M() {
1074
1074
  }
1075
- const Is = { dispose: M }, P = () => Is;
1076
- function Gs(e) {
1075
+ const Ws = { dispose: M }, P = () => Ws;
1076
+ function Is(e) {
1077
1077
  return {
1078
1078
  id: `full-page:${e}`,
1079
1079
  title: e,
@@ -1107,7 +1107,7 @@ function Gs(e) {
1107
1107
  onWillFocus: P
1108
1108
  };
1109
1109
  }
1110
- function $s() {
1110
+ function Gs() {
1111
1111
  return {
1112
1112
  width: window.innerWidth,
1113
1113
  height: window.innerHeight,
@@ -1149,26 +1149,26 @@ function $s() {
1149
1149
  onDidActivePanelChange_: P
1150
1150
  };
1151
1151
  }
1152
- function St({ code: e, title: n, description: r }) {
1152
+ function ht({ code: e, title: n, description: r }) {
1153
1153
  return /* @__PURE__ */ d(
1154
1154
  "div",
1155
1155
  {
1156
1156
  className: "flex min-h-screen items-center justify-center bg-background p-6 text-foreground",
1157
1157
  "data-testid": "full-page-error-state",
1158
1158
  "data-full-page-error-code": e,
1159
- children: /* @__PURE__ */ d(es, { className: "w-full max-w-lg", title: n, description: r })
1159
+ children: /* @__PURE__ */ d(Zr, { className: "w-full max-w-lg", title: n, description: r })
1160
1160
  }
1161
1161
  );
1162
1162
  }
1163
- function Zs({ componentId: e, params: n = {} }) {
1164
- const r = Wn(), { errors: s } = Br(), i = r.get(e), o = r.getComponents()[e];
1165
- Fr(() => {
1163
+ function Xs({ componentId: e, params: n = {} }) {
1164
+ const r = Fn(), { errors: s } = jr(), i = r.get(e), o = r.getComponents()[e];
1165
+ Cr(() => {
1166
1166
  document.title = (i == null ? void 0 : i.title) ?? e;
1167
1167
  }, [e, i == null ? void 0 : i.title]);
1168
1168
  const c = L(() => ({
1169
1169
  params: n,
1170
- api: Gs(e),
1171
- containerApi: $s(),
1170
+ api: Is(e),
1171
+ containerApi: Gs(),
1172
1172
  className: "h-full"
1173
1173
  }), [e, n]), u = L(() => {
1174
1174
  if (!i) return null;
@@ -1181,29 +1181,29 @@ function Zs({ componentId: e, params: n = {} }) {
1181
1181
  return null;
1182
1182
  }, [e, s, i]);
1183
1183
  return i ? !i.supportsFullPage || !o ? /* @__PURE__ */ d(
1184
- St,
1184
+ ht,
1185
1185
  {
1186
- code: Fs,
1186
+ code: Cs,
1187
1187
  title: "Panel does not support full-page mode",
1188
1188
  description: `Panel "${e}" can render in the workspace, but it has not opted into the dedicated full-page pane route.`
1189
1189
  }
1190
1190
  ) : u ? /* @__PURE__ */ d(
1191
- St,
1191
+ ht,
1192
1192
  {
1193
- code: Ws,
1193
+ code: Fs,
1194
1194
  title: "Panel failed to render",
1195
1195
  description: `Panel "${e}" crashed while rendering in full-page mode: ${u.error.message}`
1196
1196
  }
1197
- ) : /* @__PURE__ */ d("div", { className: "min-h-screen bg-background text-foreground", children: /* @__PURE__ */ d(Vr, { mode: "full-page", children: /* @__PURE__ */ d(o, { ...c }) }) }) : /* @__PURE__ */ d(
1198
- St,
1197
+ ) : /* @__PURE__ */ d("div", { className: "min-h-screen bg-background text-foreground", children: /* @__PURE__ */ d(Br, { mode: "full-page", children: /* @__PURE__ */ d(o, { ...c }) }) }) : /* @__PURE__ */ d(
1198
+ ht,
1199
1199
  {
1200
- code: Cs,
1200
+ code: Ms,
1201
1201
  title: "Unknown panel",
1202
1202
  description: `No full-page panel component is registered as "${e}".`
1203
1203
  }
1204
1204
  );
1205
1205
  }
1206
- function ei(e) {
1206
+ function Zs(e) {
1207
1207
  var o;
1208
1208
  const n = new URLSearchParams(e), r = ((o = n.get("component")) == null ? void 0 : o.trim()) ?? "";
1209
1209
  if (!r)
@@ -1211,7 +1211,7 @@ function ei(e) {
1211
1211
  componentId: null,
1212
1212
  params: {},
1213
1213
  error: {
1214
- code: Ls,
1214
+ code: Os,
1215
1215
  message: "Missing full-page panel component id."
1216
1216
  }
1217
1217
  };
@@ -1226,7 +1226,7 @@ function ei(e) {
1226
1226
  componentId: null,
1227
1227
  params: {},
1228
1228
  error: {
1229
- code: xs,
1229
+ code: Ls,
1230
1230
  message: "Invalid full-page panel params JSON."
1231
1231
  }
1232
1232
  };
@@ -1235,23 +1235,23 @@ function ei(e) {
1235
1235
  componentId: null,
1236
1236
  params: {},
1237
1237
  error: {
1238
- code: Ms,
1238
+ code: xs,
1239
1239
  message: "Full-page panel params must be a JSON object."
1240
1240
  }
1241
1241
  } : { componentId: r, params: i };
1242
1242
  }
1243
1243
  export {
1244
- xs as FULL_PAGE_PANEL_INVALID_PARAMS_JSON,
1245
- Ls as FULL_PAGE_PANEL_MISSING_COMPONENT,
1246
- Fs as FULL_PAGE_PANEL_NOT_SUPPORTED,
1247
- Ms as FULL_PAGE_PANEL_PARAMS_NOT_OBJECT,
1248
- Ws as FULL_PAGE_PANEL_RENDER_FAILED,
1249
- Cs as FULL_PAGE_PANEL_UNKNOWN_COMPONENT,
1250
- Qs as WorkspaceAgentFront,
1251
- gs as WorkspaceBackgroundBoot,
1252
- Xs as WorkspaceBootGate,
1253
- Zs as WorkspaceFullPagePanel,
1254
- is as createLocalStorageSessions,
1255
- ei as parseFullPagePanelLocation,
1256
- os as useLocalStorageSessions
1244
+ Ls as FULL_PAGE_PANEL_INVALID_PARAMS_JSON,
1245
+ Os as FULL_PAGE_PANEL_MISSING_COMPONENT,
1246
+ Cs as FULL_PAGE_PANEL_NOT_SUPPORTED,
1247
+ xs as FULL_PAGE_PANEL_PARAMS_NOT_OBJECT,
1248
+ Fs as FULL_PAGE_PANEL_RENDER_FAILED,
1249
+ Ms as FULL_PAGE_PANEL_UNKNOWN_COMPONENT,
1250
+ Ys as WorkspaceAgentFront,
1251
+ fs as WorkspaceBackgroundBoot,
1252
+ Qs as WorkspaceBootGate,
1253
+ Xs as WorkspaceFullPagePanel,
1254
+ ss as createLocalStorageSessions,
1255
+ Zs as parseFullPagePanelLocation,
1256
+ is as useLocalStorageSessions
1257
1257
  };