@hachej/boring-workspace 0.1.23 → 0.1.24

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/workspace.js CHANGED
@@ -1,31 +1,31 @@
1
- var X = Object.defineProperty;
2
- var q = (e, r, t) => r in e ? X(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
- var T = (e, r, t) => q(e, typeof r != "symbol" ? r + "" : r, t);
4
- import { u as z, a as G, b as Q, D as Y } from "./WorkspaceProvider-Cn0sPgaB.js";
5
- import { A as ze, C as Ke, c as je, d as $e, e as _e, F as He, f as Ue, M as Ae, g as Je, P as Ve, h as Xe, i as qe, j as Ge, k as Qe, R as Ye, S as Ze, l as et, m as tt, T as nt, U as rt, W as at, n as st, o as ot, p as it, q as lt, r as ct, s as dt, t as ut, v as pt, w as mt, x as ht, y as ft, z as gt, B as bt, E as yt, G as vt, H as xt, I as St, J as Ct, K as Pt, L as kt, N as wt, O as Nt, Q as Et, V as Rt, X as Tt, Y as Ot, Z as It, _ as Lt, $ as Mt, a0 as Bt, a1 as Ft, a2 as Wt, a3 as Dt, a4 as zt, a5 as Kt, a6 as jt, a7 as $t, a8 as _t, a9 as Ht, aa as Ut, ab as At, ac as Jt, ad as Vt, ae as Xt, af as qt, ag as Gt, ah as Qt, ai as Yt } from "./WorkspaceProvider-Cn0sPgaB.js";
1
+ var V = Object.defineProperty;
2
+ var X = (e, r, t) => r in e ? V(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
+ var T = (e, r, t) => X(e, typeof r != "symbol" ? r + "" : r, t);
4
+ import { u as z, a as G, b as Q, D as Y } from "./WorkspaceProvider-BW4wzbpR.js";
5
+ import { A as ze, C as Ke, c as je, d as $e, e as _e, F as He, f as Ue, M as Ae, g as qe, P as Je, h as Ve, i as Xe, j as Ge, k as Qe, R as Ye, S as Ze, l as et, m as tt, T as at, U as rt, W as nt, n as st, o as ot, p as it, q as lt, r as ct, s as dt, t as ut, v as pt, w as mt, x as ht, y as ft, z as gt, B as bt, E as yt, G as vt, H as xt, I as Pt, J as St, K as kt, L as Ct, N as wt, O as Nt, Q as Et, V as Rt, X as Tt, Y as It, Z as Ot, _ as Ft, $ as Mt, a0 as Lt, a1 as Bt, a2 as Wt, a3 as Dt, a4 as zt, a5 as Kt, a6 as jt, a7 as $t, a8 as _t, a9 as Ht, aa as Ut, ab as At, ac as qt, ad as Jt, ae as Vt, af as Xt, ag as Gt, ah as Qt, ai as Yt, aj as Zt, ak as ea, al as ta, am as aa, an as ra, ao as na, ap as sa, aq as oa, ar as ia } from "./WorkspaceProvider-BW4wzbpR.js";
6
6
  import { c as w } from "./utils-B6yFEsav.js";
7
- import { C as en, T as tn, W as nn, b as rn } from "./WorkspaceLoadingState-hKrnYCL3.js";
8
- import { jsxs as b, jsx as n, Fragment as Z } from "react/jsx-runtime";
9
- import { Button as P, Sheet as ee, SheetContent as te, SheetHeader as ne, SheetTitle as re, SheetDescription as ae, EmptyState as se, Kbd as O, ErrorState as oe, IconButton as I } from "@hachej/boring-ui-kit";
10
- import { Toaster as sn, dismissToast as on, toast as ln } from "@hachej/boring-ui-kit";
11
- import { useSyncExternalStore as K, useState as N, useEffect as S, useRef as k, useCallback as y, useMemo as C, Suspense as ie, Component as le } from "react";
12
- import { C as dn, c as un } from "./CodeEditor-DQqOn4xz.js";
13
- import { FileTree as mn } from "./FileTree-D8Rmj8Bo.js";
14
- import { MarkdownEditor as fn } from "./MarkdownEditor-DKC4gNT4.js";
7
+ import { C as ca, T as da, W as ua, b as pa } from "./WorkspaceLoadingState-fccm3AQg.js";
8
+ import { jsxs as b, jsx as a, Fragment as Z } from "react/jsx-runtime";
9
+ import { Button as k, Sheet as ee, SheetContent as te, SheetHeader as ae, SheetTitle as re, SheetDescription as ne, EmptyState as se, Kbd as I, ErrorState as oe, IconButton as O } from "@hachej/boring-ui-kit";
10
+ import { Toaster as ha, dismissToast as fa, toast as ga } from "@hachej/boring-ui-kit";
11
+ import { useSyncExternalStore as K, useState as N, useEffect as P, useRef as C, useCallback as y, useMemo as S, Suspense as ie, Component as le } from "react";
12
+ import { C as ya, c as va } from "./CodeEditor-DQqOn4xz.js";
13
+ import { FileTree as Pa } from "./FileTree-DjPzfDMq.js";
14
+ import { MarkdownEditor as ka } from "./MarkdownEditor-BbSy0bLV.js";
15
15
  import { MenuIcon as ce, PanelLeftOpenIcon as de, PanelLeftCloseIcon as ue, PinIcon as pe, CheckIcon as me, CopyIcon as he } from "lucide-react";
16
- import { d as bn } from "./panel-DnvDNQac.js";
16
+ import { d as wa } from "./panel-DnvDNQac.js";
17
17
  function Te() {
18
18
  const e = z();
19
19
  return K(e.subscribe, e.getSnapshot);
20
20
  }
21
- function F(e) {
21
+ function B(e) {
22
22
  return typeof window > "u" ? !1 : window.innerWidth < e;
23
23
  }
24
24
  function W(e = 1024) {
25
- const [r, t] = N(() => F(e));
26
- return S(() => {
25
+ const [r, t] = N(() => B(e));
26
+ return P(() => {
27
27
  const s = () => {
28
- t(F(e));
28
+ t(B(e));
29
29
  };
30
30
  return s(), window.addEventListener("resize", s), () => {
31
31
  window.removeEventListener("resize", s);
@@ -37,10 +37,10 @@ function fe({
37
37
  isCollapsed: r,
38
38
  setCollapsed: t
39
39
  }) {
40
- const s = k(r), l = k(!1), i = k(null);
41
- return S(() => {
40
+ const s = C(r), l = C(!1), i = C(null);
41
+ return P(() => {
42
42
  s.current = r;
43
- }, [r]), S(() => {
43
+ }, [r]), P(() => {
44
44
  const g = i.current, d = g !== !0 && e, o = g === !0 && !e;
45
45
  if (i.current = e, e && d && !s.current) {
46
46
  l.current = !0, t(!0);
@@ -51,9 +51,9 @@ function fe({
51
51
  l.current = !1;
52
52
  }, []);
53
53
  }
54
- function Oe(e) {
55
- const [r, t] = N([]), s = k(r);
56
- s.current = r, S(() => {
54
+ function Ie(e) {
55
+ const [r, t] = N([]), s = C(r);
56
+ s.current = r, P(() => {
57
57
  if (!e) {
58
58
  t([]);
59
59
  return;
@@ -71,8 +71,8 @@ function Oe(e) {
71
71
  params: m.params
72
72
  });
73
73
  }
74
- const a = s.current;
75
- (a.length !== h.length || a.some((f, m) => {
74
+ const n = s.current;
75
+ (n.length !== h.length || n.some((f, m) => {
76
76
  var v;
77
77
  return f.id !== ((v = h[m]) == null ? void 0 : v.id);
78
78
  })) && t(h);
@@ -108,7 +108,7 @@ function Oe(e) {
108
108
  );
109
109
  return { panels: r, open: l, close: i, activate: g, isOpen: d };
110
110
  }
111
- function Ie(e, r = {}) {
111
+ function Oe(e, r = {}) {
112
112
  const t = r.toolPanelMap ?? {}, s = y(
113
113
  (i) => t[i],
114
114
  [t]
@@ -135,22 +135,22 @@ function ve({
135
135
  className: r
136
136
  }) {
137
137
  var M;
138
- const t = z(), s = G(), l = Q(), i = W(ge), g = W(be), d = g && !i, o = C(
138
+ const t = z(), s = G(), l = Q(), i = W(ge), g = W(be), d = g && !i, o = S(
139
139
  () => e.groups.find((x) => x.id === "sidebar" && x.panel),
140
140
  [e]
141
141
  ), c = o == null ? void 0 : o.panel, u = !!c, h = fe({
142
142
  isNarrowViewport: u && g,
143
143
  isCollapsed: s.collapsed,
144
144
  setCollapsed: (x) => l({ collapsed: x })
145
- }), [a, p] = N(!1);
146
- S(() => {
145
+ }), [n, p] = N(!1);
146
+ P(() => {
147
147
  (!u || !i && !d) && p(!1);
148
148
  }, [u, i, d]);
149
- const f = u && (i || d && s.collapsed), m = u && !i && (!d || !s.collapsed), v = C(
149
+ const f = u && (i || d && s.collapsed), m = u && !i && (!d || !s.collapsed), v = S(
150
150
  () => m ? e : ye(e),
151
151
  [m, e]
152
- ), j = C(() => {
153
- const x = m ? "inline-sidebar" : "overlay-sidebar", B = v.groups.map((E) => {
152
+ ), j = S(() => {
153
+ const x = m ? "inline-sidebar" : "overlay-sidebar", L = v.groups.map((E) => {
154
154
  let R = "";
155
155
  try {
156
156
  R = JSON.stringify(E.params ?? null);
@@ -159,63 +159,63 @@ function ve({
159
159
  }
160
160
  return `${E.id}:${E.panel ?? ""}:${R}`;
161
161
  }).join(",");
162
- return `${v.version}:${x}:${B}`;
162
+ return `${v.version}:${x}:${L}`;
163
163
  }, [v, m]), $ = K(
164
164
  t.subscribe,
165
165
  t.getSnapshot,
166
166
  t.getSnapshot
167
- ), _ = C(() => t.getComponents(), [t, $]), L = c ? _[c] : null, H = c ? ((M = t.get(c)) == null ? void 0 : M.title) ?? "Sidebar" : "Sidebar", U = y(() => {
167
+ ), _ = S(() => t.getComponents(), [t, $]), F = c ? _[c] : null, H = c ? ((M = t.get(c)) == null ? void 0 : M.title) ?? "Sidebar" : "Sidebar", U = y(() => {
168
168
  p(!0);
169
169
  }, []), A = y(() => {
170
170
  h(), l({ collapsed: !1 }), p(!1);
171
- }, [h, l]), J = y(() => {
171
+ }, [h, l]), q = y(() => {
172
172
  h(), l({ collapsed: !0 }), p(!1);
173
- }, [h, l]), V = y(
173
+ }, [h, l]), J = y(
174
174
  (x) => {
175
175
  x.target.closest("[role='treeitem']") && p(!1);
176
176
  },
177
177
  []
178
178
  );
179
179
  return /* @__PURE__ */ b("div", { className: "relative h-full w-full", children: [
180
- d && u && s.collapsed && /* @__PURE__ */ n(
180
+ d && u && s.collapsed && /* @__PURE__ */ a(
181
181
  "div",
182
182
  {
183
183
  className: "pointer-events-none absolute inset-y-0 left-0 z-20 w-10 border-r border-border bg-background/95",
184
184
  "aria-hidden": "true"
185
185
  }
186
186
  ),
187
- f && /* @__PURE__ */ n(
187
+ f && /* @__PURE__ */ a(
188
188
  "div",
189
189
  {
190
190
  className: w(
191
191
  "absolute z-30",
192
192
  i ? "left-2 top-2" : "left-1 top-2"
193
193
  ),
194
- children: /* @__PURE__ */ n(
195
- P,
194
+ children: /* @__PURE__ */ a(
195
+ k,
196
196
  {
197
197
  type: "button",
198
198
  variant: "outline",
199
199
  size: "icon-sm",
200
200
  onClick: U,
201
201
  "aria-label": i ? "Open sidebar menu" : "Open collapsed sidebar",
202
- children: i ? /* @__PURE__ */ n(ce, { className: "h-4 w-4" }) : /* @__PURE__ */ n(de, { className: "h-4 w-4" })
202
+ children: i ? /* @__PURE__ */ a(ce, { className: "h-4 w-4" }) : /* @__PURE__ */ a(de, { className: "h-4 w-4" })
203
203
  }
204
204
  )
205
205
  }
206
206
  ),
207
- d && u && !s.collapsed && /* @__PURE__ */ n("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ n(
208
- P,
207
+ d && u && !s.collapsed && /* @__PURE__ */ a("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ a(
208
+ k,
209
209
  {
210
210
  type: "button",
211
211
  variant: "outline",
212
212
  size: "icon-sm",
213
- onClick: J,
213
+ onClick: q,
214
214
  "aria-label": "Collapse sidebar",
215
- children: /* @__PURE__ */ n(ue, { className: "h-4 w-4" })
215
+ children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" })
216
216
  }
217
217
  ) }),
218
- /* @__PURE__ */ n(
218
+ /* @__PURE__ */ a(
219
219
  Y,
220
220
  {
221
221
  layout: v,
@@ -226,19 +226,19 @@ function ve({
226
226
  },
227
227
  j
228
228
  ),
229
- f && /* @__PURE__ */ n(ee, { open: a, onOpenChange: p, children: /* @__PURE__ */ b(
229
+ f && /* @__PURE__ */ a(ee, { open: n, onOpenChange: p, children: /* @__PURE__ */ b(
230
230
  te,
231
231
  {
232
232
  side: "left",
233
233
  className: "w-[85vw] max-w-sm p-0",
234
234
  children: [
235
- /* @__PURE__ */ b(ne, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
235
+ /* @__PURE__ */ b(ae, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
236
236
  /* @__PURE__ */ b("div", { children: [
237
- /* @__PURE__ */ n(re, { children: H }),
238
- /* @__PURE__ */ n(ae, { className: "sr-only", children: "Responsive sidebar panel" })
237
+ /* @__PURE__ */ a(re, { children: H }),
238
+ /* @__PURE__ */ a(ne, { className: "sr-only", children: "Responsive sidebar panel" })
239
239
  ] }),
240
240
  d && /* @__PURE__ */ b(
241
- P,
241
+ k,
242
242
  {
243
243
  type: "button",
244
244
  variant: "outline",
@@ -246,18 +246,18 @@ function ve({
246
246
  onClick: A,
247
247
  "aria-label": "Pin sidebar open",
248
248
  children: [
249
- /* @__PURE__ */ n(pe, { className: "h-4 w-4" }),
249
+ /* @__PURE__ */ a(pe, { className: "h-4 w-4" }),
250
250
  "Pin"
251
251
  ]
252
252
  }
253
253
  )
254
254
  ] }),
255
- /* @__PURE__ */ n(
255
+ /* @__PURE__ */ a(
256
256
  "div",
257
257
  {
258
258
  className: "h-full min-h-0 overflow-auto",
259
- onClickCapture: V,
260
- children: L ? /* @__PURE__ */ n(ie, { fallback: /* @__PURE__ */ n(D, {}), children: /* @__PURE__ */ n(L, {}) }) : /* @__PURE__ */ n(D, {})
259
+ onClickCapture: J,
260
+ children: F ? /* @__PURE__ */ a(ie, { fallback: /* @__PURE__ */ a(D, {}), children: /* @__PURE__ */ a(F, {}) }) : /* @__PURE__ */ a(D, {})
261
261
  }
262
262
  )
263
263
  ]
@@ -266,7 +266,7 @@ function ve({
266
266
  ] });
267
267
  }
268
268
  function D() {
269
- return /* @__PURE__ */ n("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
269
+ return /* @__PURE__ */ a("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
270
270
  }
271
271
  function xe(e = {}) {
272
272
  const { sidebar: r = "filetree", center: t = "empty", right: s } = e, l = [
@@ -296,35 +296,35 @@ function xe(e = {}) {
296
296
  constraints: { minWidth: 250 }
297
297
  }), { version: "2.0", groups: l };
298
298
  }
299
- function Le(e) {
300
- return /* @__PURE__ */ n(ve, { layout: xe(e), className: e.className });
299
+ function Fe(e) {
300
+ return /* @__PURE__ */ a(ve, { layout: xe(e), className: e.className });
301
301
  }
302
302
  function Me({ className: e, onOpenFile: r }) {
303
- return /* @__PURE__ */ n(
303
+ return /* @__PURE__ */ a(
304
304
  se,
305
305
  {
306
306
  className: w("h-full border-0 text-muted-foreground", e),
307
307
  title: "No file open",
308
308
  description: "Open a file to get started",
309
- actions: r ? /* @__PURE__ */ n(P, { type: "button", variant: "outline", onClick: r, children: "Open file" }) : null,
309
+ actions: r ? /* @__PURE__ */ a(k, { type: "button", variant: "outline", onClick: r, children: "Open file" }) : null,
310
310
  children: /* @__PURE__ */ b("div", { className: "space-y-2 text-sm", children: [
311
311
  /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
312
- /* @__PURE__ */ n(O, { children: "⌘P" }),
313
- /* @__PURE__ */ n("span", { children: "Open file" })
312
+ /* @__PURE__ */ a(I, { children: "⌘P" }),
313
+ /* @__PURE__ */ a("span", { children: "Open file" })
314
314
  ] }),
315
315
  /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
316
- /* @__PURE__ */ n(O, { children: "⌘⇧P" }),
317
- /* @__PURE__ */ n("span", { children: "Command palette" })
316
+ /* @__PURE__ */ a(I, { children: "⌘⇧P" }),
317
+ /* @__PURE__ */ a("span", { children: "Command palette" })
318
318
  ] }),
319
319
  /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
320
- /* @__PURE__ */ n(O, { children: "⌘B" }),
321
- /* @__PURE__ */ n("span", { children: "Toggle sidebar" })
320
+ /* @__PURE__ */ a(I, { children: "⌘B" }),
321
+ /* @__PURE__ */ a("span", { children: "Toggle sidebar" })
322
322
  ] })
323
323
  ] })
324
324
  }
325
325
  );
326
326
  }
327
- class Be extends le {
327
+ class Le extends le {
328
328
  constructor() {
329
329
  super(...arguments);
330
330
  T(this, "state", { hasError: !1, error: null });
@@ -345,24 +345,24 @@ class Be extends le {
345
345
  }
346
346
  render() {
347
347
  var t;
348
- return this.state.hasError ? /* @__PURE__ */ n("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ n(
348
+ return this.state.hasError ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ a(
349
349
  oe,
350
350
  {
351
351
  className: "w-full max-w-md",
352
352
  title: "Something went wrong",
353
353
  description: /* @__PURE__ */ b(Z, { children: [
354
354
  "Panel ",
355
- /* @__PURE__ */ n("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
355
+ /* @__PURE__ */ a("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
356
356
  " ",
357
357
  "encountered an error."
358
358
  ] }),
359
359
  details: (t = this.state.error) == null ? void 0 : t.message,
360
- actions: /* @__PURE__ */ n(P, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
360
+ actions: /* @__PURE__ */ a(k, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
361
361
  }
362
362
  ) }) : this.props.children;
363
363
  }
364
364
  }
365
- function Fe({
365
+ function Be({
366
366
  sessions: e,
367
367
  activeId: r,
368
368
  onSwitch: t,
@@ -370,38 +370,38 @@ function Fe({
370
370
  onDelete: l,
371
371
  className: i
372
372
  }) {
373
- const [g, d] = N(null), o = k({}), c = C(() => e.map((a) => a.id), [e]);
374
- S(() => {
373
+ const [g, d] = N(null), o = C({}), c = S(() => e.map((n) => n.id), [e]);
374
+ P(() => {
375
375
  if (c.length === 0) {
376
376
  d(null);
377
377
  return;
378
378
  }
379
- d((a) => a && c.includes(a) ? a : r && c.includes(r) ? r : c[0] ?? null);
379
+ d((n) => n && c.includes(n) ? n : r && c.includes(r) ? r : c[0] ?? null);
380
380
  }, [c, r]);
381
- const u = y((a) => {
381
+ const u = y((n) => {
382
382
  var p;
383
- d(a), (p = o.current[a]) == null || p.focus();
383
+ d(n), (p = o.current[n]) == null || p.focus();
384
384
  }, []), h = y(
385
- (a, p) => {
386
- if (a.target !== a.currentTarget) return;
387
- if (a.key === "Enter" || a.key === " ") {
388
- a.preventDefault(), t == null || t(p);
385
+ (n, p) => {
386
+ if (n.target !== n.currentTarget) return;
387
+ if (n.key === "Enter" || n.key === " ") {
388
+ n.preventDefault(), t == null || t(p);
389
389
  return;
390
390
  }
391
391
  const f = c.indexOf(p);
392
392
  if (f < 0) return;
393
393
  let m = f;
394
- if (a.key === "ArrowDown")
394
+ if (n.key === "ArrowDown")
395
395
  m = Math.min(f + 1, c.length - 1);
396
- else if (a.key === "ArrowUp")
396
+ else if (n.key === "ArrowUp")
397
397
  m = Math.max(f - 1, 0);
398
- else if (a.key === "Home")
398
+ else if (n.key === "Home")
399
399
  m = 0;
400
- else if (a.key === "End")
400
+ else if (n.key === "End")
401
401
  m = c.length - 1;
402
402
  else
403
403
  return;
404
- a.preventDefault();
404
+ n.preventDefault();
405
405
  const v = c[m];
406
406
  v && u(v);
407
407
  },
@@ -416,8 +416,8 @@ function Fe({
416
416
  "aria-label": "Sessions",
417
417
  children: [
418
418
  /* @__PURE__ */ b("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
419
- /* @__PURE__ */ n("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
420
- s && /* @__PURE__ */ n(I, { type: "button", variant: "ghost", size: "icon-xs", onClick: s, "aria-label": "New session", children: /* @__PURE__ */ n(
419
+ /* @__PURE__ */ a("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
420
+ s && /* @__PURE__ */ a(O, { type: "button", variant: "ghost", size: "icon-xs", onClick: s, "aria-label": "New session", children: /* @__PURE__ */ a(
421
421
  "svg",
422
422
  {
423
423
  width: "16",
@@ -427,34 +427,34 @@ function Fe({
427
427
  stroke: "currentColor",
428
428
  strokeWidth: "1.5",
429
429
  strokeLinecap: "round",
430
- children: /* @__PURE__ */ n("path", { d: "M8 3v10M3 8h10" })
430
+ children: /* @__PURE__ */ a("path", { d: "M8 3v10M3 8h10" })
431
431
  }
432
432
  ) })
433
433
  ] }),
434
434
  /* @__PURE__ */ b("div", { className: "flex-1 overflow-y-auto", role: "list", "aria-label": "Session list", children: [
435
- e.length === 0 && /* @__PURE__ */ n("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
436
- e.map((a) => /* @__PURE__ */ n(
437
- Se,
435
+ e.length === 0 && /* @__PURE__ */ a("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
436
+ e.map((n) => /* @__PURE__ */ a(
437
+ Pe,
438
438
  {
439
- session: a,
440
- isActive: a.id === r,
441
- isFocused: a.id === g,
439
+ session: n,
440
+ isActive: n.id === r,
441
+ isFocused: n.id === g,
442
442
  onSwitch: t,
443
443
  onDelete: l,
444
- onFocus: () => d(a.id),
444
+ onFocus: () => d(n.id),
445
445
  onKeyDown: h,
446
446
  rowRef: (p) => {
447
- o.current[a.id] = p;
447
+ o.current[n.id] = p;
448
448
  }
449
449
  },
450
- a.id
450
+ n.id
451
451
  ))
452
452
  ] })
453
453
  ]
454
454
  }
455
455
  );
456
456
  }
457
- function Se({
457
+ function Pe({
458
458
  session: e,
459
459
  isActive: r,
460
460
  isFocused: t,
@@ -467,8 +467,8 @@ function Se({
467
467
  const [o, c] = N(!1), u = y((h) => {
468
468
  var p, f;
469
469
  h.stopPropagation();
470
- const a = (f = (p = navigator.clipboard) == null ? void 0 : p.writeText) == null ? void 0 : f.bind(navigator.clipboard);
471
- a && a(e.id).then(() => {
470
+ const n = (f = (p = navigator.clipboard) == null ? void 0 : p.writeText) == null ? void 0 : f.bind(navigator.clipboard);
471
+ n && n(e.id).then(() => {
472
472
  c(!0), window.setTimeout(() => c(!1), 1200);
473
473
  });
474
474
  }, [e.id]);
@@ -491,9 +491,9 @@ function Se({
491
491
  tabIndex: t ? 0 : -1,
492
492
  "aria-current": r ? "true" : void 0,
493
493
  children: [
494
- /* @__PURE__ */ n("span", { className: "flex-1 truncate", children: e.title }),
495
- /* @__PURE__ */ n(
496
- I,
494
+ /* @__PURE__ */ a("span", { className: "flex-1 truncate", children: e.title }),
495
+ /* @__PURE__ */ a(
496
+ O,
497
497
  {
498
498
  type: "button",
499
499
  variant: "ghost",
@@ -503,18 +503,18 @@ function Se({
503
503
  tabIndex: t ? 0 : -1,
504
504
  "aria-label": `Copy Pi session id for ${e.title}`,
505
505
  title: "Copy Pi session id",
506
- children: o ? /* @__PURE__ */ n(me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(he, { className: "h-3.5 w-3.5" })
506
+ children: o ? /* @__PURE__ */ a(me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(he, { className: "h-3.5 w-3.5" })
507
507
  }
508
508
  ),
509
- r && /* @__PURE__ */ n(
509
+ r && /* @__PURE__ */ a(
510
510
  "span",
511
511
  {
512
512
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary",
513
513
  "aria-label": "Active"
514
514
  }
515
515
  ),
516
- l && /* @__PURE__ */ n(
517
- I,
516
+ l && /* @__PURE__ */ a(
517
+ O,
518
518
  {
519
519
  type: "button",
520
520
  variant: "ghost",
@@ -525,7 +525,7 @@ function Se({
525
525
  },
526
526
  tabIndex: t ? 0 : -1,
527
527
  "aria-label": `Delete ${e.title}`,
528
- children: /* @__PURE__ */ n(
528
+ children: /* @__PURE__ */ a(
529
529
  "svg",
530
530
  {
531
531
  width: "14",
@@ -535,7 +535,7 @@ function Se({
535
535
  stroke: "currentColor",
536
536
  strokeWidth: "1.5",
537
537
  strokeLinecap: "round",
538
- children: /* @__PURE__ */ n("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
538
+ children: /* @__PURE__ */ a("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
539
539
  }
540
540
  )
541
541
  }
@@ -547,99 +547,108 @@ function Se({
547
547
  export {
548
548
  ze as ArtifactSurfacePane,
549
549
  Ke as CatalogRegistry,
550
- en as ChatLayout,
551
- dn as CodeEditor,
550
+ ca as ChatLayout,
551
+ ya as CodeEditor,
552
552
  je as CodeEditorPane,
553
553
  $e as CommandPalette,
554
554
  _e as CommandRegistry,
555
555
  Y as DockviewShell,
556
556
  Me as EmptyPane,
557
- mn as FileTree,
557
+ Pa as FileTree,
558
558
  He as FileTreePane,
559
559
  Ue as FileTreeView,
560
- Le as IdeLayout,
560
+ Fe as IdeLayout,
561
561
  Ae as MAX_PANELS,
562
- fn as MarkdownEditor,
563
- Je as MarkdownEditorPane,
564
- Ve as PanelChrome,
565
- Be as PanelErrorBoundary,
566
- Xe as PanelRegistry,
567
- qe as PluginError,
562
+ ka as MarkdownEditor,
563
+ qe as MarkdownEditorPane,
564
+ Je as PanelChrome,
565
+ Le as PanelErrorBoundary,
566
+ Ve as PanelRegistry,
567
+ Xe as PluginError,
568
568
  Ge as PluginErrorBoundary,
569
569
  Qe as PluginErrorProvider,
570
570
  Ye as RegistryProvider,
571
571
  ve as ResponsiveDockviewShell,
572
572
  Ze as SessionBrowser,
573
- Fe as SessionList,
573
+ Be as SessionList,
574
574
  et as SurfaceResolverRegistry,
575
575
  tt as SurfaceShell,
576
- nt as ThemeProvider,
577
- sn as Toaster,
578
- tn as TopBar,
576
+ at as ThemeProvider,
577
+ ha as Toaster,
578
+ da as TopBar,
579
579
  rt as UI_COMMAND_EVENT,
580
- at as WORKSPACE_OPEN_PATH_SURFACE_KIND,
580
+ nt as WORKSPACE_OPEN_PATH_SURFACE_KIND,
581
581
  st as WorkbenchLeftPane,
582
- nn as WorkspaceLoadingState,
583
- ot as WorkspaceProvider,
584
- it as agentMeta,
585
- lt as bindStore,
586
- ct as bootstrap,
587
- rn as buildChatLayout,
582
+ ot as WorkspaceFilesProvider,
583
+ ua as WorkspaceLoadingState,
584
+ it as WorkspaceProvider,
585
+ lt as agentMeta,
586
+ ct as bindStore,
587
+ dt as bootstrap,
588
+ pa as buildChatLayout,
589
+ ut as buildFullPagePanelHref,
588
590
  xe as buildIdeLayout,
589
- dt as closePanelSchema,
591
+ pt as closePanelSchema,
590
592
  w as cn,
591
- ut as createBridge,
592
- pt as createBridgeClient,
593
- un as createShadcnTheme,
594
- mt as createWorkspaceStore,
595
- bn as definePanel,
596
- on as dismissToast,
597
- ht as emitAgentData,
598
- ft as emitFilesystemAgentFileChange,
599
- gt as events,
600
- bt as expandToFileSchema,
601
- yt as filesystemEvents,
602
- vt as filesystemPlugin,
603
- xt as formatShortcut,
604
- St as getFileIcon,
593
+ mt as createBridge,
594
+ ht as createBridgeClient,
595
+ va as createShadcnTheme,
596
+ ft as createWorkspaceStore,
597
+ wa as definePanel,
598
+ fa as dismissToast,
599
+ gt as emitAgentData,
600
+ bt as emitFilesystemAgentFileChange,
601
+ yt as events,
602
+ vt as expandToFileSchema,
603
+ xt as filesystemEvents,
604
+ Pt as filesystemPlugin,
605
+ St as formatShortcut,
606
+ kt as getFileIcon,
605
607
  Ct as navigateToLineSchema,
606
- Pt as notificationSchema,
607
- kt as onFilesystemChanged,
608
- wt as openFileSchema,
609
- Nt as openPanelSchema,
610
- Et as postUiCommand,
611
- ln as toast,
612
- Rt as useActiveFile,
613
- Tt as useActivePanel,
608
+ wt as notificationSchema,
609
+ Nt as onFilesystemChanged,
610
+ Et as openFileSchema,
611
+ Rt as openPanelSchema,
612
+ Tt as postUiCommand,
613
+ ga as toast,
614
+ It as useActiveFile,
615
+ Ot as useActivePanel,
614
616
  Te as useActivePanels,
615
- Oe as useArtifactPanels,
616
- Ie as useArtifactRouting,
617
- Ot as useAutoOpenAgentFiles,
618
- It as useCatalogRegistry,
619
- Lt as useCatalogs,
620
- Mt as useCommandRegistry,
621
- Bt as useCommands,
622
- Ft as useDirtyFiles,
623
- Wt as useDockviewApi,
624
- Dt as useEditorLifecycle,
625
- zt as useEvent,
626
- Kt as useHydrationComplete,
627
- jt as useKeyboardShortcuts,
628
- $t as useOpenPanels,
629
- _t as usePluginErrors,
617
+ Ft as useApiBaseUrl,
618
+ Ie as useArtifactPanels,
619
+ Oe as useArtifactRouting,
620
+ Mt as useAutoOpenAgentFiles,
621
+ Lt as useCatalogRegistry,
622
+ Bt as useCatalogs,
623
+ Wt as useCommandRegistry,
624
+ Dt as useCommands,
625
+ zt as useDirtyFiles,
626
+ Kt as useDockviewApi,
627
+ jt as useEditorLifecycle,
628
+ $t as useEvent,
629
+ _t as useFilePane,
630
+ Ht as useFullPagePanelHref,
631
+ Ut as useHasWorkspaceFilesProvider,
632
+ At as useHydrationComplete,
633
+ qt as useIsFullPagePanel,
634
+ Jt as useKeyboardShortcuts,
635
+ Vt as useOpenPanels,
636
+ Xt as usePanelRenderMode,
637
+ Gt as usePluginErrors,
630
638
  z as useRegistry,
631
- Ht as useResetLayout,
639
+ Qt as useResetLayout,
632
640
  fe as useResponsiveSidebarCollapse,
633
641
  Q as useSetSidebar,
634
642
  G as useSidebarState,
635
- Ut as useSurfaceResolverRegistry,
636
- At as useTheme,
637
- Jt as useThemePreference,
643
+ Yt as useSurfaceResolverRegistry,
644
+ Zt as useTheme,
645
+ ea as useThemePreference,
638
646
  W as useViewportBreakpoint,
639
- Vt as useWorkspaceAttention,
640
- Xt as useWorkspaceBridge,
641
- qt as useWorkspaceChatPanel,
642
- Gt as useWorkspaceContext,
643
- Qt as useWorkspaceContextOptional,
644
- Yt as userMeta
647
+ ta as useWorkspaceAttention,
648
+ aa as useWorkspaceBridge,
649
+ ra as useWorkspaceChatPanel,
650
+ na as useWorkspaceContext,
651
+ sa as useWorkspaceContextOptional,
652
+ oa as useWorkspaceRequestId,
653
+ ia as userMeta
645
654
  };