@hachej/boring-workspace 0.1.12 → 0.1.14
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/README.md +270 -42
- package/dist/CommandPalette-NOEOVkN2.js +5714 -0
- package/dist/{FileTree-BVfqs3rR.js → FileTree-Dl-qUAB0.js} +9 -9
- package/dist/MarkdownEditor-yc6mFsnI.js +533 -0
- package/dist/{WorkspaceLoadingState-CPQBxYFG.js → WorkspaceLoadingState-CSZfENWe.js} +178 -157
- package/dist/agent-tool-DEtfQPVB.d.ts +100 -0
- package/dist/app-front.d.ts +79 -67
- package/dist/app-front.js +253 -241
- package/dist/app-server.d.ts +17 -12
- package/dist/app-server.js +105 -23
- package/dist/{bootstrapServer-BRUqUpVW.d.ts → bootstrapServer-BreQ9QBc.d.ts} +8 -2
- package/dist/server.d.ts +13 -35
- package/dist/server.js +39 -137
- package/dist/shared.d.ts +1 -2
- package/dist/testing.d.ts +0 -63
- package/dist/testing.js +2248 -2401
- package/dist/workspace.css +1616 -977
- package/dist/workspace.d.ts +111 -450
- package/dist/workspace.js +417 -1635
- package/docs/INTERFACES.md +2 -2
- package/docs/PLUGIN_STRUCTURE.md +1 -1
- package/docs/plans/ASK_USER_QUESTIONS_PLUGIN_SPEC.md +131 -263
- package/docs/plans/GENERIC_EXPLORER_PLUGIN_PLAN.md +29 -27
- package/docs/plans/MACRO_PLUGIN_GENERIC_HELPERS_AUDIT.md +12 -12
- package/docs/plans/PANE_TO_AGENT_CHAT_ACTIONS_SPEC.md +366 -0
- package/docs/plans/README.md +2 -0
- package/docs/plans/archive/PLUGIN_MODEL.md +14 -14
- package/docs/plans/archive/SRC_FOLDER_REORG_PLAN.md +2 -3
- package/docs/plans/archive/WORKSPACE_V2_PLAN.md +1 -1
- package/package.json +3 -6
- package/dist/CommandPalette-Dme9em28.js +0 -5506
- package/dist/MarkdownEditor-CcCDF65H.js +0 -502
- package/dist/agent-tool-NvxKfist.d.ts +0 -28
- package/dist/explorer-DtLUnuah.d.ts +0 -129
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
2
|
-
import { useCallback as b, useMemo as
|
|
3
|
-
import { LoadingState as
|
|
1
|
+
import { jsxs as d, jsx as a, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as b, useMemo as F, useEffect as I, useState as q, Suspense as Q, useRef as Y } from "react";
|
|
3
|
+
import { LoadingState as ee, ResizeHandle as te, IconButton as Z, Button as ne, Kbd as re } from "@hachej/boring-ui-kit";
|
|
4
4
|
import { c as g } from "./utils-B6yFEsav.js";
|
|
5
|
-
import {
|
|
6
|
-
import { Search as
|
|
7
|
-
function
|
|
5
|
+
import { a0 as ae, a7 as oe, B as ie, an as se, al as ce, u as de } from "./CommandPalette-NOEOVkN2.js";
|
|
6
|
+
import { Search as le, Plus as ue } from "lucide-react";
|
|
7
|
+
function ke(e, t, r = !0) {
|
|
8
8
|
if (!r || typeof window > "u") return t;
|
|
9
9
|
try {
|
|
10
10
|
const n = window.localStorage.getItem(e);
|
|
@@ -14,14 +14,14 @@ function be(e, t, r = !0) {
|
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function _e(e, t, r = !0) {
|
|
18
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
|
|
24
|
+
function T(e, t, r = !0) {
|
|
25
25
|
if (!r || typeof window > "u") return t;
|
|
26
26
|
try {
|
|
27
27
|
const n = window.localStorage.getItem(e);
|
|
@@ -32,14 +32,14 @@ function F(e, t, r = !0) {
|
|
|
32
32
|
}
|
|
33
33
|
return t;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function he(e, t, r = !0) {
|
|
36
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 Ce(e = {}) {
|
|
43
43
|
const {
|
|
44
44
|
nav: t = "session-list",
|
|
45
45
|
navParams: r,
|
|
@@ -48,9 +48,9 @@ function ve(e = {}) {
|
|
|
48
48
|
surface: c,
|
|
49
49
|
surfaceParams: l,
|
|
50
50
|
sidebar: s,
|
|
51
|
-
sidebarParams:
|
|
52
|
-
} = e,
|
|
53
|
-
return t &&
|
|
51
|
+
sidebarParams: x
|
|
52
|
+
} = e, w = [];
|
|
53
|
+
return t && w.push({
|
|
54
54
|
id: "nav",
|
|
55
55
|
position: "left",
|
|
56
56
|
panel: t,
|
|
@@ -58,22 +58,22 @@ function ve(e = {}) {
|
|
|
58
58
|
locked: !0,
|
|
59
59
|
hideHeader: !0,
|
|
60
60
|
constraints: { minWidth: 60, maxWidth: 60 }
|
|
61
|
-
}),
|
|
61
|
+
}), w.push({
|
|
62
62
|
id: "center",
|
|
63
63
|
position: "center",
|
|
64
64
|
panel: n,
|
|
65
65
|
params: i,
|
|
66
66
|
hideHeader: !0
|
|
67
|
-
}), s &&
|
|
67
|
+
}), s && w.push({
|
|
68
68
|
id: "sidebar",
|
|
69
69
|
position: "left",
|
|
70
70
|
panel: s,
|
|
71
|
-
params:
|
|
71
|
+
params: x,
|
|
72
72
|
hideHeader: !0,
|
|
73
73
|
collapsible: !0,
|
|
74
74
|
collapsedWidth: 40,
|
|
75
75
|
constraints: { minWidth: 200, maxWidthViewportRatio: 0.5 }
|
|
76
|
-
}), c &&
|
|
76
|
+
}), c && w.push({
|
|
77
77
|
id: "surface",
|
|
78
78
|
position: "right",
|
|
79
79
|
panel: c,
|
|
@@ -81,72 +81,87 @@ function ve(e = {}) {
|
|
|
81
81
|
hideHeader: !0,
|
|
82
82
|
dynamic: !0,
|
|
83
83
|
placeholder: "empty"
|
|
84
|
-
}), { version: "2.0", groups:
|
|
84
|
+
}), { version: "2.0", groups: w };
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
const t = e.nav !== null, r = e.surface !== void 0, n = !!e.surface, i = e.nav || "session-list", c = e.center ?? "chat", l = e.surface || "artifact-surface", s =
|
|
86
|
+
function Se(e) {
|
|
87
|
+
const t = e.nav !== null, r = e.surface !== void 0, n = !!e.surface, i = e.nav || "session-list", c = e.center ?? "chat", l = e.surface || "artifact-surface", s = me(), [x, w] = $(
|
|
88
88
|
e.storageKey ? `${e.storageKey}:drawerWidth` : void 0,
|
|
89
89
|
260
|
|
90
|
-
), [
|
|
90
|
+
), [G, J] = $(
|
|
91
91
|
e.storageKey ? `${e.storageKey}:surfaceWidth` : void 0,
|
|
92
92
|
680
|
|
93
|
-
),
|
|
94
|
-
var
|
|
93
|
+
), u = ae(), z = O(x, 200, 360), K = Math.max(480, Math.floor(s * 0.72)), L = O(G, 480, K), R = y(e.centerParams, "getSurface"), D = y(e.centerParams, "isWorkbenchOpen"), A = y(e.centerParams, "openWorkbench"), j = y(e.centerParams, "closeWorkbench"), h = B(e.navParams, "onClose"), m = B(e.surfaceParams, "onClose"), p = B(e.sidebarParams, "onClose"), M = B(e.navParams, "onCreate"), v = !!e.sidebar, k = t ? !!h : !!e.onOpenNav, _ = n ? !!m : !!e.onOpenSurface, C = v ? !!p : !!e.onOpenSidebar, S = b(() => {
|
|
94
|
+
var o;
|
|
95
95
|
if (t) {
|
|
96
|
-
|
|
96
|
+
h == null || h();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
(
|
|
100
|
-
}, [
|
|
101
|
-
var
|
|
99
|
+
(o = e.onOpenNav) == null || o.call(e);
|
|
100
|
+
}, [h, t, e.onOpenNav]), N = b(() => {
|
|
101
|
+
var o;
|
|
102
102
|
if (n) {
|
|
103
|
-
|
|
103
|
+
m == null || m();
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
(
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
(o = e.onOpenSurface) == null || o.call(e);
|
|
107
|
+
}, [m, e.onOpenSurface, n]), W = b(() => {
|
|
108
|
+
var o;
|
|
109
|
+
if (v) {
|
|
110
|
+
p == null || p();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
(o = e.onOpenSidebar) == null || o.call(e);
|
|
114
|
+
}, [p, e.onOpenSidebar, v]), P = b(() => {
|
|
115
|
+
t && (h == null || h()), n && (m == null || m()), E(), fe();
|
|
116
|
+
}, [h, m, t, n]);
|
|
117
|
+
return oe({
|
|
118
|
+
shortcuts: F(() => {
|
|
119
|
+
const o = [];
|
|
120
|
+
return k && o.push({ key: "1", mod: !0, handler: S }), _ && o.push({ key: "2", mod: !0, handler: N }), C && o.push({ key: "3", mod: !0, allowInEditable: !0, handler: W }), c === "chat" && o.push({ key: "Escape", allowInEditable: !0, handler: P }), o;
|
|
121
|
+
}, [k, C, _, c, P, S, W, N])
|
|
122
|
+
}), I(() => {
|
|
123
|
+
const o = "workspace:chat-layout", f = "agent:chat-layout";
|
|
124
|
+
return u.unregisterByPluginId(o), u.unregisterByPluginId(f), u.registerCommand({
|
|
118
125
|
id: "workspace:open-session-history",
|
|
119
126
|
title: t ? "Close Session History" : "Open Session History",
|
|
120
127
|
keywords: ["sessions", "history", "drawer", t ? "close" : "open"],
|
|
121
128
|
shortcut: "⌘1",
|
|
122
|
-
pluginId:
|
|
123
|
-
when: () =>
|
|
124
|
-
run:
|
|
125
|
-
}),
|
|
129
|
+
pluginId: o,
|
|
130
|
+
when: () => k,
|
|
131
|
+
run: S
|
|
132
|
+
}), u.registerCommand({
|
|
126
133
|
id: "workspace:open-workbench",
|
|
127
134
|
title: n ? "Close Workbench" : "Open Workbench",
|
|
128
135
|
keywords: ["surface", "artifacts", "sources", "workbench", n ? "close" : "open"],
|
|
129
136
|
shortcut: "⌘2",
|
|
130
|
-
pluginId:
|
|
131
|
-
when: () =>
|
|
132
|
-
run:
|
|
133
|
-
}),
|
|
137
|
+
pluginId: o,
|
|
138
|
+
when: () => _,
|
|
139
|
+
run: N
|
|
140
|
+
}), u.registerCommand({
|
|
141
|
+
id: "workspace:toggle-workbench-left-panel",
|
|
142
|
+
title: v ? "Close Workbench Left Panel" : "Open Workbench Left Panel",
|
|
143
|
+
keywords: ["left", "sidebar", "tabs", "workbench", v ? "close" : "open"],
|
|
144
|
+
shortcut: "⌘3",
|
|
145
|
+
pluginId: o,
|
|
146
|
+
when: () => C,
|
|
147
|
+
run: W
|
|
148
|
+
}), c === "chat" && u.registerCommand({
|
|
134
149
|
id: "agent:focus-chat",
|
|
135
150
|
title: "Focus Chat",
|
|
136
151
|
keywords: ["agent", "chat", "prompt", "composer", "input", "focus"],
|
|
137
|
-
pluginId:
|
|
138
|
-
run:
|
|
139
|
-
}),
|
|
152
|
+
pluginId: f,
|
|
153
|
+
run: P
|
|
154
|
+
}), M && u.registerCommand({
|
|
140
155
|
id: "agent:new-chat",
|
|
141
156
|
title: "New Chat",
|
|
142
157
|
keywords: ["agent", "chat", "session", "new"],
|
|
143
|
-
pluginId:
|
|
144
|
-
run:
|
|
158
|
+
pluginId: f,
|
|
159
|
+
run: M
|
|
145
160
|
}), () => {
|
|
146
|
-
|
|
161
|
+
u.unregisterByPluginId(o), u.unregisterByPluginId(f);
|
|
147
162
|
};
|
|
148
163
|
}, [
|
|
149
|
-
|
|
164
|
+
u,
|
|
150
165
|
t,
|
|
151
166
|
c,
|
|
152
167
|
r,
|
|
@@ -155,25 +170,31 @@ function xe(e) {
|
|
|
155
170
|
e.surfaceParams,
|
|
156
171
|
e.onOpenNav,
|
|
157
172
|
e.onOpenSurface,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
u,
|
|
161
|
-
h,
|
|
162
|
-
B,
|
|
173
|
+
e.onOpenSidebar,
|
|
174
|
+
k,
|
|
163
175
|
_,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
176
|
+
C,
|
|
177
|
+
h,
|
|
178
|
+
m,
|
|
179
|
+
p,
|
|
180
|
+
M,
|
|
181
|
+
P,
|
|
182
|
+
v,
|
|
183
|
+
S,
|
|
184
|
+
N,
|
|
185
|
+
W
|
|
186
|
+
]), I(() => {
|
|
187
|
+
if (!R || !D || !A) return;
|
|
188
|
+
const o = {
|
|
189
|
+
surface: R,
|
|
190
|
+
isWorkbenchOpen: D,
|
|
191
|
+
openWorkbench: A,
|
|
192
|
+
closeWorkbench: j
|
|
172
193
|
};
|
|
173
|
-
return
|
|
174
|
-
|
|
194
|
+
return ie.on(se.uiCommand, ({ command: f }) => {
|
|
195
|
+
ce(f, o);
|
|
175
196
|
});
|
|
176
|
-
}, [
|
|
197
|
+
}, [R, D, A, j]), /* @__PURE__ */ d(
|
|
177
198
|
"div",
|
|
178
199
|
{
|
|
179
200
|
"data-boring-workspace": "",
|
|
@@ -193,13 +214,13 @@ function xe(e) {
|
|
|
193
214
|
t && "border-r border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
194
215
|
),
|
|
195
216
|
style: {
|
|
196
|
-
width: t ?
|
|
197
|
-
minWidth: t ?
|
|
198
|
-
maxWidth: t ?
|
|
217
|
+
width: t ? z : 0,
|
|
218
|
+
minWidth: t ? z : 0,
|
|
219
|
+
maxWidth: t ? z : 0,
|
|
199
220
|
willChange: "width"
|
|
200
221
|
},
|
|
201
222
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ a(
|
|
203
224
|
"div",
|
|
204
225
|
{
|
|
205
226
|
className: g(
|
|
@@ -207,15 +228,15 @@ function xe(e) {
|
|
|
207
228
|
"transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
208
229
|
t ? "opacity-100" : "opacity-0"
|
|
209
230
|
),
|
|
210
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ a(H, { id: i, params: e.navParams })
|
|
211
232
|
}
|
|
212
233
|
),
|
|
213
|
-
t ? /* @__PURE__ */
|
|
214
|
-
|
|
234
|
+
t ? /* @__PURE__ */ a(
|
|
235
|
+
X,
|
|
215
236
|
{
|
|
216
237
|
side: "drawer-right",
|
|
217
238
|
ariaLabel: "Resize sessions drawer",
|
|
218
|
-
onResize: (
|
|
239
|
+
onResize: (o) => w((f) => O(f + o, 200, 360))
|
|
219
240
|
}
|
|
220
241
|
) : null
|
|
221
242
|
]
|
|
@@ -228,9 +249,9 @@ function xe(e) {
|
|
|
228
249
|
"aria-label": "Chat stage",
|
|
229
250
|
className: "relative h-full min-h-0 min-w-0 flex-1 overflow-hidden bg-background",
|
|
230
251
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
!t && e.onOpenNav ? /* @__PURE__ */
|
|
233
|
-
|
|
252
|
+
/* @__PURE__ */ a(H, { id: c, params: e.centerParams }),
|
|
253
|
+
!t && e.onOpenNav ? /* @__PURE__ */ a(
|
|
254
|
+
U,
|
|
234
255
|
{
|
|
235
256
|
side: "left",
|
|
236
257
|
icon: "sessions",
|
|
@@ -239,8 +260,8 @@ function xe(e) {
|
|
|
239
260
|
hint: "⌘1"
|
|
240
261
|
}
|
|
241
262
|
) : null,
|
|
242
|
-
!n && e.onOpenSurface ? /* @__PURE__ */
|
|
243
|
-
|
|
263
|
+
!n && e.onOpenSurface ? /* @__PURE__ */ a(
|
|
264
|
+
U,
|
|
244
265
|
{
|
|
245
266
|
side: "right",
|
|
246
267
|
icon: "workbench",
|
|
@@ -265,13 +286,13 @@ function xe(e) {
|
|
|
265
286
|
n && "border-l border-[color:oklch(from_var(--border)_l_c_h/0.6)]"
|
|
266
287
|
),
|
|
267
288
|
style: {
|
|
268
|
-
width: n ?
|
|
269
|
-
minWidth: n ?
|
|
270
|
-
maxWidth: n ?
|
|
289
|
+
width: n ? L : 0,
|
|
290
|
+
minWidth: n ? L : 0,
|
|
291
|
+
maxWidth: n ? L : 0,
|
|
271
292
|
willChange: "width"
|
|
272
293
|
},
|
|
273
294
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ a(
|
|
275
296
|
"div",
|
|
276
297
|
{
|
|
277
298
|
className: g(
|
|
@@ -279,15 +300,15 @@ function xe(e) {
|
|
|
279
300
|
"transition-opacity duration-[200ms] ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
280
301
|
n ? "opacity-100" : "opacity-0"
|
|
281
302
|
),
|
|
282
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ a(H, { id: l, params: e.surfaceParams })
|
|
283
304
|
}
|
|
284
305
|
),
|
|
285
|
-
n ? /* @__PURE__ */
|
|
286
|
-
|
|
306
|
+
n ? /* @__PURE__ */ a(
|
|
307
|
+
X,
|
|
287
308
|
{
|
|
288
309
|
side: "surface-left",
|
|
289
310
|
ariaLabel: "Resize workbench",
|
|
290
|
-
onResize: (
|
|
311
|
+
onResize: (o) => J((f) => O(f - o, 480, K))
|
|
291
312
|
}
|
|
292
313
|
) : null
|
|
293
314
|
]
|
|
@@ -297,46 +318,46 @@ function xe(e) {
|
|
|
297
318
|
}
|
|
298
319
|
);
|
|
299
320
|
}
|
|
300
|
-
function
|
|
321
|
+
function O(e, t, r) {
|
|
301
322
|
return Math.max(t, Math.min(r, e));
|
|
302
323
|
}
|
|
303
|
-
function
|
|
304
|
-
const [r, n] =
|
|
305
|
-
() => e ?
|
|
324
|
+
function $(e, t) {
|
|
325
|
+
const [r, n] = q(
|
|
326
|
+
() => e ? T(e, t) : t
|
|
306
327
|
);
|
|
307
|
-
|
|
308
|
-
n(e ?
|
|
328
|
+
I(() => {
|
|
329
|
+
n(e ? T(e, t) : t);
|
|
309
330
|
}, [e, t]);
|
|
310
331
|
const i = b(
|
|
311
332
|
(c) => {
|
|
312
333
|
n((l) => {
|
|
313
334
|
const s = typeof c == "function" ? c(l) : c;
|
|
314
|
-
return e &&
|
|
335
|
+
return e && he(e, s), s;
|
|
315
336
|
});
|
|
316
337
|
},
|
|
317
338
|
[e]
|
|
318
339
|
);
|
|
319
340
|
return [r, i];
|
|
320
341
|
}
|
|
321
|
-
function
|
|
322
|
-
const [e, t] =
|
|
323
|
-
return
|
|
342
|
+
function me() {
|
|
343
|
+
const [e, t] = q(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
344
|
+
return I(() => {
|
|
324
345
|
const r = () => t(window.innerWidth);
|
|
325
346
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
326
347
|
}, []), e;
|
|
327
348
|
}
|
|
328
|
-
function
|
|
329
|
-
const n =
|
|
349
|
+
function X({ side: e, ariaLabel: t, onResize: r }) {
|
|
350
|
+
const n = Y(null), i = b((s) => {
|
|
330
351
|
s.preventDefault(), n.current = s.clientX, s.currentTarget.setPointerCapture(s.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
331
352
|
}, []), c = b((s) => {
|
|
332
353
|
if (n.current === null) return;
|
|
333
|
-
const
|
|
334
|
-
n.current = s.clientX, r(
|
|
354
|
+
const x = s.clientX - n.current;
|
|
355
|
+
n.current = s.clientX, r(x);
|
|
335
356
|
}, [r]), l = b((s) => {
|
|
336
357
|
n.current !== null && (n.current = null, s.currentTarget.releasePointerCapture(s.pointerId), document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
337
358
|
}, []);
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
|
|
359
|
+
return /* @__PURE__ */ a(
|
|
360
|
+
te,
|
|
340
361
|
{
|
|
341
362
|
"aria-label": t,
|
|
342
363
|
orientation: "vertical",
|
|
@@ -354,28 +375,28 @@ function E({ side: e, ariaLabel: t, onResize: r }) {
|
|
|
354
375
|
}
|
|
355
376
|
);
|
|
356
377
|
}
|
|
357
|
-
function
|
|
378
|
+
function y(e, t) {
|
|
358
379
|
const r = e == null ? void 0 : e[t];
|
|
359
380
|
return typeof r == "function" ? r : void 0;
|
|
360
381
|
}
|
|
361
|
-
function
|
|
362
|
-
return
|
|
382
|
+
function B(e, t) {
|
|
383
|
+
return y(e, t);
|
|
363
384
|
}
|
|
364
|
-
function
|
|
385
|
+
function E() {
|
|
365
386
|
if (typeof document > "u") return;
|
|
366
387
|
const e = document.querySelector(
|
|
367
388
|
'[data-boring-agent] textarea[name="message"], textarea[name="message"]'
|
|
368
389
|
);
|
|
369
390
|
e == null || e.focus();
|
|
370
391
|
}
|
|
371
|
-
function
|
|
392
|
+
function fe() {
|
|
372
393
|
typeof window > "u" || window.requestAnimationFrame(() => {
|
|
373
|
-
|
|
394
|
+
E(), window.setTimeout(E, 320);
|
|
374
395
|
});
|
|
375
396
|
}
|
|
376
|
-
function
|
|
377
|
-
const r =
|
|
378
|
-
return i ? /* @__PURE__ */
|
|
397
|
+
function H({ id: e, params: t }) {
|
|
398
|
+
const r = de(), i = F(() => r.getComponents(), [r])[e], c = F(() => ge(e), [e]);
|
|
399
|
+
return i ? /* @__PURE__ */ a(Q, { fallback: /* @__PURE__ */ a(ee, { centered: !0 }), children: /* @__PURE__ */ a(
|
|
379
400
|
i,
|
|
380
401
|
{
|
|
381
402
|
params: t,
|
|
@@ -384,7 +405,7 @@ function L({ id: e, params: t }) {
|
|
|
384
405
|
}
|
|
385
406
|
) }) : null;
|
|
386
407
|
}
|
|
387
|
-
function
|
|
408
|
+
function ge(e) {
|
|
388
409
|
return {
|
|
389
410
|
id: e,
|
|
390
411
|
title: e,
|
|
@@ -420,15 +441,15 @@ function le(e) {
|
|
|
420
441
|
} })
|
|
421
442
|
};
|
|
422
443
|
}
|
|
423
|
-
function
|
|
444
|
+
function U({
|
|
424
445
|
side: e,
|
|
425
446
|
icon: t,
|
|
426
447
|
onClick: r,
|
|
427
448
|
label: n,
|
|
428
449
|
hint: i
|
|
429
450
|
}) {
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
-
|
|
451
|
+
return /* @__PURE__ */ a(
|
|
452
|
+
Z,
|
|
432
453
|
{
|
|
433
454
|
type: "button",
|
|
434
455
|
variant: "ghost",
|
|
@@ -444,13 +465,13 @@ function K({
|
|
|
444
465
|
"focus-visible:ring-ring/40"
|
|
445
466
|
),
|
|
446
467
|
children: t === "sessions" ? /* @__PURE__ */ d("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
] }) : /* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
469
|
+
/* @__PURE__ */ a("path", { d: "M12 7v5l3.2 2", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
|
|
470
|
+
] }) : /* @__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" }) })
|
|
450
471
|
}
|
|
451
472
|
);
|
|
452
473
|
}
|
|
453
|
-
function
|
|
474
|
+
function Ne({
|
|
454
475
|
appTitle: e = "Boring",
|
|
455
476
|
sessionTitle: t,
|
|
456
477
|
onCommandPalette: r,
|
|
@@ -465,48 +486,48 @@ function ye({
|
|
|
465
486
|
{
|
|
466
487
|
"data-boring-workspace-part": "topbar",
|
|
467
488
|
className: g(
|
|
468
|
-
"relative flex items-center justify-between gap-
|
|
489
|
+
"relative flex items-center justify-between gap-2 px-3",
|
|
469
490
|
"bg-background border-b border-[color:oklch(from_var(--border)_l_c_h/0.4)]",
|
|
470
491
|
l
|
|
471
492
|
),
|
|
472
|
-
style: { height:
|
|
493
|
+
style: { height: 40 },
|
|
473
494
|
"aria-label": "App top bar",
|
|
474
495
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
"
|
|
496
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: i ?? /* @__PURE__ */ d(V, { children: [
|
|
497
|
+
/* @__PURE__ */ a(
|
|
498
|
+
"img",
|
|
478
499
|
{
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
500
|
+
src: "https://chatgpt.com/backend-api/estuary/content?id=file_000000006a4471f4b8411fcbfde271c6&ts=493962&p=fs&cid=1&sig=b406cfec61d387bdedd898858283b389f31ad2bd3eb7a358a6d1efa23e9afa83&v=0",
|
|
501
|
+
alt: e,
|
|
502
|
+
className: "h-6 w-6 shrink-0 rounded-md"
|
|
482
503
|
}
|
|
483
504
|
),
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
t && /* @__PURE__ */ d(
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ a("span", { className: "truncate text-[12px] font-medium tracking-tight text-foreground", children: e }),
|
|
506
|
+
t && /* @__PURE__ */ d(V, { children: [
|
|
507
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "text-muted-foreground/30", children: "/" }),
|
|
508
|
+
/* @__PURE__ */ a("span", { className: "truncate text-[12px] font-normal text-muted-foreground", children: t })
|
|
488
509
|
] })
|
|
489
510
|
] }) }),
|
|
490
511
|
/* @__PURE__ */ d(
|
|
491
|
-
|
|
512
|
+
ne,
|
|
492
513
|
{
|
|
493
514
|
type: "button",
|
|
494
515
|
variant: "ghost",
|
|
495
516
|
size: "sm",
|
|
496
517
|
onClick: r,
|
|
497
|
-
className: "group h-
|
|
518
|
+
className: "group h-6 gap-1 px-1.5 text-[12px] text-muted-foreground/60 hover:bg-muted/60 hover:text-foreground focus-visible:text-foreground",
|
|
498
519
|
"aria-label": "Search catalogs and commands",
|
|
499
520
|
title: "Command palette (⌘K)",
|
|
500
521
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ a(le, { className: "h-3 w-3 shrink-0 opacity-70", strokeWidth: 1.75 }),
|
|
523
|
+
/* @__PURE__ */ a("span", { className: "font-normal tracking-tight", children: "Search" }),
|
|
524
|
+
/* @__PURE__ */ a(re, { className: "ml-1 border-0 bg-transparent p-0 text-[10px] shadow-none group-hover:text-muted-foreground", children: "⌘K" })
|
|
504
525
|
]
|
|
505
526
|
}
|
|
506
527
|
),
|
|
507
528
|
/* @__PURE__ */ d("div", { className: "flex flex-1 shrink-0 items-center justify-end gap-1", children: [
|
|
508
|
-
n && /* @__PURE__ */
|
|
509
|
-
|
|
529
|
+
n && /* @__PURE__ */ a(
|
|
530
|
+
Z,
|
|
510
531
|
{
|
|
511
532
|
type: "button",
|
|
512
533
|
variant: "ghost",
|
|
@@ -514,7 +535,7 @@ function ye({
|
|
|
514
535
|
onClick: n,
|
|
515
536
|
"aria-label": "New chat",
|
|
516
537
|
title: "New chat",
|
|
517
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" })
|
|
518
539
|
}
|
|
519
540
|
),
|
|
520
541
|
s
|
|
@@ -523,14 +544,14 @@ function ye({
|
|
|
523
544
|
}
|
|
524
545
|
);
|
|
525
546
|
}
|
|
526
|
-
function
|
|
547
|
+
function We({
|
|
527
548
|
title: e = "Loading workspace",
|
|
528
549
|
description: t = "Preparing the workspace context.",
|
|
529
550
|
status: r = "Loading",
|
|
530
551
|
fullscreen: n = !0,
|
|
531
552
|
className: i
|
|
532
553
|
}) {
|
|
533
|
-
return /* @__PURE__ */
|
|
554
|
+
return /* @__PURE__ */ a(
|
|
534
555
|
"section",
|
|
535
556
|
{
|
|
536
557
|
role: "status",
|
|
@@ -542,7 +563,7 @@ function ke({
|
|
|
542
563
|
i
|
|
543
564
|
),
|
|
544
565
|
children: /* @__PURE__ */ d("div", { className: "flex w-full max-w-sm flex-col items-center gap-5 text-center", children: [
|
|
545
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__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(
|
|
546
567
|
"span",
|
|
547
568
|
{
|
|
548
569
|
"aria-hidden": "true",
|
|
@@ -550,19 +571,19 @@ function ke({
|
|
|
550
571
|
}
|
|
551
572
|
) }),
|
|
552
573
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
t ? /* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ a("h2", { className: "text-base font-medium text-foreground", children: e }),
|
|
575
|
+
t ? /* @__PURE__ */ a("p", { className: "text-sm leading-6 text-muted-foreground", children: t }) : null
|
|
555
576
|
] }),
|
|
556
|
-
r ? /* @__PURE__ */
|
|
577
|
+
r ? /* @__PURE__ */ a("p", { className: "text-xs font-medium text-muted-foreground/80", children: r }) : null
|
|
557
578
|
] })
|
|
558
579
|
}
|
|
559
580
|
);
|
|
560
581
|
}
|
|
561
582
|
export {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
583
|
+
Se as C,
|
|
584
|
+
Ne as T,
|
|
585
|
+
We as W,
|
|
586
|
+
Ce as b,
|
|
587
|
+
ke as r,
|
|
588
|
+
_e as w
|
|
568
589
|
};
|