@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/{FileTree-GeEPOsUU.js → FileTree-BeCvmmxS.js} +8 -8
- package/dist/{MarkdownEditor-PL9esiiq.js → MarkdownEditor-DjdBgjHU.js} +1 -1
- package/dist/{WorkspaceLoadingState-Bi_qd29T.js → WorkspaceLoadingState-BfrLCML3.js} +31 -31
- package/dist/{WorkspaceProvider-CbvaXxgT.js → WorkspaceProvider-BvLlkZR_.js} +2706 -2454
- package/dist/app-front.js +55 -55
- package/dist/testing.js +1 -1
- package/dist/workspace.js +182 -183
- package/package.json +4 -4
- package/dist/CodeEditor-DQqOn4xz.js +0 -266
package/dist/workspace.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
var V = Object.defineProperty;
|
|
2
|
-
var X = (e, t,
|
|
3
|
-
var T = (e, t,
|
|
4
|
-
import { u as K, p as Q, a as Y, b as Z, D as ee } from "./WorkspaceProvider-
|
|
5
|
-
import { A as Je, C as Ge, c as Ve, d as Xe, e as Qe,
|
|
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
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { Button as P, Sheet as
|
|
10
|
-
import { Toaster as
|
|
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 {
|
|
13
|
-
import {
|
|
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
|
|
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:
|
|
48
|
-
return /* @__PURE__ */
|
|
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:
|
|
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
|
|
78
|
-
n && !Object.keys(
|
|
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:
|
|
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,
|
|
91
|
+
const [t, a] = N(() => B(e));
|
|
93
92
|
return k(() => {
|
|
94
93
|
const n = () => {
|
|
95
|
-
|
|
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:
|
|
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,
|
|
112
|
+
i.current = !0, a(!0);
|
|
114
113
|
return;
|
|
115
114
|
}
|
|
116
|
-
l && i.current && (i.current = !1,
|
|
117
|
-
}, [e,
|
|
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,
|
|
121
|
+
const [t, a] = N([]), n = S(t);
|
|
123
122
|
n.current = t, k(() => {
|
|
124
123
|
if (!e) {
|
|
125
|
-
|
|
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
|
-
})) &&
|
|
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
|
|
180
|
-
(o) =>
|
|
181
|
-
[
|
|
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 =
|
|
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
|
-
[
|
|
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
|
|
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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
), U = w(() =>
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
281
|
+
children: /* @__PURE__ */ r(fe, { className: "h-4 w-4" })
|
|
283
282
|
}
|
|
284
283
|
) }),
|
|
285
|
-
/* @__PURE__ */
|
|
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__ */
|
|
297
|
-
|
|
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__ */
|
|
305
|
-
/* @__PURE__ */
|
|
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__ */
|
|
315
|
+
/* @__PURE__ */ r(me, { className: "h-4 w-4" }),
|
|
317
316
|
"Pin"
|
|
318
317
|
]
|
|
319
318
|
}
|
|
320
319
|
)
|
|
321
320
|
] }),
|
|
322
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
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:
|
|
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__ */
|
|
366
|
+
return /* @__PURE__ */ r(Ce, { layout: Ne(e), className: e.className });
|
|
368
367
|
}
|
|
369
368
|
function He({ className: e, onOpenFile: t }) {
|
|
370
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
380
|
-
/* @__PURE__ */
|
|
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__ */
|
|
384
|
-
/* @__PURE__ */
|
|
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__ */
|
|
388
|
-
/* @__PURE__ */
|
|
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(
|
|
403
|
-
return { hasError: !0, error:
|
|
401
|
+
static getDerivedStateFromError(a) {
|
|
402
|
+
return { hasError: !0, error: a };
|
|
404
403
|
}
|
|
405
|
-
componentDidCatch(
|
|
404
|
+
componentDidCatch(a, n) {
|
|
406
405
|
const { panelId: i, onError: o } = this.props;
|
|
407
|
-
console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`,
|
|
406
|
+
console.error(`[PanelErrorBoundary] Panel "${i}" crashed:`, a, n.componentStack), o == null || o({
|
|
408
407
|
panelId: i,
|
|
409
|
-
error:
|
|
408
|
+
error: a.message,
|
|
410
409
|
stack: n.componentStack ?? void 0
|
|
411
410
|
});
|
|
412
411
|
}
|
|
413
412
|
render() {
|
|
414
|
-
var
|
|
415
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
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__ */
|
|
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: (
|
|
427
|
-
actions: /* @__PURE__ */
|
|
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:
|
|
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(),
|
|
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,
|
|
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__ */
|
|
487
|
-
n && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
503
|
-
e.map((s) => /* @__PURE__ */
|
|
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:
|
|
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
|
|
526
|
-
if (typeof navigator < "u" && ((
|
|
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:
|
|
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":
|
|
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:
|
|
572
|
+
tabIndex: a ? 0 : -1,
|
|
574
573
|
"aria-current": t ? "true" : void 0,
|
|
575
574
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
/* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
607
|
+
tabIndex: a ? 0 : -1,
|
|
609
608
|
"aria-label": `Delete ${e.title}`,
|
|
610
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
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
|
-
|
|
640
|
-
|
|
641
|
-
|
|
638
|
+
Ta as FileTree,
|
|
639
|
+
Ze as FileTreePane,
|
|
640
|
+
et as FileTreeView,
|
|
642
641
|
ze as IdeLayout,
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
642
|
+
tt as MAX_PANELS,
|
|
643
|
+
Oa as MarkdownEditor,
|
|
644
|
+
at as MarkdownEditorPane,
|
|
646
645
|
rt as PanelChrome,
|
|
647
646
|
Ue as PanelErrorBoundary,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
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
|
-
|
|
653
|
+
ct as SessionBrowser,
|
|
655
654
|
_e as SessionList,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
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
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
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
|
-
|
|
673
|
+
wt as closePanelSchema,
|
|
675
674
|
C as cn,
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
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
|
-
|
|
698
|
-
|
|
699
|
-
|
|
696
|
+
Ea as toast,
|
|
697
|
+
jt as useActiveFile,
|
|
698
|
+
zt as useActivePanel,
|
|
700
699
|
We as useActivePanels,
|
|
701
|
-
|
|
700
|
+
Ht as useApiBaseUrl,
|
|
702
701
|
$e as useArtifactPanels,
|
|
703
702
|
je as useArtifactRouting,
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
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
|
-
|
|
722
|
+
ia as useResetLayout,
|
|
724
723
|
ke as useResponsiveSidebarCollapse,
|
|
725
724
|
Z as useSetSidebar,
|
|
726
725
|
Y as useSidebarState,
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
726
|
+
la as useSurfaceResolverRegistry,
|
|
727
|
+
ca as useTheme,
|
|
728
|
+
da as useThemePreference,
|
|
730
729
|
W as useViewportBreakpoint,
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
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
|
};
|