@hachej/boring-workspace 0.1.35 → 0.1.36
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-CkCxHBDu.js → FileTree-GkaIEJ9n.js} +1 -1
- package/dist/{MarkdownEditor-CtPphEVP.js → MarkdownEditor-DjZZnHcU.js} +1 -1
- package/dist/{WorkspaceLoadingState-Bl-92Dly.js → WorkspaceLoadingState-C664sU-y.js} +12 -13
- package/dist/{WorkspaceProvider-BhRPFy5R.js → WorkspaceProvider-CpK401MG.js} +1847 -1961
- package/dist/agent-tool-CB0RQyx9.d.ts +32 -0
- package/dist/app-front.d.ts +1 -20
- package/dist/app-front.js +396 -388
- package/dist/app-server.d.ts +4 -3
- package/dist/app-server.js +26 -0
- package/dist/{createInMemoryBridge-zb8MpO60.d.ts → createInMemoryBridge-e7QdNLSA.d.ts} +2 -1
- package/dist/plugin.d.ts +65 -1
- package/dist/plugin.js +39 -0
- package/dist/server.d.ts +14 -5
- package/dist/server.js +10 -0
- package/dist/shared.d.ts +2 -1
- package/dist/testing.js +1 -1
- package/dist/{ui-bridge-DFNem0df.d.ts → ui-bridge-LeBuZqfA.d.ts} +1 -32
- package/dist/workspace.css +0 -33
- package/dist/workspace.d.ts +0 -19
- package/dist/workspace.js +5 -5
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as z } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as D, useEffect as A, useMemo as M, useCallback as w, createContext as S, useContext as $ } from "react";
|
|
3
3
|
import { Tree as E } from "react-arborist";
|
|
4
4
|
import { FolderOpenIcon as J, FolderIcon as K, ChevronRightIcon as U, Loader2Icon as V } from "lucide-react";
|
|
5
|
-
import { L as X } from "./WorkspaceProvider-
|
|
5
|
+
import { L as X } from "./WorkspaceProvider-CpK401MG.js";
|
|
6
6
|
import { EmptyState as Y, Input as Z } from "@hachej/boring-ui-kit";
|
|
7
7
|
import { c as N } from "./utils-B6yFEsav.js";
|
|
8
8
|
import { createDragDropManager as y } from "dnd-core";
|
|
@@ -15,7 +15,7 @@ import { TableHeader as gt } from "@tiptap/extension-table-header";
|
|
|
15
15
|
import { TableCell as dt } from "@tiptap/extension-table-cell";
|
|
16
16
|
import ft from "@tiptap/extension-image";
|
|
17
17
|
import { c as S } from "./utils-B6yFEsav.js";
|
|
18
|
-
import { _ as O, aq as V } from "./WorkspaceProvider-
|
|
18
|
+
import { _ as O, aq as V } from "./WorkspaceProvider-CpK401MG.js";
|
|
19
19
|
import { uploadFile as mt } from "@hachej/boring-agent/front";
|
|
20
20
|
import pt from "@tiptap/extension-code-block-lowlight";
|
|
21
21
|
import { createLowlight as ht, common as wt } from "lowlight";
|
|
@@ -3,7 +3,7 @@ import { useState as V, useCallback as v, useMemo as Y, useEffect as C, useRef a
|
|
|
3
3
|
import { IconButton as F, LoadingState as xe, ResizeHandle as pe, Button as Ce, Kbd as ke } 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, aG as Be, a7 as ze, aJ as Re, aK as Q, u as Le, ao as Ae } from "./WorkspaceProvider-
|
|
6
|
+
import { al as Ne, a2 as We, ad as Ie, G as Oe, as as de, aG as Be, a7 as ze, aJ as Re, aK as Q, u as Le, ao as Ae } from "./WorkspaceProvider-CpK401MG.js";
|
|
7
7
|
function Ue(e, t, r = !0) {
|
|
8
8
|
if (!r || typeof window > "u") return t;
|
|
9
9
|
try {
|
|
@@ -85,7 +85,7 @@ function Ge(e = {}) {
|
|
|
85
85
|
}
|
|
86
86
|
function Te(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 = Ke(), [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"), G = S(e.centerParams, "openWorkbench"), ne = S(e.centerParams, "openWorkbenchSources"), ae = S(e.centerParams, "closeWorkbench"), w =
|
|
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"), G = S(e.centerParams, "openWorkbench"), ne = S(e.centerParams, "openWorkbenchSources"), ae = S(e.centerParams, "closeWorkbench"), w = K(e.navParams, "onClose"), f = K(e.surfaceParams, "onClose"), k = K(e.sidebarParams, "onClose"), T = K(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 ? !!k : !!e.onOpenSidebar, z = v(() => {
|
|
98
98
|
var o;
|
|
99
99
|
if (t) {
|
|
100
100
|
w == null || w();
|
|
@@ -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(E, { id: d, params: e.navParams })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
263
|
t ? /* @__PURE__ */ a(
|
|
@@ -305,16 +305,15 @@ function Te(e) {
|
|
|
305
305
|
flashPaneId: e.flashChatPaneId,
|
|
306
306
|
storageKey: e.storageKey,
|
|
307
307
|
onDropSession: e.onDropChatSession,
|
|
308
|
-
engine: e.chatPaneEngine,
|
|
309
308
|
renderPane: (o) => /* @__PURE__ */ a(
|
|
310
|
-
|
|
309
|
+
E,
|
|
311
310
|
{
|
|
312
311
|
id: o.panel ?? i,
|
|
313
312
|
params: o.params ?? e.centerParams
|
|
314
313
|
}
|
|
315
314
|
)
|
|
316
315
|
}
|
|
317
|
-
) : /* @__PURE__ */ a(
|
|
316
|
+
) : /* @__PURE__ */ a(E, { id: i, params: e.centerParams })
|
|
318
317
|
}
|
|
319
318
|
),
|
|
320
319
|
c ? null : /* @__PURE__ */ a(Q, { label: "Collapse chat", hint: "⌘\\", side: "bottom", children: /* @__PURE__ */ a(
|
|
@@ -383,7 +382,7 @@ function Te(e) {
|
|
|
383
382
|
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: "›" })
|
|
384
383
|
}
|
|
385
384
|
) }) : null
|
|
386
|
-
] }) : /* @__PURE__ */ a(
|
|
385
|
+
] }) : /* @__PURE__ */ a(E, { id: l, params: e.surfaceParams })
|
|
387
386
|
}
|
|
388
387
|
),
|
|
389
388
|
n && !c ? /* @__PURE__ */ a(
|
|
@@ -491,7 +490,7 @@ function Me(e, t) {
|
|
|
491
490
|
);
|
|
492
491
|
return [r, d];
|
|
493
492
|
}
|
|
494
|
-
function
|
|
493
|
+
function Ke() {
|
|
495
494
|
const [e, t] = V(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
496
495
|
return C(() => {
|
|
497
496
|
const r = () => t(window.innerWidth);
|
|
@@ -531,7 +530,7 @@ function S(e, t) {
|
|
|
531
530
|
const r = e == null ? void 0 : e[t];
|
|
532
531
|
return typeof r == "function" ? r : void 0;
|
|
533
532
|
}
|
|
534
|
-
function
|
|
533
|
+
function K(e, t) {
|
|
535
534
|
return S(e, t);
|
|
536
535
|
}
|
|
537
536
|
function ee() {
|
|
@@ -548,12 +547,12 @@ function fe() {
|
|
|
548
547
|
ee(), window.setTimeout(ee, 320);
|
|
549
548
|
});
|
|
550
549
|
}
|
|
551
|
-
function
|
|
550
|
+
function E({ id: e, params: t }) {
|
|
552
551
|
const r = Le(), { debug: n } = Ae(), d = we(
|
|
553
552
|
r.subscribe,
|
|
554
553
|
r.getSnapshot,
|
|
555
554
|
r.getSnapshot
|
|
556
|
-
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() =>
|
|
555
|
+
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() => Ee(e), [e]);
|
|
557
556
|
return l ? /* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a(xe, { centered: !0 }), children: /* @__PURE__ */ a(
|
|
558
557
|
l,
|
|
559
558
|
{
|
|
@@ -563,7 +562,7 @@ function K({ id: e, params: t }) {
|
|
|
563
562
|
}
|
|
564
563
|
) }) : null;
|
|
565
564
|
}
|
|
566
|
-
function
|
|
565
|
+
function Ee(e) {
|
|
567
566
|
return {
|
|
568
567
|
id: e,
|
|
569
568
|
title: e,
|