@hachej/boring-workspace 0.1.36 → 0.1.37

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,19 @@
1
1
  var V = Object.defineProperty;
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-CpK401MG.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 at, h as rt, 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 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 } from "./WorkspaceProvider-CpK401MG.js";
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-CX_4aV6Z.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-CX_4aV6Z.js";
6
6
  import { c as C } from "./utils-B6yFEsav.js";
7
- import { C as ya, T as va, W as xa, b as ka } from "./WorkspaceLoadingState-C664sU-y.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 Pa, dismissToast as Sa, toast as Ca } from "@hachej/boring-ui-kit";
7
+ import { C as yr, T as vr, W as xr, b as kr } from "./WorkspaceLoadingState-C-whZTne.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";
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 Ea, c as Ra } from "./CodeEditor-DQqOn4xz.js";
13
- import { FileTree as Ia } from "./FileTree-GkaIEJ9n.js";
14
- import { MarkdownEditor as Fa } from "./MarkdownEditor-DjZZnHcU.js";
12
+ import { C as Er, c as Rr } from "./CodeEditor-DQqOn4xz.js";
13
+ import { FileTree as Ir } from "./FileTree-D6oUyX8I.js";
14
+ import { MarkdownEditor as Fr } from "./MarkdownEditor-DPFwqtbH.js";
15
15
  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 Ma } from "./panel-DnvDNQac.js";
