@principal-ade/panel-layouts 0.3.1 → 0.3.2
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/index.d.ts +98 -1
- package/dist/index.esm.js +960 -669
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import './index.css';var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { EditableConfigurablePanelLayout as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { jsx as s, jsxs as m, Fragment as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
class
|
|
1
|
+
import './index.css';var Pe = Object.defineProperty;
|
|
2
|
+
var We = (o, e, t) => e in o ? Pe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var Y = (o, e, t) => We(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { EditableConfigurablePanelLayout as bt, ResponsiveConfigurablePanelLayout as wt, mapThemeToPanelVars as St, mapThemeToTabVars as vt } from "@principal-ade/panels";
|
|
5
|
+
import { useState as P, useRef as N, useEffect as R, useCallback as k, useMemo as ne } from "react";
|
|
6
|
+
import { jsx as s, jsxs as m, Fragment as se } from "react/jsx-runtime";
|
|
7
|
+
import { useTheme as H } from "@principal-ade/industry-theme";
|
|
8
|
+
class ze {
|
|
9
9
|
constructor() {
|
|
10
|
-
|
|
10
|
+
Y(this, "storageKey", "panel-layouts");
|
|
11
11
|
}
|
|
12
12
|
async load(e) {
|
|
13
13
|
try {
|
|
@@ -28,122 +28,122 @@ class xe {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ot(o) {
|
|
32
32
|
const {
|
|
33
33
|
viewKey: e,
|
|
34
34
|
defaultSizes: t,
|
|
35
35
|
panelType: r,
|
|
36
|
-
adapter:
|
|
37
|
-
} = o, [
|
|
38
|
-
|
|
36
|
+
adapter: n = new ze()
|
|
37
|
+
} = o, [a, i] = P(t), [c, y] = P(o.collapsed), l = N(o.collapsed), b = N({}), p = N(null), f = N(null);
|
|
38
|
+
R(() => {
|
|
39
39
|
(async () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const v = await n.load(e);
|
|
41
|
+
v != null && v.sizes && (i(v.sizes), x(v.sizes));
|
|
42
42
|
})();
|
|
43
43
|
}, [e]);
|
|
44
|
-
const x =
|
|
45
|
-
(
|
|
46
|
-
"left" in
|
|
44
|
+
const x = k(
|
|
45
|
+
(w) => {
|
|
46
|
+
"left" in w && w.left > 0 && (b.current.left = w.left), "middle" in w && w.middle > 0 && (b.current.middle = w.middle), "right" in w && w.right > 0 && (b.current.right = w.right);
|
|
47
47
|
},
|
|
48
48
|
[]
|
|
49
|
-
),
|
|
50
|
-
(
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
-
if (
|
|
49
|
+
), h = k(
|
|
50
|
+
(w) => {
|
|
51
|
+
const v = b.current[w];
|
|
52
|
+
if (v && v > 0)
|
|
53
|
+
return v;
|
|
54
|
+
if (w === "left" && "left" in t && t.left > 0)
|
|
55
55
|
return t.left;
|
|
56
|
-
if (
|
|
56
|
+
if (w === "right" && "right" in t && t.right > 0)
|
|
57
57
|
return t.right;
|
|
58
58
|
},
|
|
59
59
|
[t]
|
|
60
|
-
),
|
|
61
|
-
|
|
62
|
-
("left" in t && t.left !==
|
|
63
|
-
}, [t, x]),
|
|
64
|
-
const
|
|
65
|
-
(
|
|
60
|
+
), d = N(t);
|
|
61
|
+
R(() => {
|
|
62
|
+
("left" in t && t.left !== d.current.left || "middle" in t && "middle" in d.current && t.middle !== d.current.middle || "right" in t && t.right !== d.current.right) && (i(t), x(t), d.current = t);
|
|
63
|
+
}, [t, x]), R(() => {
|
|
64
|
+
const w = o.collapsed.left !== l.current.left, v = "right" in o.collapsed && "right" in l.current && o.collapsed.right !== l.current.right;
|
|
65
|
+
(w || v) && (y(o.collapsed), l.current = { ...o.collapsed });
|
|
66
66
|
}, [o.collapsed.left, o.collapsed.right]);
|
|
67
|
-
const
|
|
68
|
-
async (
|
|
67
|
+
const u = k(
|
|
68
|
+
async (w) => {
|
|
69
69
|
try {
|
|
70
|
-
await
|
|
71
|
-
} catch (
|
|
70
|
+
await n.save(e, { sizes: w });
|
|
71
|
+
} catch (v) {
|
|
72
72
|
console.error(
|
|
73
73
|
`Failed to save panel preferences for ${e}:`,
|
|
74
|
-
|
|
74
|
+
v
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
[e,
|
|
79
|
-
), C =
|
|
80
|
-
(
|
|
81
|
-
const
|
|
82
|
-
let
|
|
83
|
-
if ("left" in
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
} else
|
|
78
|
+
[e, n]
|
|
79
|
+
), C = k(
|
|
80
|
+
(w) => {
|
|
81
|
+
const v = { ...w };
|
|
82
|
+
let S = !0;
|
|
83
|
+
if ("left" in w) {
|
|
84
|
+
const T = !!(c != null && c.left), W = w.left;
|
|
85
|
+
if (T) {
|
|
86
|
+
const z = h("left");
|
|
87
|
+
z !== void 0 && z > 0 ? v.left = z : S = !1;
|
|
88
|
+
} else W === 0 && (S = !1);
|
|
89
89
|
}
|
|
90
|
-
if (r === "three-panel" && "right" in
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
} else
|
|
90
|
+
if (r === "three-panel" && "right" in w) {
|
|
91
|
+
const T = !!(c != null && c.right), W = w.right;
|
|
92
|
+
if (T) {
|
|
93
|
+
const z = h("right");
|
|
94
|
+
z !== void 0 && z > 0 ? v.right = z : S = !1;
|
|
95
|
+
} else W === 0 && (S = !1);
|
|
96
96
|
}
|
|
97
|
-
if (i(
|
|
98
|
-
|
|
97
|
+
if (i(v), x(v), p.current && (clearTimeout(p.current), p.current = null), !S) {
|
|
98
|
+
f.current = null;
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
101
|
+
f.current = v, p.current = setTimeout(() => {
|
|
102
|
+
const T = f.current;
|
|
103
|
+
T && (u(T), f.current = null), p.current = null;
|
|
104
104
|
}, 500);
|
|
105
105
|
},
|
|
106
106
|
[
|
|
107
|
-
|
|
108
|
-
k,
|
|
109
|
-
r,
|
|
107
|
+
c,
|
|
110
108
|
h,
|
|
109
|
+
r,
|
|
110
|
+
u,
|
|
111
111
|
x
|
|
112
112
|
]
|
|
113
113
|
);
|
|
114
|
-
|
|
114
|
+
R(() => () => {
|
|
115
115
|
if (p.current) {
|
|
116
|
-
const
|
|
117
|
-
|
|
116
|
+
const w = f.current;
|
|
117
|
+
w && (u(w), f.current = null), clearTimeout(p.current), p.current = null;
|
|
118
118
|
}
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
}, []),
|
|
122
|
-
}, []), I =
|
|
123
|
-
}, []),
|
|
119
|
+
}, [u]);
|
|
120
|
+
const L = k(async () => {
|
|
121
|
+
}, []), $ = k(async () => {
|
|
122
|
+
}, []), I = k(async () => {
|
|
123
|
+
}, []), _ = k(async () => {
|
|
124
124
|
}, []);
|
|
125
125
|
return r === "three-panel" ? {
|
|
126
126
|
type: "three-panel",
|
|
127
|
-
sizes:
|
|
128
|
-
collapsed:
|
|
127
|
+
sizes: a,
|
|
128
|
+
collapsed: c,
|
|
129
129
|
handlePanelResize: C,
|
|
130
|
-
handleLeftCollapseComplete:
|
|
131
|
-
handleLeftExpandComplete:
|
|
130
|
+
handleLeftCollapseComplete: L,
|
|
131
|
+
handleLeftExpandComplete: $,
|
|
132
132
|
handleRightCollapseComplete: I,
|
|
133
|
-
handleRightExpandComplete:
|
|
133
|
+
handleRightExpandComplete: _
|
|
134
134
|
} : {
|
|
135
135
|
type: "two-panel",
|
|
136
|
-
sizes:
|
|
137
|
-
collapsed:
|
|
136
|
+
sizes: a,
|
|
137
|
+
collapsed: c,
|
|
138
138
|
handlePanelResize: C,
|
|
139
|
-
handleLeftCollapseComplete:
|
|
140
|
-
handleLeftExpandComplete:
|
|
139
|
+
handleLeftCollapseComplete: L,
|
|
140
|
+
handleLeftExpandComplete: $
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class Le {
|
|
144
144
|
constructor() {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
Y(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
|
|
146
|
+
Y(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Load all user-created workspace presets
|
|
@@ -203,13 +203,13 @@ class we {
|
|
|
203
203
|
for (let t = 0; t < localStorage.length; t++) {
|
|
204
204
|
const r = localStorage.key(t);
|
|
205
205
|
if (r && r.startsWith(this.REPO_STATE_PREFIX)) {
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
206
|
+
const n = r.substring(this.REPO_STATE_PREFIX.length), a = localStorage.getItem(r);
|
|
207
|
+
if (a)
|
|
208
208
|
try {
|
|
209
|
-
e[
|
|
209
|
+
e[n] = JSON.parse(a);
|
|
210
210
|
} catch (i) {
|
|
211
211
|
console.error(
|
|
212
|
-
`Failed to parse repository state for ${
|
|
212
|
+
`Failed to parse repository state for ${n}:`,
|
|
213
213
|
i
|
|
214
214
|
);
|
|
215
215
|
}
|
|
@@ -221,7 +221,7 @@ class we {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
class
|
|
224
|
+
class D {
|
|
225
225
|
/**
|
|
226
226
|
* Configure a custom storage adapter (for Electron IPC or remote storage)
|
|
227
227
|
*/
|
|
@@ -248,7 +248,7 @@ class L {
|
|
|
248
248
|
* Create a new workspace layout
|
|
249
249
|
*/
|
|
250
250
|
static async createWorkspaceLayout(e) {
|
|
251
|
-
const t = await this.adapter.loadWorkspacePresets(), r = this.generateWorkspaceId(e.name),
|
|
251
|
+
const t = await this.adapter.loadWorkspacePresets(), r = this.generateWorkspaceId(e.name), n = {
|
|
252
252
|
id: r,
|
|
253
253
|
name: e.name,
|
|
254
254
|
description: e.description,
|
|
@@ -258,34 +258,34 @@ class L {
|
|
|
258
258
|
createdAt: Date.now(),
|
|
259
259
|
updatedAt: Date.now(),
|
|
260
260
|
isBuiltIn: !1
|
|
261
|
-
},
|
|
261
|
+
}, a = {
|
|
262
262
|
...t,
|
|
263
|
-
[r]:
|
|
263
|
+
[r]: n
|
|
264
264
|
};
|
|
265
|
-
return await this.adapter.saveWorkspacePresets(
|
|
265
|
+
return await this.adapter.saveWorkspacePresets(a), n;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
268
|
* Update an existing workspace layout
|
|
269
269
|
*/
|
|
270
270
|
static async updateWorkspaceLayout(e, t) {
|
|
271
|
-
const r = await this.adapter.loadWorkspacePresets(),
|
|
272
|
-
if (!
|
|
271
|
+
const r = await this.adapter.loadWorkspacePresets(), n = r[e];
|
|
272
|
+
if (!n)
|
|
273
273
|
return console.error(`Workspace layout ${e} not found`), null;
|
|
274
|
-
if (
|
|
274
|
+
if (n.isBuiltIn)
|
|
275
275
|
return console.error(`Cannot update built-in workspace layout ${e}`), null;
|
|
276
|
-
const
|
|
277
|
-
...
|
|
276
|
+
const a = {
|
|
277
|
+
...n,
|
|
278
278
|
...t,
|
|
279
279
|
id: e,
|
|
280
280
|
// Preserve ID
|
|
281
|
-
createdAt:
|
|
281
|
+
createdAt: n.createdAt,
|
|
282
282
|
// Preserve creation time
|
|
283
283
|
updatedAt: Date.now()
|
|
284
284
|
}, i = {
|
|
285
285
|
...r,
|
|
286
|
-
[e]:
|
|
286
|
+
[e]: a
|
|
287
287
|
};
|
|
288
|
-
return await this.adapter.saveWorkspacePresets(i),
|
|
288
|
+
return await this.adapter.saveWorkspacePresets(i), a;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
291
|
* Delete a workspace layout
|
|
@@ -296,8 +296,8 @@ class L {
|
|
|
296
296
|
return console.error(`Workspace layout ${e} not found`), !1;
|
|
297
297
|
if (r.isBuiltIn)
|
|
298
298
|
return console.error(`Cannot delete built-in workspace layout ${e}`), !1;
|
|
299
|
-
const
|
|
300
|
-
return delete
|
|
299
|
+
const n = { ...t };
|
|
300
|
+
return delete n[e], await this.adapter.saveWorkspacePresets(n), !0;
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
303
|
* Get repository state (which workspace + current sizes/collapsed)
|
|
@@ -335,23 +335,23 @@ class L {
|
|
|
335
335
|
* Check if repository state differs from workspace defaults
|
|
336
336
|
*/
|
|
337
337
|
static hasStateDeviation(e, t) {
|
|
338
|
-
const r = t.defaultSizes ? JSON.stringify(e.sizes) !== JSON.stringify(t.defaultSizes) : !1,
|
|
339
|
-
return { hasSizeDeviation: r, hasCollapsedDeviation:
|
|
338
|
+
const r = t.defaultSizes ? JSON.stringify(e.sizes) !== JSON.stringify(t.defaultSizes) : !1, n = t.defaultCollapsed ? JSON.stringify(e.collapsed) !== JSON.stringify(t.defaultCollapsed) : !1;
|
|
339
|
+
return { hasSizeDeviation: r, hasCollapsedDeviation: n };
|
|
340
340
|
}
|
|
341
341
|
/**
|
|
342
342
|
* Update workspace defaults from repository state
|
|
343
343
|
*/
|
|
344
344
|
static async updateWorkspaceFromRepositoryState(e, t) {
|
|
345
|
-
const r = await this.getWorkspaceLayout(e),
|
|
346
|
-
if (!r || !
|
|
345
|
+
const r = await this.getWorkspaceLayout(e), n = await this.getRepositoryState(t);
|
|
346
|
+
if (!r || !n || r.isBuiltIn) {
|
|
347
347
|
console.error(
|
|
348
348
|
"Cannot update built-in workspace or workspace/state not found"
|
|
349
349
|
);
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
await this.updateWorkspaceLayout(e, {
|
|
353
|
-
defaultSizes:
|
|
354
|
-
defaultCollapsed:
|
|
353
|
+
defaultSizes: n.sizes,
|
|
354
|
+
defaultCollapsed: n.collapsed
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
/**
|
|
@@ -363,9 +363,9 @@ class L {
|
|
|
363
363
|
console.error(`Workspace ${t} not found`);
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
...
|
|
366
|
+
const n = await this.getRepositoryState(e);
|
|
367
|
+
n && await this.setRepositoryState(e, {
|
|
368
|
+
...n,
|
|
369
369
|
sizes: r.defaultSizes || { left: 20, middle: 45, right: 35 },
|
|
370
370
|
collapsed: r.defaultCollapsed || { left: !1, right: !1 }
|
|
371
371
|
});
|
|
@@ -381,8 +381,8 @@ class L {
|
|
|
381
381
|
*/
|
|
382
382
|
static async findMatchingWorkspace(e) {
|
|
383
383
|
const t = await this.getWorkspaceLayouts();
|
|
384
|
-
for (const [r,
|
|
385
|
-
if (this.isLayoutMatchingWorkspace(e,
|
|
384
|
+
for (const [r, n] of Object.entries(t))
|
|
385
|
+
if (this.isLayoutMatchingWorkspace(e, n))
|
|
386
386
|
return r;
|
|
387
387
|
return null;
|
|
388
388
|
}
|
|
@@ -610,296 +610,296 @@ class L {
|
|
|
610
610
|
Object.keys(e).length;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
|
|
614
|
-
function
|
|
615
|
-
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [
|
|
613
|
+
Y(D, "adapter", new Le());
|
|
614
|
+
function rt(o = {}) {
|
|
615
|
+
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [n, a] = P(
|
|
616
616
|
{}
|
|
617
|
-
), [i,
|
|
617
|
+
), [i, c] = P(null), [y, l] = P(null), [b, p] = P(!0), [f, x] = P(null), h = k(async () => {
|
|
618
618
|
try {
|
|
619
619
|
p(!0), x(null);
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
let
|
|
623
|
-
if (!
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
workspaceId:
|
|
627
|
-
sizes:
|
|
620
|
+
const S = await D.getWorkspaceLayouts();
|
|
621
|
+
if (a(S), e) {
|
|
622
|
+
let T = await D.getRepositoryState(e);
|
|
623
|
+
if (!T && t) {
|
|
624
|
+
const W = r || "project-management", z = await D.getWorkspaceLayout(W);
|
|
625
|
+
z && (T = {
|
|
626
|
+
workspaceId: W,
|
|
627
|
+
sizes: z.defaultSizes || {
|
|
628
628
|
left: 20,
|
|
629
629
|
middle: 45,
|
|
630
630
|
right: 35
|
|
631
631
|
},
|
|
632
|
-
collapsed:
|
|
632
|
+
collapsed: z.defaultCollapsed || {
|
|
633
633
|
left: !1,
|
|
634
634
|
right: !1
|
|
635
635
|
}
|
|
636
|
-
}, await
|
|
636
|
+
}, await D.setRepositoryState(
|
|
637
637
|
e,
|
|
638
|
-
|
|
638
|
+
T
|
|
639
639
|
));
|
|
640
640
|
}
|
|
641
|
-
if (
|
|
642
|
-
const
|
|
643
|
-
|
|
641
|
+
if (c(T), T != null && T.workspaceId) {
|
|
642
|
+
const W = await D.getWorkspaceLayout(
|
|
643
|
+
T.workspaceId
|
|
644
644
|
);
|
|
645
|
-
|
|
645
|
+
l(W);
|
|
646
646
|
} else
|
|
647
|
-
|
|
647
|
+
l(null);
|
|
648
648
|
}
|
|
649
|
-
} catch (
|
|
650
|
-
x(
|
|
649
|
+
} catch (S) {
|
|
650
|
+
x(S), console.error("Failed to load workspace data:", S);
|
|
651
651
|
} finally {
|
|
652
652
|
p(!1);
|
|
653
653
|
}
|
|
654
654
|
}, [e, t, r]);
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}, [
|
|
658
|
-
const
|
|
659
|
-
async (
|
|
655
|
+
R(() => {
|
|
656
|
+
h();
|
|
657
|
+
}, [h]);
|
|
658
|
+
const d = k(
|
|
659
|
+
async (S) => await D.getWorkspaceLayout(S),
|
|
660
660
|
[]
|
|
661
|
-
),
|
|
662
|
-
async (
|
|
663
|
-
const
|
|
664
|
-
return await
|
|
661
|
+
), u = k(
|
|
662
|
+
async (S) => {
|
|
663
|
+
const T = await D.createWorkspaceLayout(S);
|
|
664
|
+
return await h(), T;
|
|
665
665
|
},
|
|
666
|
-
[
|
|
667
|
-
), C =
|
|
668
|
-
async (
|
|
669
|
-
const
|
|
670
|
-
return await
|
|
666
|
+
[h]
|
|
667
|
+
), C = k(
|
|
668
|
+
async (S, T) => {
|
|
669
|
+
const W = await D.updateWorkspaceLayout(S, T);
|
|
670
|
+
return await h(), W;
|
|
671
671
|
},
|
|
672
|
-
[
|
|
673
|
-
),
|
|
674
|
-
async (
|
|
675
|
-
const
|
|
676
|
-
return
|
|
672
|
+
[h]
|
|
673
|
+
), L = k(
|
|
674
|
+
async (S) => {
|
|
675
|
+
const T = await D.deleteWorkspaceLayout(S);
|
|
676
|
+
return T && await h(), T;
|
|
677
677
|
},
|
|
678
|
-
[
|
|
679
|
-
),
|
|
680
|
-
async (
|
|
678
|
+
[h]
|
|
679
|
+
), $ = k(
|
|
680
|
+
async (S) => {
|
|
681
681
|
if (!e) {
|
|
682
682
|
console.error("Cannot apply workspace without repositoryKey");
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
console.error(`Workspace ${
|
|
685
|
+
const T = await D.getWorkspaceLayout(S);
|
|
686
|
+
if (!T) {
|
|
687
|
+
console.error(`Workspace ${S} not found`);
|
|
688
688
|
return;
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
workspaceId:
|
|
692
|
-
sizes:
|
|
693
|
-
collapsed:
|
|
690
|
+
const W = {
|
|
691
|
+
workspaceId: S,
|
|
692
|
+
sizes: T.defaultSizes || { left: 20, middle: 45, right: 35 },
|
|
693
|
+
collapsed: T.defaultCollapsed || {
|
|
694
694
|
left: !1,
|
|
695
695
|
right: !1
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
|
-
await
|
|
698
|
+
await D.setRepositoryState(e, W), await h();
|
|
699
699
|
},
|
|
700
|
-
[e,
|
|
701
|
-
), I =
|
|
702
|
-
async (
|
|
700
|
+
[e, h]
|
|
701
|
+
), I = k(
|
|
702
|
+
async (S) => {
|
|
703
703
|
if (!e) {
|
|
704
704
|
console.error("Cannot update sizes without repositoryKey");
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
|
-
await
|
|
707
|
+
await D.updateRepositorySizes(e, S), await h();
|
|
708
708
|
},
|
|
709
|
-
[e,
|
|
710
|
-
),
|
|
711
|
-
async (
|
|
709
|
+
[e, h]
|
|
710
|
+
), _ = k(
|
|
711
|
+
async (S) => {
|
|
712
712
|
if (!e) {
|
|
713
713
|
console.error("Cannot update collapsed without repositoryKey");
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
|
-
await
|
|
716
|
+
await D.updateRepositoryCollapsed(
|
|
717
717
|
e,
|
|
718
|
-
|
|
719
|
-
), await
|
|
718
|
+
S
|
|
719
|
+
), await h();
|
|
720
720
|
},
|
|
721
|
-
[e,
|
|
722
|
-
),
|
|
721
|
+
[e, h]
|
|
722
|
+
), w = k(async () => {
|
|
723
723
|
if (!e || !(i != null && i.workspaceId)) {
|
|
724
724
|
console.error("Cannot reset without repositoryKey and active workspace");
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
|
-
await
|
|
727
|
+
await D.resetRepositoryToWorkspaceDefaults(
|
|
728
728
|
e,
|
|
729
729
|
i.workspaceId
|
|
730
|
-
), await
|
|
731
|
-
}, [e, i == null ? void 0 : i.workspaceId,
|
|
732
|
-
await
|
|
733
|
-
}, [
|
|
730
|
+
), await h();
|
|
731
|
+
}, [e, i == null ? void 0 : i.workspaceId, h]), v = k(async () => {
|
|
732
|
+
await h();
|
|
733
|
+
}, [h]);
|
|
734
734
|
return {
|
|
735
|
-
workspaces:
|
|
735
|
+
workspaces: n,
|
|
736
736
|
repositoryState: i,
|
|
737
737
|
activeWorkspace: y,
|
|
738
|
-
loading:
|
|
739
|
-
error:
|
|
740
|
-
getWorkspace:
|
|
741
|
-
createWorkspace:
|
|
738
|
+
loading: b,
|
|
739
|
+
error: f,
|
|
740
|
+
getWorkspace: d,
|
|
741
|
+
createWorkspace: u,
|
|
742
742
|
updateWorkspace: C,
|
|
743
|
-
deleteWorkspace:
|
|
744
|
-
applyWorkspace:
|
|
743
|
+
deleteWorkspace: L,
|
|
744
|
+
applyWorkspace: $,
|
|
745
745
|
updateSizes: I,
|
|
746
|
-
updateCollapsed:
|
|
747
|
-
resetToDefaults:
|
|
748
|
-
refresh:
|
|
746
|
+
updateCollapsed: _,
|
|
747
|
+
resetToDefaults: w,
|
|
748
|
+
refresh: v
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function nt(o = {}) {
|
|
752
752
|
const {
|
|
753
753
|
initialFocus: e = null,
|
|
754
754
|
collapsed: t = {},
|
|
755
755
|
panelType: r = "three-panel",
|
|
756
|
-
onFocusChange:
|
|
757
|
-
events:
|
|
756
|
+
onFocusChange: n,
|
|
757
|
+
events: a,
|
|
758
758
|
getPanelId: i
|
|
759
|
-
} = o, [
|
|
759
|
+
} = o, [c, y] = P(
|
|
760
760
|
e
|
|
761
|
-
),
|
|
762
|
-
(
|
|
763
|
-
const
|
|
764
|
-
if (y(
|
|
765
|
-
if (
|
|
766
|
-
const
|
|
767
|
-
|
|
761
|
+
), l = k(
|
|
762
|
+
(d) => {
|
|
763
|
+
const u = c;
|
|
764
|
+
if (y(d), n == null || n(d), a && i) {
|
|
765
|
+
if (u) {
|
|
766
|
+
const L = i(u);
|
|
767
|
+
L && a.emit({
|
|
768
768
|
type: "panel:blur",
|
|
769
769
|
source: "panel-layouts",
|
|
770
770
|
timestamp: Date.now(),
|
|
771
771
|
payload: {
|
|
772
|
-
panelId:
|
|
773
|
-
panelSlot:
|
|
774
|
-
nextPanelId: i(
|
|
772
|
+
panelId: L,
|
|
773
|
+
panelSlot: u,
|
|
774
|
+
nextPanelId: i(d)
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
const C = i(
|
|
779
|
-
C &&
|
|
778
|
+
const C = i(d);
|
|
779
|
+
C && a.emit({
|
|
780
780
|
type: "panel:focus",
|
|
781
781
|
source: "panel-layouts",
|
|
782
782
|
timestamp: Date.now(),
|
|
783
783
|
payload: {
|
|
784
784
|
panelId: C,
|
|
785
|
-
panelSlot:
|
|
785
|
+
panelSlot: d,
|
|
786
786
|
source: "keyboard-shortcut"
|
|
787
787
|
}
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
|
-
[
|
|
792
|
-
),
|
|
793
|
-
const
|
|
794
|
-
if (y(null),
|
|
795
|
-
const
|
|
796
|
-
|
|
791
|
+
[c, n, a, i]
|
|
792
|
+
), b = k(() => {
|
|
793
|
+
const d = c;
|
|
794
|
+
if (y(null), n == null || n(null), a && i && d) {
|
|
795
|
+
const u = i(d);
|
|
796
|
+
u && a.emit({
|
|
797
797
|
type: "panel:blur",
|
|
798
798
|
source: "panel-layouts",
|
|
799
799
|
timestamp: Date.now(),
|
|
800
800
|
payload: {
|
|
801
|
-
panelId:
|
|
802
|
-
panelSlot:
|
|
801
|
+
panelId: u,
|
|
802
|
+
panelSlot: d
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
}, [
|
|
807
|
-
const
|
|
808
|
-
return t.left ||
|
|
809
|
-
}, [t, r]),
|
|
810
|
-
const
|
|
811
|
-
if (
|
|
812
|
-
if (
|
|
813
|
-
|
|
806
|
+
}, [c, n, a, i]), p = k(() => {
|
|
807
|
+
const d = [];
|
|
808
|
+
return t.left || d.push("left"), d.push("middle"), r === "three-panel" && !t.right && d.push("right"), d;
|
|
809
|
+
}, [t, r]), f = k(() => {
|
|
810
|
+
const d = p();
|
|
811
|
+
if (d.length === 0) return;
|
|
812
|
+
if (c === null) {
|
|
813
|
+
l(d[0]);
|
|
814
814
|
return;
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
818
|
-
|
|
816
|
+
const u = d.indexOf(c);
|
|
817
|
+
if (u === -1) {
|
|
818
|
+
l(d[0]);
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
|
-
const C = (
|
|
822
|
-
|
|
823
|
-
}, [
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
if (
|
|
827
|
-
|
|
821
|
+
const C = (u + 1) % d.length;
|
|
822
|
+
l(d[C]);
|
|
823
|
+
}, [c, p, l]), x = k(() => {
|
|
824
|
+
const d = p();
|
|
825
|
+
if (d.length === 0) return;
|
|
826
|
+
if (c === null) {
|
|
827
|
+
l(d[d.length - 1]);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
|
|
830
|
+
const u = d.indexOf(c);
|
|
831
|
+
if (u === -1) {
|
|
832
|
+
l(d[d.length - 1]);
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const C =
|
|
836
|
-
|
|
837
|
-
}, [
|
|
838
|
-
(
|
|
839
|
-
[
|
|
835
|
+
const C = u === 0 ? d.length - 1 : u - 1;
|
|
836
|
+
l(d[C]);
|
|
837
|
+
}, [c, p, l]), h = k(
|
|
838
|
+
(d) => c === d,
|
|
839
|
+
[c]
|
|
840
840
|
);
|
|
841
841
|
return {
|
|
842
|
-
focusedPanel:
|
|
843
|
-
setFocus:
|
|
844
|
-
clearFocus:
|
|
845
|
-
focusNext:
|
|
842
|
+
focusedPanel: c,
|
|
843
|
+
setFocus: l,
|
|
844
|
+
clearFocus: b,
|
|
845
|
+
focusNext: f,
|
|
846
846
|
focusPrevious: x,
|
|
847
|
-
isFocused:
|
|
847
|
+
isFocused: h
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function st(o) {
|
|
851
851
|
const {
|
|
852
852
|
enabled: e = !0,
|
|
853
853
|
focusedPanel: t,
|
|
854
854
|
collapsed: r,
|
|
855
|
-
panelType:
|
|
856
|
-
setFocus:
|
|
855
|
+
panelType: n,
|
|
856
|
+
setFocus: a,
|
|
857
857
|
onExpand: i,
|
|
858
|
-
onCollapse:
|
|
859
|
-
} = o, y =
|
|
860
|
-
|
|
858
|
+
onCollapse: c
|
|
859
|
+
} = o, y = N(t), l = N(r), b = N(n);
|
|
860
|
+
R(() => {
|
|
861
861
|
y.current = t;
|
|
862
|
-
}, [t]),
|
|
863
|
-
|
|
864
|
-
}, [r]),
|
|
865
|
-
|
|
866
|
-
}, [
|
|
867
|
-
const p =
|
|
868
|
-
(
|
|
869
|
-
if (!
|
|
862
|
+
}, [t]), R(() => {
|
|
863
|
+
l.current = r;
|
|
864
|
+
}, [r]), R(() => {
|
|
865
|
+
b.current = n;
|
|
866
|
+
}, [n]);
|
|
867
|
+
const p = k(
|
|
868
|
+
(f) => {
|
|
869
|
+
if (!f.altKey || f.ctrlKey || f.metaKey || f.shiftKey)
|
|
870
870
|
return;
|
|
871
|
-
const x =
|
|
872
|
-
x === "Digit1" || x === "Numpad1" ? (
|
|
871
|
+
const x = f.code, h = y.current, d = l.current, u = b.current;
|
|
872
|
+
x === "Digit1" || x === "Numpad1" ? (f.preventDefault(), d.left ? i("left") : h !== "left" ? a("left") : (c("left"), a("middle"))) : x === "Digit2" || x === "Numpad2" ? (f.preventDefault(), a("middle")) : (x === "Digit3" || x === "Numpad3") && u === "three-panel" && (f.preventDefault(), d.right ? i("right") : h !== "right" ? a("right") : (c("right"), a("middle")));
|
|
873
873
|
},
|
|
874
|
-
[
|
|
874
|
+
[a, i, c]
|
|
875
875
|
);
|
|
876
|
-
|
|
876
|
+
R(() => {
|
|
877
877
|
if (e)
|
|
878
878
|
return window.addEventListener("keydown", p), () => {
|
|
879
879
|
window.removeEventListener("keydown", p);
|
|
880
880
|
};
|
|
881
881
|
}, [e, p]);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
const
|
|
883
|
+
function at(o, e, t, r) {
|
|
884
|
+
R(() => {
|
|
885
|
+
const n = e.on(
|
|
886
886
|
"panel:focus",
|
|
887
887
|
(i) => {
|
|
888
888
|
i.payload.panelId === o && t();
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
|
-
let
|
|
892
|
-
return r && (
|
|
891
|
+
let a;
|
|
892
|
+
return r && (a = e.on(
|
|
893
893
|
"panel:blur",
|
|
894
894
|
(i) => {
|
|
895
895
|
i.payload.panelId === o && r();
|
|
896
896
|
}
|
|
897
897
|
)), () => {
|
|
898
|
-
|
|
898
|
+
n(), a == null || a();
|
|
899
899
|
};
|
|
900
900
|
}, [o, e, t, r]);
|
|
901
901
|
}
|
|
902
|
-
const
|
|
902
|
+
const it = ({
|
|
903
903
|
isFocused: o,
|
|
904
904
|
className: e = "",
|
|
905
905
|
style: t = {}
|
|
@@ -929,40 +929,47 @@ const Qe = ({
|
|
|
929
929
|
"aria-hidden": "true"
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
},
|
|
932
|
+
}, ce = ({
|
|
933
933
|
value: o,
|
|
934
934
|
onChange: e,
|
|
935
935
|
onSubmit: t,
|
|
936
936
|
onClose: r,
|
|
937
|
-
onHistoryPrevious:
|
|
938
|
-
onHistoryNext:
|
|
937
|
+
onHistoryPrevious: n,
|
|
938
|
+
onHistoryNext: a,
|
|
939
939
|
mode: i,
|
|
940
|
-
status:
|
|
940
|
+
status: c,
|
|
941
941
|
placeholder: y = "What would you like to do?",
|
|
942
|
-
disabled:
|
|
943
|
-
autoFocus:
|
|
944
|
-
agentAvailable: p = !0
|
|
942
|
+
disabled: l = !1,
|
|
943
|
+
autoFocus: b = !0,
|
|
944
|
+
agentAvailable: p = !0,
|
|
945
|
+
showAutocomplete: f = !1,
|
|
946
|
+
onAutocompleteNext: x,
|
|
947
|
+
onAutocompletePrevious: h,
|
|
948
|
+
onAutocompleteAccept: d
|
|
945
949
|
}) => {
|
|
946
|
-
const { theme: u } =
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
}, [
|
|
950
|
-
const
|
|
951
|
-
switch (
|
|
950
|
+
const { theme: u } = H(), C = N(null);
|
|
951
|
+
R(() => {
|
|
952
|
+
b && C.current && C.current.focus();
|
|
953
|
+
}, [b]);
|
|
954
|
+
const L = (I) => {
|
|
955
|
+
switch (I.stopPropagation(), I.key) {
|
|
952
956
|
case "Enter":
|
|
953
|
-
|
|
957
|
+
I.preventDefault(), t();
|
|
954
958
|
break;
|
|
955
959
|
case "Escape":
|
|
956
|
-
|
|
960
|
+
I.preventDefault(), r();
|
|
961
|
+
break;
|
|
962
|
+
case "Tab":
|
|
963
|
+
f && d && (I.preventDefault(), d());
|
|
957
964
|
break;
|
|
958
965
|
case "ArrowUp":
|
|
959
|
-
|
|
966
|
+
I.preventDefault(), f && h ? h() : n();
|
|
960
967
|
break;
|
|
961
968
|
case "ArrowDown":
|
|
962
|
-
|
|
969
|
+
I.preventDefault(), f && x ? x() : a();
|
|
963
970
|
break;
|
|
964
971
|
}
|
|
965
|
-
},
|
|
972
|
+
}, $ = c === "thinking" || c === "executing";
|
|
966
973
|
return /* @__PURE__ */ m(
|
|
967
974
|
"div",
|
|
968
975
|
{
|
|
@@ -981,7 +988,7 @@ const Qe = ({
|
|
|
981
988
|
style: {
|
|
982
989
|
color: i === "quick-command" ? u.colors.info : p ? u.colors.primary : u.colors.textMuted,
|
|
983
990
|
fontFamily: u.fonts.monospace,
|
|
984
|
-
fontSize:
|
|
991
|
+
fontSize: u.fontSizes[1],
|
|
985
992
|
userSelect: "none",
|
|
986
993
|
display: "flex",
|
|
987
994
|
alignItems: "center"
|
|
@@ -1027,14 +1034,14 @@ const Qe = ({
|
|
|
1027
1034
|
/* @__PURE__ */ s(
|
|
1028
1035
|
"input",
|
|
1029
1036
|
{
|
|
1030
|
-
ref:
|
|
1037
|
+
ref: C,
|
|
1031
1038
|
"data-agent-command-palette-input": !0,
|
|
1032
1039
|
type: "text",
|
|
1033
1040
|
value: o,
|
|
1034
|
-
onChange: (
|
|
1035
|
-
onKeyDown:
|
|
1041
|
+
onChange: (I) => e(I.target.value),
|
|
1042
|
+
onKeyDown: L,
|
|
1036
1043
|
placeholder: y,
|
|
1037
|
-
disabled:
|
|
1044
|
+
disabled: l || $,
|
|
1038
1045
|
style: {
|
|
1039
1046
|
flex: 1,
|
|
1040
1047
|
backgroundColor: "transparent",
|
|
@@ -1042,17 +1049,17 @@ const Qe = ({
|
|
|
1042
1049
|
outline: "none",
|
|
1043
1050
|
color: u.colors.text,
|
|
1044
1051
|
fontFamily: u.fonts.monospace,
|
|
1045
|
-
fontSize:
|
|
1052
|
+
fontSize: u.fontSizes[1],
|
|
1046
1053
|
caretColor: u.colors.primary
|
|
1047
1054
|
}
|
|
1048
1055
|
}
|
|
1049
1056
|
),
|
|
1050
|
-
|
|
1057
|
+
$ && /* @__PURE__ */ m(
|
|
1051
1058
|
"span",
|
|
1052
1059
|
{
|
|
1053
1060
|
style: {
|
|
1054
1061
|
color: u.colors.info,
|
|
1055
|
-
fontSize:
|
|
1062
|
+
fontSize: u.fontSizes[0],
|
|
1056
1063
|
display: "flex",
|
|
1057
1064
|
alignItems: "center",
|
|
1058
1065
|
gap: "4px"
|
|
@@ -1071,11 +1078,11 @@ const Qe = ({
|
|
|
1071
1078
|
}
|
|
1072
1079
|
}
|
|
1073
1080
|
),
|
|
1074
|
-
|
|
1081
|
+
c === "thinking" ? "Thinking..." : "Executing..."
|
|
1075
1082
|
]
|
|
1076
1083
|
}
|
|
1077
1084
|
),
|
|
1078
|
-
|
|
1085
|
+
!$ && /* @__PURE__ */ s(
|
|
1079
1086
|
"kbd",
|
|
1080
1087
|
{
|
|
1081
1088
|
style: {
|
|
@@ -1083,7 +1090,7 @@ const Qe = ({
|
|
|
1083
1090
|
backgroundColor: u.colors.backgroundSecondary,
|
|
1084
1091
|
borderRadius: "3px",
|
|
1085
1092
|
border: `1px solid ${u.colors.border}`,
|
|
1086
|
-
fontSize:
|
|
1093
|
+
fontSize: u.fontSizes[0],
|
|
1087
1094
|
color: u.colors.textMuted
|
|
1088
1095
|
},
|
|
1089
1096
|
children: "Alt+P"
|
|
@@ -1093,15 +1100,15 @@ const Qe = ({
|
|
|
1093
1100
|
}
|
|
1094
1101
|
);
|
|
1095
1102
|
};
|
|
1096
|
-
|
|
1097
|
-
const
|
|
1098
|
-
const { theme: e } =
|
|
1103
|
+
ce.displayName = "AgentCommandInput";
|
|
1104
|
+
const _e = ({ status: o }) => {
|
|
1105
|
+
const { theme: e } = H(), t = {
|
|
1099
1106
|
display: "inline-flex",
|
|
1100
1107
|
alignItems: "center",
|
|
1101
1108
|
justifyContent: "center",
|
|
1102
1109
|
width: "16px",
|
|
1103
1110
|
height: "16px",
|
|
1104
|
-
fontSize:
|
|
1111
|
+
fontSize: e.fontSizes[0]
|
|
1105
1112
|
};
|
|
1106
1113
|
switch (o) {
|
|
1107
1114
|
case "pending":
|
|
@@ -1123,11 +1130,11 @@ const be = ({ status: o }) => {
|
|
|
1123
1130
|
case "error":
|
|
1124
1131
|
return /* @__PURE__ */ s("span", { style: { ...t, color: e.colors.error }, children: "✗" });
|
|
1125
1132
|
}
|
|
1126
|
-
},
|
|
1133
|
+
}, Ae = (o) => {
|
|
1127
1134
|
const e = Object.entries(o);
|
|
1128
1135
|
return e.length === 0 ? "" : e.map(([t, r]) => t === "args" && Array.isArray(r) ? r.join(", ") : typeof r == "string" ? `"${r}"` : JSON.stringify(r)).join(", ");
|
|
1129
|
-
},
|
|
1130
|
-
const { theme: t } =
|
|
1136
|
+
}, Re = ({ tool: o, compact: e }) => {
|
|
1137
|
+
const { theme: t } = H(), r = Ae(o.args);
|
|
1131
1138
|
return /* @__PURE__ */ m(
|
|
1132
1139
|
"div",
|
|
1133
1140
|
{
|
|
@@ -1137,10 +1144,10 @@ const be = ({ status: o }) => {
|
|
|
1137
1144
|
gap: "8px",
|
|
1138
1145
|
padding: e ? "4px 0" : "8px 0",
|
|
1139
1146
|
fontFamily: t.fonts.monospace,
|
|
1140
|
-
fontSize:
|
|
1147
|
+
fontSize: t.fontSizes[1]
|
|
1141
1148
|
},
|
|
1142
1149
|
children: [
|
|
1143
|
-
/* @__PURE__ */ s(
|
|
1150
|
+
/* @__PURE__ */ s(_e, { status: o.status }),
|
|
1144
1151
|
/* @__PURE__ */ m("span", { style: { color: t.colors.text }, children: [
|
|
1145
1152
|
o.name,
|
|
1146
1153
|
r && /* @__PURE__ */ m("span", { style: { color: t.colors.textMuted }, children: [
|
|
@@ -1155,7 +1162,7 @@ const be = ({ status: o }) => {
|
|
|
1155
1162
|
style: {
|
|
1156
1163
|
marginLeft: "auto",
|
|
1157
1164
|
color: t.colors.info,
|
|
1158
|
-
fontSize:
|
|
1165
|
+
fontSize: t.fontSizes[0]
|
|
1159
1166
|
},
|
|
1160
1167
|
children: "[running]"
|
|
1161
1168
|
}
|
|
@@ -1166,7 +1173,7 @@ const be = ({ status: o }) => {
|
|
|
1166
1173
|
style: {
|
|
1167
1174
|
marginLeft: "auto",
|
|
1168
1175
|
color: t.colors.success,
|
|
1169
|
-
fontSize:
|
|
1176
|
+
fontSize: t.fontSizes[0]
|
|
1170
1177
|
},
|
|
1171
1178
|
children: "[done]"
|
|
1172
1179
|
}
|
|
@@ -1177,7 +1184,7 @@ const be = ({ status: o }) => {
|
|
|
1177
1184
|
style: {
|
|
1178
1185
|
marginLeft: "auto",
|
|
1179
1186
|
color: t.colors.error,
|
|
1180
|
-
fontSize:
|
|
1187
|
+
fontSize: t.fontSizes[0]
|
|
1181
1188
|
},
|
|
1182
1189
|
title: o.error,
|
|
1183
1190
|
children: "[error]"
|
|
@@ -1186,11 +1193,11 @@ const be = ({ status: o }) => {
|
|
|
1186
1193
|
]
|
|
1187
1194
|
}
|
|
1188
1195
|
);
|
|
1189
|
-
},
|
|
1196
|
+
}, de = ({
|
|
1190
1197
|
tools: o,
|
|
1191
1198
|
compact: e = !1
|
|
1192
1199
|
}) => {
|
|
1193
|
-
const { theme: t } =
|
|
1200
|
+
const { theme: t } = H();
|
|
1194
1201
|
return o.length === 0 ? null : /* @__PURE__ */ s(
|
|
1195
1202
|
"div",
|
|
1196
1203
|
{
|
|
@@ -1200,32 +1207,32 @@ const be = ({ status: o }) => {
|
|
|
1200
1207
|
borderRadius: "4px",
|
|
1201
1208
|
margin: "8px 16px"
|
|
1202
1209
|
},
|
|
1203
|
-
children: o.map((r) => /* @__PURE__ */ s(
|
|
1210
|
+
children: o.map((r) => /* @__PURE__ */ s(Re, { tool: r, compact: e }, r.id))
|
|
1204
1211
|
}
|
|
1205
1212
|
);
|
|
1206
1213
|
};
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1214
|
+
de.displayName = "ToolExecutionList";
|
|
1215
|
+
const pe = ({
|
|
1209
1216
|
response: o,
|
|
1210
1217
|
streaming: e = !1
|
|
1211
1218
|
}) => {
|
|
1212
|
-
const { theme: t } =
|
|
1219
|
+
const { theme: t } = H();
|
|
1213
1220
|
if (!o)
|
|
1214
1221
|
return null;
|
|
1215
|
-
const r = o.toLowerCase().startsWith("error"),
|
|
1222
|
+
const r = o.toLowerCase().startsWith("error"), n = o.toLowerCase().startsWith("done") || o.toLowerCase().startsWith("executed");
|
|
1216
1223
|
return /* @__PURE__ */ m(
|
|
1217
1224
|
"div",
|
|
1218
1225
|
{
|
|
1219
1226
|
style: {
|
|
1220
1227
|
padding: "12px 16px",
|
|
1221
|
-
color: r ? t.colors.error :
|
|
1222
|
-
fontSize:
|
|
1228
|
+
color: r ? t.colors.error : n ? t.colors.success : t.colors.text,
|
|
1229
|
+
fontSize: t.fontSizes[1],
|
|
1223
1230
|
display: "flex",
|
|
1224
1231
|
alignItems: "center",
|
|
1225
1232
|
gap: "8px"
|
|
1226
1233
|
},
|
|
1227
1234
|
children: [
|
|
1228
|
-
|
|
1235
|
+
n && /* @__PURE__ */ s("span", { children: "✓" }),
|
|
1229
1236
|
r && /* @__PURE__ */ s("span", { children: "✗" }),
|
|
1230
1237
|
/* @__PURE__ */ m("span", { children: [
|
|
1231
1238
|
o,
|
|
@@ -1247,57 +1254,242 @@ const oe = ({
|
|
|
1247
1254
|
}
|
|
1248
1255
|
);
|
|
1249
1256
|
};
|
|
1250
|
-
|
|
1251
|
-
|
|
1257
|
+
pe.displayName = "AgentResponseDisplay";
|
|
1258
|
+
function Ee({
|
|
1259
|
+
text: o,
|
|
1260
|
+
matchedIndices: e,
|
|
1261
|
+
highlightColor: t
|
|
1262
|
+
}) {
|
|
1263
|
+
if (!e.length)
|
|
1264
|
+
return /* @__PURE__ */ s(se, { children: o });
|
|
1265
|
+
const r = new Set(e), n = o.split("");
|
|
1266
|
+
return /* @__PURE__ */ s(se, { children: n.map((a, i) => /* @__PURE__ */ s(
|
|
1267
|
+
"span",
|
|
1268
|
+
{
|
|
1269
|
+
style: {
|
|
1270
|
+
color: r.has(i) ? t : "inherit",
|
|
1271
|
+
fontWeight: r.has(i) ? 600 : "inherit"
|
|
1272
|
+
},
|
|
1273
|
+
children: a
|
|
1274
|
+
},
|
|
1275
|
+
i
|
|
1276
|
+
)) });
|
|
1277
|
+
}
|
|
1278
|
+
const ue = ({
|
|
1279
|
+
matches: o,
|
|
1280
|
+
selectedIndex: e,
|
|
1281
|
+
onSelect: t,
|
|
1282
|
+
maxVisible: r = 6
|
|
1283
|
+
}) => {
|
|
1284
|
+
const { theme: n } = H(), a = N(null), i = N(null);
|
|
1285
|
+
if (R(() => {
|
|
1286
|
+
i.current && a.current && i.current.scrollIntoView({
|
|
1287
|
+
block: "nearest",
|
|
1288
|
+
behavior: "smooth"
|
|
1289
|
+
});
|
|
1290
|
+
}, [e]), o.length === 0)
|
|
1291
|
+
return null;
|
|
1292
|
+
const y = 48 * r;
|
|
1293
|
+
return /* @__PURE__ */ s(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
ref: a,
|
|
1297
|
+
style: {
|
|
1298
|
+
maxHeight: `${y}px`,
|
|
1299
|
+
overflowY: "auto",
|
|
1300
|
+
borderTop: `1px solid ${n.colors.border}`
|
|
1301
|
+
},
|
|
1302
|
+
children: o.map((l, b) => {
|
|
1303
|
+
const p = b === e, f = l.command;
|
|
1304
|
+
return /* @__PURE__ */ m(
|
|
1305
|
+
"div",
|
|
1306
|
+
{
|
|
1307
|
+
ref: p ? i : void 0,
|
|
1308
|
+
onClick: () => t(b),
|
|
1309
|
+
style: {
|
|
1310
|
+
display: "flex",
|
|
1311
|
+
alignItems: "center",
|
|
1312
|
+
gap: "12px",
|
|
1313
|
+
padding: "10px 16px",
|
|
1314
|
+
cursor: "pointer",
|
|
1315
|
+
backgroundColor: p ? n.colors.backgroundSecondary : "transparent",
|
|
1316
|
+
borderLeft: p ? `2px solid ${n.colors.primary}` : "2px solid transparent",
|
|
1317
|
+
transition: "background-color 100ms ease"
|
|
1318
|
+
},
|
|
1319
|
+
onMouseEnter: (x) => {
|
|
1320
|
+
p || (x.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
|
|
1321
|
+
},
|
|
1322
|
+
onMouseLeave: (x) => {
|
|
1323
|
+
p || (x.currentTarget.style.backgroundColor = "transparent");
|
|
1324
|
+
},
|
|
1325
|
+
children: [
|
|
1326
|
+
/* @__PURE__ */ s(
|
|
1327
|
+
"span",
|
|
1328
|
+
{
|
|
1329
|
+
style: {
|
|
1330
|
+
color: n.colors.info,
|
|
1331
|
+
fontFamily: n.fonts.monospace,
|
|
1332
|
+
fontSize: n.fontSizes[1],
|
|
1333
|
+
flexShrink: 0
|
|
1334
|
+
},
|
|
1335
|
+
children: "/"
|
|
1336
|
+
}
|
|
1337
|
+
),
|
|
1338
|
+
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1339
|
+
/* @__PURE__ */ m(
|
|
1340
|
+
"div",
|
|
1341
|
+
{
|
|
1342
|
+
style: {
|
|
1343
|
+
fontFamily: n.fonts.monospace,
|
|
1344
|
+
fontSize: n.fontSizes[1],
|
|
1345
|
+
color: n.colors.text
|
|
1346
|
+
},
|
|
1347
|
+
children: [
|
|
1348
|
+
/* @__PURE__ */ s(
|
|
1349
|
+
Ee,
|
|
1350
|
+
{
|
|
1351
|
+
text: f.name,
|
|
1352
|
+
matchedIndices: l.matchedOn === f.name ? l.matchedIndices : [],
|
|
1353
|
+
highlightColor: n.colors.primary
|
|
1354
|
+
}
|
|
1355
|
+
),
|
|
1356
|
+
l.matchedOn !== f.name && /* @__PURE__ */ m(
|
|
1357
|
+
"span",
|
|
1358
|
+
{
|
|
1359
|
+
style: {
|
|
1360
|
+
color: n.colors.textMuted,
|
|
1361
|
+
marginLeft: "8px",
|
|
1362
|
+
fontSize: n.fontSizes[0]
|
|
1363
|
+
},
|
|
1364
|
+
children: [
|
|
1365
|
+
"(alias: ",
|
|
1366
|
+
l.matchedOn,
|
|
1367
|
+
")"
|
|
1368
|
+
]
|
|
1369
|
+
}
|
|
1370
|
+
)
|
|
1371
|
+
]
|
|
1372
|
+
}
|
|
1373
|
+
),
|
|
1374
|
+
/* @__PURE__ */ s(
|
|
1375
|
+
"div",
|
|
1376
|
+
{
|
|
1377
|
+
style: {
|
|
1378
|
+
fontSize: n.fontSizes[0],
|
|
1379
|
+
color: n.colors.textMuted,
|
|
1380
|
+
marginTop: "2px",
|
|
1381
|
+
whiteSpace: "nowrap",
|
|
1382
|
+
overflow: "hidden",
|
|
1383
|
+
textOverflow: "ellipsis"
|
|
1384
|
+
},
|
|
1385
|
+
children: f.description
|
|
1386
|
+
}
|
|
1387
|
+
)
|
|
1388
|
+
] }),
|
|
1389
|
+
f.args && f.args.length > 0 && /* @__PURE__ */ s(
|
|
1390
|
+
"div",
|
|
1391
|
+
{
|
|
1392
|
+
style: {
|
|
1393
|
+
fontSize: n.fontSizes[0],
|
|
1394
|
+
color: n.colors.textMuted,
|
|
1395
|
+
fontFamily: n.fonts.monospace,
|
|
1396
|
+
flexShrink: 0
|
|
1397
|
+
},
|
|
1398
|
+
children: f.args.map((x, h) => /* @__PURE__ */ m("span", { children: [
|
|
1399
|
+
h > 0 && " ",
|
|
1400
|
+
/* @__PURE__ */ s(
|
|
1401
|
+
"span",
|
|
1402
|
+
{
|
|
1403
|
+
style: {
|
|
1404
|
+
color: x.required ? n.colors.warning : n.colors.textMuted
|
|
1405
|
+
},
|
|
1406
|
+
children: x.required ? `<${x.name}>` : `[${x.name}]`
|
|
1407
|
+
}
|
|
1408
|
+
)
|
|
1409
|
+
] }, x.name))
|
|
1410
|
+
}
|
|
1411
|
+
),
|
|
1412
|
+
p && /* @__PURE__ */ s(
|
|
1413
|
+
"kbd",
|
|
1414
|
+
{
|
|
1415
|
+
style: {
|
|
1416
|
+
padding: "2px 6px",
|
|
1417
|
+
backgroundColor: n.colors.backgroundTertiary,
|
|
1418
|
+
borderRadius: "3px",
|
|
1419
|
+
border: `1px solid ${n.colors.border}`,
|
|
1420
|
+
fontSize: n.fontSizes[0],
|
|
1421
|
+
color: n.colors.textMuted,
|
|
1422
|
+
flexShrink: 0
|
|
1423
|
+
},
|
|
1424
|
+
children: "Tab"
|
|
1425
|
+
}
|
|
1426
|
+
)
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
`${f.name}-${b}`
|
|
1430
|
+
);
|
|
1431
|
+
})
|
|
1432
|
+
}
|
|
1433
|
+
);
|
|
1434
|
+
};
|
|
1435
|
+
ue.displayName = "QuickCommandAutocomplete";
|
|
1436
|
+
const De = ({
|
|
1252
1437
|
palette: o,
|
|
1253
1438
|
config: e
|
|
1254
1439
|
}) => {
|
|
1255
|
-
const { theme: t } =
|
|
1256
|
-
isOpen:
|
|
1257
|
-
close:
|
|
1440
|
+
const { theme: t } = H(), r = N(null), {
|
|
1441
|
+
isOpen: n,
|
|
1442
|
+
close: a,
|
|
1258
1443
|
query: i,
|
|
1259
|
-
setQuery:
|
|
1444
|
+
setQuery: c,
|
|
1260
1445
|
mode: y,
|
|
1261
|
-
status:
|
|
1262
|
-
pendingTools:
|
|
1446
|
+
status: l,
|
|
1447
|
+
pendingTools: b,
|
|
1263
1448
|
completedTools: p,
|
|
1264
|
-
agentResponse:
|
|
1449
|
+
agentResponse: f,
|
|
1265
1450
|
submit: x,
|
|
1266
|
-
historyPrevious:
|
|
1267
|
-
historyNext:
|
|
1268
|
-
suggestions:
|
|
1269
|
-
agentAvailable: C
|
|
1451
|
+
historyPrevious: h,
|
|
1452
|
+
historyNext: d,
|
|
1453
|
+
suggestions: u,
|
|
1454
|
+
agentAvailable: C,
|
|
1455
|
+
// Autocomplete
|
|
1456
|
+
quickCommandMatches: L,
|
|
1457
|
+
selectedAutocompleteIndex: $,
|
|
1458
|
+
autocompleteNext: I,
|
|
1459
|
+
autocompletePrevious: _,
|
|
1460
|
+
autocompleteAccept: w,
|
|
1461
|
+
showAutocomplete: v
|
|
1270
1462
|
} = o;
|
|
1271
|
-
|
|
1272
|
-
if (!
|
|
1273
|
-
const
|
|
1274
|
-
r.current && !r.current.contains(
|
|
1275
|
-
},
|
|
1276
|
-
document.addEventListener("mousedown",
|
|
1463
|
+
R(() => {
|
|
1464
|
+
if (!n) return;
|
|
1465
|
+
const j = (O) => {
|
|
1466
|
+
r.current && !r.current.contains(O.target) && a();
|
|
1467
|
+
}, M = setTimeout(() => {
|
|
1468
|
+
document.addEventListener("mousedown", j);
|
|
1277
1469
|
}, 100);
|
|
1278
1470
|
return () => {
|
|
1279
|
-
clearTimeout(
|
|
1471
|
+
clearTimeout(M), document.removeEventListener("mousedown", j);
|
|
1280
1472
|
};
|
|
1281
|
-
}, [
|
|
1282
|
-
const [
|
|
1283
|
-
if (
|
|
1284
|
-
if (
|
|
1285
|
-
|
|
1473
|
+
}, [n, a]);
|
|
1474
|
+
const [S, T] = P(!1), [W, z] = P(!1);
|
|
1475
|
+
if (R(() => {
|
|
1476
|
+
if (n)
|
|
1477
|
+
z(!0), requestAnimationFrame(() => {
|
|
1286
1478
|
requestAnimationFrame(() => {
|
|
1287
|
-
|
|
1479
|
+
T(!0);
|
|
1288
1480
|
});
|
|
1289
1481
|
});
|
|
1290
1482
|
else {
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1483
|
+
T(!1);
|
|
1484
|
+
const j = setTimeout(() => {
|
|
1485
|
+
z(!1);
|
|
1294
1486
|
}, 150);
|
|
1295
|
-
return () => clearTimeout(
|
|
1487
|
+
return () => clearTimeout(j);
|
|
1296
1488
|
}
|
|
1297
|
-
}, [
|
|
1489
|
+
}, [n]), !W)
|
|
1298
1490
|
return null;
|
|
1299
|
-
const
|
|
1300
|
-
return /* @__PURE__ */ m(
|
|
1491
|
+
const q = C ? (e == null ? void 0 : e.placeholder) || "What would you like to do?" : "Quick command mode (agent unavailable)", B = [...p, ...b], te = B.length > 0, G = f && l !== "idle", J = C && !i && l === "idle" && u.length > 0, X = (y === "quick-command" || !C) && l === "idle", oe = !C && y !== "quick-command" && l === "idle";
|
|
1492
|
+
return /* @__PURE__ */ m(se, { children: [
|
|
1301
1493
|
/* @__PURE__ */ s(
|
|
1302
1494
|
"div",
|
|
1303
1495
|
{
|
|
@@ -1306,7 +1498,7 @@ const Te = ({
|
|
|
1306
1498
|
inset: 0,
|
|
1307
1499
|
zIndex: 999
|
|
1308
1500
|
},
|
|
1309
|
-
onClick:
|
|
1501
|
+
onClick: a
|
|
1310
1502
|
}
|
|
1311
1503
|
),
|
|
1312
1504
|
/* @__PURE__ */ m(
|
|
@@ -1327,25 +1519,29 @@ const Te = ({
|
|
|
1327
1519
|
display: "flex",
|
|
1328
1520
|
flexDirection: "column-reverse",
|
|
1329
1521
|
overflow: "hidden",
|
|
1330
|
-
transform:
|
|
1522
|
+
transform: S ? "translateY(0)" : "translateY(100%)",
|
|
1331
1523
|
transition: "transform 150ms ease-out",
|
|
1332
1524
|
...e == null ? void 0 : e.style
|
|
1333
1525
|
},
|
|
1334
1526
|
children: [
|
|
1335
1527
|
/* @__PURE__ */ m("div", { children: [
|
|
1336
1528
|
/* @__PURE__ */ s(
|
|
1337
|
-
|
|
1529
|
+
ce,
|
|
1338
1530
|
{
|
|
1339
1531
|
value: i,
|
|
1340
|
-
onChange:
|
|
1532
|
+
onChange: c,
|
|
1341
1533
|
onSubmit: x,
|
|
1342
|
-
onClose:
|
|
1343
|
-
onHistoryPrevious:
|
|
1344
|
-
onHistoryNext:
|
|
1534
|
+
onClose: a,
|
|
1535
|
+
onHistoryPrevious: h,
|
|
1536
|
+
onHistoryNext: d,
|
|
1345
1537
|
mode: y,
|
|
1346
|
-
status:
|
|
1347
|
-
placeholder:
|
|
1348
|
-
agentAvailable: C
|
|
1538
|
+
status: l,
|
|
1539
|
+
placeholder: q,
|
|
1540
|
+
agentAvailable: C,
|
|
1541
|
+
showAutocomplete: v,
|
|
1542
|
+
onAutocompleteNext: I,
|
|
1543
|
+
onAutocompletePrevious: _,
|
|
1544
|
+
onAutocompleteAccept: w
|
|
1349
1545
|
}
|
|
1350
1546
|
),
|
|
1351
1547
|
/* @__PURE__ */ m(
|
|
@@ -1356,7 +1552,7 @@ const Te = ({
|
|
|
1356
1552
|
borderTop: `1px solid ${t.colors.border}`,
|
|
1357
1553
|
display: "flex",
|
|
1358
1554
|
gap: "16px",
|
|
1359
|
-
fontSize:
|
|
1555
|
+
fontSize: t.fontSizes[0],
|
|
1360
1556
|
color: t.colors.textMuted,
|
|
1361
1557
|
backgroundColor: t.colors.background
|
|
1362
1558
|
},
|
|
@@ -1430,15 +1626,15 @@ const Te = ({
|
|
|
1430
1626
|
)
|
|
1431
1627
|
] }),
|
|
1432
1628
|
/* @__PURE__ */ m("div", { style: { overflow: "auto" }, children: [
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1629
|
+
te && /* @__PURE__ */ s(de, { tools: B, compact: B.length > 3 }),
|
|
1630
|
+
G && /* @__PURE__ */ s(
|
|
1631
|
+
pe,
|
|
1436
1632
|
{
|
|
1437
|
-
response:
|
|
1438
|
-
streaming:
|
|
1633
|
+
response: f,
|
|
1634
|
+
streaming: l === "thinking"
|
|
1439
1635
|
}
|
|
1440
1636
|
),
|
|
1441
|
-
|
|
1637
|
+
J && /* @__PURE__ */ m(
|
|
1442
1638
|
"div",
|
|
1443
1639
|
{
|
|
1444
1640
|
style: {
|
|
@@ -1453,17 +1649,17 @@ const Te = ({
|
|
|
1453
1649
|
{
|
|
1454
1650
|
style: {
|
|
1455
1651
|
color: t.colors.textMuted,
|
|
1456
|
-
fontSize:
|
|
1652
|
+
fontSize: t.fontSizes[0],
|
|
1457
1653
|
marginRight: "4px"
|
|
1458
1654
|
},
|
|
1459
1655
|
children: "Try:"
|
|
1460
1656
|
}
|
|
1461
1657
|
),
|
|
1462
|
-
|
|
1658
|
+
u.map((j, M) => /* @__PURE__ */ m(
|
|
1463
1659
|
"button",
|
|
1464
1660
|
{
|
|
1465
1661
|
onClick: () => {
|
|
1466
|
-
|
|
1662
|
+
c(j);
|
|
1467
1663
|
},
|
|
1468
1664
|
style: {
|
|
1469
1665
|
padding: "4px 10px",
|
|
@@ -1471,33 +1667,33 @@ const Te = ({
|
|
|
1471
1667
|
border: `1px solid ${t.colors.border}`,
|
|
1472
1668
|
borderRadius: "12px",
|
|
1473
1669
|
color: t.colors.textSecondary,
|
|
1474
|
-
fontSize:
|
|
1670
|
+
fontSize: t.fontSizes[0],
|
|
1475
1671
|
cursor: "pointer",
|
|
1476
1672
|
transition: "background-color 150ms ease"
|
|
1477
1673
|
},
|
|
1478
|
-
onMouseEnter: (
|
|
1479
|
-
|
|
1674
|
+
onMouseEnter: (O) => {
|
|
1675
|
+
O.currentTarget.style.backgroundColor = t.colors.backgroundTertiary;
|
|
1480
1676
|
},
|
|
1481
|
-
onMouseLeave: (
|
|
1482
|
-
|
|
1677
|
+
onMouseLeave: (O) => {
|
|
1678
|
+
O.currentTarget.style.backgroundColor = t.colors.backgroundSecondary;
|
|
1483
1679
|
},
|
|
1484
1680
|
children: [
|
|
1485
1681
|
'"',
|
|
1486
|
-
|
|
1682
|
+
j,
|
|
1487
1683
|
'"'
|
|
1488
1684
|
]
|
|
1489
1685
|
},
|
|
1490
|
-
|
|
1686
|
+
M
|
|
1491
1687
|
))
|
|
1492
1688
|
]
|
|
1493
1689
|
}
|
|
1494
1690
|
),
|
|
1495
|
-
|
|
1691
|
+
oe && /* @__PURE__ */ m(
|
|
1496
1692
|
"div",
|
|
1497
1693
|
{
|
|
1498
1694
|
style: {
|
|
1499
1695
|
padding: "12px 16px",
|
|
1500
|
-
fontSize:
|
|
1696
|
+
fontSize: t.fontSizes[0],
|
|
1501
1697
|
color: t.colors.warning,
|
|
1502
1698
|
display: "flex",
|
|
1503
1699
|
alignItems: "center",
|
|
@@ -1518,12 +1714,12 @@ const Te = ({
|
|
|
1518
1714
|
]
|
|
1519
1715
|
}
|
|
1520
1716
|
),
|
|
1521
|
-
|
|
1717
|
+
X && /* @__PURE__ */ m(
|
|
1522
1718
|
"div",
|
|
1523
1719
|
{
|
|
1524
1720
|
style: {
|
|
1525
1721
|
padding: "12px 16px",
|
|
1526
|
-
fontSize:
|
|
1722
|
+
fontSize: t.fontSizes[0],
|
|
1527
1723
|
color: t.colors.textMuted,
|
|
1528
1724
|
fontFamily: t.fonts.monospace
|
|
1529
1725
|
},
|
|
@@ -1557,6 +1753,21 @@ const Te = ({
|
|
|
1557
1753
|
] })
|
|
1558
1754
|
]
|
|
1559
1755
|
}
|
|
1756
|
+
),
|
|
1757
|
+
v && /* @__PURE__ */ s(
|
|
1758
|
+
ue,
|
|
1759
|
+
{
|
|
1760
|
+
matches: L,
|
|
1761
|
+
selectedIndex: $,
|
|
1762
|
+
onSelect: (j) => {
|
|
1763
|
+
const M = L[j];
|
|
1764
|
+
if (M) {
|
|
1765
|
+
const O = M.command;
|
|
1766
|
+
let Z = `/${O.name}`;
|
|
1767
|
+
O.args && O.args.length > 0 && (Z += " "), c(Z);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1560
1771
|
)
|
|
1561
1772
|
] })
|
|
1562
1773
|
]
|
|
@@ -1578,184 +1789,261 @@ const Te = ({
|
|
|
1578
1789
|
` })
|
|
1579
1790
|
] });
|
|
1580
1791
|
};
|
|
1581
|
-
|
|
1582
|
-
|
|
1792
|
+
De.displayName = "AgentCommandPalette";
|
|
1793
|
+
function ae(o, e) {
|
|
1794
|
+
const t = o.toLowerCase(), r = e.toLowerCase();
|
|
1795
|
+
if (!t)
|
|
1796
|
+
return { score: 0, matchedIndices: [] };
|
|
1797
|
+
const n = [];
|
|
1798
|
+
let a = 0, i = 0, c = 0, y = -1;
|
|
1799
|
+
for (let l = 0; l < r.length && a < t.length; l++)
|
|
1800
|
+
r[l] === t[a] && (n.push(l), y === l - 1 ? (c++, i += c * 2) : c = 1, l === 0 && (i += 10), l > 0 && /[_\-\s]/.test(e[l - 1]) && (i += 5), i += 1, y = l, a++);
|
|
1801
|
+
return a < t.length ? null : (i -= e.length * 0.1, t === r && (i += 20), r.startsWith(t) && (i += 15), { score: i, matchedIndices: n });
|
|
1802
|
+
}
|
|
1803
|
+
function $e(o, e, t = 10) {
|
|
1804
|
+
const r = o.replace(/^\//, "").trim();
|
|
1805
|
+
if (!r)
|
|
1806
|
+
return e.slice(0, t).map((a) => ({
|
|
1807
|
+
command: a,
|
|
1808
|
+
score: 0,
|
|
1809
|
+
matchedIndices: [],
|
|
1810
|
+
matchedOn: a.name
|
|
1811
|
+
}));
|
|
1812
|
+
const n = [];
|
|
1813
|
+
for (const a of e) {
|
|
1814
|
+
const i = ae(r, a.name);
|
|
1815
|
+
if (i) {
|
|
1816
|
+
n.push({
|
|
1817
|
+
command: a,
|
|
1818
|
+
score: i.score,
|
|
1819
|
+
matchedIndices: i.matchedIndices,
|
|
1820
|
+
matchedOn: a.name
|
|
1821
|
+
});
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
if (a.aliases)
|
|
1825
|
+
for (const c of a.aliases) {
|
|
1826
|
+
const y = ae(r, c);
|
|
1827
|
+
if (y) {
|
|
1828
|
+
n.push({
|
|
1829
|
+
command: a,
|
|
1830
|
+
score: y.score - 2,
|
|
1831
|
+
// Slight penalty for alias match
|
|
1832
|
+
matchedIndices: y.matchedIndices,
|
|
1833
|
+
matchedOn: c
|
|
1834
|
+
});
|
|
1835
|
+
break;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
return n.sort((a, i) => i.score - a.score).slice(0, t);
|
|
1840
|
+
}
|
|
1841
|
+
const qe = [
|
|
1583
1842
|
"hide sidebars",
|
|
1584
1843
|
"show terminal",
|
|
1585
1844
|
"focus editor"
|
|
1586
1845
|
];
|
|
1587
|
-
function
|
|
1846
|
+
function lt({
|
|
1588
1847
|
events: o,
|
|
1589
1848
|
keyboard: e = { key: "p", altKey: !0 },
|
|
1590
1849
|
config: t = {},
|
|
1591
1850
|
onExecuteTool: r,
|
|
1592
|
-
initialSuggestions:
|
|
1593
|
-
agentAvailable:
|
|
1851
|
+
initialSuggestions: n = qe,
|
|
1852
|
+
agentAvailable: a = !0,
|
|
1853
|
+
quickCommands: i = []
|
|
1594
1854
|
} = {}) {
|
|
1595
|
-
const [
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1855
|
+
const [c, y] = P(!1), [l, b] = P(""), [p, f] = P("natural"), [x, h] = P("idle"), [d, u] = P([]), [C, L] = P([]), [$, I] = P(""), [_, w] = P([]), [v, S] = P(-1), T = ne(() => n, [n]), [W, z] = P(-1), q = ne(() => p !== "quick-command" || !i.length ? [] : $e(l, i), [l, p, i]), B = ne(() => p === "quick-command" && x === "idle" && q.length > 0 && l.length > 0, [p, x, q.length, l.length]);
|
|
1856
|
+
R(() => {
|
|
1857
|
+
z(q.length > 0 ? 0 : -1);
|
|
1858
|
+
}, [q.length]);
|
|
1859
|
+
const te = k((g) => {
|
|
1860
|
+
b(g), f(g.startsWith("/") ? "quick-command" : "natural");
|
|
1861
|
+
}, []), G = k(() => {
|
|
1862
|
+
y(!0), a ? (b(""), f("natural")) : (b("/"), f("quick-command")), h("idle"), u([]), L([]), I(""), S(-1), o == null || o.emit({
|
|
1599
1863
|
type: "agent-command-palette:opened",
|
|
1600
1864
|
source: "agent-command-palette",
|
|
1601
1865
|
timestamp: Date.now(),
|
|
1602
1866
|
payload: {}
|
|
1603
1867
|
});
|
|
1604
|
-
}, [o,
|
|
1605
|
-
|
|
1868
|
+
}, [o, a]), J = k(() => {
|
|
1869
|
+
y(!1), o == null || o.emit({
|
|
1606
1870
|
type: "agent-command-palette:closed",
|
|
1607
1871
|
source: "agent-command-palette",
|
|
1608
1872
|
timestamp: Date.now(),
|
|
1609
1873
|
payload: {}
|
|
1610
1874
|
});
|
|
1611
|
-
}, [o]),
|
|
1612
|
-
|
|
1613
|
-
}, [
|
|
1614
|
-
|
|
1615
|
-
}, []),
|
|
1616
|
-
const
|
|
1617
|
-
...
|
|
1875
|
+
}, [o]), X = k(() => {
|
|
1876
|
+
c ? J() : G();
|
|
1877
|
+
}, [c, G, J]), oe = k(() => {
|
|
1878
|
+
b(""), f("natural"), h("idle"), u([]), L([]), I(""), S(-1);
|
|
1879
|
+
}, []), j = k((g) => {
|
|
1880
|
+
const A = {
|
|
1881
|
+
...g,
|
|
1618
1882
|
status: "pending"
|
|
1619
1883
|
};
|
|
1620
|
-
return
|
|
1621
|
-
}, []),
|
|
1622
|
-
(
|
|
1623
|
-
|
|
1624
|
-
const
|
|
1625
|
-
if (!
|
|
1626
|
-
const
|
|
1627
|
-
...
|
|
1628
|
-
status:
|
|
1629
|
-
result:
|
|
1630
|
-
error:
|
|
1884
|
+
return u((E) => [...E, A]), A;
|
|
1885
|
+
}, []), M = k(
|
|
1886
|
+
(g, A, E, U) => {
|
|
1887
|
+
u((F) => {
|
|
1888
|
+
const K = F.find((Q) => Q.id === g);
|
|
1889
|
+
if (!K) return F;
|
|
1890
|
+
const V = {
|
|
1891
|
+
...K,
|
|
1892
|
+
status: A,
|
|
1893
|
+
result: E,
|
|
1894
|
+
error: U
|
|
1631
1895
|
};
|
|
1632
|
-
return
|
|
1896
|
+
return A === "success" || A === "error" ? (L((Q) => [...Q, V]), F.filter((Q) => Q.id !== g)) : F.map((Q) => Q.id === g ? V : Q);
|
|
1633
1897
|
});
|
|
1634
1898
|
},
|
|
1635
1899
|
[]
|
|
1636
|
-
),
|
|
1637
|
-
async (
|
|
1638
|
-
const
|
|
1639
|
-
if (!
|
|
1640
|
-
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1643
|
-
id:
|
|
1644
|
-
name:
|
|
1645
|
-
args: { args:
|
|
1646
|
-
}),
|
|
1900
|
+
), O = k(
|
|
1901
|
+
async (g) => {
|
|
1902
|
+
const A = g.replace(/^\//, "").trim().split(/\s+/), E = A[0], U = A.slice(1);
|
|
1903
|
+
if (!E) return;
|
|
1904
|
+
h("executing");
|
|
1905
|
+
const F = `quick-${Date.now()}`;
|
|
1906
|
+
j({
|
|
1907
|
+
id: F,
|
|
1908
|
+
name: E,
|
|
1909
|
+
args: { args: U }
|
|
1910
|
+
}), M(F, "running");
|
|
1647
1911
|
try {
|
|
1648
1912
|
if (r) {
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1913
|
+
const V = await r(E, { args: U });
|
|
1914
|
+
M(F, "success", String(V));
|
|
1651
1915
|
} else
|
|
1652
|
-
|
|
1653
|
-
|
|
1916
|
+
M(F, "success", "Tool executed (no handler)");
|
|
1917
|
+
w((V) => [
|
|
1654
1918
|
{
|
|
1655
|
-
query:
|
|
1919
|
+
query: g,
|
|
1656
1920
|
timestamp: Date.now(),
|
|
1657
|
-
toolsExecuted: [
|
|
1921
|
+
toolsExecuted: [E],
|
|
1658
1922
|
success: !0
|
|
1659
1923
|
},
|
|
1660
|
-
|
|
1661
|
-
]),
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1664
|
-
} catch (
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1924
|
+
...V.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
1925
|
+
]), h("complete"), I(`Executed: ${E}`);
|
|
1926
|
+
const K = t.autoCloseDelay ?? 1e3;
|
|
1927
|
+
K > 0 && setTimeout(() => J(), K);
|
|
1928
|
+
} catch (K) {
|
|
1929
|
+
const V = K instanceof Error ? K.message : "Unknown error";
|
|
1930
|
+
M(F, "error", void 0, V), h("error"), I(`Error: ${V}`);
|
|
1667
1931
|
}
|
|
1668
1932
|
},
|
|
1669
|
-
[r,
|
|
1670
|
-
),
|
|
1671
|
-
if (
|
|
1672
|
-
if (
|
|
1673
|
-
|
|
1933
|
+
[r, j, M, t.autoCloseDelay, t.maxHistoryEntries, J]
|
|
1934
|
+
), Z = k(() => {
|
|
1935
|
+
if (l.trim()) {
|
|
1936
|
+
if (p === "quick-command") {
|
|
1937
|
+
O(l);
|
|
1674
1938
|
return;
|
|
1675
1939
|
}
|
|
1676
|
-
if (!
|
|
1677
|
-
|
|
1940
|
+
if (!a) {
|
|
1941
|
+
I("Agent unavailable. Use quick commands (start with /)."), h("error");
|
|
1678
1942
|
return;
|
|
1679
1943
|
}
|
|
1680
|
-
|
|
1944
|
+
h("thinking"), o == null || o.emit({
|
|
1681
1945
|
type: "agent-command-palette:submit",
|
|
1682
1946
|
source: "agent-command-palette",
|
|
1683
1947
|
timestamp: Date.now(),
|
|
1684
|
-
payload: { query:
|
|
1685
|
-
}),
|
|
1948
|
+
payload: { query: l, mode: p }
|
|
1949
|
+
}), w((g) => [
|
|
1686
1950
|
{
|
|
1687
|
-
query:
|
|
1951
|
+
query: l,
|
|
1688
1952
|
timestamp: Date.now(),
|
|
1689
1953
|
toolsExecuted: [],
|
|
1690
1954
|
success: !0
|
|
1691
1955
|
},
|
|
1692
|
-
...
|
|
1956
|
+
...g.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
1693
1957
|
]);
|
|
1694
1958
|
}
|
|
1695
|
-
}, [
|
|
1696
|
-
if (
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1699
|
-
}, [
|
|
1700
|
-
if (
|
|
1701
|
-
|
|
1959
|
+
}, [l, p, O, o, t.maxHistoryEntries, a]), Se = k(() => {
|
|
1960
|
+
if (_.length === 0) return;
|
|
1961
|
+
const g = v < _.length - 1 ? v + 1 : v;
|
|
1962
|
+
S(g), _[g] && (b(_[g].query), f(_[g].query.startsWith("/") ? "quick-command" : "natural"));
|
|
1963
|
+
}, [_, v]), ve = k(() => {
|
|
1964
|
+
if (v <= 0) {
|
|
1965
|
+
S(-1), b(""), f("natural");
|
|
1702
1966
|
return;
|
|
1703
1967
|
}
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1706
|
-
}, [
|
|
1707
|
-
(
|
|
1968
|
+
const g = v - 1;
|
|
1969
|
+
S(g), _[g] && (b(_[g].query), f(_[g].query.startsWith("/") ? "quick-command" : "natural"));
|
|
1970
|
+
}, [_, v]), re = k(
|
|
1971
|
+
(g) => {
|
|
1708
1972
|
const {
|
|
1709
|
-
key:
|
|
1710
|
-
altKey:
|
|
1711
|
-
ctrlKey:
|
|
1712
|
-
metaKey:
|
|
1713
|
-
shiftKey:
|
|
1714
|
-
} = e,
|
|
1715
|
-
if ((
|
|
1716
|
-
const
|
|
1717
|
-
if (!
|
|
1973
|
+
key: A = "p",
|
|
1974
|
+
altKey: E = !0,
|
|
1975
|
+
ctrlKey: U = !1,
|
|
1976
|
+
metaKey: F = !1,
|
|
1977
|
+
shiftKey: K = !1
|
|
1978
|
+
} = e, V = g.altKey === E && g.ctrlKey === U && g.metaKey === F && g.shiftKey === K;
|
|
1979
|
+
if ((E ? g.code === `Key${A.toUpperCase()}` : g.key.toLowerCase() === A.toLowerCase()) && V) {
|
|
1980
|
+
const ee = g.target;
|
|
1981
|
+
if (!ee.closest("[data-agent-command-palette-input]") && (ee.tagName === "INPUT" || ee.tagName === "TEXTAREA" || ee.isContentEditable))
|
|
1718
1982
|
return;
|
|
1719
|
-
|
|
1983
|
+
g.preventDefault(), X();
|
|
1720
1984
|
}
|
|
1721
1985
|
},
|
|
1722
|
-
[e,
|
|
1986
|
+
[e, X]
|
|
1723
1987
|
);
|
|
1724
|
-
|
|
1988
|
+
R(() => (window.addEventListener("keydown", re), () => window.removeEventListener("keydown", re)), [re]);
|
|
1989
|
+
const Te = k(() => {
|
|
1990
|
+
B && z(
|
|
1991
|
+
(g) => g < q.length - 1 ? g + 1 : 0
|
|
1992
|
+
);
|
|
1993
|
+
}, [B, q.length]), Ce = k(() => {
|
|
1994
|
+
B && z(
|
|
1995
|
+
(g) => g > 0 ? g - 1 : q.length - 1
|
|
1996
|
+
);
|
|
1997
|
+
}, [B, q.length]), Ie = k(() => {
|
|
1998
|
+
if (!B || W < 0) return;
|
|
1999
|
+
const g = q[W];
|
|
2000
|
+
if (!g) return;
|
|
2001
|
+
const A = g.command;
|
|
2002
|
+
let E = `/${A.name}`;
|
|
2003
|
+
A.args && A.args.length > 0 && (E += " "), b(E), z(-1);
|
|
2004
|
+
}, [B, W, q]);
|
|
2005
|
+
return {
|
|
1725
2006
|
// Agent availability
|
|
1726
|
-
agentAvailable:
|
|
2007
|
+
agentAvailable: a,
|
|
1727
2008
|
// Visibility
|
|
1728
|
-
isOpen:
|
|
1729
|
-
open:
|
|
1730
|
-
close:
|
|
1731
|
-
toggle:
|
|
2009
|
+
isOpen: c,
|
|
2010
|
+
open: G,
|
|
2011
|
+
close: J,
|
|
2012
|
+
toggle: X,
|
|
1732
2013
|
// Input
|
|
1733
|
-
query:
|
|
1734
|
-
setQuery:
|
|
1735
|
-
mode:
|
|
2014
|
+
query: l,
|
|
2015
|
+
setQuery: te,
|
|
2016
|
+
mode: p,
|
|
1736
2017
|
// Execution
|
|
1737
|
-
status:
|
|
1738
|
-
setStatus:
|
|
1739
|
-
pendingTools:
|
|
1740
|
-
completedTools:
|
|
1741
|
-
agentResponse:
|
|
1742
|
-
setAgentResponse:
|
|
1743
|
-
submit:
|
|
1744
|
-
executeQuickCommand:
|
|
2018
|
+
status: x,
|
|
2019
|
+
setStatus: h,
|
|
2020
|
+
pendingTools: d,
|
|
2021
|
+
completedTools: C,
|
|
2022
|
+
agentResponse: $,
|
|
2023
|
+
setAgentResponse: I,
|
|
2024
|
+
submit: Z,
|
|
2025
|
+
executeQuickCommand: O,
|
|
1745
2026
|
// Tool management (for external AI integration)
|
|
1746
|
-
addPendingTool:
|
|
1747
|
-
updateToolStatus:
|
|
2027
|
+
addPendingTool: j,
|
|
2028
|
+
updateToolStatus: M,
|
|
1748
2029
|
// History
|
|
1749
|
-
history:
|
|
1750
|
-
historyPrevious:
|
|
1751
|
-
historyNext:
|
|
2030
|
+
history: _,
|
|
2031
|
+
historyPrevious: Se,
|
|
2032
|
+
historyNext: ve,
|
|
1752
2033
|
// Suggestions
|
|
1753
|
-
suggestions:
|
|
2034
|
+
suggestions: T,
|
|
1754
2035
|
// Actions
|
|
1755
|
-
clear:
|
|
2036
|
+
clear: oe,
|
|
2037
|
+
// Quick command autocomplete
|
|
2038
|
+
quickCommandMatches: q,
|
|
2039
|
+
selectedAutocompleteIndex: W,
|
|
2040
|
+
autocompleteNext: Te,
|
|
2041
|
+
autocompletePrevious: Ce,
|
|
2042
|
+
autocompleteAccept: Ie,
|
|
2043
|
+
showAutocomplete: B
|
|
1756
2044
|
};
|
|
1757
2045
|
}
|
|
1758
|
-
const
|
|
2046
|
+
const fe = {
|
|
1759
2047
|
name: "get_visible_panels",
|
|
1760
2048
|
description: "Get the current visibility state of all panel slots (left, middle, right). Returns which panels are active in each slot and whether side panels are collapsed.",
|
|
1761
2049
|
inputs: {
|
|
@@ -1824,7 +2112,7 @@ const re = {
|
|
|
1824
2112
|
call_template_type: "panel_event",
|
|
1825
2113
|
event_type: "panel:get-visibility"
|
|
1826
2114
|
}
|
|
1827
|
-
},
|
|
2115
|
+
}, he = {
|
|
1828
2116
|
name: "get_panel_state",
|
|
1829
2117
|
description: "Get the current state of a specific panel. Returns panel-specific state data if the panel supports state queries.",
|
|
1830
2118
|
inputs: {
|
|
@@ -1856,7 +2144,7 @@ const re = {
|
|
|
1856
2144
|
call_template_type: "panel_event",
|
|
1857
2145
|
event_type: "panel:get-state"
|
|
1858
2146
|
}
|
|
1859
|
-
},
|
|
2147
|
+
}, ye = {
|
|
1860
2148
|
name: "list_panels_with_state",
|
|
1861
2149
|
description: "Get a list of all panels that support state queries. Use this to discover which panels can be queried with get_panel_state.",
|
|
1862
2150
|
inputs: {
|
|
@@ -1889,7 +2177,7 @@ const re = {
|
|
|
1889
2177
|
call_template_type: "panel_event",
|
|
1890
2178
|
event_type: "panel:list-state-panels"
|
|
1891
2179
|
}
|
|
1892
|
-
},
|
|
2180
|
+
}, ge = {
|
|
1893
2181
|
name: "toggle_panel",
|
|
1894
2182
|
description: "Collapse or expand a side panel to give more space to the main content area.",
|
|
1895
2183
|
inputs: {
|
|
@@ -1916,7 +2204,7 @@ const re = {
|
|
|
1916
2204
|
call_template_type: "panel_event",
|
|
1917
2205
|
event_type: "panel:toggle"
|
|
1918
2206
|
}
|
|
1919
|
-
},
|
|
2207
|
+
}, me = {
|
|
1920
2208
|
name: "collapse_all_panels",
|
|
1921
2209
|
description: "Collapse both left and right panels to maximize the main content area. Useful for focus mode.",
|
|
1922
2210
|
inputs: {
|
|
@@ -1936,7 +2224,7 @@ const re = {
|
|
|
1936
2224
|
call_template_type: "panel_event",
|
|
1937
2225
|
event_type: "panel:collapse-all"
|
|
1938
2226
|
}
|
|
1939
|
-
},
|
|
2227
|
+
}, ke = {
|
|
1940
2228
|
name: "expand_all_panels",
|
|
1941
2229
|
description: "Expand both left and right panels to show all content. Restores the default layout.",
|
|
1942
2230
|
inputs: {
|
|
@@ -1956,7 +2244,7 @@ const re = {
|
|
|
1956
2244
|
call_template_type: "panel_event",
|
|
1957
2245
|
event_type: "panel:expand-all"
|
|
1958
2246
|
}
|
|
1959
|
-
},
|
|
2247
|
+
}, xe = {
|
|
1960
2248
|
name: "switch_panel",
|
|
1961
2249
|
description: "Change which content is displayed in a panel slot (left, middle, or right).",
|
|
1962
2250
|
inputs: {
|
|
@@ -1987,7 +2275,7 @@ const re = {
|
|
|
1987
2275
|
call_template_type: "panel_event",
|
|
1988
2276
|
event_type: "panel:switch"
|
|
1989
2277
|
}
|
|
1990
|
-
},
|
|
2278
|
+
}, be = {
|
|
1991
2279
|
name: "focus_panel",
|
|
1992
2280
|
description: "Set focus to a specific panel slot for keyboard navigation.",
|
|
1993
2281
|
inputs: {
|
|
@@ -2013,7 +2301,7 @@ const re = {
|
|
|
2013
2301
|
call_template_type: "panel_event",
|
|
2014
2302
|
event_type: "panel:focus"
|
|
2015
2303
|
}
|
|
2016
|
-
},
|
|
2304
|
+
}, we = {
|
|
2017
2305
|
name: "reset_layout",
|
|
2018
2306
|
description: "Reset panel sizes to the default layout configuration.",
|
|
2019
2307
|
inputs: {
|
|
@@ -2033,44 +2321,44 @@ const re = {
|
|
|
2033
2321
|
call_template_type: "panel_event",
|
|
2034
2322
|
event_type: "panel:reset-layout"
|
|
2035
2323
|
}
|
|
2036
|
-
},
|
|
2324
|
+
}, je = [
|
|
2037
2325
|
// State query tools
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2326
|
+
fe,
|
|
2327
|
+
he,
|
|
2328
|
+
ye,
|
|
2041
2329
|
// Layout action tools
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
],
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
],
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
],
|
|
2330
|
+
ge,
|
|
2331
|
+
me,
|
|
2332
|
+
ke,
|
|
2333
|
+
xe,
|
|
2334
|
+
be,
|
|
2335
|
+
we
|
|
2336
|
+
], ct = [
|
|
2337
|
+
fe,
|
|
2338
|
+
he,
|
|
2339
|
+
ye
|
|
2340
|
+
], dt = [
|
|
2341
|
+
ge,
|
|
2342
|
+
me,
|
|
2343
|
+
ke,
|
|
2344
|
+
xe,
|
|
2345
|
+
be,
|
|
2346
|
+
we
|
|
2347
|
+
], pt = {
|
|
2060
2348
|
id: "panel-layouts",
|
|
2061
2349
|
name: "Panel Layouts",
|
|
2062
2350
|
description: "Generic panel layout and state query operations",
|
|
2063
|
-
tools:
|
|
2351
|
+
tools: je
|
|
2064
2352
|
};
|
|
2065
|
-
function
|
|
2353
|
+
function Me(o) {
|
|
2066
2354
|
const e = {};
|
|
2067
2355
|
if (o.inputs.properties)
|
|
2068
2356
|
for (const [t, r] of Object.entries(o.inputs.properties)) {
|
|
2069
|
-
const
|
|
2357
|
+
const n = r;
|
|
2070
2358
|
e[t] = {
|
|
2071
|
-
type:
|
|
2072
|
-
description:
|
|
2073
|
-
...
|
|
2359
|
+
type: n.type || "string",
|
|
2360
|
+
description: n.description,
|
|
2361
|
+
...n.enum && { enum: n.enum }
|
|
2074
2362
|
};
|
|
2075
2363
|
}
|
|
2076
2364
|
return {
|
|
@@ -2083,12 +2371,12 @@ function Pe(o) {
|
|
|
2083
2371
|
}
|
|
2084
2372
|
};
|
|
2085
2373
|
}
|
|
2086
|
-
function
|
|
2374
|
+
function ut(o) {
|
|
2087
2375
|
return {
|
|
2088
|
-
functionDeclarations: o.map(
|
|
2376
|
+
functionDeclarations: o.map(Me)
|
|
2089
2377
|
};
|
|
2090
2378
|
}
|
|
2091
|
-
function
|
|
2379
|
+
function Oe(o) {
|
|
2092
2380
|
return {
|
|
2093
2381
|
type: "function",
|
|
2094
2382
|
function: {
|
|
@@ -2098,54 +2386,54 @@ function We(o) {
|
|
|
2098
2386
|
}
|
|
2099
2387
|
};
|
|
2100
2388
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return o.map(
|
|
2389
|
+
function ft(o) {
|
|
2390
|
+
return o.map(Oe);
|
|
2103
2391
|
}
|
|
2104
|
-
function
|
|
2392
|
+
function Fe(o) {
|
|
2105
2393
|
return {
|
|
2106
2394
|
name: o.name,
|
|
2107
2395
|
description: o.description,
|
|
2108
2396
|
input_schema: o.inputs
|
|
2109
2397
|
};
|
|
2110
2398
|
}
|
|
2111
|
-
function
|
|
2112
|
-
return o.map(
|
|
2399
|
+
function ht(o) {
|
|
2400
|
+
return o.map(Fe);
|
|
2113
2401
|
}
|
|
2114
|
-
function
|
|
2402
|
+
function Ne(o) {
|
|
2115
2403
|
return {
|
|
2116
2404
|
name: o.name,
|
|
2117
2405
|
description: o.description,
|
|
2118
2406
|
parameters: o.inputs
|
|
2119
2407
|
};
|
|
2120
2408
|
}
|
|
2121
|
-
function
|
|
2122
|
-
return o.map(
|
|
2409
|
+
function yt(o) {
|
|
2410
|
+
return o.map(Ne);
|
|
2123
2411
|
}
|
|
2124
|
-
function
|
|
2412
|
+
function gt(o, e = {}) {
|
|
2125
2413
|
const {
|
|
2126
2414
|
header: t = "You have access to the following tools:",
|
|
2127
2415
|
includeParameters: r = !0
|
|
2128
|
-
} = e,
|
|
2129
|
-
let i = `- ${
|
|
2130
|
-
if (r &&
|
|
2131
|
-
const
|
|
2132
|
-
var
|
|
2133
|
-
const
|
|
2134
|
-
return ` - ${y}: ${
|
|
2416
|
+
} = e, n = o.map((a) => {
|
|
2417
|
+
let i = `- ${a.name}: ${a.description}`;
|
|
2418
|
+
if (r && a.inputs.properties) {
|
|
2419
|
+
const c = Object.entries(a.inputs.properties).map(([y, l]) => {
|
|
2420
|
+
var f;
|
|
2421
|
+
const b = l, p = (f = a.inputs.required) != null && f.includes(y) ? " (required)" : "";
|
|
2422
|
+
return ` - ${y}: ${b.description || b.type}${p}`;
|
|
2135
2423
|
}).join(`
|
|
2136
2424
|
`);
|
|
2137
|
-
|
|
2138
|
-
${
|
|
2425
|
+
c && (i += `
|
|
2426
|
+
${c}`);
|
|
2139
2427
|
}
|
|
2140
2428
|
return i;
|
|
2141
2429
|
});
|
|
2142
2430
|
return `${t}
|
|
2143
2431
|
|
|
2144
|
-
${
|
|
2432
|
+
${n.join(`
|
|
2145
2433
|
|
|
2146
2434
|
`)}`;
|
|
2147
2435
|
}
|
|
2148
|
-
const
|
|
2436
|
+
const Be = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
2149
2437
|
"svg",
|
|
2150
2438
|
{
|
|
2151
2439
|
width: o,
|
|
@@ -2161,7 +2449,7 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2161
2449
|
/* @__PURE__ */ s("path", { d: "M9 3v18" })
|
|
2162
2450
|
]
|
|
2163
2451
|
}
|
|
2164
|
-
),
|
|
2452
|
+
), Ve = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
2165
2453
|
"svg",
|
|
2166
2454
|
{
|
|
2167
2455
|
width: o,
|
|
@@ -2178,7 +2466,7 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2178
2466
|
/* @__PURE__ */ s("path", { d: "m16 15-3-3 3-3" })
|
|
2179
2467
|
]
|
|
2180
2468
|
}
|
|
2181
|
-
),
|
|
2469
|
+
), Ke = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
2182
2470
|
"svg",
|
|
2183
2471
|
{
|
|
2184
2472
|
width: o,
|
|
@@ -2194,7 +2482,7 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2194
2482
|
/* @__PURE__ */ s("path", { d: "M15 3v18" })
|
|
2195
2483
|
]
|
|
2196
2484
|
}
|
|
2197
|
-
),
|
|
2485
|
+
), He = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
2198
2486
|
"svg",
|
|
2199
2487
|
{
|
|
2200
2488
|
width: o,
|
|
@@ -2211,23 +2499,23 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2211
2499
|
/* @__PURE__ */ s("path", { d: "m8 9 3 3-3 3" })
|
|
2212
2500
|
]
|
|
2213
2501
|
}
|
|
2214
|
-
),
|
|
2502
|
+
), ie = ({
|
|
2215
2503
|
isCollapsed: o,
|
|
2216
2504
|
onToggle: e,
|
|
2217
2505
|
side: t = "left",
|
|
2218
2506
|
iconSize: r = 18,
|
|
2219
|
-
style:
|
|
2220
|
-
shortcutHint:
|
|
2507
|
+
style: n,
|
|
2508
|
+
shortcutHint: a = "Cmd/Ctrl+B",
|
|
2221
2509
|
title: i,
|
|
2222
|
-
className:
|
|
2510
|
+
className: c
|
|
2223
2511
|
}) => {
|
|
2224
|
-
const { theme: y } =
|
|
2512
|
+
const { theme: y } = H(), l = () => t === "right" ? o ? /* @__PURE__ */ s(Ke, { size: r }) : /* @__PURE__ */ s(He, { size: r }) : o ? /* @__PURE__ */ s(Be, { size: r }) : /* @__PURE__ */ s(Ve, { size: r });
|
|
2225
2513
|
return /* @__PURE__ */ s(
|
|
2226
2514
|
"button",
|
|
2227
2515
|
{
|
|
2228
2516
|
onClick: e,
|
|
2229
|
-
title: i ?? `${o ? "Show" : "Hide"} ${t === "right" ? "Right Panel" : "Sidebar"}${
|
|
2230
|
-
className:
|
|
2517
|
+
title: i ?? `${o ? "Show" : "Hide"} ${t === "right" ? "Right Panel" : "Sidebar"}${a ? ` (${a})` : ""}`,
|
|
2518
|
+
className: c,
|
|
2231
2519
|
style: {
|
|
2232
2520
|
background: "transparent",
|
|
2233
2521
|
border: "none",
|
|
@@ -2241,7 +2529,7 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2241
2529
|
transition: "all 0.2s",
|
|
2242
2530
|
width: "32px",
|
|
2243
2531
|
height: "32px",
|
|
2244
|
-
...
|
|
2532
|
+
...n
|
|
2245
2533
|
},
|
|
2246
2534
|
onMouseEnter: (p) => {
|
|
2247
2535
|
p.currentTarget.style.backgroundColor = y.colors.backgroundTertiary, p.currentTarget.style.color = y.colors.primary;
|
|
@@ -2249,10 +2537,10 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2249
2537
|
onMouseLeave: (p) => {
|
|
2250
2538
|
p.currentTarget.style.backgroundColor = "transparent", p.currentTarget.style.color = o ? y.colors.textSecondary : y.colors.primary;
|
|
2251
2539
|
},
|
|
2252
|
-
children:
|
|
2540
|
+
children: l()
|
|
2253
2541
|
}
|
|
2254
2542
|
);
|
|
2255
|
-
},
|
|
2543
|
+
}, Qe = ({ size: o = 14 }) => /* @__PURE__ */ m(
|
|
2256
2544
|
"svg",
|
|
2257
2545
|
{
|
|
2258
2546
|
width: o,
|
|
@@ -2270,7 +2558,7 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2270
2558
|
/* @__PURE__ */ s("path", { d: "M20 17H4" })
|
|
2271
2559
|
]
|
|
2272
2560
|
}
|
|
2273
|
-
),
|
|
2561
|
+
), Je = ({ size: o = 14 }) => /* @__PURE__ */ m(
|
|
2274
2562
|
"svg",
|
|
2275
2563
|
{
|
|
2276
2564
|
width: o,
|
|
@@ -2288,21 +2576,21 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2288
2576
|
/* @__PURE__ */ s("path", { d: "M4 17h16" })
|
|
2289
2577
|
]
|
|
2290
2578
|
}
|
|
2291
|
-
),
|
|
2579
|
+
), le = ({
|
|
2292
2580
|
onSwitch: o,
|
|
2293
2581
|
variant: e = "left-middle",
|
|
2294
2582
|
iconSize: t = 14,
|
|
2295
2583
|
style: r,
|
|
2296
|
-
title:
|
|
2297
|
-
className:
|
|
2584
|
+
title: n,
|
|
2585
|
+
className: a
|
|
2298
2586
|
}) => {
|
|
2299
|
-
const { theme: i } =
|
|
2587
|
+
const { theme: i } = H(), c = () => e === "left-middle" ? "Switch left and middle panels" : "Switch right and middle panels", y = e === "left-middle" ? Qe : Je;
|
|
2300
2588
|
return /* @__PURE__ */ s(
|
|
2301
2589
|
"button",
|
|
2302
2590
|
{
|
|
2303
2591
|
onClick: o,
|
|
2304
|
-
title:
|
|
2305
|
-
className:
|
|
2592
|
+
title: n ?? c(),
|
|
2593
|
+
className: a,
|
|
2306
2594
|
style: {
|
|
2307
2595
|
background: "transparent",
|
|
2308
2596
|
border: "none",
|
|
@@ -2318,16 +2606,16 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2318
2606
|
height: "32px",
|
|
2319
2607
|
...r
|
|
2320
2608
|
},
|
|
2321
|
-
onMouseEnter: (
|
|
2322
|
-
|
|
2609
|
+
onMouseEnter: (l) => {
|
|
2610
|
+
l.currentTarget.style.backgroundColor = i.colors.backgroundTertiary, l.currentTarget.style.color = i.colors.text;
|
|
2323
2611
|
},
|
|
2324
|
-
onMouseLeave: (
|
|
2325
|
-
|
|
2612
|
+
onMouseLeave: (l) => {
|
|
2613
|
+
l.currentTarget.style.backgroundColor = "transparent", l.currentTarget.style.color = i.colors.textSecondary;
|
|
2326
2614
|
},
|
|
2327
2615
|
children: /* @__PURE__ */ s(y, { size: t })
|
|
2328
2616
|
}
|
|
2329
2617
|
);
|
|
2330
|
-
},
|
|
2618
|
+
}, Ue = ({ size: o = 14 }) => /* @__PURE__ */ m(
|
|
2331
2619
|
"svg",
|
|
2332
2620
|
{
|
|
2333
2621
|
width: o,
|
|
@@ -2344,24 +2632,24 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2344
2632
|
/* @__PURE__ */ s("path", { d: "M9 21V9" })
|
|
2345
2633
|
]
|
|
2346
2634
|
}
|
|
2347
|
-
),
|
|
2635
|
+
), Ge = ({
|
|
2348
2636
|
onConfigure: o,
|
|
2349
2637
|
iconSize: e = 14,
|
|
2350
2638
|
style: t,
|
|
2351
2639
|
title: r = "Configure panel layout",
|
|
2352
|
-
className:
|
|
2640
|
+
className: n
|
|
2353
2641
|
}) => {
|
|
2354
|
-
const { theme:
|
|
2642
|
+
const { theme: a } = H();
|
|
2355
2643
|
return /* @__PURE__ */ s(
|
|
2356
2644
|
"button",
|
|
2357
2645
|
{
|
|
2358
2646
|
onClick: o,
|
|
2359
2647
|
title: r,
|
|
2360
|
-
className:
|
|
2648
|
+
className: n,
|
|
2361
2649
|
style: {
|
|
2362
2650
|
background: "transparent",
|
|
2363
2651
|
border: "none",
|
|
2364
|
-
color:
|
|
2652
|
+
color: a.colors.textSecondary,
|
|
2365
2653
|
cursor: "pointer",
|
|
2366
2654
|
padding: "6px",
|
|
2367
2655
|
borderRadius: "4px",
|
|
@@ -2374,90 +2662,90 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2374
2662
|
...t
|
|
2375
2663
|
},
|
|
2376
2664
|
onMouseEnter: (i) => {
|
|
2377
|
-
i.currentTarget.style.backgroundColor =
|
|
2665
|
+
i.currentTarget.style.backgroundColor = a.colors.backgroundTertiary, i.currentTarget.style.color = a.colors.text;
|
|
2378
2666
|
},
|
|
2379
2667
|
onMouseLeave: (i) => {
|
|
2380
|
-
i.currentTarget.style.backgroundColor = "transparent", i.currentTarget.style.color =
|
|
2668
|
+
i.currentTarget.style.backgroundColor = "transparent", i.currentTarget.style.color = a.colors.textSecondary;
|
|
2381
2669
|
},
|
|
2382
|
-
children: /* @__PURE__ */ s(
|
|
2670
|
+
children: /* @__PURE__ */ s(Ue, { size: e })
|
|
2383
2671
|
}
|
|
2384
2672
|
);
|
|
2385
|
-
},
|
|
2673
|
+
}, mt = ({
|
|
2386
2674
|
leftSidebarCollapsed: o = !1,
|
|
2387
2675
|
onToggleLeftSidebar: e,
|
|
2388
2676
|
showLeftSidebarControl: t = !1,
|
|
2389
2677
|
rightSidebarCollapsed: r = !1,
|
|
2390
|
-
onToggleRightSidebar:
|
|
2391
|
-
showRightSidebarControl:
|
|
2678
|
+
onToggleRightSidebar: n,
|
|
2679
|
+
showRightSidebarControl: a = !1,
|
|
2392
2680
|
onSwitchLeftMiddlePanels: i,
|
|
2393
|
-
showSwitchLeftMiddle:
|
|
2681
|
+
showSwitchLeftMiddle: c = !1,
|
|
2394
2682
|
onSwitchRightMiddlePanels: y,
|
|
2395
|
-
showSwitchRightMiddle:
|
|
2396
|
-
onConfigurePanels:
|
|
2683
|
+
showSwitchRightMiddle: l = !1,
|
|
2684
|
+
onConfigurePanels: b,
|
|
2397
2685
|
showConfigureButton: p = !1,
|
|
2398
|
-
gap:
|
|
2686
|
+
gap: f = 4,
|
|
2399
2687
|
style: x,
|
|
2400
|
-
className:
|
|
2401
|
-
iconSize:
|
|
2402
|
-
leftCollapseButtonProps:
|
|
2688
|
+
className: h,
|
|
2689
|
+
iconSize: d,
|
|
2690
|
+
leftCollapseButtonProps: u,
|
|
2403
2691
|
rightCollapseButtonProps: C,
|
|
2404
|
-
leftMiddleSwitchButtonProps:
|
|
2405
|
-
rightMiddleSwitchButtonProps:
|
|
2692
|
+
leftMiddleSwitchButtonProps: L,
|
|
2693
|
+
rightMiddleSwitchButtonProps: $,
|
|
2406
2694
|
configureButtonProps: I
|
|
2407
|
-
}) => t && e ||
|
|
2695
|
+
}) => t && e || c && i || p && b || l && y || a && n ? /* @__PURE__ */ m(
|
|
2408
2696
|
"div",
|
|
2409
2697
|
{
|
|
2410
|
-
className:
|
|
2698
|
+
className: h,
|
|
2411
2699
|
style: {
|
|
2412
2700
|
display: "flex",
|
|
2413
2701
|
alignItems: "center",
|
|
2414
|
-
gap: `${
|
|
2702
|
+
gap: `${f}px`,
|
|
2415
2703
|
...x
|
|
2416
2704
|
},
|
|
2417
2705
|
children: [
|
|
2418
2706
|
t && e && /* @__PURE__ */ s(
|
|
2419
|
-
|
|
2707
|
+
ie,
|
|
2420
2708
|
{
|
|
2421
2709
|
isCollapsed: o,
|
|
2422
2710
|
onToggle: e,
|
|
2423
2711
|
side: "left",
|
|
2424
|
-
iconSize:
|
|
2425
|
-
...
|
|
2712
|
+
iconSize: d ?? 18,
|
|
2713
|
+
...u
|
|
2426
2714
|
}
|
|
2427
2715
|
),
|
|
2428
|
-
|
|
2429
|
-
|
|
2716
|
+
c && i && /* @__PURE__ */ s(
|
|
2717
|
+
le,
|
|
2430
2718
|
{
|
|
2431
2719
|
onSwitch: i,
|
|
2432
2720
|
variant: "left-middle",
|
|
2433
|
-
iconSize:
|
|
2434
|
-
...
|
|
2721
|
+
iconSize: d ?? 14,
|
|
2722
|
+
...L
|
|
2435
2723
|
}
|
|
2436
2724
|
),
|
|
2437
|
-
p &&
|
|
2438
|
-
|
|
2725
|
+
p && b && /* @__PURE__ */ s(
|
|
2726
|
+
Ge,
|
|
2439
2727
|
{
|
|
2440
|
-
onConfigure:
|
|
2441
|
-
iconSize:
|
|
2728
|
+
onConfigure: b,
|
|
2729
|
+
iconSize: d ?? 14,
|
|
2442
2730
|
...I
|
|
2443
2731
|
}
|
|
2444
2732
|
),
|
|
2445
|
-
|
|
2446
|
-
|
|
2733
|
+
l && y && /* @__PURE__ */ s(
|
|
2734
|
+
le,
|
|
2447
2735
|
{
|
|
2448
2736
|
onSwitch: y,
|
|
2449
2737
|
variant: "right-middle",
|
|
2450
|
-
iconSize:
|
|
2451
|
-
|
|
2738
|
+
iconSize: d ?? 14,
|
|
2739
|
+
...$
|
|
2452
2740
|
}
|
|
2453
2741
|
),
|
|
2454
|
-
|
|
2455
|
-
|
|
2742
|
+
a && n && /* @__PURE__ */ s(
|
|
2743
|
+
ie,
|
|
2456
2744
|
{
|
|
2457
2745
|
isCollapsed: r,
|
|
2458
|
-
onToggle:
|
|
2746
|
+
onToggle: n,
|
|
2459
2747
|
side: "right",
|
|
2460
|
-
iconSize:
|
|
2748
|
+
iconSize: d ?? 18,
|
|
2461
2749
|
...C
|
|
2462
2750
|
}
|
|
2463
2751
|
)
|
|
@@ -2465,49 +2753,52 @@ const Le = ({ size: o = 18 }) => /* @__PURE__ */ m(
|
|
|
2465
2753
|
}
|
|
2466
2754
|
) : null;
|
|
2467
2755
|
export {
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2756
|
+
ce as AgentCommandInput,
|
|
2757
|
+
De as AgentCommandPalette,
|
|
2758
|
+
pe as AgentResponseDisplay,
|
|
2759
|
+
bt as EditableConfigurablePanelLayout,
|
|
2760
|
+
it as FocusIndicator,
|
|
2761
|
+
ze as LocalStoragePersistenceAdapter,
|
|
2762
|
+
Le as LocalStorageWorkspaceAdapter,
|
|
2763
|
+
ie as PanelCollapseButton,
|
|
2764
|
+
Ge as PanelConfigureButton,
|
|
2765
|
+
mt as PanelControls,
|
|
2766
|
+
le as PanelSwitchButton,
|
|
2767
|
+
ue as QuickCommandAutocomplete,
|
|
2768
|
+
wt as ResponsiveConfigurablePanelLayout,
|
|
2769
|
+
de as ToolExecutionList,
|
|
2770
|
+
D as WorkspaceLayoutService,
|
|
2771
|
+
me as collapseAllPanelsTool,
|
|
2772
|
+
ke as expandAllPanelsTool,
|
|
2773
|
+
be as focusPanelTool,
|
|
2774
|
+
ae as fuzzyMatch,
|
|
2775
|
+
gt as generateToolsSystemPrompt,
|
|
2776
|
+
he as getPanelStateTool,
|
|
2777
|
+
fe as getVisiblePanelsTool,
|
|
2778
|
+
dt as layoutActionTools,
|
|
2779
|
+
je as layoutTools,
|
|
2780
|
+
pt as layoutToolsMetadata,
|
|
2781
|
+
ye as listPanelsWithStateTool,
|
|
2782
|
+
St as mapThemeToPanelVars,
|
|
2783
|
+
vt as mapThemeToTabVars,
|
|
2784
|
+
we as resetLayoutTool,
|
|
2785
|
+
$e as searchQuickCommands,
|
|
2786
|
+
ct as stateQueryTools,
|
|
2787
|
+
xe as switchPanelTool,
|
|
2788
|
+
ge as togglePanelTool,
|
|
2789
|
+
Ne as toolToAIFunction,
|
|
2790
|
+
Fe as toolToAnthropicFormat,
|
|
2791
|
+
Me as toolToGeminiFunction,
|
|
2792
|
+
Oe as toolToOpenAIFunction,
|
|
2793
|
+
yt as toolsToAIFunctions,
|
|
2794
|
+
ht as toolsToAnthropicFormat,
|
|
2795
|
+
ut as toolsToGeminiFormat,
|
|
2796
|
+
ft as toolsToOpenAIFormat,
|
|
2797
|
+
lt as useAgentCommandPalette,
|
|
2798
|
+
nt as usePanelFocus,
|
|
2799
|
+
at as usePanelFocusListener,
|
|
2800
|
+
st as usePanelKeyboardShortcuts,
|
|
2801
|
+
ot as usePanelPersistence,
|
|
2802
|
+
rt as useWorkspace
|
|
2512
2803
|
};
|
|
2513
2804
|
//# sourceMappingURL=index.esm.js.map
|