@hachej/boring-workspace 0.1.47 → 0.1.48
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-CoZWkHqn.js +315 -0
- package/dist/{MarkdownEditor-FJtYn6Xx.js → MarkdownEditor-DOZy49fg.js} +160 -160
- package/dist/{WorkspaceLoadingState-BoFzsDji.js → WorkspaceLoadingState-CjXix_Fa.js} +22 -22
- package/dist/{WorkspaceProvider-CSwoKjTp.js → WorkspaceProvider-CRd7lb76.js} +833 -826
- package/dist/app-front.js +515 -504
- package/dist/testing.js +1 -1
- package/dist/workspace.d.ts +24 -4
- package/dist/workspace.js +5 -5
- package/package.json +4 -4
- package/dist/FileTree-DKzSeYJX.js +0 -289
|
@@ -3,7 +3,7 @@ import { useState as V, useCallback as v, useMemo as Y, useEffect as k, useRef a
|
|
|
3
3
|
import { IconButton as F, LoadingState as xe, ResizeHandle as pe, Button as ke, Kbd as Ce } from "@hachej/boring-ui-kit";
|
|
4
4
|
import { ChevronLeft as ye, MessageSquare as Se, Search as Pe, Plus as _e } from "lucide-react";
|
|
5
5
|
import { c as m } from "./utils-B6yFEsav.js";
|
|
6
|
-
import { al as Ne, a2 as We, ad as Ie, G as Oe, as as de,
|
|
6
|
+
import { al as Ne, a2 as We, ad as Ie, G as Oe, as as de, aE as Be, a7 as ze, aJ as Re, aK as Q, u as Le, ao as Ae } from "./WorkspaceProvider-CRd7lb76.js";
|
|
7
7
|
function Ue(e, t, r = !0) {
|
|
8
8
|
if (!r || typeof window > "u") return t;
|
|
9
9
|
try {
|
|
@@ -39,7 +39,7 @@ function De(e, t, r = !0) {
|
|
|
39
39
|
} catch {
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Te(e = {}) {
|
|
43
43
|
const {
|
|
44
44
|
nav: t = "session-list",
|
|
45
45
|
navParams: r,
|
|
@@ -83,9 +83,9 @@ function Ge(e = {}) {
|
|
|
83
83
|
placeholder: "empty"
|
|
84
84
|
}), { version: "2.0", groups: x };
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ge(e) {
|
|
87
87
|
var ie, se;
|
|
88
|
-
const t = e.nav !== null, r = e.surface !== void 0, n = !!e.surface, d = e.nav || "session-list", i = e.center ?? "chat", l = e.surface || "artifact-surface", s =
|
|
88
|
+
const t = e.nav !== null, r = e.surface !== void 0, n = !!e.surface, d = e.nav || "session-list", i = e.center ?? "chat", l = e.surface || "artifact-surface", s = Ee(), [p, x] = ue(
|
|
89
89
|
e.storageKey ? `${e.storageKey}:drawerWidth` : void 0,
|
|
90
90
|
260
|
|
91
91
|
), [me, ge] = ue(
|
|
@@ -94,7 +94,7 @@ function Te(e) {
|
|
|
94
94
|
), [c, g] = Me(
|
|
95
95
|
e.storageKey ? `${e.storageKey}:chatCollapsed` : void 0,
|
|
96
96
|
!1
|
|
97
|
-
), [be, W] = V(!1), { blockers: j } = Ne(), b = We(), $ = M(p, 200, 360), te = Math.max(480, Math.floor(s * 0.72)), q = M(me, 480, te), U = S(e.centerParams, "getSurface"), X = S(e.centerParams, "isWorkbenchOpen"),
|
|
97
|
+
), [be, W] = V(!1), { blockers: j } = Ne(), b = We(), $ = M(p, 200, 360), te = Math.max(480, Math.floor(s * 0.72)), q = M(me, 480, te), U = S(e.centerParams, "getSurface"), X = S(e.centerParams, "isWorkbenchOpen"), T = S(e.centerParams, "openWorkbench"), ne = S(e.centerParams, "openWorkbenchSources"), ae = S(e.centerParams, "closeWorkbench"), w = E(e.navParams, "onClose"), f = E(e.surfaceParams, "onClose"), C = E(e.sidebarParams, "onClose"), G = E(e.navParams, "onCreate"), P = ((ie = e.chatPanes) == null ? void 0 : ie.filter((o) => o.id.length > 0)) ?? [], J = P.length > 0, y = !!e.sidebar, I = t ? !!w : !!e.onOpenNav, O = n ? !!f : !!e.onOpenSurface, B = y ? !!C : !!e.onOpenSidebar, z = v(() => {
|
|
98
98
|
var o;
|
|
99
99
|
if (t) {
|
|
100
100
|
w == null || w();
|
|
@@ -161,12 +161,12 @@ function Te(e) {
|
|
|
161
161
|
keywords: ["agent", "chat", "prompt", "composer", "input", "focus"],
|
|
162
162
|
pluginId: u,
|
|
163
163
|
run: A
|
|
164
|
-
}),
|
|
164
|
+
}), G && b.registerCommand({
|
|
165
165
|
id: "agent:new-chat",
|
|
166
166
|
title: "New Chat",
|
|
167
167
|
keywords: ["agent", "chat", "session", "new"],
|
|
168
168
|
pluginId: u,
|
|
169
|
-
run:
|
|
169
|
+
run: G
|
|
170
170
|
}), () => {
|
|
171
171
|
b.unregisterByPluginId(o), b.unregisterByPluginId(u);
|
|
172
172
|
};
|
|
@@ -187,25 +187,25 @@ function Te(e) {
|
|
|
187
187
|
w,
|
|
188
188
|
f,
|
|
189
189
|
C,
|
|
190
|
-
|
|
190
|
+
G,
|
|
191
191
|
A,
|
|
192
192
|
y,
|
|
193
193
|
z,
|
|
194
194
|
R,
|
|
195
195
|
L
|
|
196
196
|
]), k(() => {
|
|
197
|
-
if (!U || !X || !
|
|
197
|
+
if (!U || !X || !T) return;
|
|
198
198
|
const o = {
|
|
199
199
|
surface: U,
|
|
200
200
|
isWorkbenchOpen: X,
|
|
201
|
-
openWorkbench:
|
|
201
|
+
openWorkbench: T,
|
|
202
202
|
openWorkbenchSources: ne,
|
|
203
203
|
closeWorkbench: ae
|
|
204
204
|
};
|
|
205
205
|
return Oe.on(de.uiCommand, ({ command: u }) => {
|
|
206
206
|
Be(u, o);
|
|
207
207
|
});
|
|
208
|
-
}, [U, X,
|
|
208
|
+
}, [U, X, T, ne, ae]), ze(de.agentData, () => {
|
|
209
209
|
c && W(!0);
|
|
210
210
|
}), k(() => {
|
|
211
211
|
if (!c) {
|
|
@@ -257,7 +257,7 @@ function Te(e) {
|
|
|
257
257
|
"transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
258
258
|
t ? "opacity-100" : "opacity-0"
|
|
259
259
|
),
|
|
260
|
-
children: /* @__PURE__ */ a(
|
|
260
|
+
children: /* @__PURE__ */ a(K, { id: d, params: e.navParams })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
t ? /* @__PURE__ */ a(
|
|
@@ -306,14 +306,14 @@ function Te(e) {
|
|
|
306
306
|
storageKey: e.storageKey,
|
|
307
307
|
onDropSession: e.onDropChatSession,
|
|
308
308
|
renderPane: (o) => /* @__PURE__ */ a(
|
|
309
|
-
|
|
309
|
+
K,
|
|
310
310
|
{
|
|
311
311
|
id: o.panel ?? i,
|
|
312
312
|
params: o.params ?? e.centerParams
|
|
313
313
|
}
|
|
314
314
|
)
|
|
315
315
|
}
|
|
316
|
-
) : /* @__PURE__ */ a(
|
|
316
|
+
) : /* @__PURE__ */ a(K, { id: i, params: e.centerParams })
|
|
317
317
|
}
|
|
318
318
|
),
|
|
319
319
|
c ? null : /* @__PURE__ */ a(Q, { label: "Collapse chat", hint: "⌘\\", side: "bottom", children: /* @__PURE__ */ a(
|
|
@@ -382,7 +382,7 @@ function Te(e) {
|
|
|
382
382
|
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: "›" })
|
|
383
383
|
}
|
|
384
384
|
) }) : null
|
|
385
|
-
] }) : /* @__PURE__ */ a(
|
|
385
|
+
] }) : /* @__PURE__ */ a(K, { id: l, params: e.surfaceParams })
|
|
386
386
|
}
|
|
387
387
|
),
|
|
388
388
|
n && !c ? /* @__PURE__ */ a(
|
|
@@ -490,7 +490,7 @@ function Me(e, t) {
|
|
|
490
490
|
);
|
|
491
491
|
return [r, d];
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Ee() {
|
|
494
494
|
const [e, t] = V(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
495
495
|
return k(() => {
|
|
496
496
|
const r = () => t(window.innerWidth);
|
|
@@ -529,7 +529,7 @@ function S(e, t) {
|
|
|
529
529
|
const r = e == null ? void 0 : e[t];
|
|
530
530
|
return typeof r == "function" ? r : void 0;
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function E(e, t) {
|
|
533
533
|
return S(e, t);
|
|
534
534
|
}
|
|
535
535
|
function ee() {
|
|
@@ -546,12 +546,12 @@ function fe() {
|
|
|
546
546
|
ee(), window.setTimeout(ee, 320);
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function K({ id: e, params: t }) {
|
|
550
550
|
const r = Le(), { debug: n } = Ae(), d = we(
|
|
551
551
|
r.subscribe,
|
|
552
552
|
r.getSnapshot,
|
|
553
553
|
r.getSnapshot
|
|
554
|
-
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() =>
|
|
554
|
+
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() => Ke(e), [e]);
|
|
555
555
|
return l ? /* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a(xe, { centered: !0 }), children: /* @__PURE__ */ a(
|
|
556
556
|
l,
|
|
557
557
|
{
|
|
@@ -561,7 +561,7 @@ function E({ id: e, params: t }) {
|
|
|
561
561
|
}
|
|
562
562
|
) }) : null;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Ke(e) {
|
|
565
565
|
return {
|
|
566
566
|
id: e,
|
|
567
567
|
title: e,
|
|
@@ -743,10 +743,10 @@ function Ye({
|
|
|
743
743
|
);
|
|
744
744
|
}
|
|
745
745
|
export {
|
|
746
|
-
|
|
746
|
+
Ge as C,
|
|
747
747
|
Je as T,
|
|
748
748
|
Ye as W,
|
|
749
|
-
|
|
749
|
+
Te as b,
|
|
750
750
|
Ue as r,
|
|
751
751
|
Xe as w
|
|
752
752
|
};
|