@hachej/boring-workspace 0.1.50 → 0.1.51

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,19 +1,18 @@
1
1
  var V = Object.defineProperty;
2
- var X = (e, t, r) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => X(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { u as K, p as Q, a as Y, b as Z, D as ee } from "./WorkspaceProvider-CbvaXxgT.js";
5
- import { A as Je, C as Ge, c as Ve, d as Xe, e as Qe, F as Ye, f as Ze, M as et, g as tt, P as rt, h as at, i as nt, j as st, k as ot, R as it, S as lt, l as ct, m as dt, T as ut, U as pt, W as ft, n as mt, o as ht, q as gt, r as bt, s as yt, t as vt, v as xt, w as kt, x as wt, y as Pt, z as St, B as Ct, E as Nt, G as Et, H as Rt, I as Tt, J as It, K as Ot, L as Ft, N as Lt, O as Mt, Q as Bt, V as Wt, X as Dt, Y as Kt, Z as $t, _ as jt, $ as zt, a0 as Ht, a1 as Ut, a2 as _t, a3 as qt, a4 as At, a5 as Jt, a6 as Gt, a7 as Vt, a8 as Xt, a9 as Qt, aa as Yt, ab as Zt, ac as er, ad as tr, ae as rr, af as ar, ag as nr, ah as sr, ai as or, aj as ir, ak as lr, al as cr, am as dr, an as ur, ao as pr, ap as fr, aq as mr, ar as hr, as as gr } from "./WorkspaceProvider-CbvaXxgT.js";
2
+ var X = (e, t, a) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
+ var T = (e, t, a) => X(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { u as K, p as Q, a as Y, b as Z, D as ee } from "./WorkspaceProvider-BvLlkZR_.js";
5
+ import { A as Je, C as Ge, c as Ve, d as Xe, e as Qe, f as Ye, F as Ze, g as et, M as tt, h as at, P as rt, i as nt, j as st, k as ot, l as it, R as lt, S as ct, m as dt, n as ut, T as pt, U as ft, W as mt, o as ht, q as gt, r as bt, s as yt, t as vt, v as xt, w as kt, x as wt, y as Pt, z as St, B as Ct, E as Nt, G as Et, H as Rt, I as Tt, J as It, K as Ot, L as Ft, N as Lt, O as Mt, Q as Bt, V as Wt, X as Dt, Y as Kt, Z as $t, _ as jt, $ as zt, a0 as Ht, a1 as Ut, a2 as _t, a3 as qt, a4 as At, a5 as Jt, a6 as Gt, a7 as Vt, a8 as Xt, a9 as Qt, aa as Yt, ab as Zt, ac as ea, ad as ta, ae as aa, af as ra, ag as na, ah as sa, ai as oa, aj as ia, ak as la, al as ca, am as da, an as ua, ao as pa, ap as fa, aq as ma, ar as ha, as as ga, at as ba, au as ya } from "./WorkspaceProvider-BvLlkZR_.js";
6
6
  import { c as C } from "./utils-B6yFEsav.js";
7
- import { C as yr, T as vr, W as xr, b as kr } from "./WorkspaceLoadingState-Bi_qd29T.js";
8
- import { jsx as a, jsxs as g, Fragment as te } from "react/jsx-runtime";
9
- import { Button as P, Sheet as re, SheetContent as ae, SheetHeader as ne, SheetTitle as se, SheetDescription as oe, EmptyState as ie, Kbd as I, ErrorState as le, IconButton as O } from "@hachej/boring-ui-kit";
10
- import { Toaster as Pr, dismissToast as Sr, toast as Cr } from "@hachej/boring-ui-kit";
7
+ import { C as xa, T as ka, W as wa, b as Pa } from "./WorkspaceLoadingState-BfrLCML3.js";
8
+ import { jsx as r, jsxs as g, Fragment as te } from "react/jsx-runtime";
9
+ import { Button as P, Sheet as ae, SheetContent as re, SheetHeader as ne, SheetTitle as se, SheetDescription as oe, EmptyState as ie, Kbd as I, ErrorState as le, IconButton as O } from "@hachej/boring-ui-kit";
10
+ import { Toaster as Ca, dismissToast as Na, toast as Ea } from "@hachej/boring-ui-kit";
11
11
  import { useSyncExternalStore as $, useState as N, useEffect as k, useRef as S, useCallback as b, useMemo as w, Suspense as ce, Component as de } from "react";
12
- import { C as Er, c as Rr } from "./CodeEditor-DQqOn4xz.js";
13
- import { FileTree as Ir } from "./FileTree-GeEPOsUU.js";
14
- import { MarkdownEditor as Fr } from "./MarkdownEditor-PL9esiiq.js";
12
+ import { FileTree as Ta } from "./FileTree-BeCvmmxS.js";
13
+ import { MarkdownEditor as Oa } from "./MarkdownEditor-DjdBgjHU.js";
15
14
  import { MenuIcon as ue, PanelLeftOpenIcon as pe, PanelLeftCloseIcon as fe, PinIcon as me, CheckIcon as he, CopyIcon as ge } from "lucide-react";
16
- import { d as Mr } from "./panel-DnvDNQac.js";
15
+ import { d as La } from "./panel-DnvDNQac.js";
17
16
  function We() {
18
17
  const e = K();
19
18
  return $(e.subscribe, e.getSnapshot);
@@ -44,12 +43,12 @@ function be(e) {
44
43
  function ye(e) {
45
44
  return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
46
45
  }
47
- function De({ to: e, children: t, className: r, title: n, href: i, onClick: o }) {
48
- return /* @__PURE__ */ a(
46
+ function De({ to: e, children: t, className: a, title: n, href: i, onClick: o }) {
47
+ return /* @__PURE__ */ r(
49
48
  "a",
50
49
  {
51
50
  href: i ?? be(e),
52
- className: r,
51
+ className: a,
53
52
  title: n,
54
53
  onClick: (u) => {
55
54
  o == null || o(u), !(u.defaultPrevented || !ye(u)) && (u.preventDefault(), Q(j(e)));
@@ -74,11 +73,11 @@ function xe() {
74
73
  async function Ke(e) {
75
74
  const t = new URLSearchParams({ path: e.path });
76
75
  e.recordSet && t.set("recordSet", e.recordSet), e.offset !== void 0 && t.set("offset", String(e.offset)), e.limit !== void 0 && t.set("limit", String(e.limit)), e.q && t.set("q", e.q);
77
- const r = { ...e.headers ?? {} }, n = e.workspaceId ?? xe();
78
- n && !Object.keys(r).some((o) => o.toLowerCase() === "x-boring-workspace-id") && (r["x-boring-workspace-id"] = n);
76
+ const a = { ...e.headers ?? {} }, n = e.workspaceId ?? xe();
77
+ n && !Object.keys(a).some((o) => o.toLowerCase() === "x-boring-workspace-id") && (a["x-boring-workspace-id"] = n);
79
78
  const i = await fetch(ve(e.apiBaseUrl, `/api/v1/files/records?${t}`), {
80
79
  method: "GET",
81
- headers: r,
80
+ headers: a,
82
81
  signal: e.signal
83
82
  });
84
83
  if (!i.ok)
@@ -89,10 +88,10 @@ function B(e) {
89
88
  return typeof window > "u" ? !1 : window.innerWidth < e;
90
89
  }
91
90
  function W(e = 1024) {
92
- const [t, r] = N(() => B(e));
91
+ const [t, a] = N(() => B(e));
93
92
  return k(() => {
94
93
  const n = () => {
95
- r(B(e));
94
+ a(B(e));
96
95
  };
97
96
  return n(), window.addEventListener("resize", n), () => {
98
97
  window.removeEventListener("resize", n);
@@ -102,7 +101,7 @@ function W(e = 1024) {
102
101
  function ke({
103
102
  isNarrowViewport: e,
104
103
  isCollapsed: t,
105
- setCollapsed: r
104
+ setCollapsed: a
106
105
  }) {
107
106
  const n = S(t), i = S(!1), o = S(null);
108
107
  return k(() => {
@@ -110,19 +109,19 @@ function ke({
110
109
  }, [t]), k(() => {
111
110
  const u = o.current, d = u !== !0 && e, l = u === !0 && !e;
112
111
  if (o.current = e, e && d && !n.current) {
113
- i.current = !0, r(!0);
112
+ i.current = !0, a(!0);
114
113
  return;
115
114
  }
116
- l && i.current && (i.current = !1, r(!1));
117
- }, [e, r]), b(() => {
115
+ l && i.current && (i.current = !1, a(!1));
116
+ }, [e, a]), b(() => {
118
117
  i.current = !1;
119
118
  }, []);
120
119
  }
121
120
  function $e(e) {
122
- const [t, r] = N([]), n = S(t);
121
+ const [t, a] = N([]), n = S(t);
123
122
  n.current = t, k(() => {
124
123
  if (!e) {
125
- r([]);
124
+ a([]);
126
125
  return;
127
126
  }
128
127
  function l() {
@@ -142,7 +141,7 @@ function $e(e) {
142
141
  (s.length !== m.length || s.some((y, f) => {
143
142
  var v;
144
143
  return y.id !== ((v = m[f]) == null ? void 0 : v.id);
145
- })) && r(m);
144
+ })) && a(m);
146
145
  } catch {
147
146
  }
148
147
  }
@@ -176,18 +175,18 @@ function $e(e) {
176
175
  return { panels: t, open: i, close: o, activate: u, isOpen: d };
177
176
  }
178
177
  function je(e, t = {}) {
179
- const r = t.toolPanelMap ?? {}, n = b(
180
- (o) => r[o],
181
- [r]
178
+ const a = t.toolPanelMap ?? {}, n = b(
179
+ (o) => a[o],
180
+ [a]
182
181
  );
183
182
  return { openForTool: b(
184
183
  (o, u) => {
185
- const d = r[o];
184
+ const d = a[o];
186
185
  if (!d) return;
187
186
  const l = `artifact-${u.path}`;
188
187
  e.isOpen(l) ? e.activate(l) : e.open({ id: l, component: d, params: u });
189
188
  },
190
- [r, e]
189
+ [a, e]
191
190
  ), resolvePanel: n };
192
191
  }
193
192
  const we = 768, Pe = 1024;
@@ -202,7 +201,7 @@ function Ce({
202
201
  className: t
203
202
  }) {
204
203
  var L;
205
- const r = K(), n = Y(), i = Z(), o = W(we), u = W(Pe), d = u && !o, l = w(
204
+ const a = K(), n = Y(), i = Z(), o = W(we), u = W(Pe), d = u && !o, l = w(
206
205
  () => e.groups.find((x) => x.id === "sidebar" && x.panel),
207
206
  [e]
208
207
  ), c = l == null ? void 0 : l.panel, p = !!c, m = ke({
@@ -228,10 +227,10 @@ function Ce({
228
227
  }).join(",");
229
228
  return `${v.version}:${x}:${M}`;
230
229
  }, [v, f]), H = $(
231
- r.subscribe,
232
- r.getSnapshot,
233
- r.getSnapshot
234
- ), U = w(() => r.getComponents(), [r, H]), F = c ? U[c] : null, _ = c ? ((L = r.get(c)) == null ? void 0 : L.title) ?? "Sidebar" : "Sidebar", q = b(() => {
230
+ a.subscribe,
231
+ a.getSnapshot,
232
+ a.getSnapshot
233
+ ), U = w(() => a.getComponents(), [a, H]), F = c ? U[c] : null, _ = c ? ((L = a.get(c)) == null ? void 0 : L.title) ?? "Sidebar" : "Sidebar", q = b(() => {
235
234
  h(!0);
236
235
  }, []), A = b(() => {
237
236
  m(), i({ collapsed: !1 }), h(!1);
@@ -244,21 +243,21 @@ function Ce({
244
243
  []
245
244
  );
246
245
  return /* @__PURE__ */ g("div", { className: "relative h-full w-full", children: [
247
- d && p && n.collapsed && /* @__PURE__ */ a(
246
+ d && p && n.collapsed && /* @__PURE__ */ r(
248
247
  "div",
249
248
  {
250
249
  className: "pointer-events-none absolute inset-y-0 left-0 z-20 w-10 border-r border-border bg-background/95",
251
250
  "aria-hidden": "true"
252
251
  }
253
252
  ),
254
- y && /* @__PURE__ */ a(
253
+ y && /* @__PURE__ */ r(
255
254
  "div",
256
255
  {
257
256
  className: C(
258
257
  "absolute z-30",
259
258
  o ? "left-2 top-2" : "left-1 top-2"
260
259
  ),
261
- children: /* @__PURE__ */ a(
260
+ children: /* @__PURE__ */ r(
262
261
  P,
263
262
  {
264
263
  type: "button",
@@ -266,12 +265,12 @@ function Ce({
266
265
  size: "icon-sm",
267
266
  onClick: q,
268
267
  "aria-label": o ? "Open sidebar menu" : "Open collapsed sidebar",
269
- children: o ? /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ a(pe, { className: "h-4 w-4" })
268
+ children: o ? /* @__PURE__ */ r(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ r(pe, { className: "h-4 w-4" })
270
269
  }
271
270
  )
272
271
  }
273
272
  ),
274
- d && p && !n.collapsed && /* @__PURE__ */ a("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ a(
273
+ d && p && !n.collapsed && /* @__PURE__ */ r("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ r(
275
274
  P,
276
275
  {
277
276
  type: "button",
@@ -279,10 +278,10 @@ function Ce({
279
278
  size: "icon-sm",
280
279
  onClick: J,
281
280
  "aria-label": "Collapse sidebar",
282
- children: /* @__PURE__ */ a(fe, { className: "h-4 w-4" })
281
+ children: /* @__PURE__ */ r(fe, { className: "h-4 w-4" })
283
282
  }
284
283
  ) }),
285
- /* @__PURE__ */ a(
284
+ /* @__PURE__ */ r(
286
285
  ee,
287
286
  {
288
287
  layout: v,
@@ -293,16 +292,16 @@ function Ce({
293
292
  },
294
293
  z
295
294
  ),
296
- y && /* @__PURE__ */ a(re, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
297
- ae,
295
+ y && /* @__PURE__ */ r(ae, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
296
+ re,
298
297
  {
299
298
  side: "left",
300
299
  className: "w-[85vw] max-w-sm p-0",
301
300
  children: [
302
301
  /* @__PURE__ */ g(ne, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
303
302
  /* @__PURE__ */ g("div", { children: [
304
- /* @__PURE__ */ a(se, { children: _ }),
305
- /* @__PURE__ */ a(oe, { className: "sr-only", children: "Responsive sidebar panel" })
303
+ /* @__PURE__ */ r(se, { children: _ }),
304
+ /* @__PURE__ */ r(oe, { className: "sr-only", children: "Responsive sidebar panel" })
306
305
  ] }),
307
306
  d && /* @__PURE__ */ g(
308
307
  P,
@@ -313,18 +312,18 @@ function Ce({
313
312
  onClick: A,
314
313
  "aria-label": "Pin sidebar open",
315
314
  children: [
316
- /* @__PURE__ */ a(me, { className: "h-4 w-4" }),
315
+ /* @__PURE__ */ r(me, { className: "h-4 w-4" }),
317
316
  "Pin"
318
317
  ]
319
318
  }
320
319
  )
321
320
  ] }),
322
- /* @__PURE__ */ a(
321
+ /* @__PURE__ */ r(
323
322
  "div",
324
323
  {
325
324
  className: "h-full min-h-0 overflow-auto",
326
325
  onClickCapture: G,
327
- children: F ? /* @__PURE__ */ a(ce, { fallback: /* @__PURE__ */ a(D, {}), children: /* @__PURE__ */ a(F, {}) }) : /* @__PURE__ */ a(D, {})
326
+ children: F ? /* @__PURE__ */ r(ce, { fallback: /* @__PURE__ */ r(D, {}), children: /* @__PURE__ */ r(F, {}) }) : /* @__PURE__ */ r(D, {})
328
327
  }
329
328
  )
330
329
  ]
@@ -333,10 +332,10 @@ function Ce({
333
332
  ] });
334
333
  }
335
334
  function D() {
336
- return /* @__PURE__ */ a("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
335
+ return /* @__PURE__ */ r("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
337
336
  }
338
337
  function Ne(e = {}) {
339
- const { sidebar: t = "filetree", center: r = "empty", right: n } = e, i = [
338
+ const { sidebar: t = "filetree", center: a = "empty", right: n } = e, i = [
340
339
  {
341
340
  id: "sidebar",
342
341
  position: "left",
@@ -349,7 +348,7 @@ function Ne(e = {}) {
349
348
  {
350
349
  id: "center",
351
350
  position: "center",
352
- panel: r,
351
+ panel: a,
353
352
  dynamic: !0,
354
353
  placeholder: "empty",
355
354
  constraints: { minWidth: 300 }
@@ -364,28 +363,28 @@ function Ne(e = {}) {
364
363
  }), { version: "2.0", groups: i };
365
364
  }
366
365
  function ze(e) {
367
- return /* @__PURE__ */ a(Ce, { layout: Ne(e), className: e.className });
366
+ return /* @__PURE__ */ r(Ce, { layout: Ne(e), className: e.className });
368
367
  }
369
368
  function He({ className: e, onOpenFile: t }) {
370
- return /* @__PURE__ */ a(
369
+ return /* @__PURE__ */ r(
371
370
  ie,
372
371
  {
373
372
  className: C("h-full border-0 text-muted-foreground", e),
374
373
  title: "No file open",
375
374
  description: "Open a file to get started",
376
- actions: t ? /* @__PURE__ */ a(P, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
375
+ actions: t ? /* @__PURE__ */ r(P, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
377
376
  children: /* @__PURE__ */ g("div", { className: "space-y-2 text-sm", children: [
378
377
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
379
- /* @__PURE__ */ a(I, { children: "⌘P" }),
380
- /* @__PURE__ */ a("span", { children: "Open file" })
378
+ /* @__PURE__ */ r(I, { children: "⌘P" }),
379
+ /* @__PURE__ */ r("span", { children: "Open file" })
381
380
  ] }),
382
381
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
383
- /* @__PURE__ */ a(I, { children: "⌘⇧P" }),
384
- /* @__PURE__ */ a("span", { children: "Command palette" })
382
+ /* @__PURE__ */ r(I, { children: "⌘⇧P" }),
383
+ /* @__PURE__ */ r("span", { children: "Command palette" })
385
384
  ] }),
386
385
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
387
- /* @__PURE__ */ a(I, { children: "⌘B" }),
388
- /* @__PURE__ */ a("span", { children: "Toggle sidebar" })
386
+ /* @__PURE__ */ r(I, { children: "⌘B" }),
387
+ /* @__PURE__ */ r("span", { children: "Toggle sidebar" })
389
388
  ] })
390
389
  ] })
391
390
  }
@@ -399,32 +398,32 @@ class Ue extends de {
399
398
  this.setState({ hasError: !1, error: null });
400
399
  });
401
400
  }
402
- static getDerivedStateFromError(r) {
403
- return { hasError: !0, error: r };
401
+ static getDerivedStateFromError(a) {
402
+ return { hasError: !0, error: a };
404
403
  }
405
- componentDidCatch(r, n) {
404
+ componentDidCatch(a, n) {
406
405
  const { panelId: i, onError: o } = this.props;
407
- console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`, r, n.componentStack), o == null || o({
406
+ console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`, a, n.componentStack), o == null || o({
408
407
  panelId: i,
409
- error: r.message,
408
+ error: a.message,
410
409
  stack: n.componentStack ?? void 0
411
410
  });
412
411
  }
413
412
  render() {
414
- var r;
415
- return this.state.hasError ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ a(
413
+ var a;
414
+ return this.state.hasError ? /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ r(
416
415
  le,
417
416
  {
418
417
  className: "w-full max-w-md",
419
418
  title: "Something went wrong",
420
419
  description: /* @__PURE__ */ g(te, { children: [
421
420
  "Panel ",
422
- /* @__PURE__ */ a("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
421
+ /* @__PURE__ */ r("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
423
422
  " ",
424
423
  "encountered an error."
425
424
  ] }),
426
- details: (r = this.state.error) == null ? void 0 : r.message,
427
- actions: /* @__PURE__ */ a(P, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
425
+ details: (a = this.state.error) == null ? void 0 : a.message,
426
+ actions: /* @__PURE__ */ r(P, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
428
427
  }
429
428
  ) }) : this.props.children;
430
429
  }
@@ -432,7 +431,7 @@ class Ue extends de {
432
431
  function _e({
433
432
  sessions: e,
434
433
  activeId: t,
435
- onSwitch: r,
434
+ onSwitch: a,
436
435
  onCreate: n,
437
436
  onDelete: i,
438
437
  className: o
@@ -452,7 +451,7 @@ function _e({
452
451
  (s, h) => {
453
452
  if (s.target !== s.currentTarget) return;
454
453
  if (s.key === "Enter" || s.key === " ") {
455
- s.preventDefault(), r == null || r(h);
454
+ s.preventDefault(), a == null || a(h);
456
455
  return;
457
456
  }
458
457
  const y = c.indexOf(h);
@@ -472,7 +471,7 @@ function _e({
472
471
  const v = c[f];
473
472
  v && p(v);
474
473
  },
475
- [p, r, c]
474
+ [p, a, c]
476
475
  );
477
476
  return /* @__PURE__ */ g(
478
477
  "div",
@@ -483,8 +482,8 @@ function _e({
483
482
  "aria-label": "Sessions",
484
483
  children: [
485
484
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
486
- /* @__PURE__ */ a("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
487
- n && /* @__PURE__ */ a(O, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ a(
485
+ /* @__PURE__ */ r("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
486
+ n && /* @__PURE__ */ r(O, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ r(
488
487
  "svg",
489
488
  {
490
489
  width: "16",
@@ -494,19 +493,19 @@ function _e({
494
493
  stroke: "currentColor",
495
494
  strokeWidth: "1.5",
496
495
  strokeLinecap: "round",
497
- children: /* @__PURE__ */ a("path", { d: "M8 3v10M3 8h10" })
496
+ children: /* @__PURE__ */ r("path", { d: "M8 3v10M3 8h10" })
498
497
  }
499
498
  ) })
500
499
  ] }),
501
500
  /* @__PURE__ */ g("div", { className: "flex-1 overflow-y-auto", role: "list", "aria-label": "Session list", children: [
502
- e.length === 0 && /* @__PURE__ */ a("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
503
- e.map((s) => /* @__PURE__ */ a(
501
+ e.length === 0 && /* @__PURE__ */ r("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
502
+ e.map((s) => /* @__PURE__ */ r(
504
503
  Re,
505
504
  {
506
505
  session: s,
507
506
  isActive: s.id === t,
508
507
  isFocused: s.id === u,
509
- onSwitch: r,
508
+ onSwitch: a,
510
509
  onDelete: i,
511
510
  onFocus: () => d(s.id),
512
511
  onKeyDown: m,
@@ -522,8 +521,8 @@ function _e({
522
521
  );
523
522
  }
524
523
  async function Ee(e) {
525
- var r, n;
526
- if (typeof navigator < "u" && ((r = navigator.clipboard) != null && r.writeText))
524
+ var a, n;
525
+ if (typeof navigator < "u" && ((a = navigator.clipboard) != null && a.writeText))
527
526
  try {
528
527
  return await navigator.clipboard.writeText(e), !0;
529
528
  } catch {
@@ -542,7 +541,7 @@ async function Ee(e) {
542
541
  function Re({
543
542
  session: e,
544
543
  isActive: t,
545
- isFocused: r,
544
+ isFocused: a,
546
545
  onSwitch: n,
547
546
  onDelete: i,
548
547
  onFocus: o,
@@ -561,7 +560,7 @@ function Re({
561
560
  role: "listitem",
562
561
  "data-boring-workspace-part": "session-row",
563
562
  "data-boring-state": t ? "selected" : void 0,
564
- "data-focused": r ? "true" : "false",
563
+ "data-focused": a ? "true" : "false",
565
564
  className: C(
566
565
  "group flex items-center gap-2 border-b border-border px-3 py-2 text-sm cursor-pointer transition-colors",
567
566
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
@@ -570,11 +569,11 @@ function Re({
570
569
  onClick: () => n == null ? void 0 : n(e.id),
571
570
  onFocus: o,
572
571
  onKeyDown: (m) => u(m, e.id),
573
- tabIndex: r ? 0 : -1,
572
+ tabIndex: a ? 0 : -1,
574
573
  "aria-current": t ? "true" : void 0,
575
574
  children: [
576
- /* @__PURE__ */ a("span", { className: "flex-1 truncate", children: e.title }),
577
- /* @__PURE__ */ a(
575
+ /* @__PURE__ */ r("span", { className: "flex-1 truncate", children: e.title }),
576
+ /* @__PURE__ */ r(
578
577
  O,
579
578
  {
580
579
  type: "button",
@@ -582,20 +581,20 @@ function Re({
582
581
  size: "icon-xs",
583
582
  className: "hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:inline-flex group-data-[focused=true]:inline-flex",
584
583
  onClick: p,
585
- tabIndex: r ? 0 : -1,
584
+ tabIndex: a ? 0 : -1,
586
585
  "aria-label": `Copy Pi session id for ${e.title}`,
587
586
  title: "Copy Pi session id",
588
- children: l ? /* @__PURE__ */ a(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(ge, { className: "h-3.5 w-3.5" })
587
+ children: l ? /* @__PURE__ */ r(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ge, { className: "h-3.5 w-3.5" })
589
588
  }
590
589
  ),
591
- t && /* @__PURE__ */ a(
590
+ t && /* @__PURE__ */ r(
592
591
  "span",
593
592
  {
594
593
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary",
595
594
  "aria-label": "Active"
596
595
  }
597
596
  ),
598
- i && /* @__PURE__ */ a(
597
+ i && /* @__PURE__ */ r(
599
598
  O,
600
599
  {
601
600
  type: "button",
@@ -605,9 +604,9 @@ function Re({
605
604
  onClick: (m) => {
606
605
  m.stopPropagation(), i(e.id);
607
606
  },
608
- tabIndex: r ? 0 : -1,
607
+ tabIndex: a ? 0 : -1,
609
608
  "aria-label": `Delete ${e.title}`,
610
- children: /* @__PURE__ */ a(
609
+ children: /* @__PURE__ */ r(
611
610
  "svg",
612
611
  {
613
612
  width: "14",
@@ -617,7 +616,7 @@ function Re({
617
616
  stroke: "currentColor",
618
617
  strokeWidth: "1.5",
619
618
  strokeLinecap: "round",
620
- children: /* @__PURE__ */ a("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
619
+ children: /* @__PURE__ */ r("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
621
620
  }
622
621
  )
623
622
  }
@@ -629,113 +628,113 @@ function Re({
629
628
  export {
630
629
  Je as ArtifactSurfacePane,
631
630
  Ge as CatalogRegistry,
632
- yr as ChatLayout,
633
- Er as CodeEditor,
634
- Ve as CodeEditorPane,
635
- Xe as CommandPalette,
636
- Qe as CommandRegistry,
631
+ xa as ChatLayout,
632
+ Ve as CodeEditor,
633
+ Xe as CodeEditorPane,
634
+ Qe as CommandPalette,
635
+ Ye as CommandRegistry,
637
636
  ee as DockviewShell,
638
637
  He as EmptyPane,
639
- Ir as FileTree,
640
- Ye as FileTreePane,
641
- Ze as FileTreeView,
638
+ Ta as FileTree,
639
+ Ze as FileTreePane,
640
+ et as FileTreeView,
642
641
  ze as IdeLayout,
643
- et as MAX_PANELS,
644
- Fr as MarkdownEditor,
645
- tt as MarkdownEditorPane,
642
+ tt as MAX_PANELS,
643
+ Oa as MarkdownEditor,
644
+ at as MarkdownEditorPane,
646
645
  rt as PanelChrome,
647
646
  Ue as PanelErrorBoundary,
648
- at as PanelRegistry,
649
- nt as PluginError,
650
- st as PluginErrorBoundary,
651
- ot as PluginErrorProvider,
652
- it as RegistryProvider,
647
+ nt as PanelRegistry,
648
+ st as PluginError,
649
+ ot as PluginErrorBoundary,
650
+ it as PluginErrorProvider,
651
+ lt as RegistryProvider,
653
652
  Ce as ResponsiveDockviewShell,
654
- lt as SessionBrowser,
653
+ ct as SessionBrowser,
655
654
  _e as SessionList,
656
- ct as SurfaceResolverRegistry,
657
- dt as SurfaceShell,
658
- ut as ThemeProvider,
659
- Pr as Toaster,
660
- vr as TopBar,
661
- pt as UI_COMMAND_EVENT,
662
- ft as WORKSPACE_OPEN_PATH_SURFACE_KIND,
663
- mt as WorkbenchLeftPane,
664
- ht as WorkspaceFilesProvider,
655
+ dt as SurfaceResolverRegistry,
656
+ ut as SurfaceShell,
657
+ pt as ThemeProvider,
658
+ Ca as Toaster,
659
+ ka as TopBar,
660
+ ft as UI_COMMAND_EVENT,
661
+ mt as WORKSPACE_OPEN_PATH_SURFACE_KIND,
662
+ ht as WorkbenchLeftPane,
663
+ gt as WorkspaceFilesProvider,
665
664
  De as WorkspaceLink,
666
- xr as WorkspaceLoadingState,
667
- gt as WorkspaceProvider,
668
- bt as agentMeta,
669
- yt as bindStore,
670
- vt as bootstrap,
671
- kr as buildChatLayout,
672
- xt as buildFullPagePanelHref,
665
+ wa as WorkspaceLoadingState,
666
+ bt as WorkspaceProvider,
667
+ yt as agentMeta,
668
+ vt as bindStore,
669
+ xt as bootstrap,
670
+ Pa as buildChatLayout,
671
+ kt as buildFullPagePanelHref,
673
672
  Ne as buildIdeLayout,
674
- kt as closePanelSchema,
673
+ wt as closePanelSchema,
675
674
  C as cn,
676
- wt as createBridge,
677
- Pt as createBridgeClient,
678
- Rr as createShadcnTheme,
679
- St as createWorkspaceStore,
680
- Mr as definePanel,
681
- Sr as dismissToast,
682
- Ct as emitAgentData,
683
- Nt as emitFilesystemAgentFileChange,
684
- Et as events,
685
- Rt as expandToFileSchema,
686
- Tt as filesystemEvents,
687
- It as filesystemPlugin,
688
- Ot as formatShortcut,
689
- Ft as getFileIcon,
690
- Lt as navigateToLineSchema,
691
- Mt as notificationSchema,
692
- Bt as onFilesystemChanged,
693
- Wt as openFileSchema,
694
- Dt as openPanelSchema,
675
+ Pt as createBridge,
676
+ St as createBridgeClient,
677
+ Ct as createShadcnTheme,
678
+ Nt as createWorkspaceStore,
679
+ La as definePanel,
680
+ Na as dismissToast,
681
+ Et as emitAgentData,
682
+ Rt as emitFilesystemAgentFileChange,
683
+ Tt as events,
684
+ It as expandToFileSchema,
685
+ Ot as filesystemEvents,
686
+ Ft as filesystemPlugin,
687
+ Lt as formatShortcut,
688
+ Mt as getFileIcon,
689
+ Bt as navigateToLineSchema,
690
+ Wt as notificationSchema,
691
+ Dt as onFilesystemChanged,
692
+ Kt as openFileSchema,
693
+ $t as openPanelSchema,
695
694
  Q as postUiCommand,
696
695
  Ke as readFileRecords,
697
- Cr as toast,
698
- Kt as useActiveFile,
699
- $t as useActivePanel,
696
+ Ea as toast,
697
+ jt as useActiveFile,
698
+ zt as useActivePanel,
700
699
  We as useActivePanels,
701
- jt as useApiBaseUrl,
700
+ Ht as useApiBaseUrl,
702
701
  $e as useArtifactPanels,
703
702
  je as useArtifactRouting,
704
- zt as useAutoOpenAgentFiles,
705
- Ht as useCatalogRegistry,
706
- Ut as useCatalogs,
707
- _t as useCommandRegistry,
708
- qt as useCommands,
709
- At as useDirtyFiles,
710
- Jt as useDockviewApi,
711
- Gt as useEditorLifecycle,
712
- Vt as useEvent,
713
- Xt as useFilePane,
714
- Qt as useFullPagePanelHref,
715
- Yt as useHasWorkspaceFilesProvider,
716
- Zt as useHydrationComplete,
717
- er as useIsFullPagePanel,
718
- tr as useKeyboardShortcuts,
719
- rr as useOpenPanels,
720
- ar as usePanelRenderMode,
721
- nr as usePluginErrors,
703
+ Ut as useAutoOpenAgentFiles,
704
+ _t as useCatalogRegistry,
705
+ qt as useCatalogs,
706
+ At as useCommandRegistry,
707
+ Jt as useCommands,
708
+ Gt as useDirtyFiles,
709
+ Vt as useDockviewApi,
710
+ Xt as useEditorLifecycle,
711
+ Qt as useEvent,
712
+ Yt as useFilePane,
713
+ Zt as useFullPagePanelHref,
714
+ ea as useHasWorkspaceFilesProvider,
715
+ ta as useHydrationComplete,
716
+ aa as useIsFullPagePanel,
717
+ ra as useKeyboardShortcuts,
718
+ na as useOpenPanels,
719
+ sa as usePanelRenderMode,
720
+ oa as usePluginErrors,
722
721
  K as useRegistry,
723
- sr as useResetLayout,
722
+ ia as useResetLayout,
724
723
  ke as useResponsiveSidebarCollapse,
725
724
  Z as useSetSidebar,
726
725
  Y as useSidebarState,
727
- or as useSurfaceResolverRegistry,
728
- ir as useTheme,
729
- lr as useThemePreference,
726
+ la as useSurfaceResolverRegistry,
727
+ ca as useTheme,
728
+ da as useThemePreference,
730
729
  W as useViewportBreakpoint,
731
- cr as useWorkspaceAttention,
732
- dr as useWorkspaceBridge,
733
- ur as useWorkspaceChatPanel,
734
- pr as useWorkspaceContext,
735
- fr as useWorkspaceContextOptional,
736
- mr as useWorkspaceRequestId,
737
- hr as userMeta,
738
- gr as workspaceEvents,
730
+ ua as useWorkspaceAttention,
731
+ pa as useWorkspaceBridge,
732
+ fa as useWorkspaceChatPanel,
733
+ ma as useWorkspaceContext,
734
+ ha as useWorkspaceContextOptional,
735
+ ga as useWorkspaceRequestId,
736
+ ba as userMeta,
737
+ ya as workspaceEvents,
739
738
  j as workspaceLinkCommand,
740
739
  be as workspaceLinkHref
741
740
  };