@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.
@@ -1,10 +1,10 @@
1
- import { jsxs as l, jsx as a, Fragment as V } from "react/jsx-runtime";
2
- import { useCallback as b, useMemo as E, useEffect as z, useState as Z, useSyncExternalStore as T, Suspense as Y, useRef as ee } from "react";
3
- import { LoadingState as ne, ResizeHandle as te, IconButton as G, Button as re, Kbd as ae } from "@hachej/boring-ui-kit";
1
+ import { jsxs as l, jsx as o, Fragment as U } from "react/jsx-runtime";
2
+ import { useCallback as b, useMemo as H, useEffect as z, useState as G, useSyncExternalStore as Y, Suspense as ee, useRef as ne } from "react";
3
+ import { IconButton as K, LoadingState as te, ResizeHandle as re, Button as oe, Kbd as ae } from "@hachej/boring-ui-kit";
4
4
  import { c as g } from "./utils-B6yFEsav.js";
5
- import { $ as oe, a6 as ie, z as se, an as ce, al as de, u as le, ag as ue } from "./WorkspaceProvider-Cn0sPgaB.js";
6
- import { Search as he, Plus as me } from "lucide-react";
7
- function Se(e, n, r = !0) {
5
+ import { a2 as ie, ad as se, E as ce, aw as de, au as le, u as ue, ao as he } from "./WorkspaceProvider-BW4wzbpR.js";
6
+ import { Search as me, Plus as fe } from "lucide-react";
7
+ function _e(e, n, r = !0) {
8
8
  if (!r || typeof window > "u") return n;
9
9
  try {
10
10
  const t = window.localStorage.getItem(e);
@@ -14,25 +14,25 @@ function Se(e, n, r = !0) {
14
14
  }
15
15
  return n;
16
16
  }
17
- function _e(e, n, r = !0) {
17
+ function We(e, n, r = !0) {
18
18
  if (!(!r || typeof window > "u"))
19
19
  try {
20
20
  window.localStorage.setItem(e, n ? "1" : "0");
21
21
  } catch {
22
22
  }
23
23
  }
24
- function $(e, n, r = !0) {
24
+ function X(e, n, r = !0) {
25
25
  if (!r || typeof window > "u") return n;
26
26
  try {
27
27
  const t = window.localStorage.getItem(e);
28
28
  if (t === null) return n;
29
- const s = Number(t);
30
- return Number.isFinite(s) ? s : n;
29
+ const c = Number(t);
30
+ return Number.isFinite(c) ? c : n;
31
31
  } catch {
32
32
  }
33
33
  return n;
34
34
  }
35
- function fe(e, n, r = !0) {
35
+ function ge(e, n, r = !0) {
36
36
  if (!(!r || typeof window > "u"))
37
37
  try {
38
38
  window.localStorage.setItem(e, String(Math.round(n)));
@@ -44,11 +44,11 @@ function Ne(e = {}) {
44
44
  nav: n = "session-list",
45
45
  navParams: r,
46
46
  center: t = "chat",
47
- centerParams: s,
48
- surface: c,
47
+ centerParams: c,
48
+ surface: s,
49
49
  surfaceParams: d,
50
50
  sidebar: i,
51
- sidebarParams: x
51
+ sidebarParams: k
52
52
  } = e, w = [];
53
53
  return n && w.push({
54
54
  id: "nav",
@@ -62,108 +62,108 @@ function Ne(e = {}) {
62
62
  id: "center",
63
63
  position: "center",
64
64
  panel: t,
65
- params: s,
65
+ params: c,
66
66
  hideHeader: !0
67
67
  }), i && w.push({
68
68
  id: "sidebar",
69
69
  position: "left",
70
70
  panel: i,
71
- params: x,
71
+ params: k,
72
72
  hideHeader: !0,
73
73
  collapsible: !0,
74
74
  collapsedWidth: 40,
75
75
  constraints: { minWidth: 200, maxWidthViewportRatio: 0.5 }
76
- }), c && w.push({
76
+ }), s && w.push({
77
77
  id: "surface",
78
78
  position: "right",
79
- panel: c,
79
+ panel: s,
80
80
  params: d,
81
81
  hideHeader: !0,
82
82
  dynamic: !0,
83
83
  placeholder: "empty"
84
84
  }), { version: "2.0", groups: w };
85
85
  }
86
- function We(e) {
87
- const n = e.nav !== null, r = e.surface !== void 0, t = !!e.surface, s = e.nav || "session-list", c = e.center ?? "chat", d = e.surface || "artifact-surface", i = ge(), [x, w] = U(
86
+ function Pe(e) {
87
+ const n = e.nav !== null, r = e.surface !== void 0, t = !!e.surface, c = e.nav || "session-list", s = e.center ?? "chat", d = e.surface || "artifact-surface", i = be(), [k, w] = q(
88
88
  e.storageKey ? `${e.storageKey}:drawerWidth` : void 0,
89
89
  260
90
- ), [J, Q] = U(
90
+ ), [J, Q] = q(
91
91
  e.storageKey ? `${e.storageKey}:surfaceWidth` : void 0,
92
92
  680
93
- ), u = oe(), I = O(x, 200, 360), K = Math.max(480, Math.floor(i * 0.72)), L = O(J, 480, K), R = k(e.centerParams, "getSurface"), D = k(e.centerParams, "isWorkbenchOpen"), A = k(e.centerParams, "openWorkbench"), j = k(e.centerParams, "closeWorkbench"), h = B(e.navParams, "onClose"), m = B(e.surfaceParams, "onClose"), p = B(e.sidebarParams, "onClose"), M = B(e.navParams, "onCreate"), v = !!e.sidebar, y = n ? !!h : !!e.onOpenNav, C = t ? !!m : !!e.onOpenSurface, S = v ? !!p : !!e.onOpenSidebar, _ = b(() => {
94
- var o;
93
+ ), h = ie(), I = O(k, 200, 360), j = Math.max(480, Math.floor(i * 0.72)), L = O(J, 480, j), R = x(e.centerParams, "getSurface"), D = x(e.centerParams, "isWorkbenchOpen"), A = x(e.centerParams, "openWorkbench"), V = x(e.centerParams, "openWorkbenchSources"), $ = x(e.centerParams, "closeWorkbench"), m = B(e.navParams, "onClose"), u = B(e.surfaceParams, "onClose"), p = B(e.sidebarParams, "onClose"), M = B(e.navParams, "onCreate"), v = !!e.sidebar, y = n ? !!m : !!e.onOpenNav, C = t ? !!u : !!e.onOpenSurface, S = v ? !!p : !!e.onOpenSidebar, _ = b(() => {
94
+ var a;
95
95
  if (n) {
96
- h == null || h();
96
+ m == null || m();
97
97
  return;
98
98
  }
99
- (o = e.onOpenNav) == null || o.call(e);
100
- }, [h, n, e.onOpenNav]), N = b(() => {
101
- var o;
99
+ (a = e.onOpenNav) == null || a.call(e);
100
+ }, [m, n, e.onOpenNav]), W = b(() => {
101
+ var a;
102
102
  if (t) {
103
- m == null || m();
103
+ u == null || u();
104
104
  return;
105
105
  }
106
- (o = e.onOpenSurface) == null || o.call(e);
107
- }, [m, e.onOpenSurface, t]), W = b(() => {
108
- var o;
106
+ (a = e.onOpenSurface) == null || a.call(e);
107
+ }, [u, e.onOpenSurface, t]), N = b(() => {
108
+ var a;
109
109
  if (v) {
110
110
  p == null || p();
111
111
  return;
112
112
  }
113
- (o = e.onOpenSidebar) == null || o.call(e);
113
+ (a = e.onOpenSidebar) == null || a.call(e);
114
114
  }, [p, e.onOpenSidebar, v]), P = b(() => {
115
- n && (h == null || h()), t && (m == null || m()), F(), be();
116
- }, [h, m, n, t]);
117
- return ie({
118
- shortcuts: E(() => {
119
- const o = [];
120
- return y && o.push({ key: "1", mod: !0, handler: _ }), C && o.push({ key: "2", mod: !0, handler: N }), S && o.push({ key: "3", mod: !0, allowInEditable: !0, handler: W }), c === "chat" && o.push({ key: "Escape", allowInEditable: !0, handler: P }), o;
121
- }, [y, S, C, c, P, _, W, N])
115
+ n && (m == null || m()), t && (u == null || u()), F(), we();
116
+ }, [m, u, n, t]);
117
+ return se({
118
+ shortcuts: H(() => {
119
+ const a = [];
120
+ return y && a.push({ key: "1", mod: !0, handler: _ }), C && a.push({ key: "2", mod: !0, handler: W }), S && a.push({ key: "3", mod: !0, allowInEditable: !0, handler: N }), s === "chat" && a.push({ key: "Escape", allowInEditable: !0, handler: P }), a;
121
+ }, [y, S, C, s, P, _, N, W])
122
122
  }), z(() => {
123
- const o = "workspace:chat-layout", f = "agent:chat-layout";
124
- return u.unregisterByPluginId(o), u.unregisterByPluginId(f), u.registerCommand({
123
+ const a = "workspace:chat-layout", f = "agent:chat-layout";
124
+ return h.unregisterByPluginId(a), h.unregisterByPluginId(f), h.registerCommand({
125
125
  id: "workspace:open-session-history",
126
126
  title: n ? "Close Session History" : "Open Session History",
127
127
  keywords: ["sessions", "history", "drawer", n ? "close" : "open"],
128
128
  shortcut: "⌘1",
129
- pluginId: o,
129
+ pluginId: a,
130
130
  when: () => y,
131
131
  run: _
132
- }), u.registerCommand({
132
+ }), h.registerCommand({
133
133
  id: "workspace:open-workbench",
134
134
  title: t ? "Close Workbench" : "Open Workbench",
135
135
  keywords: ["surface", "artifacts", "sources", "workbench", t ? "close" : "open"],
136
136
  shortcut: "⌘2",
137
- pluginId: o,
137
+ pluginId: a,
138
138
  when: () => C,
139
- run: N
140
- }), u.registerCommand({
139
+ run: W
140
+ }), h.registerCommand({
141
141
  id: "workspace:toggle-workbench-left-panel",
142
142
  title: v ? "Close Workbench Left Panel" : "Open Workbench Left Panel",
143
143
  keywords: ["left", "sidebar", "tabs", "workbench", v ? "close" : "open"],
144
144
  shortcut: "⌘3",
145
- pluginId: o,
145
+ pluginId: a,
146
146
  when: () => S,
147
- run: W
148
- }), c === "chat" && u.registerCommand({
147
+ run: N
148
+ }), s === "chat" && h.registerCommand({
149
149
  id: "agent:focus-chat",
150
150
  title: "Focus Chat",
151
151
  keywords: ["agent", "chat", "prompt", "composer", "input", "focus"],
152
152
  pluginId: f,
153
153
  run: P
154
- }), M && u.registerCommand({
154
+ }), M && h.registerCommand({
155
155
  id: "agent:new-chat",
156
156
  title: "New Chat",
157
157
  keywords: ["agent", "chat", "session", "new"],
158
158
  pluginId: f,
159
159
  run: M
160
160
  }), () => {
161
- u.unregisterByPluginId(o), u.unregisterByPluginId(f);
161
+ h.unregisterByPluginId(a), h.unregisterByPluginId(f);
162
162
  };
163
163
  }, [
164
- u,
164
+ h,
165
165
  n,
166
- c,
166
+ s,
167
167
  r,
168
168
  t,
169
169
  e.navParams,
@@ -174,27 +174,28 @@ function We(e) {
174
174
  y,
175
175
  C,
176
176
  S,
177
- h,
178
177
  m,
178
+ u,
179
179
  p,
180
180
  M,
181
181
  P,
182
182
  v,
183
183
  _,
184
- N,
185
- W
184
+ W,
185
+ N
186
186
  ]), z(() => {
187
187
  if (!R || !D || !A) return;
188
- const o = {
188
+ const a = {
189
189
  surface: R,
190
190
  isWorkbenchOpen: D,
191
191
  openWorkbench: A,
192
- closeWorkbench: j
192
+ openWorkbenchSources: V,
193
+ closeWorkbench: $
193
194
  };
194
- return se.on(ce.uiCommand, ({ command: f }) => {
195
- de(f, o);
195
+ return ce.on(de.uiCommand, ({ command: f }) => {
196
+ le(f, a);
196
197
  });
197
- }, [R, D, A, j]), /* @__PURE__ */ l(
198
+ }, [R, D, A, V, $]), /* @__PURE__ */ l(
198
199
  "div",
199
200
  {
200
201
  "data-boring-workspace": "",
@@ -220,7 +221,7 @@ function We(e) {
220
221
  willChange: "width"
221
222
  },
222
223
  children: [
223
- /* @__PURE__ */ a(
224
+ /* @__PURE__ */ o(
224
225
  "div",
225
226
  {
226
227
  className: g(
@@ -228,15 +229,15 @@ function We(e) {
228
229
  "transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
229
230
  n ? "opacity-100" : "opacity-0"
230
231
  ),
231
- children: /* @__PURE__ */ a(H, { id: s, params: e.navParams })
232
+ children: /* @__PURE__ */ o(E, { id: c, params: e.navParams })
232
233
  }
233
234
  ),
234
- n ? /* @__PURE__ */ a(
235
- X,
235
+ n ? /* @__PURE__ */ o(
236
+ T,
236
237
  {
237
238
  side: "drawer-right",
238
239
  ariaLabel: "Resize sessions drawer",
239
- onResize: (o) => w((f) => O(f + o, 200, 360))
240
+ onResize: (a) => w((f) => O(f + a, 200, 360))
240
241
  }
241
242
  ) : null
242
243
  ]
@@ -249,9 +250,9 @@ function We(e) {
249
250
  "aria-label": "Chat stage",
250
251
  className: "relative h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-background",
251
252
  children: [
252
- /* @__PURE__ */ a(H, { id: c, params: e.centerParams }),
253
- !n && e.onOpenNav ? /* @__PURE__ */ a(
254
- q,
253
+ /* @__PURE__ */ o(E, { id: s, params: e.centerParams }),
254
+ !n && e.onOpenNav ? /* @__PURE__ */ o(
255
+ Z,
255
256
  {
256
257
  side: "left",
257
258
  icon: "sessions",
@@ -260,14 +261,15 @@ function We(e) {
260
261
  hint: "⌘1"
261
262
  }
262
263
  ) : null,
263
- !t && e.onOpenSurface ? /* @__PURE__ */ a(
264
- q,
264
+ !t && e.onOpenSurface ? /* @__PURE__ */ o(
265
+ Z,
265
266
  {
266
267
  side: "right",
267
268
  icon: "workbench",
268
269
  onClick: e.onOpenSurface,
269
270
  label: "Workbench",
270
- hint: "⌘2"
271
+ hint: "⌘2",
272
+ bottomOffset: e.surfaceButtonBottomOffset
271
273
  }
272
274
  ) : null
273
275
  ]
@@ -292,7 +294,7 @@ function We(e) {
292
294
  willChange: "width"
293
295
  },
294
296
  children: [
295
- /* @__PURE__ */ a(
297
+ /* @__PURE__ */ o(
296
298
  "div",
297
299
  {
298
300
  className: g(
@@ -300,15 +302,30 @@ function We(e) {
300
302
  "transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
301
303
  t ? "opacity-100" : "opacity-0"
302
304
  ),
303
- children: /* @__PURE__ */ a(H, { id: d, params: e.surfaceParams })
305
+ children: e.surfaceOverlay ? /* @__PURE__ */ l("div", { className: "relative h-full min-h-0", children: [
306
+ e.surfaceOverlay,
307
+ u ? /* @__PURE__ */ o(
308
+ K,
309
+ {
310
+ type: "button",
311
+ variant: "ghost",
312
+ size: "icon-sm",
313
+ onClick: u,
314
+ className: "absolute right-3 top-3 z-20 rounded-full bg-background/80 text-muted-foreground shadow-sm backdrop-blur hover:bg-muted hover:text-foreground",
315
+ "aria-label": "Close workbench",
316
+ title: "Close workbench (⌘2)",
317
+ children: /* @__PURE__ */ o("span", { "aria-hidden": "true", children: "›" })
318
+ }
319
+ ) : null
320
+ ] }) : /* @__PURE__ */ o(E, { id: d, params: e.surfaceParams })
304
321
  }
305
322
  ),
306
- t ? /* @__PURE__ */ a(
307
- X,
323
+ t ? /* @__PURE__ */ o(
324
+ T,
308
325
  {
309
326
  side: "surface-left",
310
327
  ariaLabel: "Resize workbench",
311
- onResize: (o) => Q((f) => O(f - o, 480, K))
328
+ onResize: (a) => Q((f) => O(f - a, 480, j))
312
329
  }
313
330
  ) : null
314
331
  ]
@@ -321,48 +338,48 @@ function We(e) {
321
338
  function O(e, n, r) {
322
339
  return Math.max(n, Math.min(r, e));
323
340
  }
324
- function U(e, n) {
325
- const [r, t] = Z(
326
- () => e ? $(e, n) : n
341
+ function q(e, n) {
342
+ const [r, t] = G(
343
+ () => e ? X(e, n) : n
327
344
  );
328
345
  z(() => {
329
- t(e ? $(e, n) : n);
346
+ t(e ? X(e, n) : n);
330
347
  }, [e, n]);
331
- const s = b(
332
- (c) => {
348
+ const c = b(
349
+ (s) => {
333
350
  t((d) => {
334
- const i = typeof c == "function" ? c(d) : c;
335
- return e && fe(e, i), i;
351
+ const i = typeof s == "function" ? s(d) : s;
352
+ return e && ge(e, i), i;
336
353
  });
337
354
  },
338
355
  [e]
339
356
  );
340
- return [r, s];
357
+ return [r, c];
341
358
  }
342
- function ge() {
343
- const [e, n] = Z(() => typeof window < "u" ? window.innerWidth : 1200);
359
+ function be() {
360
+ const [e, n] = G(() => typeof window < "u" ? window.innerWidth : 1200);
344
361
  return z(() => {
345
362
  const r = () => n(window.innerWidth);
346
363
  return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
347
364
  }, []), e;
348
365
  }
349
- function X({ side: e, ariaLabel: n, onResize: r }) {
350
- const t = ee(null), s = b((i) => {
366
+ function T({ side: e, ariaLabel: n, onResize: r }) {
367
+ const t = ne(null), c = b((i) => {
351
368
  i.preventDefault(), t.current = i.clientX, i.currentTarget.setPointerCapture(i.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
352
- }, []), c = b((i) => {
369
+ }, []), s = b((i) => {
353
370
  if (t.current === null) return;
354
- const x = i.clientX - t.current;
355
- t.current = i.clientX, r(x);
371
+ const k = i.clientX - t.current;
372
+ t.current = i.clientX, r(k);
356
373
  }, [r]), d = b((i) => {
357
374
  t.current !== null && (t.current = null, i.currentTarget.releasePointerCapture(i.pointerId), document.body.style.cursor = "", document.body.style.userSelect = "");
358
375
  }, []);
359
- return /* @__PURE__ */ a(
360
- te,
376
+ return /* @__PURE__ */ o(
377
+ re,
361
378
  {
362
379
  "aria-label": n,
363
380
  orientation: "vertical",
364
- onResizeStart: s,
365
- onPointerMove: c,
381
+ onResizeStart: c,
382
+ onPointerMove: s,
366
383
  onPointerUp: d,
367
384
  onPointerCancel: d,
368
385
  className: g(
@@ -375,12 +392,12 @@ function X({ side: e, ariaLabel: n, onResize: r }) {
375
392
  }
376
393
  );
377
394
  }
378
- function k(e, n) {
395
+ function x(e, n) {
379
396
  const r = e == null ? void 0 : e[n];
380
397
  return typeof r == "function" ? r : void 0;
381
398
  }
382
399
  function B(e, n) {
383
- return k(e, n);
400
+ return x(e, n);
384
401
  }
385
402
  function F() {
386
403
  if (typeof document > "u") return;
@@ -389,18 +406,18 @@ function F() {
389
406
  );
390
407
  e == null || e.focus();
391
408
  }
392
- function be() {
409
+ function we() {
393
410
  typeof window > "u" || window.requestAnimationFrame(() => {
394
411
  F(), window.setTimeout(F, 320);
395
412
  });
396
413
  }
397
- function H({ id: e, params: n }) {
398
- const r = le(), { debug: t } = ue(), s = T(
414
+ function E({ id: e, params: n }) {
415
+ const r = ue(), { debug: t } = he(), c = Y(
399
416
  r.subscribe,
400
417
  r.getSnapshot,
401
418
  r.getSnapshot
402
- ), d = E(() => r.getComponents(), [r, s])[e], i = E(() => we(e), [e]);
403
- return d ? /* @__PURE__ */ a(Y, { fallback: /* @__PURE__ */ a(ne, { centered: !0 }), children: /* @__PURE__ */ a(
419
+ ), d = H(() => r.getComponents(), [r, c])[e], i = H(() => pe(e), [e]);
420
+ return d ? /* @__PURE__ */ o(ee, { fallback: /* @__PURE__ */ o(te, { centered: !0 }), children: /* @__PURE__ */ o(
404
421
  d,
405
422
  {
406
423
  params: { ...n, debug: t },
@@ -409,7 +426,7 @@ function H({ id: e, params: n }) {
409
426
  }
410
427
  ) }) : null;
411
428
  }
412
- function we(e) {
429
+ function pe(e) {
413
430
  return {
414
431
  id: e,
415
432
  title: e,
@@ -445,46 +462,50 @@ function we(e) {
445
462
  } })
446
463
  };
447
464
  }
448
- function q({
465
+ function Z({
449
466
  side: e,
450
467
  icon: n,
451
468
  onClick: r,
452
469
  label: t,
453
- hint: s
470
+ hint: c,
471
+ bottomOffset: s
454
472
  }) {
455
- return /* @__PURE__ */ a(
456
- G,
473
+ const d = e === "right" && s !== void 0;
474
+ return /* @__PURE__ */ o(
475
+ K,
457
476
  {
458
477
  type: "button",
459
478
  variant: "ghost",
460
479
  size: "icon-sm",
461
480
  onClick: r,
462
481
  "aria-label": t,
463
- title: s ? `${t} (${s})` : t,
482
+ title: c ? `${t} (${c})` : t,
464
483
  className: g(
465
- "absolute top-1/2 z-30 h-9 w-9 -translate-y-1/2 gap-0.5 rounded-lg bg-background text-muted-foreground",
484
+ "absolute z-30 h-9 w-9 gap-0.5 rounded-lg bg-background text-muted-foreground",
466
485
  e === "left" ? "left-2" : "right-2",
486
+ d ? "hover:-translate-y-0.5" : "top-1/2 -translate-y-1/2 hover:-translate-y-[calc(50%+1px)]",
467
487
  "shadow-[0_1px_2px_-1px_oklch(0_0_0/0.08),0_2px_8px_-4px_oklch(0_0_0/0.10),inset_0_0_0_1px_oklch(from_var(--border)_l_c_h/0.7)]",
468
- "hover:-translate-y-[calc(50%+1px)] hover:bg-muted/60 hover:text-foreground hover:shadow-[0_2px_4px_-1px_oklch(0_0_0/0.08),0_4px_12px_-4px_oklch(0_0_0/0.10),inset_0_0_0_1px_oklch(from_var(--border)_l_c_h/0.9)]",
488
+ "hover:bg-muted/60 hover:text-foreground hover:shadow-[0_2px_4px_-1px_oklch(0_0_0/0.08),0_4px_12px_-4px_oklch(0_0_0/0.10),inset_0_0_0_1px_oklch(from_var(--border)_l_c_h/0.9)]",
469
489
  "focus-visible:ring-ring/40"
470
490
  ),
491
+ style: d ? { bottom: s } : void 0,
471
492
  children: n === "sessions" ? /* @__PURE__ */ l("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
472
- /* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.8" }),
473
- /* @__PURE__ */ a("path", { d: "M12 7v5l3.2 2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
474
- ] }) : /* @__PURE__ */ a("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M3 7.5 A1.5 1.5 0 0 1 4.5 6 h4 l2 2 h9 A1.5 1.5 0 0 1 21 9.5 V17.5 A1.5 1.5 0 0 1 19.5 19 H4.5 A1.5 1.5 0 0 1 3 17.5 Z", stroke: "currentColor", strokeWidth: "1.8", strokeLinejoin: "round" }) })
493
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.8" }),
494
+ /* @__PURE__ */ o("path", { d: "M12 7v5l3.2 2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
495
+ ] }) : /* @__PURE__ */ o("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M3 7.5 A1.5 1.5 0 0 1 4.5 6 h4 l2 2 h9 A1.5 1.5 0 0 1 21 9.5 V17.5 A1.5 1.5 0 0 1 19.5 19 H4.5 A1.5 1.5 0 0 1 3 17.5 Z", stroke: "currentColor", strokeWidth: "1.8", strokeLinejoin: "round" }) })
475
496
  }
476
497
  );
477
498
  }
478
- function Pe({
499
+ function Oe({
479
500
  appTitle: e = "Boring",
480
501
  sessionTitle: n,
481
502
  onCommandPalette: r,
482
503
  onNewChat: t,
483
- topBarLeft: s,
484
- topBarRight: c,
504
+ topBarLeft: c,
505
+ topBarRight: s,
485
506
  className: d
486
507
  }) {
487
- const i = c ?? null;
508
+ const i = s ?? null;
488
509
  return /* @__PURE__ */ l(
489
510
  "header",
490
511
  {
@@ -496,8 +517,8 @@ function Pe({
496
517
  ),
497
518
  "aria-label": "App top bar",
498
519
  children: [
499
- /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 leading-none", children: s ?? /* @__PURE__ */ l(V, { children: [
500
- /* @__PURE__ */ a(
520
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 leading-none", children: c ?? /* @__PURE__ */ l(U, { children: [
521
+ /* @__PURE__ */ o(
501
522
  "span",
502
523
  {
503
524
  "aria-hidden": "true",
@@ -505,14 +526,14 @@ function Pe({
505
526
  children: ((e == null ? void 0 : e[0]) ?? "B").toUpperCase()
506
527
  }
507
528
  ),
508
- n ? /* @__PURE__ */ l(V, { children: [
509
- /* @__PURE__ */ a("span", { className: "shrink-0 text-[13px] font-medium leading-none tracking-tight text-foreground/65", children: e }),
510
- /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "text-[13px] leading-none text-muted-foreground/45", children: "·" }),
511
- /* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: n })
512
- ] }) : /* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: e })
529
+ n ? /* @__PURE__ */ l(U, { children: [
530
+ /* @__PURE__ */ o("span", { className: "shrink-0 text-[13px] font-medium leading-none tracking-tight text-foreground/65", children: e }),
531
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", className: "text-[13px] leading-none text-muted-foreground/45", children: "·" }),
532
+ /* @__PURE__ */ o("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: n })
533
+ ] }) : /* @__PURE__ */ o("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: e })
513
534
  ] }) }),
514
535
  /* @__PURE__ */ l(
515
- re,
536
+ oe,
516
537
  {
517
538
  type: "button",
518
539
  variant: "ghost",
@@ -522,15 +543,15 @@ function Pe({
522
543
  "aria-label": "Search catalogs and commands",
523
544
  title: "Command palette (⌘K)",
524
545
  children: [
525
- /* @__PURE__ */ a(he, { className: "h-3.5 w-3.5 shrink-0 opacity-80", strokeWidth: 1.75 }),
526
- /* @__PURE__ */ a("span", { className: "font-normal tracking-tight", children: "Search" }),
527
- /* @__PURE__ */ a(ae, { className: "ml-0.5 bg-muted/40 leading-none shadow-none", children: "⌘K" })
546
+ /* @__PURE__ */ o(me, { className: "h-3.5 w-3.5 shrink-0 opacity-80", strokeWidth: 1.75 }),
547
+ /* @__PURE__ */ o("span", { className: "font-normal tracking-tight", children: "Search" }),
548
+ /* @__PURE__ */ o(ae, { className: "ml-0.5 bg-muted/40 leading-none shadow-none", children: "⌘K" })
528
549
  ]
529
550
  }
530
551
  ),
531
552
  /* @__PURE__ */ l("div", { className: "flex flex-1 shrink-0 items-center justify-end gap-1", children: [
532
- t && /* @__PURE__ */ a(
533
- G,
553
+ t && /* @__PURE__ */ o(
554
+ K,
534
555
  {
535
556
  type: "button",
536
557
  variant: "ghost",
@@ -538,7 +559,7 @@ function Pe({
538
559
  onClick: t,
539
560
  "aria-label": "New chat",
540
561
  title: "New chat",
541
- children: /* @__PURE__ */ a(me, { className: "h-4 w-4" })
562
+ children: /* @__PURE__ */ o(fe, { className: "h-4 w-4" })
542
563
  }
543
564
  ),
544
565
  i
@@ -547,14 +568,14 @@ function Pe({
547
568
  }
548
569
  );
549
570
  }
550
- function Oe({
571
+ function Be({
551
572
  title: e = "Loading workspace",
552
573
  description: n = "Preparing the workspace context.",
553
574
  status: r = "Loading",
554
575
  fullscreen: t = !0,
555
- className: s
576
+ className: c
556
577
  }) {
557
- return /* @__PURE__ */ a(
578
+ return /* @__PURE__ */ o(
558
579
  "section",
559
580
  {
560
581
  role: "status",
@@ -563,10 +584,10 @@ function Oe({
563
584
  className: g(
564
585
  "flex h-full w-full items-center justify-center bg-background px-6 text-foreground",
565
586
  t ? "min-h-screen" : "min-h-[240px]",
566
- s
587
+ c
567
588
  ),
568
589
  children: /* @__PURE__ */ l("div", { className: "flex w-full max-w-sm flex-col items-center gap-5 text-center", children: [
569
- /* @__PURE__ */ a("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg border border-border bg-card text-foreground", children: /* @__PURE__ */ a(
590
+ /* @__PURE__ */ o("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg border border-border bg-card text-foreground", children: /* @__PURE__ */ o(
570
591
  "span",
571
592
  {
572
593
  "aria-hidden": "true",
@@ -574,19 +595,19 @@ function Oe({
574
595
  }
575
596
  ) }),
576
597
  /* @__PURE__ */ l("div", { className: "space-y-2", children: [
577
- /* @__PURE__ */ a("h2", { className: "text-base font-medium text-foreground", children: e }),
578
- n ? /* @__PURE__ */ a("p", { className: "text-sm leading-6 text-muted-foreground", children: n }) : null
598
+ /* @__PURE__ */ o("h2", { className: "text-base font-medium text-foreground", children: e }),
599
+ n ? /* @__PURE__ */ o("p", { className: "text-sm leading-6 text-muted-foreground", children: n }) : null
579
600
  ] }),
580
- r ? /* @__PURE__ */ a("p", { className: "text-xs font-medium text-muted-foreground/80", children: r }) : null
601
+ r ? /* @__PURE__ */ o("p", { className: "text-xs font-medium text-muted-foreground/80", children: r }) : null
581
602
  ] })
582
603
  }
583
604
  );
584
605
  }
585
606
  export {
586
- We as C,
587
- Pe as T,
588
- Oe as W,
607
+ Pe as C,
608
+ Oe as T,
609
+ Be as W,
589
610
  Ne as b,
590
- Se as r,
591
- _e as w
611
+ _e as r,
612
+ We as w
592
613
  };