@hachej/boring-workspace 0.1.33 → 0.1.35
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-SmsE0Raq.js → FileTree-CkCxHBDu.js} +1 -1
- package/dist/MarkdownEditor-CtPphEVP.js +549 -0
- package/dist/{WorkspaceLoadingState-BlvZXmFg.js → WorkspaceLoadingState-Bl-92Dly.js} +287 -252
- package/dist/WorkspaceProvider-BhRPFy5R.js +7508 -0
- package/dist/app-front.d.ts +50 -3
- package/dist/app-front.js +893 -756
- package/dist/app-server.d.ts +11 -8
- package/dist/app-server.js +609 -79
- package/dist/boring-workspace.css +1 -1
- package/dist/{createInMemoryBridge-HJopAIbo.d.ts → createInMemoryBridge-zb8MpO60.d.ts} +11 -1
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.js +8 -1
- package/dist/runtime-server.d.ts +47 -0
- package/dist/runtime-server.js +32 -0
- package/dist/server.d.ts +63 -25
- package/dist/server.js +555 -46
- package/dist/testing.js +1 -1
- package/dist/workspace.css +328 -30
- package/dist/workspace.d.ts +68 -2
- package/dist/workspace.js +31 -30
- package/docs/PLUGIN_SYSTEM.md +5 -6
- package/package.json +10 -4
- package/dist/MarkdownEditor-zbp8ezds.js +0 -540
- package/dist/WorkspaceProvider-CuIZx1ua.js +0 -6553
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { IconButton as
|
|
4
|
-
import { ChevronLeft as
|
|
1
|
+
import { jsxs as h, jsx as a, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import { useState as V, useCallback as v, useMemo as Y, useEffect as C, useRef as Z, useSyncExternalStore as we, Suspense as ve } from "react";
|
|
3
|
+
import { IconButton as F, LoadingState as xe, ResizeHandle as pe, Button as Ce, Kbd as ke } from "@hachej/boring-ui-kit";
|
|
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
|
|
7
|
-
function
|
|
8
|
-
if (!
|
|
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-BhRPFy5R.js";
|
|
7
|
+
function Ue(e, t, r = !0) {
|
|
8
|
+
if (!r || typeof window > "u") return t;
|
|
9
9
|
try {
|
|
10
10
|
const n = window.localStorage.getItem(e);
|
|
11
11
|
if (n === "1") return !0;
|
|
@@ -14,66 +14,66 @@ function Fe(e, t, a = !0) {
|
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!(!
|
|
17
|
+
function Xe(e, t, r = !0) {
|
|
18
|
+
if (!(!r || typeof window > "u"))
|
|
19
19
|
try {
|
|
20
20
|
window.localStorage.setItem(e, t ? "1" : "0");
|
|
21
21
|
} catch {
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (!
|
|
24
|
+
function le(e, t, r = !0) {
|
|
25
|
+
if (!r || typeof window > "u") return t;
|
|
26
26
|
try {
|
|
27
27
|
const n = window.localStorage.getItem(e);
|
|
28
28
|
if (n === null) return t;
|
|
29
|
-
const
|
|
30
|
-
return Number.isFinite(
|
|
29
|
+
const d = Number(n);
|
|
30
|
+
return Number.isFinite(d) ? d : t;
|
|
31
31
|
} catch {
|
|
32
32
|
}
|
|
33
33
|
return t;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
if (!(!
|
|
35
|
+
function De(e, t, r = !0) {
|
|
36
|
+
if (!(!r || typeof window > "u"))
|
|
37
37
|
try {
|
|
38
38
|
window.localStorage.setItem(e, String(Math.round(t)));
|
|
39
39
|
} catch {
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Ge(e = {}) {
|
|
43
43
|
const {
|
|
44
44
|
nav: t = "session-list",
|
|
45
|
-
navParams:
|
|
45
|
+
navParams: r,
|
|
46
46
|
center: n = "chat",
|
|
47
|
-
centerParams:
|
|
47
|
+
centerParams: d,
|
|
48
48
|
surface: i,
|
|
49
49
|
surfaceParams: l,
|
|
50
50
|
sidebar: s,
|
|
51
|
-
sidebarParams:
|
|
52
|
-
} = e,
|
|
53
|
-
return t &&
|
|
51
|
+
sidebarParams: p
|
|
52
|
+
} = e, x = [];
|
|
53
|
+
return t && x.push({
|
|
54
54
|
id: "nav",
|
|
55
55
|
position: "left",
|
|
56
56
|
panel: t,
|
|
57
|
-
params:
|
|
57
|
+
params: r,
|
|
58
58
|
locked: !0,
|
|
59
59
|
hideHeader: !0,
|
|
60
60
|
constraints: { minWidth: 60, maxWidth: 60 }
|
|
61
|
-
}),
|
|
61
|
+
}), x.push({
|
|
62
62
|
id: "center",
|
|
63
63
|
position: "center",
|
|
64
64
|
panel: n,
|
|
65
|
-
params:
|
|
65
|
+
params: d,
|
|
66
66
|
hideHeader: !0
|
|
67
|
-
}), s &&
|
|
67
|
+
}), s && x.push({
|
|
68
68
|
id: "sidebar",
|
|
69
69
|
position: "left",
|
|
70
70
|
panel: s,
|
|
71
|
-
params:
|
|
71
|
+
params: p,
|
|
72
72
|
hideHeader: !0,
|
|
73
73
|
collapsible: !0,
|
|
74
74
|
collapsedWidth: 40,
|
|
75
75
|
constraints: { minWidth: 200, maxWidthViewportRatio: 0.5 }
|
|
76
|
-
}), i &&
|
|
76
|
+
}), i && x.push({
|
|
77
77
|
id: "surface",
|
|
78
78
|
position: "right",
|
|
79
79
|
panel: i,
|
|
@@ -81,156 +81,156 @@ function je(e = {}) {
|
|
|
81
81
|
hideHeader: !0,
|
|
82
82
|
dynamic: !0,
|
|
83
83
|
placeholder: "empty"
|
|
84
|
-
}), { version: "2.0", groups:
|
|
84
|
+
}), { version: "2.0", groups: x };
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
const t = e.nav !== null,
|
|
86
|
+
function Te(e) {
|
|
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 = Ee(), [p, x] = ue(
|
|
89
89
|
e.storageKey ? `${e.storageKey}:drawerWidth` : void 0,
|
|
90
90
|
260
|
|
91
|
-
), [
|
|
91
|
+
), [me, ge] = ue(
|
|
92
92
|
e.storageKey ? `${e.storageKey}:surfaceWidth` : void 0,
|
|
93
93
|
680
|
|
94
|
-
), [
|
|
94
|
+
), [c, g] = Me(
|
|
95
95
|
e.storageKey ? `${e.storageKey}:chatCollapsed` : void 0,
|
|
96
96
|
!1
|
|
97
|
-
), [
|
|
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 = E(e.navParams, "onClose"), f = E(e.surfaceParams, "onClose"), k = E(e.sidebarParams, "onClose"), T = 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 ? !!k : !!e.onOpenSidebar, z = v(() => {
|
|
98
98
|
var o;
|
|
99
99
|
if (t) {
|
|
100
100
|
w == null || w();
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
(o = e.onOpenNav) == null || o.call(e);
|
|
104
|
-
}, [w, t, e.onOpenNav]),
|
|
104
|
+
}, [w, t, e.onOpenNav]), R = v(() => {
|
|
105
105
|
var o;
|
|
106
106
|
if (n) {
|
|
107
107
|
f == null || f();
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
(o = e.onOpenSurface) == null || o.call(e);
|
|
111
|
-
}, [f, e.onOpenSurface, n]),
|
|
111
|
+
}, [f, e.onOpenSurface, n]), L = v(() => {
|
|
112
112
|
var o;
|
|
113
|
-
if (
|
|
114
|
-
|
|
113
|
+
if (y) {
|
|
114
|
+
k == null || k();
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(o = e.onOpenSidebar) == null || o.call(e);
|
|
118
|
-
}, [
|
|
119
|
-
|
|
120
|
-
}, [
|
|
118
|
+
}, [k, e.onOpenSidebar, y]), A = v(() => {
|
|
119
|
+
c && g(!1), t && (w == null || w()), n && (f == null || f()), ee(), fe();
|
|
120
|
+
}, [c, w, f, t, g, n]), D = v(() => {
|
|
121
121
|
g((o) => {
|
|
122
|
-
var
|
|
123
|
-
const
|
|
124
|
-
return
|
|
125
|
-
}),
|
|
122
|
+
var N;
|
|
123
|
+
const u = !o;
|
|
124
|
+
return u && !n && ((N = e.onOpenSurface) == null || N.call(e)), u;
|
|
125
|
+
}), W(!1);
|
|
126
126
|
}, [g, n, e.onOpenSurface]);
|
|
127
|
-
|
|
128
|
-
shortcuts:
|
|
127
|
+
Ie({
|
|
128
|
+
shortcuts: Y(() => {
|
|
129
129
|
const o = [];
|
|
130
|
-
return
|
|
131
|
-
}, [
|
|
132
|
-
}),
|
|
133
|
-
const o = "workspace:chat-layout",
|
|
134
|
-
return b.unregisterByPluginId(o), b.unregisterByPluginId(
|
|
130
|
+
return I && o.push({ key: "1", mod: !0, handler: z }), O && o.push({ key: "2", mod: !0, handler: R }), B && o.push({ key: "3", mod: !0, allowInEditable: !0, handler: L }), i === "chat" && (o.push({ key: "Escape", allowInEditable: !0, handler: A }), o.push({ key: "\\", mod: !0, allowInEditable: !0, handler: D })), o;
|
|
131
|
+
}, [I, B, O, i, A, D, z, L, R])
|
|
132
|
+
}), C(() => {
|
|
133
|
+
const o = "workspace:chat-layout", u = "agent:chat-layout";
|
|
134
|
+
return b.unregisterByPluginId(o), b.unregisterByPluginId(u), b.registerCommand({
|
|
135
135
|
id: "workspace:open-session-history",
|
|
136
136
|
title: t ? "Close Session History" : "Open Session History",
|
|
137
137
|
keywords: ["sessions", "history", "drawer", t ? "close" : "open"],
|
|
138
138
|
shortcut: "⌘1",
|
|
139
139
|
pluginId: o,
|
|
140
|
-
when: () =>
|
|
141
|
-
run:
|
|
140
|
+
when: () => I,
|
|
141
|
+
run: z
|
|
142
142
|
}), b.registerCommand({
|
|
143
143
|
id: "workspace:open-workbench",
|
|
144
144
|
title: n ? "Close Workbench" : "Open Workbench",
|
|
145
145
|
keywords: ["surface", "artifacts", "sources", "workbench", n ? "close" : "open"],
|
|
146
146
|
shortcut: "⌘2",
|
|
147
147
|
pluginId: o,
|
|
148
|
-
when: () =>
|
|
149
|
-
run:
|
|
148
|
+
when: () => O,
|
|
149
|
+
run: R
|
|
150
150
|
}), b.registerCommand({
|
|
151
151
|
id: "workspace:toggle-workbench-left-panel",
|
|
152
|
-
title:
|
|
153
|
-
keywords: ["left", "sidebar", "tabs", "workbench",
|
|
152
|
+
title: y ? "Close Workbench Left Panel" : "Open Workbench Left Panel",
|
|
153
|
+
keywords: ["left", "sidebar", "tabs", "workbench", y ? "close" : "open"],
|
|
154
154
|
shortcut: "⌘3",
|
|
155
155
|
pluginId: o,
|
|
156
|
-
when: () =>
|
|
157
|
-
run:
|
|
156
|
+
when: () => B,
|
|
157
|
+
run: L
|
|
158
158
|
}), i === "chat" && b.registerCommand({
|
|
159
159
|
id: "agent:focus-chat",
|
|
160
160
|
title: "Focus Chat",
|
|
161
161
|
keywords: ["agent", "chat", "prompt", "composer", "input", "focus"],
|
|
162
|
-
pluginId:
|
|
163
|
-
run:
|
|
164
|
-
}),
|
|
162
|
+
pluginId: u,
|
|
163
|
+
run: A
|
|
164
|
+
}), T && b.registerCommand({
|
|
165
165
|
id: "agent:new-chat",
|
|
166
166
|
title: "New Chat",
|
|
167
167
|
keywords: ["agent", "chat", "session", "new"],
|
|
168
|
-
pluginId:
|
|
169
|
-
run:
|
|
168
|
+
pluginId: u,
|
|
169
|
+
run: T
|
|
170
170
|
}), () => {
|
|
171
|
-
b.unregisterByPluginId(o), b.unregisterByPluginId(
|
|
171
|
+
b.unregisterByPluginId(o), b.unregisterByPluginId(u);
|
|
172
172
|
};
|
|
173
173
|
}, [
|
|
174
174
|
b,
|
|
175
175
|
t,
|
|
176
176
|
i,
|
|
177
|
-
|
|
177
|
+
r,
|
|
178
178
|
n,
|
|
179
179
|
e.navParams,
|
|
180
180
|
e.surfaceParams,
|
|
181
181
|
e.onOpenNav,
|
|
182
182
|
e.onOpenSurface,
|
|
183
183
|
e.onOpenSidebar,
|
|
184
|
-
|
|
185
|
-
P,
|
|
184
|
+
I,
|
|
186
185
|
O,
|
|
186
|
+
B,
|
|
187
187
|
w,
|
|
188
188
|
f,
|
|
189
|
+
k,
|
|
190
|
+
T,
|
|
191
|
+
A,
|
|
189
192
|
y,
|
|
190
|
-
U,
|
|
191
|
-
R,
|
|
192
|
-
C,
|
|
193
|
-
I,
|
|
194
193
|
z,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
R,
|
|
195
|
+
L
|
|
196
|
+
]), C(() => {
|
|
197
|
+
if (!U || !X || !G) return;
|
|
198
198
|
const o = {
|
|
199
|
-
surface:
|
|
200
|
-
isWorkbenchOpen:
|
|
201
|
-
openWorkbench:
|
|
202
|
-
openWorkbenchSources:
|
|
203
|
-
closeWorkbench:
|
|
199
|
+
surface: U,
|
|
200
|
+
isWorkbenchOpen: X,
|
|
201
|
+
openWorkbench: G,
|
|
202
|
+
openWorkbenchSources: ne,
|
|
203
|
+
closeWorkbench: ae
|
|
204
204
|
};
|
|
205
|
-
return
|
|
206
|
-
|
|
205
|
+
return Oe.on(de.uiCommand, ({ command: u }) => {
|
|
206
|
+
Be(u, o);
|
|
207
207
|
});
|
|
208
|
-
}, [
|
|
209
|
-
|
|
210
|
-
}),
|
|
211
|
-
if (!
|
|
212
|
-
|
|
208
|
+
}, [U, X, G, ne, ae]), ze(de.agentData, () => {
|
|
209
|
+
c && W(!0);
|
|
210
|
+
}), C(() => {
|
|
211
|
+
if (!c) {
|
|
212
|
+
W(!1);
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
|
-
|
|
216
|
-
}, [
|
|
217
|
-
const _ = (
|
|
218
|
-
|
|
219
|
-
const o =
|
|
220
|
-
|
|
221
|
-
}, [_,
|
|
222
|
-
const
|
|
223
|
-
return
|
|
224
|
-
const o =
|
|
225
|
-
|
|
226
|
-
}, [n,
|
|
215
|
+
j.length > 0 && (g(!1), W(!1), fe());
|
|
216
|
+
}, [j.length, c, g]);
|
|
217
|
+
const _ = e.activeChatPaneId ?? ((se = e.centerParams) == null ? void 0 : se.sessionId), re = Z(_);
|
|
218
|
+
C(() => {
|
|
219
|
+
const o = re.current;
|
|
220
|
+
re.current = _, o !== void 0 && _ !== void 0 && _ !== o && c && g(!1);
|
|
221
|
+
}, [_, c, g]);
|
|
222
|
+
const oe = Z(n);
|
|
223
|
+
return C(() => {
|
|
224
|
+
const o = oe.current;
|
|
225
|
+
oe.current = n, o && !n && c && g(!1);
|
|
226
|
+
}, [n, c, g]), /* @__PURE__ */ h(
|
|
227
227
|
"div",
|
|
228
228
|
{
|
|
229
229
|
"data-boring-workspace": "",
|
|
230
230
|
"data-boring-workspace-part": "shell",
|
|
231
231
|
className: m("relative flex h-full min-h-0 w-full overflow-hidden bg-background", e.className),
|
|
232
232
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ h(
|
|
234
234
|
"aside",
|
|
235
235
|
{
|
|
236
236
|
"data-boring-workspace-part": "session-drawer",
|
|
@@ -243,13 +243,13 @@ function $e(e) {
|
|
|
243
243
|
t && "border-r border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
244
244
|
),
|
|
245
245
|
style: {
|
|
246
|
-
width: t ?
|
|
247
|
-
minWidth: t ?
|
|
248
|
-
maxWidth: t ?
|
|
246
|
+
width: t ? $ : 0,
|
|
247
|
+
minWidth: t ? $ : 0,
|
|
248
|
+
maxWidth: t ? $ : 0,
|
|
249
249
|
willChange: "width"
|
|
250
250
|
},
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ a(
|
|
253
253
|
"div",
|
|
254
254
|
{
|
|
255
255
|
className: m(
|
|
@@ -257,64 +257,85 @@ function $e(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__ */
|
|
260
|
+
children: /* @__PURE__ */ a(K, { id: d, params: e.navParams })
|
|
261
261
|
}
|
|
262
262
|
),
|
|
263
|
-
t ? /* @__PURE__ */
|
|
264
|
-
|
|
263
|
+
t ? /* @__PURE__ */ a(
|
|
264
|
+
he,
|
|
265
265
|
{
|
|
266
266
|
side: "drawer-right",
|
|
267
267
|
ariaLabel: "Resize sessions drawer",
|
|
268
|
-
onResize: (o) =>
|
|
268
|
+
onResize: (o) => x((u) => M(u + o, 200, 360))
|
|
269
269
|
}
|
|
270
270
|
) : null
|
|
271
271
|
]
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ h("div", { className: "relative flex h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-background", children: [
|
|
275
|
+
/* @__PURE__ */ h(
|
|
276
276
|
"main",
|
|
277
277
|
{
|
|
278
278
|
"data-boring-workspace-part": "chat-stage",
|
|
279
|
-
"data-boring-state":
|
|
280
|
-
"aria-label":
|
|
281
|
-
"aria-hidden":
|
|
279
|
+
"data-boring-state": c ? "collapsed" : "expanded",
|
|
280
|
+
"aria-label": c ? "Collapsed chat" : "Chat",
|
|
281
|
+
"aria-hidden": c,
|
|
282
282
|
className: m(
|
|
283
283
|
"relative h-full min-h-0 min-w-0 overflow-hidden bg-background",
|
|
284
284
|
// Animate flex-grow (not just width) so the chat slides open/closed
|
|
285
285
|
// like the fixed-width nav/workbench panes instead of snapping.
|
|
286
286
|
"transition-[flex-grow,flex-basis,width,min-width,max-width] duration-[280ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
287
|
-
|
|
287
|
+
c ? "min-w-0 flex-[0_0_0px]" : "flex-1 border-r border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
288
288
|
),
|
|
289
289
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ a(
|
|
291
291
|
"div",
|
|
292
292
|
{
|
|
293
293
|
className: m(
|
|
294
294
|
"h-full min-h-0 overflow-hidden",
|
|
295
295
|
"transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
296
|
-
|
|
296
|
+
c ? "opacity-0" : "opacity-100"
|
|
297
297
|
),
|
|
298
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: J ? /* @__PURE__ */ a(
|
|
299
|
+
Re,
|
|
300
|
+
{
|
|
301
|
+
panes: P,
|
|
302
|
+
activePaneId: e.activeChatPaneId,
|
|
303
|
+
onActivePaneChange: e.onActiveChatPaneChange,
|
|
304
|
+
onClosePane: e.onCloseChatPane,
|
|
305
|
+
flashPaneId: e.flashChatPaneId,
|
|
306
|
+
storageKey: e.storageKey,
|
|
307
|
+
onDropSession: e.onDropChatSession,
|
|
308
|
+
engine: e.chatPaneEngine,
|
|
309
|
+
renderPane: (o) => /* @__PURE__ */ a(
|
|
310
|
+
K,
|
|
311
|
+
{
|
|
312
|
+
id: o.panel ?? i,
|
|
313
|
+
params: o.params ?? e.centerParams
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
) : /* @__PURE__ */ a(K, { id: i, params: e.centerParams })
|
|
299
318
|
}
|
|
300
319
|
),
|
|
301
|
-
|
|
302
|
-
|
|
320
|
+
c ? null : /* @__PURE__ */ a(Q, { label: "Collapse chat", hint: "⌘\\", side: "bottom", children: /* @__PURE__ */ a(
|
|
321
|
+
F,
|
|
303
322
|
{
|
|
304
323
|
type: "button",
|
|
305
324
|
variant: "ghost",
|
|
306
325
|
size: "icon-xs",
|
|
307
|
-
onClick:
|
|
308
|
-
className:
|
|
326
|
+
onClick: D,
|
|
327
|
+
className: m(
|
|
328
|
+
"absolute right-2 z-30 rounded-full bg-background/80 text-muted-foreground shadow-sm backdrop-blur hover:bg-muted hover:text-foreground",
|
|
329
|
+
J && P.length > 1 ? "bottom-2" : "top-2"
|
|
330
|
+
),
|
|
309
331
|
"aria-label": "Collapse chat",
|
|
310
|
-
|
|
311
|
-
children: /* @__PURE__ */ r(ve, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
332
|
+
children: /* @__PURE__ */ a(ye, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
312
333
|
}
|
|
313
|
-
)
|
|
334
|
+
) })
|
|
314
335
|
]
|
|
315
336
|
}
|
|
316
337
|
),
|
|
317
|
-
|
|
338
|
+
r ? /* @__PURE__ */ h(
|
|
318
339
|
"aside",
|
|
319
340
|
{
|
|
320
341
|
"data-boring-workspace-part": "workbench",
|
|
@@ -325,18 +346,18 @@ function $e(e) {
|
|
|
325
346
|
"relative h-full min-h-0 overflow-hidden bg-background",
|
|
326
347
|
// When chat is collapsed the workbench grows to fill the freed
|
|
327
348
|
// space (full width); otherwise it's a fixed-width side panel.
|
|
328
|
-
|
|
349
|
+
c && n ? "min-w-0 flex-1" : "shrink-0",
|
|
329
350
|
"transition-[flex-grow,flex-basis,width,min-width,max-width] duration-[280ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
330
351
|
n && "border-l border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
331
352
|
),
|
|
332
|
-
style:
|
|
333
|
-
width: n ?
|
|
334
|
-
minWidth: n ?
|
|
335
|
-
maxWidth: n ?
|
|
353
|
+
style: c && n ? { willChange: "width" } : {
|
|
354
|
+
width: n ? q : 0,
|
|
355
|
+
minWidth: n ? q : 0,
|
|
356
|
+
maxWidth: n ? q : 0,
|
|
336
357
|
willChange: "width"
|
|
337
358
|
},
|
|
338
359
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ a(
|
|
340
361
|
"div",
|
|
341
362
|
{
|
|
342
363
|
className: m(
|
|
@@ -346,12 +367,12 @@ function $e(e) {
|
|
|
346
367
|
// When the chat is collapsed the workbench fills the full width
|
|
347
368
|
// and the left-edge "expand chat" float button would sit on top
|
|
348
369
|
// of the filetree — inset the content to leave a clear gutter.
|
|
349
|
-
|
|
370
|
+
c && n && !t && "pl-14"
|
|
350
371
|
),
|
|
351
|
-
children: e.surfaceOverlay ? /* @__PURE__ */
|
|
372
|
+
children: e.surfaceOverlay ? /* @__PURE__ */ h("div", { className: "relative h-full min-h-0", children: [
|
|
352
373
|
e.surfaceOverlay,
|
|
353
|
-
f ? /* @__PURE__ */
|
|
354
|
-
|
|
374
|
+
f ? /* @__PURE__ */ a(Q, { label: "Close workbench", hint: "⌘2", side: "left", children: /* @__PURE__ */ a(
|
|
375
|
+
F,
|
|
355
376
|
{
|
|
356
377
|
type: "button",
|
|
357
378
|
variant: "ghost",
|
|
@@ -359,27 +380,26 @@ function $e(e) {
|
|
|
359
380
|
onClick: f,
|
|
360
381
|
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",
|
|
361
382
|
"aria-label": "Close workbench",
|
|
362
|
-
|
|
363
|
-
children: /* @__PURE__ */ r("span", { "aria-hidden": "true", children: "›" })
|
|
383
|
+
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: "›" })
|
|
364
384
|
}
|
|
365
|
-
) : null
|
|
366
|
-
] }) : /* @__PURE__ */
|
|
385
|
+
) }) : null
|
|
386
|
+
] }) : /* @__PURE__ */ a(K, { id: l, params: e.surfaceParams })
|
|
367
387
|
}
|
|
368
388
|
),
|
|
369
|
-
n && !
|
|
370
|
-
|
|
389
|
+
n && !c ? /* @__PURE__ */ a(
|
|
390
|
+
he,
|
|
371
391
|
{
|
|
372
392
|
side: "surface-left",
|
|
373
393
|
ariaLabel: "Resize workbench",
|
|
374
|
-
onResize: (o) =>
|
|
394
|
+
onResize: (o) => ge((u) => M(u - o, 480, te))
|
|
375
395
|
}
|
|
376
396
|
) : null
|
|
377
397
|
]
|
|
378
398
|
}
|
|
379
399
|
) : null
|
|
380
400
|
] }),
|
|
381
|
-
!t && e.onOpenNav ? /* @__PURE__ */
|
|
382
|
-
|
|
401
|
+
!t && e.onOpenNav ? /* @__PURE__ */ a(
|
|
402
|
+
H,
|
|
383
403
|
{
|
|
384
404
|
side: "left",
|
|
385
405
|
icon: "sessions",
|
|
@@ -388,20 +408,34 @@ function $e(e) {
|
|
|
388
408
|
hint: "⌘1"
|
|
389
409
|
}
|
|
390
410
|
) : null,
|
|
391
|
-
|
|
392
|
-
|
|
411
|
+
!c && !t && J && e.onCreateChatPaneAfter ? /* @__PURE__ */ a(
|
|
412
|
+
H,
|
|
413
|
+
{
|
|
414
|
+
side: "left",
|
|
415
|
+
icon: "plus",
|
|
416
|
+
onClick: () => {
|
|
417
|
+
var u, N;
|
|
418
|
+
const o = e.activeChatPaneId ?? ((u = P[P.length - 1]) == null ? void 0 : u.id);
|
|
419
|
+
o && ((N = e.onCreateChatPaneAfter) == null || N.call(e, o));
|
|
420
|
+
},
|
|
421
|
+
label: "New chat",
|
|
422
|
+
stackIndex: e.onOpenNav ? 1 : 0
|
|
423
|
+
}
|
|
424
|
+
) : null,
|
|
425
|
+
c ? /* @__PURE__ */ a(
|
|
426
|
+
H,
|
|
393
427
|
{
|
|
394
428
|
side: "left",
|
|
395
429
|
icon: "chat",
|
|
396
|
-
onClick:
|
|
430
|
+
onClick: D,
|
|
397
431
|
label: "Expand chat",
|
|
398
432
|
hint: "⌘\\\\",
|
|
399
433
|
stackIndex: 1,
|
|
400
|
-
pulse:
|
|
434
|
+
pulse: be || j.length > 0
|
|
401
435
|
}
|
|
402
436
|
) : null,
|
|
403
|
-
!n && e.onOpenSurface ? /* @__PURE__ */
|
|
404
|
-
|
|
437
|
+
!n && e.onOpenSurface ? /* @__PURE__ */ a(
|
|
438
|
+
H,
|
|
405
439
|
{
|
|
406
440
|
side: "right",
|
|
407
441
|
icon: "workbench",
|
|
@@ -415,30 +449,30 @@ function $e(e) {
|
|
|
415
449
|
}
|
|
416
450
|
);
|
|
417
451
|
}
|
|
418
|
-
function
|
|
419
|
-
return Math.max(t, Math.min(
|
|
452
|
+
function M(e, t, r) {
|
|
453
|
+
return Math.max(t, Math.min(r, e));
|
|
420
454
|
}
|
|
421
|
-
function
|
|
422
|
-
const [
|
|
423
|
-
() => e ?
|
|
455
|
+
function ue(e, t) {
|
|
456
|
+
const [r, n] = V(
|
|
457
|
+
() => e ? le(e, t) : t
|
|
424
458
|
);
|
|
425
|
-
|
|
426
|
-
n(e ?
|
|
459
|
+
C(() => {
|
|
460
|
+
n(e ? le(e, t) : t);
|
|
427
461
|
}, [e, t]);
|
|
428
|
-
const
|
|
462
|
+
const d = v(
|
|
429
463
|
(i) => {
|
|
430
464
|
n((l) => {
|
|
431
465
|
const s = typeof i == "function" ? i(l) : i;
|
|
432
|
-
return e &&
|
|
466
|
+
return e && De(e, s), s;
|
|
433
467
|
});
|
|
434
468
|
},
|
|
435
469
|
[e]
|
|
436
470
|
);
|
|
437
|
-
return [
|
|
471
|
+
return [r, d];
|
|
438
472
|
}
|
|
439
|
-
function
|
|
440
|
-
const [
|
|
441
|
-
|
|
473
|
+
function Me(e, t) {
|
|
474
|
+
const [r, n] = V(() => !e || typeof window > "u" ? t : window.localStorage.getItem(e) === "1");
|
|
475
|
+
C(() => {
|
|
442
476
|
if (!e || typeof window > "u") {
|
|
443
477
|
n(t);
|
|
444
478
|
return;
|
|
@@ -446,7 +480,7 @@ function Be(e, t) {
|
|
|
446
480
|
const i = window.localStorage.getItem(e);
|
|
447
481
|
n(i == null ? t : i === "1");
|
|
448
482
|
}, [e, t]);
|
|
449
|
-
const
|
|
483
|
+
const d = v(
|
|
450
484
|
(i) => {
|
|
451
485
|
n((l) => {
|
|
452
486
|
const s = typeof i == "function" ? i(l) : i;
|
|
@@ -455,31 +489,31 @@ function Be(e, t) {
|
|
|
455
489
|
},
|
|
456
490
|
[e]
|
|
457
491
|
);
|
|
458
|
-
return [
|
|
492
|
+
return [r, d];
|
|
459
493
|
}
|
|
460
|
-
function
|
|
461
|
-
const [e, t] =
|
|
462
|
-
return
|
|
463
|
-
const
|
|
464
|
-
return window.addEventListener("resize",
|
|
494
|
+
function Ee() {
|
|
495
|
+
const [e, t] = V(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
496
|
+
return C(() => {
|
|
497
|
+
const r = () => t(window.innerWidth);
|
|
498
|
+
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
465
499
|
}, []), e;
|
|
466
500
|
}
|
|
467
|
-
function
|
|
468
|
-
const n =
|
|
501
|
+
function he({ side: e, ariaLabel: t, onResize: r }) {
|
|
502
|
+
const n = Z(null), d = v((s) => {
|
|
469
503
|
s.preventDefault(), n.current = s.clientX, s.currentTarget.setPointerCapture(s.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
470
|
-
}, []), i =
|
|
504
|
+
}, []), i = v((s) => {
|
|
471
505
|
if (n.current === null) return;
|
|
472
|
-
const
|
|
473
|
-
n.current = s.clientX,
|
|
474
|
-
}, [
|
|
506
|
+
const p = s.clientX - n.current;
|
|
507
|
+
n.current = s.clientX, r(p);
|
|
508
|
+
}, [r]), l = v((s) => {
|
|
475
509
|
n.current !== null && (n.current = null, s.currentTarget.releasePointerCapture(s.pointerId), document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
476
510
|
}, []);
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
511
|
+
return /* @__PURE__ */ a(
|
|
512
|
+
pe,
|
|
479
513
|
{
|
|
480
514
|
"aria-label": t,
|
|
481
515
|
orientation: "vertical",
|
|
482
|
-
onResizeStart:
|
|
516
|
+
onResizeStart: d,
|
|
483
517
|
onPointerMove: i,
|
|
484
518
|
onPointerUp: l,
|
|
485
519
|
onPointerCancel: l,
|
|
@@ -494,31 +528,33 @@ function ce({ side: e, ariaLabel: t, onResize: a }) {
|
|
|
494
528
|
);
|
|
495
529
|
}
|
|
496
530
|
function S(e, t) {
|
|
497
|
-
const
|
|
498
|
-
return typeof
|
|
531
|
+
const r = e == null ? void 0 : e[t];
|
|
532
|
+
return typeof r == "function" ? r : void 0;
|
|
499
533
|
}
|
|
500
|
-
function
|
|
534
|
+
function E(e, t) {
|
|
501
535
|
return S(e, t);
|
|
502
536
|
}
|
|
503
|
-
function
|
|
537
|
+
function ee() {
|
|
504
538
|
if (typeof document > "u") return;
|
|
505
|
-
const
|
|
539
|
+
const r = (document.querySelector(
|
|
540
|
+
'[data-boring-workspace-part="chat-pane"][data-boring-state="active"]'
|
|
541
|
+
) ?? document).querySelector(
|
|
506
542
|
'[data-boring-agent] textarea[name="message"], textarea[name="message"]'
|
|
507
543
|
);
|
|
508
|
-
|
|
544
|
+
r == null || r.focus();
|
|
509
545
|
}
|
|
510
|
-
function
|
|
546
|
+
function fe() {
|
|
511
547
|
typeof window > "u" || window.requestAnimationFrame(() => {
|
|
512
|
-
|
|
548
|
+
ee(), window.setTimeout(ee, 320);
|
|
513
549
|
});
|
|
514
550
|
}
|
|
515
|
-
function
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
), l =
|
|
521
|
-
return l ? /* @__PURE__ */
|
|
551
|
+
function K({ id: e, params: t }) {
|
|
552
|
+
const r = Le(), { debug: n } = Ae(), d = we(
|
|
553
|
+
r.subscribe,
|
|
554
|
+
r.getSnapshot,
|
|
555
|
+
r.getSnapshot
|
|
556
|
+
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() => Ke(e), [e]);
|
|
557
|
+
return l ? /* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a(xe, { centered: !0 }), children: /* @__PURE__ */ a(
|
|
522
558
|
l,
|
|
523
559
|
{
|
|
524
560
|
params: { ...t, debug: n },
|
|
@@ -527,7 +563,7 @@ function X({ id: e, params: t }) {
|
|
|
527
563
|
}
|
|
528
564
|
) }) : null;
|
|
529
565
|
}
|
|
530
|
-
function
|
|
566
|
+
function Ke(e) {
|
|
531
567
|
return {
|
|
532
568
|
id: e,
|
|
533
569
|
title: e,
|
|
@@ -563,56 +599,55 @@ function Le(e) {
|
|
|
563
599
|
} })
|
|
564
600
|
};
|
|
565
601
|
}
|
|
566
|
-
function
|
|
602
|
+
function H({
|
|
567
603
|
side: e,
|
|
568
604
|
icon: t,
|
|
569
|
-
onClick:
|
|
605
|
+
onClick: r,
|
|
570
606
|
label: n,
|
|
571
|
-
hint:
|
|
607
|
+
hint: d,
|
|
572
608
|
bottomOffset: i,
|
|
573
609
|
stackIndex: l = 0,
|
|
574
610
|
pulse: s = !1
|
|
575
611
|
}) {
|
|
576
|
-
const
|
|
577
|
-
return /* @__PURE__ */
|
|
578
|
-
|
|
612
|
+
const p = e === "right" && i !== void 0, x = l * 44;
|
|
613
|
+
return /* @__PURE__ */ a(Q, { label: n, hint: d, side: e === "left" ? "right" : "left", children: /* @__PURE__ */ a(
|
|
614
|
+
F,
|
|
579
615
|
{
|
|
580
616
|
type: "button",
|
|
581
617
|
variant: "ghost",
|
|
582
618
|
size: "icon-sm",
|
|
583
|
-
onClick:
|
|
619
|
+
onClick: r,
|
|
584
620
|
"aria-label": n,
|
|
585
|
-
title: c ? `${n} (${c})` : n,
|
|
586
621
|
className: m(
|
|
587
622
|
"absolute z-30 h-9 w-9 gap-0.5 rounded-lg bg-background text-muted-foreground",
|
|
588
623
|
e === "left" ? "left-2" : "right-2",
|
|
589
|
-
|
|
624
|
+
p ? "hover:-translate-y-0.5" : "top-1/2 hover:-translate-y-[1px]",
|
|
590
625
|
"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)]",
|
|
591
626
|
"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)]",
|
|
592
627
|
"focus-visible:ring-ring/40"
|
|
593
628
|
),
|
|
594
|
-
style:
|
|
595
|
-
children: t === "sessions" ? /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
] }) : t === "chat" ? /* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
s ? /* @__PURE__ */
|
|
601
|
-
] }) : /* @__PURE__ */
|
|
629
|
+
style: p ? { bottom: i } : { transform: `translateY(calc(-50% - ${x}px))` },
|
|
630
|
+
children: t === "sessions" ? /* @__PURE__ */ h("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
631
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
632
|
+
/* @__PURE__ */ a("path", { d: "M12 7v5l3.2 2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
|
|
633
|
+
] }) : t === "chat" ? /* @__PURE__ */ h("span", { className: "relative flex items-center justify-center", children: [
|
|
634
|
+
/* @__PURE__ */ a(Se, { className: "h-[15px] w-[15px]", strokeWidth: 1.8, "aria-hidden": "true" }),
|
|
635
|
+
s ? /* @__PURE__ */ a("span", { className: "absolute -right-1.5 -top-1.5 h-2 w-2 rounded-full bg-[color:var(--accent)]", "aria-hidden": "true" }) : null
|
|
636
|
+
] }) : t === "plus" ? /* @__PURE__ */ a("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) }) : /* @__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" }) })
|
|
602
637
|
}
|
|
603
|
-
);
|
|
638
|
+
) });
|
|
604
639
|
}
|
|
605
|
-
function
|
|
640
|
+
function Je({
|
|
606
641
|
appTitle: e = "Boring",
|
|
607
642
|
sessionTitle: t,
|
|
608
|
-
onCommandPalette:
|
|
643
|
+
onCommandPalette: r,
|
|
609
644
|
onNewChat: n,
|
|
610
|
-
topBarLeft:
|
|
645
|
+
topBarLeft: d,
|
|
611
646
|
topBarRight: i,
|
|
612
647
|
className: l
|
|
613
648
|
}) {
|
|
614
649
|
const s = i ?? null;
|
|
615
|
-
return /* @__PURE__ */
|
|
650
|
+
return /* @__PURE__ */ h(
|
|
616
651
|
"header",
|
|
617
652
|
{
|
|
618
653
|
"data-boring-workspace-part": "topbar",
|
|
@@ -623,8 +658,8 @@ function Ue({
|
|
|
623
658
|
),
|
|
624
659
|
"aria-label": "App top bar",
|
|
625
660
|
children: [
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 leading-none", children: d ?? /* @__PURE__ */ h(ce, { children: [
|
|
662
|
+
/* @__PURE__ */ a(
|
|
628
663
|
"span",
|
|
629
664
|
{
|
|
630
665
|
"aria-hidden": "true",
|
|
@@ -632,32 +667,32 @@ function Ue({
|
|
|
632
667
|
children: ((e == null ? void 0 : e[0]) ?? "B").toUpperCase()
|
|
633
668
|
}
|
|
634
669
|
),
|
|
635
|
-
t ? /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
] }) : /* @__PURE__ */
|
|
670
|
+
t ? /* @__PURE__ */ h(ce, { children: [
|
|
671
|
+
/* @__PURE__ */ a("span", { className: "shrink-0 text-[13px] font-medium leading-none tracking-tight text-foreground/65", children: e }),
|
|
672
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "text-[13px] leading-none text-muted-foreground/45", children: "·" }),
|
|
673
|
+
/* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: t })
|
|
674
|
+
] }) : /* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: e })
|
|
640
675
|
] }) }),
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
|
|
676
|
+
/* @__PURE__ */ h(
|
|
677
|
+
Ce,
|
|
643
678
|
{
|
|
644
679
|
type: "button",
|
|
645
680
|
variant: "ghost",
|
|
646
681
|
size: "sm",
|
|
647
|
-
onClick:
|
|
682
|
+
onClick: r,
|
|
648
683
|
className: "group h-7 gap-1.5 px-2 text-[13px] leading-none text-muted-foreground/75 hover:bg-muted/70 hover:text-foreground focus-visible:text-foreground",
|
|
649
684
|
"aria-label": "Search catalogs and commands",
|
|
650
685
|
title: "Command palette (⌘K)",
|
|
651
686
|
children: [
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ a(Pe, { className: "h-3.5 w-3.5 shrink-0 opacity-80", strokeWidth: 1.75 }),
|
|
688
|
+
/* @__PURE__ */ a("span", { className: "font-normal tracking-tight", children: "Search" }),
|
|
689
|
+
/* @__PURE__ */ a(ke, { className: "ml-0.5 bg-muted/40 leading-none shadow-none", children: "⌘K" })
|
|
655
690
|
]
|
|
656
691
|
}
|
|
657
692
|
),
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
n && /* @__PURE__ */
|
|
660
|
-
|
|
693
|
+
/* @__PURE__ */ h("div", { className: "flex flex-1 shrink-0 items-center justify-end gap-1", children: [
|
|
694
|
+
n && /* @__PURE__ */ a(
|
|
695
|
+
F,
|
|
661
696
|
{
|
|
662
697
|
type: "button",
|
|
663
698
|
variant: "ghost",
|
|
@@ -665,7 +700,7 @@ function Ue({
|
|
|
665
700
|
onClick: n,
|
|
666
701
|
"aria-label": "New chat",
|
|
667
702
|
title: "New chat",
|
|
668
|
-
children: /* @__PURE__ */
|
|
703
|
+
children: /* @__PURE__ */ a(_e, { className: "h-4 w-4" })
|
|
669
704
|
}
|
|
670
705
|
),
|
|
671
706
|
s
|
|
@@ -674,14 +709,14 @@ function Ue({
|
|
|
674
709
|
}
|
|
675
710
|
);
|
|
676
711
|
}
|
|
677
|
-
function
|
|
712
|
+
function Ye({
|
|
678
713
|
title: e = "Loading workspace",
|
|
679
714
|
description: t = "Preparing the workspace context.",
|
|
680
|
-
status:
|
|
715
|
+
status: r = "Loading",
|
|
681
716
|
fullscreen: n = !0,
|
|
682
|
-
className:
|
|
717
|
+
className: d
|
|
683
718
|
}) {
|
|
684
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ a(
|
|
685
720
|
"section",
|
|
686
721
|
{
|
|
687
722
|
role: "status",
|
|
@@ -690,30 +725,30 @@ function Xe({
|
|
|
690
725
|
className: m(
|
|
691
726
|
"flex h-full w-full items-center justify-center bg-background px-6 text-foreground",
|
|
692
727
|
n ? "min-h-screen" : "min-h-[240px]",
|
|
693
|
-
|
|
728
|
+
d
|
|
694
729
|
),
|
|
695
|
-
children: /* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
730
|
+
children: /* @__PURE__ */ h("div", { className: "flex w-full max-w-sm flex-col items-center gap-5 text-center", children: [
|
|
731
|
+
/* @__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(
|
|
697
732
|
"span",
|
|
698
733
|
{
|
|
699
734
|
"aria-hidden": "true",
|
|
700
735
|
className: "h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent opacity-70"
|
|
701
736
|
}
|
|
702
737
|
) }),
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
t ? /* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ h("div", { className: "space-y-2", children: [
|
|
739
|
+
/* @__PURE__ */ a("h2", { className: "text-base font-medium text-foreground", children: e }),
|
|
740
|
+
t ? /* @__PURE__ */ a("p", { className: "text-sm leading-6 text-muted-foreground", children: t }) : null
|
|
706
741
|
] }),
|
|
707
|
-
|
|
742
|
+
r ? /* @__PURE__ */ a("p", { className: "text-xs font-medium text-muted-foreground/80", children: r }) : null
|
|
708
743
|
] })
|
|
709
744
|
}
|
|
710
745
|
);
|
|
711
746
|
}
|
|
712
747
|
export {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
748
|
+
Te as C,
|
|
749
|
+
Je as T,
|
|
750
|
+
Ye as W,
|
|
751
|
+
Ge as b,
|
|
752
|
+
Ue as r,
|
|
753
|
+
Xe as w
|
|
719
754
|
};
|