@hachej/boring-workspace 0.1.34 → 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-DWbh0xNI.js → FileTree-GkaIEJ9n.js} +1 -1
- package/dist/MarkdownEditor-DjZZnHcU.js +549 -0
- package/dist/{WorkspaceLoadingState-RVGURLJy.js → WorkspaceLoadingState-C664sU-y.js} +286 -252
- package/dist/WorkspaceProvider-CpK401MG.js +7394 -0
- package/dist/agent-tool-CB0RQyx9.d.ts +32 -0
- package/dist/app-front.d.ts +31 -3
- package/dist/app-front.js +886 -741
- package/dist/app-server.d.ts +4 -3
- package/dist/app-server.js +32 -0
- package/dist/boring-workspace.css +1 -1
- package/dist/{createInMemoryBridge-zb8MpO60.d.ts → createInMemoryBridge-e7QdNLSA.d.ts} +2 -1
- package/dist/plugin.d.ts +73 -1
- package/dist/plugin.js +47 -1
- package/dist/server.d.ts +14 -5
- package/dist/server.js +16 -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 +299 -34
- package/dist/workspace.d.ts +49 -2
- package/dist/workspace.js +31 -30
- package/package.json +5 -5
- package/dist/MarkdownEditor-BhLjIyPQ.js +0 -540
- package/dist/WorkspaceProvider-hCE2wXKZ.js +0 -6567
|
@@ -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-CpK401MG.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 = Ke(), [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 = 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();
|
|
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,84 @@ 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(E, { 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
|
+
renderPane: (o) => /* @__PURE__ */ a(
|
|
309
|
+
E,
|
|
310
|
+
{
|
|
311
|
+
id: o.panel ?? i,
|
|
312
|
+
params: o.params ?? e.centerParams
|
|
313
|
+
}
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
) : /* @__PURE__ */ a(E, { id: i, params: e.centerParams })
|
|
299
317
|
}
|
|
300
318
|
),
|
|
301
|
-
|
|
302
|
-
|
|
319
|
+
c ? null : /* @__PURE__ */ a(Q, { label: "Collapse chat", hint: "⌘\\", side: "bottom", children: /* @__PURE__ */ a(
|
|
320
|
+
F,
|
|
303
321
|
{
|
|
304
322
|
type: "button",
|
|
305
323
|
variant: "ghost",
|
|
306
324
|
size: "icon-xs",
|
|
307
|
-
onClick:
|
|
308
|
-
className:
|
|
325
|
+
onClick: D,
|
|
326
|
+
className: m(
|
|
327
|
+
"absolute right-2 z-30 rounded-full bg-background/80 text-muted-foreground shadow-sm backdrop-blur hover:bg-muted hover:text-foreground",
|
|
328
|
+
J && P.length > 1 ? "bottom-2" : "top-2"
|
|
329
|
+
),
|
|
309
330
|
"aria-label": "Collapse chat",
|
|
310
|
-
|
|
311
|
-
children: /* @__PURE__ */ r(ve, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
331
|
+
children: /* @__PURE__ */ a(ye, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
312
332
|
}
|
|
313
|
-
)
|
|
333
|
+
) })
|
|
314
334
|
]
|
|
315
335
|
}
|
|
316
336
|
),
|
|
317
|
-
|
|
337
|
+
r ? /* @__PURE__ */ h(
|
|
318
338
|
"aside",
|
|
319
339
|
{
|
|
320
340
|
"data-boring-workspace-part": "workbench",
|
|
@@ -325,18 +345,18 @@ function $e(e) {
|
|
|
325
345
|
"relative h-full min-h-0 overflow-hidden bg-background",
|
|
326
346
|
// When chat is collapsed the workbench grows to fill the freed
|
|
327
347
|
// space (full width); otherwise it's a fixed-width side panel.
|
|
328
|
-
|
|
348
|
+
c && n ? "min-w-0 flex-1" : "shrink-0",
|
|
329
349
|
"transition-[flex-grow,flex-basis,width,min-width,max-width] duration-[280ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
330
350
|
n && "border-l border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
331
351
|
),
|
|
332
|
-
style:
|
|
333
|
-
width: n ?
|
|
334
|
-
minWidth: n ?
|
|
335
|
-
maxWidth: n ?
|
|
352
|
+
style: c && n ? { willChange: "width" } : {
|
|
353
|
+
width: n ? q : 0,
|
|
354
|
+
minWidth: n ? q : 0,
|
|
355
|
+
maxWidth: n ? q : 0,
|
|
336
356
|
willChange: "width"
|
|
337
357
|
},
|
|
338
358
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ a(
|
|
340
360
|
"div",
|
|
341
361
|
{
|
|
342
362
|
className: m(
|
|
@@ -346,12 +366,12 @@ function $e(e) {
|
|
|
346
366
|
// When the chat is collapsed the workbench fills the full width
|
|
347
367
|
// and the left-edge "expand chat" float button would sit on top
|
|
348
368
|
// of the filetree — inset the content to leave a clear gutter.
|
|
349
|
-
|
|
369
|
+
c && n && !t && "pl-14"
|
|
350
370
|
),
|
|
351
|
-
children: e.surfaceOverlay ? /* @__PURE__ */
|
|
371
|
+
children: e.surfaceOverlay ? /* @__PURE__ */ h("div", { className: "relative h-full min-h-0", children: [
|
|
352
372
|
e.surfaceOverlay,
|
|
353
|
-
f ? /* @__PURE__ */
|
|
354
|
-
|
|
373
|
+
f ? /* @__PURE__ */ a(Q, { label: "Close workbench", hint: "⌘2", side: "left", children: /* @__PURE__ */ a(
|
|
374
|
+
F,
|
|
355
375
|
{
|
|
356
376
|
type: "button",
|
|
357
377
|
variant: "ghost",
|
|
@@ -359,27 +379,26 @@ function $e(e) {
|
|
|
359
379
|
onClick: f,
|
|
360
380
|
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
381
|
"aria-label": "Close workbench",
|
|
362
|
-
|
|
363
|
-
children: /* @__PURE__ */ r("span", { "aria-hidden": "true", children: "›" })
|
|
382
|
+
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: "›" })
|
|
364
383
|
}
|
|
365
|
-
) : null
|
|
366
|
-
] }) : /* @__PURE__ */
|
|
384
|
+
) }) : null
|
|
385
|
+
] }) : /* @__PURE__ */ a(E, { id: l, params: e.surfaceParams })
|
|
367
386
|
}
|
|
368
387
|
),
|
|
369
|
-
n && !
|
|
370
|
-
|
|
388
|
+
n && !c ? /* @__PURE__ */ a(
|
|
389
|
+
he,
|
|
371
390
|
{
|
|
372
391
|
side: "surface-left",
|
|
373
392
|
ariaLabel: "Resize workbench",
|
|
374
|
-
onResize: (o) =>
|
|
393
|
+
onResize: (o) => ge((u) => M(u - o, 480, te))
|
|
375
394
|
}
|
|
376
395
|
) : null
|
|
377
396
|
]
|
|
378
397
|
}
|
|
379
398
|
) : null
|
|
380
399
|
] }),
|
|
381
|
-
!t && e.onOpenNav ? /* @__PURE__ */
|
|
382
|
-
|
|
400
|
+
!t && e.onOpenNav ? /* @__PURE__ */ a(
|
|
401
|
+
H,
|
|
383
402
|
{
|
|
384
403
|
side: "left",
|
|
385
404
|
icon: "sessions",
|
|
@@ -388,20 +407,34 @@ function $e(e) {
|
|
|
388
407
|
hint: "⌘1"
|
|
389
408
|
}
|
|
390
409
|
) : null,
|
|
391
|
-
|
|
392
|
-
|
|
410
|
+
!c && !t && J && e.onCreateChatPaneAfter ? /* @__PURE__ */ a(
|
|
411
|
+
H,
|
|
412
|
+
{
|
|
413
|
+
side: "left",
|
|
414
|
+
icon: "plus",
|
|
415
|
+
onClick: () => {
|
|
416
|
+
var u, N;
|
|
417
|
+
const o = e.activeChatPaneId ?? ((u = P[P.length - 1]) == null ? void 0 : u.id);
|
|
418
|
+
o && ((N = e.onCreateChatPaneAfter) == null || N.call(e, o));
|
|
419
|
+
},
|
|
420
|
+
label: "New chat",
|
|
421
|
+
stackIndex: e.onOpenNav ? 1 : 0
|
|
422
|
+
}
|
|
423
|
+
) : null,
|
|
424
|
+
c ? /* @__PURE__ */ a(
|
|
425
|
+
H,
|
|
393
426
|
{
|
|
394
427
|
side: "left",
|
|
395
428
|
icon: "chat",
|
|
396
|
-
onClick:
|
|
429
|
+
onClick: D,
|
|
397
430
|
label: "Expand chat",
|
|
398
431
|
hint: "⌘\\\\",
|
|
399
432
|
stackIndex: 1,
|
|
400
|
-
pulse:
|
|
433
|
+
pulse: be || j.length > 0
|
|
401
434
|
}
|
|
402
435
|
) : null,
|
|
403
|
-
!n && e.onOpenSurface ? /* @__PURE__ */
|
|
404
|
-
|
|
436
|
+
!n && e.onOpenSurface ? /* @__PURE__ */ a(
|
|
437
|
+
H,
|
|
405
438
|
{
|
|
406
439
|
side: "right",
|
|
407
440
|
icon: "workbench",
|
|
@@ -415,30 +448,30 @@ function $e(e) {
|
|
|
415
448
|
}
|
|
416
449
|
);
|
|
417
450
|
}
|
|
418
|
-
function
|
|
419
|
-
return Math.max(t, Math.min(
|
|
451
|
+
function M(e, t, r) {
|
|
452
|
+
return Math.max(t, Math.min(r, e));
|
|
420
453
|
}
|
|
421
|
-
function
|
|
422
|
-
const [
|
|
423
|
-
() => e ?
|
|
454
|
+
function ue(e, t) {
|
|
455
|
+
const [r, n] = V(
|
|
456
|
+
() => e ? le(e, t) : t
|
|
424
457
|
);
|
|
425
|
-
|
|
426
|
-
n(e ?
|
|
458
|
+
C(() => {
|
|
459
|
+
n(e ? le(e, t) : t);
|
|
427
460
|
}, [e, t]);
|
|
428
|
-
const
|
|
461
|
+
const d = v(
|
|
429
462
|
(i) => {
|
|
430
463
|
n((l) => {
|
|
431
464
|
const s = typeof i == "function" ? i(l) : i;
|
|
432
|
-
return e &&
|
|
465
|
+
return e && De(e, s), s;
|
|
433
466
|
});
|
|
434
467
|
},
|
|
435
468
|
[e]
|
|
436
469
|
);
|
|
437
|
-
return [
|
|
470
|
+
return [r, d];
|
|
438
471
|
}
|
|
439
|
-
function
|
|
440
|
-
const [
|
|
441
|
-
|
|
472
|
+
function Me(e, t) {
|
|
473
|
+
const [r, n] = V(() => !e || typeof window > "u" ? t : window.localStorage.getItem(e) === "1");
|
|
474
|
+
C(() => {
|
|
442
475
|
if (!e || typeof window > "u") {
|
|
443
476
|
n(t);
|
|
444
477
|
return;
|
|
@@ -446,7 +479,7 @@ function Be(e, t) {
|
|
|
446
479
|
const i = window.localStorage.getItem(e);
|
|
447
480
|
n(i == null ? t : i === "1");
|
|
448
481
|
}, [e, t]);
|
|
449
|
-
const
|
|
482
|
+
const d = v(
|
|
450
483
|
(i) => {
|
|
451
484
|
n((l) => {
|
|
452
485
|
const s = typeof i == "function" ? i(l) : i;
|
|
@@ -455,31 +488,31 @@ function Be(e, t) {
|
|
|
455
488
|
},
|
|
456
489
|
[e]
|
|
457
490
|
);
|
|
458
|
-
return [
|
|
491
|
+
return [r, d];
|
|
459
492
|
}
|
|
460
|
-
function
|
|
461
|
-
const [e, t] =
|
|
462
|
-
return
|
|
463
|
-
const
|
|
464
|
-
return window.addEventListener("resize",
|
|
493
|
+
function Ke() {
|
|
494
|
+
const [e, t] = V(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
495
|
+
return C(() => {
|
|
496
|
+
const r = () => t(window.innerWidth);
|
|
497
|
+
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
465
498
|
}, []), e;
|
|
466
499
|
}
|
|
467
|
-
function
|
|
468
|
-
const n =
|
|
500
|
+
function he({ side: e, ariaLabel: t, onResize: r }) {
|
|
501
|
+
const n = Z(null), d = v((s) => {
|
|
469
502
|
s.preventDefault(), n.current = s.clientX, s.currentTarget.setPointerCapture(s.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
470
|
-
}, []), i =
|
|
503
|
+
}, []), i = v((s) => {
|
|
471
504
|
if (n.current === null) return;
|
|
472
|
-
const
|
|
473
|
-
n.current = s.clientX,
|
|
474
|
-
}, [
|
|
505
|
+
const p = s.clientX - n.current;
|
|
506
|
+
n.current = s.clientX, r(p);
|
|
507
|
+
}, [r]), l = v((s) => {
|
|
475
508
|
n.current !== null && (n.current = null, s.currentTarget.releasePointerCapture(s.pointerId), document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
476
509
|
}, []);
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
510
|
+
return /* @__PURE__ */ a(
|
|
511
|
+
pe,
|
|
479
512
|
{
|
|
480
513
|
"aria-label": t,
|
|
481
514
|
orientation: "vertical",
|
|
482
|
-
onResizeStart:
|
|
515
|
+
onResizeStart: d,
|
|
483
516
|
onPointerMove: i,
|
|
484
517
|
onPointerUp: l,
|
|
485
518
|
onPointerCancel: l,
|
|
@@ -494,31 +527,33 @@ function ce({ side: e, ariaLabel: t, onResize: a }) {
|
|
|
494
527
|
);
|
|
495
528
|
}
|
|
496
529
|
function S(e, t) {
|
|
497
|
-
const
|
|
498
|
-
return typeof
|
|
530
|
+
const r = e == null ? void 0 : e[t];
|
|
531
|
+
return typeof r == "function" ? r : void 0;
|
|
499
532
|
}
|
|
500
|
-
function
|
|
533
|
+
function K(e, t) {
|
|
501
534
|
return S(e, t);
|
|
502
535
|
}
|
|
503
|
-
function
|
|
536
|
+
function ee() {
|
|
504
537
|
if (typeof document > "u") return;
|
|
505
|
-
const
|
|
538
|
+
const r = (document.querySelector(
|
|
539
|
+
'[data-boring-workspace-part="chat-pane"][data-boring-state="active"]'
|
|
540
|
+
) ?? document).querySelector(
|
|
506
541
|
'[data-boring-agent] textarea[name="message"], textarea[name="message"]'
|
|
507
542
|
);
|
|
508
|
-
|
|
543
|
+
r == null || r.focus();
|
|
509
544
|
}
|
|
510
|
-
function
|
|
545
|
+
function fe() {
|
|
511
546
|
typeof window > "u" || window.requestAnimationFrame(() => {
|
|
512
|
-
|
|
547
|
+
ee(), window.setTimeout(ee, 320);
|
|
513
548
|
});
|
|
514
549
|
}
|
|
515
|
-
function
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
), l =
|
|
521
|
-
return l ? /* @__PURE__ */
|
|
550
|
+
function E({ id: e, params: t }) {
|
|
551
|
+
const r = Le(), { debug: n } = Ae(), d = we(
|
|
552
|
+
r.subscribe,
|
|
553
|
+
r.getSnapshot,
|
|
554
|
+
r.getSnapshot
|
|
555
|
+
), l = Y(() => r.getComponents(), [r, d])[e], s = Y(() => Ee(e), [e]);
|
|
556
|
+
return l ? /* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a(xe, { centered: !0 }), children: /* @__PURE__ */ a(
|
|
522
557
|
l,
|
|
523
558
|
{
|
|
524
559
|
params: { ...t, debug: n },
|
|
@@ -527,7 +562,7 @@ function X({ id: e, params: t }) {
|
|
|
527
562
|
}
|
|
528
563
|
) }) : null;
|
|
529
564
|
}
|
|
530
|
-
function
|
|
565
|
+
function Ee(e) {
|
|
531
566
|
return {
|
|
532
567
|
id: e,
|
|
533
568
|
title: e,
|
|
@@ -563,56 +598,55 @@ function Le(e) {
|
|
|
563
598
|
} })
|
|
564
599
|
};
|
|
565
600
|
}
|
|
566
|
-
function
|
|
601
|
+
function H({
|
|
567
602
|
side: e,
|
|
568
603
|
icon: t,
|
|
569
|
-
onClick:
|
|
604
|
+
onClick: r,
|
|
570
605
|
label: n,
|
|
571
|
-
hint:
|
|
606
|
+
hint: d,
|
|
572
607
|
bottomOffset: i,
|
|
573
608
|
stackIndex: l = 0,
|
|
574
609
|
pulse: s = !1
|
|
575
610
|
}) {
|
|
576
|
-
const
|
|
577
|
-
return /* @__PURE__ */
|
|
578
|
-
|
|
611
|
+
const p = e === "right" && i !== void 0, x = l * 44;
|
|
612
|
+
return /* @__PURE__ */ a(Q, { label: n, hint: d, side: e === "left" ? "right" : "left", children: /* @__PURE__ */ a(
|
|
613
|
+
F,
|
|
579
614
|
{
|
|
580
615
|
type: "button",
|
|
581
616
|
variant: "ghost",
|
|
582
617
|
size: "icon-sm",
|
|
583
|
-
onClick:
|
|
618
|
+
onClick: r,
|
|
584
619
|
"aria-label": n,
|
|
585
|
-
title: c ? `${n} (${c})` : n,
|
|
586
620
|
className: m(
|
|
587
621
|
"absolute z-30 h-9 w-9 gap-0.5 rounded-lg bg-background text-muted-foreground",
|
|
588
622
|
e === "left" ? "left-2" : "right-2",
|
|
589
|
-
|
|
623
|
+
p ? "hover:-translate-y-0.5" : "top-1/2 hover:-translate-y-[1px]",
|
|
590
624
|
"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
625
|
"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
626
|
"focus-visible:ring-ring/40"
|
|
593
627
|
),
|
|
594
|
-
style:
|
|
595
|
-
children: t === "sessions" ? /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
] }) : t === "chat" ? /* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
s ? /* @__PURE__ */
|
|
601
|
-
] }) : /* @__PURE__ */
|
|
628
|
+
style: p ? { bottom: i } : { transform: `translateY(calc(-50% - ${x}px))` },
|
|
629
|
+
children: t === "sessions" ? /* @__PURE__ */ h("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
630
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
631
|
+
/* @__PURE__ */ a("path", { d: "M12 7v5l3.2 2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
|
|
632
|
+
] }) : t === "chat" ? /* @__PURE__ */ h("span", { className: "relative flex items-center justify-center", children: [
|
|
633
|
+
/* @__PURE__ */ a(Se, { className: "h-[15px] w-[15px]", strokeWidth: 1.8, "aria-hidden": "true" }),
|
|
634
|
+
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
|
|
635
|
+
] }) : 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
636
|
}
|
|
603
|
-
);
|
|
637
|
+
) });
|
|
604
638
|
}
|
|
605
|
-
function
|
|
639
|
+
function Je({
|
|
606
640
|
appTitle: e = "Boring",
|
|
607
641
|
sessionTitle: t,
|
|
608
|
-
onCommandPalette:
|
|
642
|
+
onCommandPalette: r,
|
|
609
643
|
onNewChat: n,
|
|
610
|
-
topBarLeft:
|
|
644
|
+
topBarLeft: d,
|
|
611
645
|
topBarRight: i,
|
|
612
646
|
className: l
|
|
613
647
|
}) {
|
|
614
648
|
const s = i ?? null;
|
|
615
|
-
return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ h(
|
|
616
650
|
"header",
|
|
617
651
|
{
|
|
618
652
|
"data-boring-workspace-part": "topbar",
|
|
@@ -623,8 +657,8 @@ function Ue({
|
|
|
623
657
|
),
|
|
624
658
|
"aria-label": "App top bar",
|
|
625
659
|
children: [
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 leading-none", children: d ?? /* @__PURE__ */ h(ce, { children: [
|
|
661
|
+
/* @__PURE__ */ a(
|
|
628
662
|
"span",
|
|
629
663
|
{
|
|
630
664
|
"aria-hidden": "true",
|
|
@@ -632,32 +666,32 @@ function Ue({
|
|
|
632
666
|
children: ((e == null ? void 0 : e[0]) ?? "B").toUpperCase()
|
|
633
667
|
}
|
|
634
668
|
),
|
|
635
|
-
t ? /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
] }) : /* @__PURE__ */
|
|
669
|
+
t ? /* @__PURE__ */ h(ce, { children: [
|
|
670
|
+
/* @__PURE__ */ a("span", { className: "shrink-0 text-[13px] font-medium leading-none tracking-tight text-foreground/65", children: e }),
|
|
671
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "text-[13px] leading-none text-muted-foreground/45", children: "·" }),
|
|
672
|
+
/* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: t })
|
|
673
|
+
] }) : /* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium leading-none tracking-tight text-foreground", children: e })
|
|
640
674
|
] }) }),
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
|
|
675
|
+
/* @__PURE__ */ h(
|
|
676
|
+
Ce,
|
|
643
677
|
{
|
|
644
678
|
type: "button",
|
|
645
679
|
variant: "ghost",
|
|
646
680
|
size: "sm",
|
|
647
|
-
onClick:
|
|
681
|
+
onClick: r,
|
|
648
682
|
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
683
|
"aria-label": "Search catalogs and commands",
|
|
650
684
|
title: "Command palette (⌘K)",
|
|
651
685
|
children: [
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ a(Pe, { className: "h-3.5 w-3.5 shrink-0 opacity-80", strokeWidth: 1.75 }),
|
|
687
|
+
/* @__PURE__ */ a("span", { className: "font-normal tracking-tight", children: "Search" }),
|
|
688
|
+
/* @__PURE__ */ a(ke, { className: "ml-0.5 bg-muted/40 leading-none shadow-none", children: "⌘K" })
|
|
655
689
|
]
|
|
656
690
|
}
|
|
657
691
|
),
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
-
n && /* @__PURE__ */
|
|
660
|
-
|
|
692
|
+
/* @__PURE__ */ h("div", { className: "flex flex-1 shrink-0 items-center justify-end gap-1", children: [
|
|
693
|
+
n && /* @__PURE__ */ a(
|
|
694
|
+
F,
|
|
661
695
|
{
|
|
662
696
|
type: "button",
|
|
663
697
|
variant: "ghost",
|
|
@@ -665,7 +699,7 @@ function Ue({
|
|
|
665
699
|
onClick: n,
|
|
666
700
|
"aria-label": "New chat",
|
|
667
701
|
title: "New chat",
|
|
668
|
-
children: /* @__PURE__ */
|
|
702
|
+
children: /* @__PURE__ */ a(_e, { className: "h-4 w-4" })
|
|
669
703
|
}
|
|
670
704
|
),
|
|
671
705
|
s
|
|
@@ -674,14 +708,14 @@ function Ue({
|
|
|
674
708
|
}
|
|
675
709
|
);
|
|
676
710
|
}
|
|
677
|
-
function
|
|
711
|
+
function Ye({
|
|
678
712
|
title: e = "Loading workspace",
|
|
679
713
|
description: t = "Preparing the workspace context.",
|
|
680
|
-
status:
|
|
714
|
+
status: r = "Loading",
|
|
681
715
|
fullscreen: n = !0,
|
|
682
|
-
className:
|
|
716
|
+
className: d
|
|
683
717
|
}) {
|
|
684
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ a(
|
|
685
719
|
"section",
|
|
686
720
|
{
|
|
687
721
|
role: "status",
|
|
@@ -690,30 +724,30 @@ function Xe({
|
|
|
690
724
|
className: m(
|
|
691
725
|
"flex h-full w-full items-center justify-center bg-background px-6 text-foreground",
|
|
692
726
|
n ? "min-h-screen" : "min-h-[240px]",
|
|
693
|
-
|
|
727
|
+
d
|
|
694
728
|
),
|
|
695
|
-
children: /* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ h("div", { className: "flex w-full max-w-sm flex-col items-center gap-5 text-center", children: [
|
|
730
|
+
/* @__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
731
|
"span",
|
|
698
732
|
{
|
|
699
733
|
"aria-hidden": "true",
|
|
700
734
|
className: "h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent opacity-70"
|
|
701
735
|
}
|
|
702
736
|
) }),
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
t ? /* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ h("div", { className: "space-y-2", children: [
|
|
738
|
+
/* @__PURE__ */ a("h2", { className: "text-base font-medium text-foreground", children: e }),
|
|
739
|
+
t ? /* @__PURE__ */ a("p", { className: "text-sm leading-6 text-muted-foreground", children: t }) : null
|
|
706
740
|
] }),
|
|
707
|
-
|
|
741
|
+
r ? /* @__PURE__ */ a("p", { className: "text-xs font-medium text-muted-foreground/80", children: r }) : null
|
|
708
742
|
] })
|
|
709
743
|
}
|
|
710
744
|
);
|
|
711
745
|
}
|
|
712
746
|
export {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
747
|
+
Te as C,
|
|
748
|
+
Je as T,
|
|
749
|
+
Ye as W,
|
|
750
|
+
Ge as b,
|
|
751
|
+
Ue as r,
|
|
752
|
+
Xe as w
|
|
719
753
|
};
|