16
+ import { d as Mr } from "./panel-DnvDNQac.js";
17
17
  function We() {
18
18
  const e = K();
19
19
  return $(e.subscribe, e.getSnapshot);
@@ -44,12 +44,12 @@ function be(e) {
44
44
  function ye(e) {
45
45
  return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
46
46
  }
47
- function De({ to: e, children: t, className: a, title: n, href: i, onClick: o }) {
48
- return /* @__PURE__ */ r(
47
+ function De({ to: e, children: t, className: r, title: n, href: i, onClick: o }) {
48
+ return /* @__PURE__ */ a(
49
49
  "a",
50
50
  {
51
51
  href: i ?? be(e),
52
- className: a,
52
+ className: r,
53
53
  title: n,
54
54
  onClick: (u) => {
55
55
  o == null || o(u), !(u.defaultPrevented || !ye(u)) && (u.preventDefault(), Q(j(e)));
@@ -74,11 +74,11 @@ function xe() {
74
74
  async function Ke(e) {
75
75
  const t = new URLSearchParams({ path: e.path });
76
76
  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 a = { ...e.headers ?? {} }, n = e.workspaceId ?? xe();
78
- n && !Object.keys(a).some((o) => o.toLowerCase() === "x-boring-workspace-id") && (a["x-boring-workspace-id"] = n);
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);
79
79
  const i = await fetch(ve(e.apiBaseUrl, `/api/v1/files/records?${t}`), {
80
80
  method: "GET",
81
- headers: a,
81
+ headers: r,
82
82
  signal: e.signal
83
83
  });
84
84
  if (!i.ok)
@@ -89,10 +89,10 @@ function B(e) {
89
89
  return typeof window > "u" ? !1 : window.innerWidth < e;
90
90
  }
91
91
  function W(e = 1024) {
92
- const [t, a] = N(() => B(e));
92
+ const [t, r] = N(() => B(e));
93
93
  return k(() => {
94
94
  const n = () => {
95
- a(B(e));
95
+ r(B(e));
96
96
  };
97
97
  return n(), window.addEventListener("resize", n), () => {
98
98
  window.removeEventListener("resize", n);
@@ -102,7 +102,7 @@ function W(e = 1024) {
102
102
  function ke({
103
103
  isNarrowViewport: e,
104
104
  isCollapsed: t,
105
- setCollapsed: a
105
+ setCollapsed: r
106
106
  }) {
107
107
  const n = S(t), i = S(!1), o = S(null);
108
108
  return k(() => {
@@ -110,19 +110,19 @@ function ke({
110
110
  }, [t]), k(() => {
111
111
  const u = o.current, d = u !== !0 && e, l = u === !0 && !e;
112
112
  if (o.current = e, e && d && !n.current) {
113
- i.current = !0, a(!0);
113
+ i.current = !0, r(!0);
114
114
  return;
115
115
  }
116
- l && i.current && (i.current = !1, a(!1));
117
- }, [e, a]), b(() => {
116
+ l && i.current && (i.current = !1, r(!1));
117
+ }, [e, r]), b(() => {
118
118
  i.current = !1;
119
119
  }, []);
120
120
  }
121
121
  function $e(e) {
122
- const [t, a] = N([]), n = S(t);
122
+ const [t, r] = N([]), n = S(t);
123
123
  n.current = t, k(() => {
124
124
  if (!e) {
125
- a([]);
125
+ r([]);
126
126
  return;
127
127
  }
128
128
  function l() {
@@ -142,7 +142,7 @@ function $e(e) {
142
142
  (s.length !== m.length || s.some((y, f) => {
143
143
  var v;
144
144
  return y.id !== ((v = m[f]) == null ? void 0 : v.id);
145
- })) && a(m);
145
+ })) && r(m);
146
146
  } catch {
147
147
  }
148
148
  }
@@ -176,18 +176,18 @@ function $e(e) {
176
176
  return { panels: t, open: i, close: o, activate: u, isOpen: d };
177
177
  }
178
178
  function je(e, t = {}) {
179
- const a = t.toolPanelMap ?? {}, n = b(
180
- (o) => a[o],
181
- [a]
179
+ const r = t.toolPanelMap ?? {}, n = b(
180
+ (o) => r[o],
181
+ [r]
182
182
  );
183
183
  return { openForTool: b(
184
184
  (o, u) => {
185
- const d = a[o];
185
+ const d = r[o];
186
186
  if (!d) return;
187
187
  const l = `artifact-${u.path}`;
188
188
  e.isOpen(l) ? e.activate(l) : e.open({ id: l, component: d, params: u });
189
189
  },
190
- [a, e]
190
+ [r, e]
191
191
  ), resolvePanel: n };
192
192
  }
193
193
  const we = 768, Pe = 1024;
@@ -202,7 +202,7 @@ function Ce({
202
202
  className: t
203
203
  }) {
204
204
  var L;
205
- const a = K(), n = Y(), i = Z(), o = W(we), u = W(Pe), d = u && !o, l = w(
205
+ const r = K(), n = Y(), i = Z(), o = W(we), u = W(Pe), d = u && !o, l = w(
206
206
  () => e.groups.find((x) => x.id === "sidebar" && x.panel),
207
207
  [e]
208
208
  ), c = l == null ? void 0 : l.panel, p = !!c, m = ke({
@@ -228,10 +228,10 @@ function Ce({
228
228
  }).join(",");
229
229
  return `${v.version}:${x}:${M}`;
230
230
  }, [v, f]), H = $(
231
- a.subscribe,
232
- a.getSnapshot,
233
- a.getSnapshot
234
- ), 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(() => {
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(() => {
235
235
  h(!0);
236
236
  }, []), A = b(() => {
237
237
  m(), i({ collapsed: !1 }), h(!1);
@@ -244,21 +244,21 @@ function Ce({
244
244
  []
245
245
  );
246
246
  return /* @__PURE__ */ g("div", { className: "relative h-full w-full", children: [
247
- d && p && n.collapsed && /* @__PURE__ */ r(
247
+ d && p && n.collapsed && /* @__PURE__ */ a(
248
248
  "div",
249
249
  {
250
250
  className: "pointer-events-none absolute inset-y-0 left-0 z-20 w-10 border-r border-border bg-background/95",
251
251
  "aria-hidden": "true"
252
252
  }
253
253
  ),
254
- y && /* @__PURE__ */ r(
254
+ y && /* @__PURE__ */ a(
255
255
  "div",
256
256
  {
257
257
  className: C(
258
258
  "absolute z-30",
259
259
  o ? "left-2 top-2" : "left-1 top-2"
260
260
  ),
261
- children: /* @__PURE__ */ r(
261
+ children: /* @__PURE__ */ a(
262
262
  P,
263
263
  {
264
264
  type: "button",
@@ -266,12 +266,12 @@ function Ce({
266
266
  size: "icon-sm",
267
267
  onClick: q,
268
268
  "aria-label": o ? "Open sidebar menu" : "Open collapsed sidebar",
269
- children: o ? /* @__PURE__ */ r(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ r(pe, { className: "h-4 w-4" })
269
+ children: o ? /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ a(pe, { className: "h-4 w-4" })
270
270
  }
271
271
  )
272
272
  }
273
273
  ),
274
- d && p && !n.collapsed && /* @__PURE__ */ r("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ r(
274
+ d && p && !n.collapsed && /* @__PURE__ */ a("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ a(
275
275
  P,
276
276
  {
277
277
  type: "button",
@@ -279,10 +279,10 @@ function Ce({
279
279
  size: "icon-sm",
280
280
  onClick: J,
281
281
  "aria-label": "Collapse sidebar",
282
- children: /* @__PURE__ */ r(fe, { className: "h-4 w-4" })
282
+ children: /* @__PURE__ */ a(fe, { className: "h-4 w-4" })
283
283
  }
284
284
  ) }),
285
- /* @__PURE__ */ r(
285
+ /* @__PURE__ */ a(
286
286
  ee,
287
287
  {
288
288
  layout: v,
@@ -293,16 +293,16 @@ function Ce({
293
293
  },
294
294
  z
295
295
  ),
296
- y && /* @__PURE__ */ r(ae, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
297
- re,
296
+ y && /* @__PURE__ */ a(re, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
297
+ ae,
298
298
  {
299
299
  side: "left",
300
300
  className: "w-[85vw] max-w-sm p-0",
301
301
  children: [
302
302
  /* @__PURE__ */ g(ne, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
303
303
  /* @__PURE__ */ g("div", { children: [
304
- /* @__PURE__ */ r(se, { children: _ }),
305
- /* @__PURE__ */ r(oe, { className: "sr-only", children: "Responsive sidebar panel" })
304
+ /* @__PURE__ */ a(se, { children: _ }),
305
+ /* @__PURE__ */ a(oe, { className: "sr-only", children: "Responsive sidebar panel" })
306
306
  ] }),
307
307
  d && /* @__PURE__ */ g(
308
308
  P,
@@ -313,18 +313,18 @@ function Ce({
313
313
  onClick: A,
314
314
  "aria-label": "Pin sidebar open",
315
315
  children: [
316
- /* @__PURE__ */ r(me, { className: "h-4 w-4" }),
316
+ /* @__PURE__ */ a(me, { className: "h-4 w-4" }),
317
317
  "Pin"
318
318
  ]
319
319
  }
320
320
  )
321
321
  ] }),
322
- /* @__PURE__ */ r(
322
+ /* @__PURE__ */ a(
323
323
  "div",
324
324
  {
325
325
  className: "h-full min-h-0 overflow-auto",
326
326
  onClickCapture: G,
327
- children: F ? /* @__PURE__ */ r(ce, { fallback: /* @__PURE__ */ r(D, {}), children: /* @__PURE__ */ r(F, {}) }) : /* @__PURE__ */ r(D, {})
327
+ children: F ? /* @__PURE__ */ a(ce, { fallback: /* @__PURE__ */ a(D, {}), children: /* @__PURE__ */ a(F, {}) }) : /* @__PURE__ */ a(D, {})
328
328
  }
329
329
  )
330
330
  ]
@@ -333,10 +333,10 @@ function Ce({
333
333
  ] });
334
334
  }
335
335
  function D() {
336
- return /* @__PURE__ */ r("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
336
+ return /* @__PURE__ */ a("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
337
337
  }
338
338
  function Ne(e = {}) {
339
- const { sidebar: t = "filetree", center: a = "empty", right: n } = e, i = [
339
+ const { sidebar: t = "filetree", center: r = "empty", right: n } = e, i = [
340
340
  {
341
341
  id: "sidebar",
342
342
  position: "left",
@@ -349,7 +349,7 @@ function Ne(e = {}) {
349
349
  {
350
350
  id: "center",
351
351
  position: "center",
352
- panel: a,
352
+ panel: r,
353
353
  dynamic: !0,
354
354
  placeholder: "empty",
355
355
  constraints: { minWidth: 300 }
@@ -364,28 +364,28 @@ function Ne(e = {}) {
364
364
  }), { version: "2.0", groups: i };
365
365
  }
366
366
  function ze(e) {
367
- return /* @__PURE__ */ r(Ce, { layout: Ne(e), className: e.className });
367
+ return /* @__PURE__ */ a(Ce, { layout: Ne(e), className: e.className });
368
368
  }
369
369
  function He({ className: e, onOpenFile: t }) {
370
- return /* @__PURE__ */ r(
370
+ return /* @__PURE__ */ a(
371
371
  ie,
372
372
  {
373
373
  className: C("h-full border-0 text-muted-foreground", e),
374
374
  title: "No file open",
375
375
  description: "Open a file to get started",
376
- actions: t ? /* @__PURE__ */ r(P, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
376
+ actions: t ? /* @__PURE__ */ a(P, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
377
377
  children: /* @__PURE__ */ g("div", { className: "space-y-2 text-sm", children: [
378
378
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
379
- /* @__PURE__ */ r(I, { children: "⌘P" }),
380
- /* @__PURE__ */ r("span", { children: "Open file" })
379
+ /* @__PURE__ */ a(I, { children: "⌘P" }),
380
+ /* @__PURE__ */ a("span", { children: "Open file" })
381
381
  ] }),
382
382
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
383
- /* @__PURE__ */ r(I, { children: "⌘⇧P" }),
384
- /* @__PURE__ */ r("span", { children: "Command palette" })
383
+ /* @__PURE__ */ a(I, { children: "⌘⇧P" }),
384
+ /* @__PURE__ */ a("span", { children: "Command palette" })
385
385
  ] }),
386
386
  /* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
387
- /* @__PURE__ */ r(I, { children: "⌘B" }),
388
- /* @__PURE__ */ r("span", { children: "Toggle sidebar" })
387
+ /* @__PURE__ */ a(I, { children: "⌘B" }),
388
+ /* @__PURE__ */ a("span", { children: "Toggle sidebar" })
389
389
  ] })
390
390
  ] })
391
391
  }
@@ -399,32 +399,32 @@ class Ue extends de {
399
399
  this.setState({ hasError: !1, error: null });
400
400
  });
401
401
  }
402
- static getDerivedStateFromError(a) {
403
- return { hasError: !0, error: a };
402
+ static getDerivedStateFromError(r) {
403
+ return { hasError: !0, error: r };
404
404
  }
405
- componentDidCatch(a, n) {
405
+ componentDidCatch(r, n) {
406
406
  const { panelId: i, onError: o } = this.props;
407
- console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`, a, n.componentStack), o == null || o({
407
+ console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`, r, n.componentStack), o == null || o({
408
408
  panelId: i,
409
- error: a.message,
409
+ error: r.message,
410
410
  stack: n.componentStack ?? void 0
411
411
  });
412
412
  }
413
413
  render() {
414
- var a;
415
- return this.state.hasError ? /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ r(
414
+ var r;
415
+ return this.state.hasError ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ a(
416
416
  le,
417
417
  {
418
418
  className: "w-full max-w-md",
419
419
  title: "Something went wrong",
420
420
  description: /* @__PURE__ */ g(te, { children: [
421
421
  "Panel ",
422
- /* @__PURE__ */ r("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
422
+ /* @__PURE__ */ a("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
423
423
  " ",
424
424
  "encountered an error."
425
425
  ] }),
426
- details: (a = this.state.error) == null ? void 0 : a.message,
427
- actions: /* @__PURE__ */ r(P, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
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" })
428
428
  }
429
429
  ) }) : this.props.children;
430
430
  }
@@ -432,7 +432,7 @@ class Ue extends de {
432
432
  function _e({
433
433
  sessions: e,
434
434
  activeId: t,
435
- onSwitch: a,
435
+ onSwitch: r,
436
436
  onCreate: n,
437
437
  onDelete: i,
438
438
  className: o
@@ -452,7 +452,7 @@ function _e({
452
452
  (s, h) => {
453
453
  if (s.target !== s.currentTarget) return;
454
454
  if (s.key === "Enter" || s.key === " ") {
455
- s.preventDefault(), a == null || a(h);
455
+ s.preventDefault(), r == null || r(h);
456
456
  return;
457
457
  }
458
458
  const y = c.indexOf(h);
@@ -472,7 +472,7 @@ function _e({
472
472
  const v = c[f];
473
473
  v && p(v);
474
474
  },
475
- [p, a, c]
475
+ [p, r, c]
476
476
  );
477
477
  return /* @__PURE__ */ g(
478
478
  "div",
@@ -483,8 +483,8 @@ function _e({
483
483
  "aria-label": "Sessions",
484
484
  children: [
485
485
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
486
- /* @__PURE__ */ r("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
487
- n && /* @__PURE__ */ r(O, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ r(
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(
488
488
  "svg",
489
489
  {
490
490
  width: "16",
@@ -494,19 +494,19 @@ function _e({
494
494
  stroke: "currentColor",
495
495
  strokeWidth: "1.5",
496
496
  strokeLinecap: "round",
497
- children: /* @__PURE__ */ r("path", { d: "M8 3v10M3 8h10" })
497
+ children: /* @__PURE__ */ a("path", { d: "M8 3v10M3 8h10" })
498
498
  }
499
499
  ) })
500
500
  ] }),
501
501
  /* @__PURE__ */ g("div", { className: "flex-1 overflow-y-auto", role: "list", "aria-label": "Session list", children: [
502
- e.length === 0 && /* @__PURE__ */ r("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
503
- e.map((s) => /* @__PURE__ */ r(
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(
504
504
  Re,
505
505
  {
506
506
  session: s,
507
507
  isActive: s.id === t,
508
508
  isFocused: s.id === u,
509
- onSwitch: a,
509
+ onSwitch: r,
510
510
  onDelete: i,
511
511
  onFocus: () => d(s.id),
512
512
  onKeyDown: m,
@@ -522,8 +522,8 @@ function _e({
522
522
  );
523
523
  }
524
524
  async function Ee(e) {
525
- var a, n;
526
- if (typeof navigator < "u" && ((a = navigator.clipboard) != null && a.writeText))
525
+ var r, n;
526
+ if (typeof navigator < "u" && ((r = navigator.clipboard) != null && r.writeText))
527
527
  try {
528
528
  return await navigator.clipboard.writeText(e), !0;
529
529
  } catch {
@@ -542,7 +542,7 @@ async function Ee(e) {
542
542
  function Re({
543
543
  session: e,
544
544
  isActive: t,
545
- isFocused: a,
545
+ isFocused: r,
546
546
  onSwitch: n,
547
547
  onDelete: i,
548
548
  onFocus: o,
@@ -561,7 +561,7 @@ function Re({
561
561
  role: "listitem",
562
562
  "data-boring-workspace-part": "session-row",
563
563
  "data-boring-state": t ? "selected" : void 0,
564
- "data-focused": a ? "true" : "false",
564
+ "data-focused": r ? "true" : "false",
565
565
  className: C(
566
566
  "group flex items-center gap-2 border-b border-border px-3 py-2 text-sm cursor-pointer transition-colors",
567
567
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
@@ -570,44 +570,44 @@ function Re({
570
570
  onClick: () => n == null ? void 0 : n(e.id),
571
571
  onFocus: o,
572
572
  onKeyDown: (m) => u(m, e.id),
573
- tabIndex: a ? 0 : -1,
573
+ tabIndex: r ? 0 : -1,
574
574
  "aria-current": t ? "true" : void 0,
575
575
  children: [
576
- /* @__PURE__ */ r("span", { className: "flex-1 truncate", children: e.title }),
577
- /* @__PURE__ */ r(
576
+ /* @__PURE__ */ a("span", { className: "flex-1 truncate", children: e.title }),
577
+ /* @__PURE__ */ a(
578
578
  O,
579
579
  {
580
580
  type: "button",
581
581
  variant: "ghost",
582
582
  size: "icon-xs",
583
- className: "shrink-0 text-muted-foreground opacity-0 hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 group-data-[focused=true]:opacity-100",
583
+ className: "hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:inline-flex group-data-[focused=true]:inline-flex",
584
584
  onClick: p,
585
- tabIndex: a ? 0 : -1,
585
+ tabIndex: r ? 0 : -1,
586
586
  "aria-label": `Copy Pi session id for ${e.title}`,
587
587
  title: "Copy Pi session id",
588
- children: l ? /* @__PURE__ */ r(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ge, { className: "h-3.5 w-3.5" })
588
+ children: l ? /* @__PURE__ */ a(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(ge, { className: "h-3.5 w-3.5" })
589
589
  }
590
590
  ),
591
- t && /* @__PURE__ */ r(
591
+ t && /* @__PURE__ */ a(
592
592
  "span",
593
593
  {
594
594
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary",
595
595
  "aria-label": "Active"
596
596
  }
597
597
  ),
598
- i && /* @__PURE__ */ r(
598
+ i && /* @__PURE__ */ a(
599
599
  O,
600
600
  {
601
601
  type: "button",
602
602
  variant: "ghost",
603
603
  size: "icon-xs",
604
- className: "shrink-0 text-muted-foreground opacity-0 hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100 group-data-[focused=true]:opacity-100",
604
+ className: "hidden shrink-0 text-muted-foreground hover:text-destructive group-hover:inline-flex group-data-[focused=true]:inline-flex",
605
605
  onClick: (m) => {
606
606
  m.stopPropagation(), i(e.id);
607
607
  },
608
- tabIndex: a ? 0 : -1,
608
+ tabIndex: r ? 0 : -1,
609
609
  "aria-label": `Delete ${e.title}`,
610
- children: /* @__PURE__ */ r(
610
+ children: /* @__PURE__ */ a(
611
611
  "svg",
612
612
  {
613
613
  width: "14",
@@ -617,7 +617,7 @@ function Re({
617
617
  stroke: "currentColor",
618
618
  strokeWidth: "1.5",
619
619
  strokeLinecap: "round",
620
- children: /* @__PURE__ */ r("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
620
+ children: /* @__PURE__ */ a("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
621
621
  }
622
622
  )
623
623
  }
@@ -629,23 +629,23 @@ function Re({
629
629
  export {
630
630
  Je as ArtifactSurfacePane,
631
631
  Ge as CatalogRegistry,
632
- ya as ChatLayout,
633
- Ea as CodeEditor,
632
+ yr as ChatLayout,
633
+ Er as CodeEditor,
634
634
  Ve as CodeEditorPane,
635
635
  Xe as CommandPalette,
636
636
  Qe as CommandRegistry,
637
637
  ee as DockviewShell,
638
638
  He as EmptyPane,
639
- Ia as FileTree,
639
+ Ir as FileTree,
640
640
  Ye as FileTreePane,
641
641
  Ze as FileTreeView,
642
642
  ze as IdeLayout,
643
643
  et as MAX_PANELS,
644
- Fa as MarkdownEditor,
644
+ Fr as MarkdownEditor,
645
645
  tt as MarkdownEditorPane,
646
- at as PanelChrome,
646
+ rt as PanelChrome,
647
647
  Ue as PanelErrorBoundary,
648
- rt as PanelRegistry,
648
+ at as PanelRegistry,
649
649
  nt as PluginError,
650
650
  st as PluginErrorBoundary,
651
651
  ot as PluginErrorProvider,
@@ -656,29 +656,29 @@ export {
656
656
  ct as SurfaceResolverRegistry,
657
657
  dt as SurfaceShell,
658
658
  ut as ThemeProvider,
659
- Pa as Toaster,
660
- va as TopBar,
659
+ Pr as Toaster,
660
+ vr as TopBar,
661
661
  pt as UI_COMMAND_EVENT,
662
662
  ft as WORKSPACE_OPEN_PATH_SURFACE_KIND,
663
663
  mt as WorkbenchLeftPane,
664
664
  ht as WorkspaceFilesProvider,
665
665
  De as WorkspaceLink,
666
- xa as WorkspaceLoadingState,
666
+ xr as WorkspaceLoadingState,
667
667
  gt as WorkspaceProvider,
668
668
  bt as agentMeta,
669
669
  yt as bindStore,
670
670
  vt as bootstrap,
671
- ka as buildChatLayout,
671
+ kr as buildChatLayout,
672
672
  xt as buildFullPagePanelHref,
673
673
  Ne as buildIdeLayout,
674
674
  kt as closePanelSchema,
675
675
  C as cn,
676
676
  wt as createBridge,
677
677
  Pt as createBridgeClient,
678
- Ra as createShadcnTheme,
678
+ Rr as createShadcnTheme,
679
679
  St as createWorkspaceStore,
680
- Ma as definePanel,
681
- Sa as dismissToast,
680
+ Mr as definePanel,
681
+ Sr as dismissToast,
682
682
  Ct as emitAgentData,
683
683
  Nt as emitFilesystemAgentFileChange,
684
684
  Et as events,
@@ -694,7 +694,7 @@ export {
694
694
  Dt as openPanelSchema,
695
695
  Q as postUiCommand,
696
696
  Ke as readFileRecords,
697
- Ca as toast,
697
+ Cr as toast,
698
698
  Kt as useActiveFile,
699
699
  $t as useActivePanel,
700
700
  We as useActivePanels,
@@ -714,28 +714,28 @@ export {
714
714
  Qt as useFullPagePanelHref,
715
715
  Yt as useHasWorkspaceFilesProvider,
716
716
  Zt as useHydrationComplete,
717
- ea as useIsFullPagePanel,
718
- ta as useKeyboardShortcuts,
719
- aa as useOpenPanels,
720
- ra as usePanelRenderMode,
721
- na as usePluginErrors,
717
+ er as useIsFullPagePanel,
718
+ tr as useKeyboardShortcuts,
719
+ rr as useOpenPanels,
720
+ ar as usePanelRenderMode,
721
+ nr as usePluginErrors,
722
722
  K as useRegistry,
723
- sa as useResetLayout,
723
+ sr as useResetLayout,
724
724
  ke as useResponsiveSidebarCollapse,
725
725
  Z as useSetSidebar,
726
726
  Y as useSidebarState,
727
- oa as useSurfaceResolverRegistry,
728
- ia as useTheme,
729
- la as useThemePreference,
727
+ or as useSurfaceResolverRegistry,
728
+ ir as useTheme,
729
+ lr as useThemePreference,
730
730
  W as useViewportBreakpoint,
731
- ca as useWorkspaceAttention,
732
- da as useWorkspaceBridge,
733
- ua as useWorkspaceChatPanel,
734
- pa as useWorkspaceContext,
735
- fa as useWorkspaceContextOptional,
736
- ma as useWorkspaceRequestId,
737
- ha as userMeta,
738
- ga as workspaceEvents,
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,
739
739
  j as workspaceLinkCommand,
740
740
  be as workspaceLinkHref
741
741
  };
@@ -218,9 +218,9 @@ running Fastify/agent process by `/reload`.
218
218
 
219
219
  | Surface | Runtime `.pi/extensions` | App/internal package plugin | Notes |
220
220
  | --- | --- | --- | --- |
221
- | `pi.systemPrompt` | `/reload`, next turn | `/reload` in dev when discovered; static in production if hot reload disabled | Appended by `systemPromptDynamic`. |
221
+ | `pi.systemPrompt` | `/reload`, next turn | `/reload` when discovered | Appended by `systemPromptDynamic`. |
222
222
  | `pi.extensions` | `/reload` through Pi session reload | `/reload` when discovered as package resources | File paths are re-read from manifest. |
223
- | `pi.skills` / `pi.packages` | `/reload` through dynamic resource getter | `/reload` in dev; boot snapshot when `pluginHotReload=false` | `verify-plugin` checks declared local skill paths. |
223
+ | `pi.skills` / `pi.packages` | `/reload` through dynamic resource getter | `/reload` when discovered as package resources | `verify-plugin` checks declared local skill paths. |
224
224
  | `boring.front` panels/commands/catalogs/surface resolvers | `/reload` + SSE + browser dynamic import | `/reload` in dev when front URL is served by the app/Vite | Previous version stays live on import/register failure. |
225
225
  | `boring.server` routes/agentTools | Not supported for generated plugins | Boot-time only | `/reload` can warn `requiresRestart`. Restart process to apply. |
226
226
  | Providers/bindings from hot-loaded front factories | Skipped | Static composition only | Dynamic provider tree mounting is intentionally not implemented yet. |
@@ -241,16 +241,6 @@ boring-ui-plugin verify <name>
241
241
  Do not teach agents to copy `packages/plugin-cli/templates/plugin` for generated runtime
242
242
  plugins. That template is an app/internal publishable package example.
243
243
 
244
- ### 4.7 `pluginHotReload`
245
-
246
- `createWorkspaceAgentServer({ pluginHotReload })` controls dynamic Pi/package
247
- refresh through the canonical `/api/v1/agent/reload` path.
248
-
249
- - `true` (default): keeps `/api/v1/agent-plugins/events` active and refreshes
250
- discovered plugin Pi resources on `/api/v1/agent/reload`.
251
- - `false`: static discovery/listing remains available, but package resources
252
- are snapped once at boot and canonical reload skips plugin hot-refresh work.
253
-
254
244
  ---
255
245
 
256
246
  ## 5. Key algorithms