@principal-ade/panel-layouts 0.2.8 → 0.2.9
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 +7 -1
- package/dist/index.esm.js +917 -844
- 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
1
|
import './index.css';var we = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { EditableConfigurablePanelLayout as
|
|
5
|
-
import
|
|
6
|
-
import { jsx as
|
|
2
|
+
var Ce = (o, e, t) => e in o ? we(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var J = (o, e, t) => Ce(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { EditableConfigurablePanelLayout as Rt, ResponsiveConfigurablePanelLayout as Lt, mapThemeToPanelVars as Wt, mapThemeToTabVars as At } from "@principal-ade/panels";
|
|
5
|
+
import ve, { useState as R, useRef as $, useEffect as A, useCallback as k, forwardRef as Se, useMemo as Y } from "react";
|
|
6
|
+
import { jsx as i, jsxs as x, Fragment as se } from "react/jsx-runtime";
|
|
7
7
|
import { useTheme as q } from "@principal-ade/industry-theme";
|
|
8
|
-
class
|
|
8
|
+
class Te {
|
|
9
9
|
constructor() {
|
|
10
|
-
|
|
10
|
+
J(this, "storageKey", "panel-layouts");
|
|
11
11
|
}
|
|
12
12
|
async load(e) {
|
|
13
13
|
try {
|
|
@@ -28,122 +28,122 @@ class Se {
|
|
|
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: s = new
|
|
37
|
-
} = o, [
|
|
38
|
-
|
|
36
|
+
adapter: s = new Te()
|
|
37
|
+
} = o, [n, a] = R(t), [l, f] = R(o.collapsed), u = $(o.collapsed), g = $({}), d = $(null), p = $(null);
|
|
38
|
+
A(() => {
|
|
39
39
|
(async () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const v = await s.load(e);
|
|
41
|
+
v != null && v.sizes && (a(v.sizes), m(v.sizes));
|
|
42
42
|
})();
|
|
43
43
|
}, [e]);
|
|
44
|
-
const
|
|
44
|
+
const m = k(
|
|
45
45
|
(w) => {
|
|
46
|
-
"left" in w && w.left > 0 && (
|
|
46
|
+
"left" in w && w.left > 0 && (g.current.left = w.left), "middle" in w && w.middle > 0 && (g.current.middle = w.middle), "right" in w && w.right > 0 && (g.current.right = w.right);
|
|
47
47
|
},
|
|
48
48
|
[]
|
|
49
|
-
),
|
|
49
|
+
), y = k(
|
|
50
50
|
(w) => {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
51
|
+
const v = g.current[w];
|
|
52
|
+
if (v && v > 0)
|
|
53
|
+
return v;
|
|
54
54
|
if (w === "left" && "left" in t && t.left > 0)
|
|
55
55
|
return t.left;
|
|
56
56
|
if (w === "right" && "right" in t && t.right > 0)
|
|
57
57
|
return t.right;
|
|
58
58
|
},
|
|
59
59
|
[t]
|
|
60
|
-
), c =
|
|
61
|
-
|
|
62
|
-
("left" in t && t.left !== c.current.left || "middle" in t && "middle" in c.current && t.middle !== c.current.middle || "right" in t && t.right !== c.current.right) && (
|
|
63
|
-
}, [t,
|
|
64
|
-
const w = o.collapsed.left !== u.current.left,
|
|
65
|
-
(w ||
|
|
60
|
+
), c = $(t);
|
|
61
|
+
A(() => {
|
|
62
|
+
("left" in t && t.left !== c.current.left || "middle" in t && "middle" in c.current && t.middle !== c.current.middle || "right" in t && t.right !== c.current.right) && (a(t), m(t), c.current = t);
|
|
63
|
+
}, [t, m]), A(() => {
|
|
64
|
+
const w = o.collapsed.left !== u.current.left, v = "right" in o.collapsed && "right" in u.current && o.collapsed.right !== u.current.right;
|
|
65
|
+
(w || v) && (f(o.collapsed), u.current = { ...o.collapsed });
|
|
66
66
|
}, [o.collapsed.left, o.collapsed.right]);
|
|
67
|
-
const
|
|
67
|
+
const b = k(
|
|
68
68
|
async (w) => {
|
|
69
69
|
try {
|
|
70
70
|
await s.save(e, { sizes: w });
|
|
71
|
-
} catch (
|
|
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
78
|
[e, s]
|
|
79
|
-
),
|
|
79
|
+
), P = k(
|
|
80
80
|
(w) => {
|
|
81
|
-
const
|
|
82
|
-
let
|
|
81
|
+
const v = { ...w };
|
|
82
|
+
let S = !0;
|
|
83
83
|
if ("left" in w) {
|
|
84
|
-
const C = !!(
|
|
84
|
+
const C = !!(l != null && l.left), h = w.left;
|
|
85
85
|
if (C) {
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
} else
|
|
86
|
+
const I = y("left");
|
|
87
|
+
I !== void 0 && I > 0 ? v.left = I : S = !1;
|
|
88
|
+
} else h === 0 && (S = !1);
|
|
89
89
|
}
|
|
90
90
|
if (r === "three-panel" && "right" in w) {
|
|
91
|
-
const C = !!(
|
|
91
|
+
const C = !!(l != null && l.right), h = w.right;
|
|
92
92
|
if (C) {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
} else
|
|
93
|
+
const I = y("right");
|
|
94
|
+
I !== void 0 && I > 0 ? v.right = I : S = !1;
|
|
95
|
+
} else h === 0 && (S = !1);
|
|
96
96
|
}
|
|
97
|
-
if (
|
|
98
|
-
|
|
97
|
+
if (a(v), m(v), d.current && (clearTimeout(d.current), d.current = null), !S) {
|
|
98
|
+
p.current = null;
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
const C =
|
|
103
|
-
C && (
|
|
101
|
+
p.current = v, d.current = setTimeout(() => {
|
|
102
|
+
const C = p.current;
|
|
103
|
+
C && (b(C), p.current = null), d.current = null;
|
|
104
104
|
}, 500);
|
|
105
105
|
},
|
|
106
106
|
[
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
l,
|
|
108
|
+
y,
|
|
109
109
|
r,
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
b,
|
|
111
|
+
m
|
|
112
112
|
]
|
|
113
113
|
);
|
|
114
|
-
|
|
114
|
+
A(() => () => {
|
|
115
115
|
if (d.current) {
|
|
116
|
-
const w =
|
|
117
|
-
w && (
|
|
116
|
+
const w = p.current;
|
|
117
|
+
w && (b(w), p.current = null), clearTimeout(d.current), d.current = null;
|
|
118
118
|
}
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
}, []),
|
|
122
|
-
}, []),
|
|
123
|
-
}, []),
|
|
119
|
+
}, [b]);
|
|
120
|
+
const D = k(async () => {
|
|
121
|
+
}, []), W = k(async () => {
|
|
122
|
+
}, []), L = k(async () => {
|
|
123
|
+
}, []), j = k(async () => {
|
|
124
124
|
}, []);
|
|
125
125
|
return r === "three-panel" ? {
|
|
126
126
|
type: "three-panel",
|
|
127
|
-
sizes:
|
|
128
|
-
collapsed:
|
|
129
|
-
handlePanelResize:
|
|
130
|
-
handleLeftCollapseComplete:
|
|
131
|
-
handleLeftExpandComplete:
|
|
132
|
-
handleRightCollapseComplete:
|
|
133
|
-
handleRightExpandComplete:
|
|
127
|
+
sizes: n,
|
|
128
|
+
collapsed: l,
|
|
129
|
+
handlePanelResize: P,
|
|
130
|
+
handleLeftCollapseComplete: D,
|
|
131
|
+
handleLeftExpandComplete: W,
|
|
132
|
+
handleRightCollapseComplete: L,
|
|
133
|
+
handleRightExpandComplete: j
|
|
134
134
|
} : {
|
|
135
135
|
type: "two-panel",
|
|
136
|
-
sizes:
|
|
137
|
-
collapsed:
|
|
138
|
-
handlePanelResize:
|
|
139
|
-
handleLeftCollapseComplete:
|
|
140
|
-
handleLeftExpandComplete:
|
|
136
|
+
sizes: n,
|
|
137
|
+
collapsed: l,
|
|
138
|
+
handlePanelResize: P,
|
|
139
|
+
handleLeftCollapseComplete: D,
|
|
140
|
+
handleLeftExpandComplete: W
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class Pe {
|
|
144
144
|
constructor() {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
J(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
|
|
146
|
+
J(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Load all user-created workspace presets
|
|
@@ -203,14 +203,14 @@ class Te {
|
|
|
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 s = r.substring(this.REPO_STATE_PREFIX.length),
|
|
207
|
-
if (
|
|
206
|
+
const s = r.substring(this.REPO_STATE_PREFIX.length), n = localStorage.getItem(r);
|
|
207
|
+
if (n)
|
|
208
208
|
try {
|
|
209
|
-
e[s] = JSON.parse(
|
|
210
|
-
} catch (
|
|
209
|
+
e[s] = JSON.parse(n);
|
|
210
|
+
} catch (a) {
|
|
211
211
|
console.error(
|
|
212
212
|
`Failed to parse repository state for ${s}:`,
|
|
213
|
-
|
|
213
|
+
a
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -258,11 +258,11 @@ class _ {
|
|
|
258
258
|
createdAt: Date.now(),
|
|
259
259
|
updatedAt: Date.now(),
|
|
260
260
|
isBuiltIn: !1
|
|
261
|
-
},
|
|
261
|
+
}, n = {
|
|
262
262
|
...t,
|
|
263
263
|
[r]: s
|
|
264
264
|
};
|
|
265
|
-
return await this.adapter.saveWorkspacePresets(
|
|
265
|
+
return await this.adapter.saveWorkspacePresets(n), s;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
268
|
* Update an existing workspace layout
|
|
@@ -273,7 +273,7 @@ class _ {
|
|
|
273
273
|
return console.error(`Workspace layout ${e} not found`), null;
|
|
274
274
|
if (s.isBuiltIn)
|
|
275
275
|
return console.error(`Cannot update built-in workspace layout ${e}`), null;
|
|
276
|
-
const
|
|
276
|
+
const n = {
|
|
277
277
|
...s,
|
|
278
278
|
...t,
|
|
279
279
|
id: e,
|
|
@@ -281,11 +281,11 @@ class _ {
|
|
|
281
281
|
createdAt: s.createdAt,
|
|
282
282
|
// Preserve creation time
|
|
283
283
|
updatedAt: Date.now()
|
|
284
|
-
},
|
|
284
|
+
}, a = {
|
|
285
285
|
...r,
|
|
286
|
-
[e]:
|
|
286
|
+
[e]: n
|
|
287
287
|
};
|
|
288
|
-
return await this.adapter.saveWorkspacePresets(
|
|
288
|
+
return await this.adapter.saveWorkspacePresets(a), n;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
291
|
* Delete a workspace layout
|
|
@@ -610,26 +610,26 @@ class _ {
|
|
|
610
610
|
Object.keys(e).length;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
|
|
614
|
-
function
|
|
615
|
-
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s,
|
|
613
|
+
J(_, "adapter", new Pe());
|
|
614
|
+
function rt(o = {}) {
|
|
615
|
+
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s, n] = R(
|
|
616
616
|
{}
|
|
617
|
-
), [
|
|
617
|
+
), [a, l] = R(null), [f, u] = R(null), [g, d] = R(!0), [p, m] = R(null), y = k(async () => {
|
|
618
618
|
try {
|
|
619
|
-
d(!0),
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
619
|
+
d(!0), m(null);
|
|
620
|
+
const S = await _.getWorkspaceLayouts();
|
|
621
|
+
if (n(S), e) {
|
|
622
622
|
let C = await _.getRepositoryState(e);
|
|
623
623
|
if (!C && t) {
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
workspaceId:
|
|
627
|
-
sizes:
|
|
624
|
+
const h = r || "project-management", I = await _.getWorkspaceLayout(h);
|
|
625
|
+
I && (C = {
|
|
626
|
+
workspaceId: h,
|
|
627
|
+
sizes: I.defaultSizes || {
|
|
628
628
|
left: 20,
|
|
629
629
|
middle: 45,
|
|
630
630
|
right: 35
|
|
631
631
|
},
|
|
632
|
-
collapsed:
|
|
632
|
+
collapsed: I.defaultCollapsed || {
|
|
633
633
|
left: !1,
|
|
634
634
|
right: !1
|
|
635
635
|
}
|
|
@@ -638,242 +638,242 @@ function ot(o = {}) {
|
|
|
638
638
|
C
|
|
639
639
|
));
|
|
640
640
|
}
|
|
641
|
-
if (
|
|
642
|
-
const
|
|
641
|
+
if (l(C), C != null && C.workspaceId) {
|
|
642
|
+
const h = await _.getWorkspaceLayout(
|
|
643
643
|
C.workspaceId
|
|
644
644
|
);
|
|
645
|
-
u(
|
|
645
|
+
u(h);
|
|
646
646
|
} else
|
|
647
647
|
u(null);
|
|
648
648
|
}
|
|
649
|
-
} catch (
|
|
650
|
-
|
|
649
|
+
} catch (S) {
|
|
650
|
+
m(S), console.error("Failed to load workspace data:", S);
|
|
651
651
|
} finally {
|
|
652
652
|
d(!1);
|
|
653
653
|
}
|
|
654
654
|
}, [e, t, r]);
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}, [
|
|
658
|
-
const c =
|
|
659
|
-
async (
|
|
655
|
+
A(() => {
|
|
656
|
+
y();
|
|
657
|
+
}, [y]);
|
|
658
|
+
const c = k(
|
|
659
|
+
async (S) => await _.getWorkspaceLayout(S),
|
|
660
660
|
[]
|
|
661
|
-
),
|
|
662
|
-
async (
|
|
663
|
-
const C = await _.createWorkspaceLayout(
|
|
664
|
-
return await
|
|
661
|
+
), b = k(
|
|
662
|
+
async (S) => {
|
|
663
|
+
const C = await _.createWorkspaceLayout(S);
|
|
664
|
+
return await y(), C;
|
|
665
665
|
},
|
|
666
|
-
[
|
|
667
|
-
),
|
|
668
|
-
async (
|
|
669
|
-
const
|
|
670
|
-
return await
|
|
666
|
+
[y]
|
|
667
|
+
), P = k(
|
|
668
|
+
async (S, C) => {
|
|
669
|
+
const h = await _.updateWorkspaceLayout(S, C);
|
|
670
|
+
return await y(), h;
|
|
671
671
|
},
|
|
672
|
-
[
|
|
673
|
-
),
|
|
674
|
-
async (
|
|
675
|
-
const C = await _.deleteWorkspaceLayout(
|
|
676
|
-
return C && await
|
|
672
|
+
[y]
|
|
673
|
+
), D = k(
|
|
674
|
+
async (S) => {
|
|
675
|
+
const C = await _.deleteWorkspaceLayout(S);
|
|
676
|
+
return C && await y(), C;
|
|
677
677
|
},
|
|
678
|
-
[
|
|
679
|
-
),
|
|
680
|
-
async (
|
|
678
|
+
[y]
|
|
679
|
+
), W = k(
|
|
680
|
+
async (S) => {
|
|
681
681
|
if (!e) {
|
|
682
682
|
console.error("Cannot apply workspace without repositoryKey");
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
|
-
const C = await _.getWorkspaceLayout(
|
|
685
|
+
const C = await _.getWorkspaceLayout(S);
|
|
686
686
|
if (!C) {
|
|
687
|
-
console.error(`Workspace ${
|
|
687
|
+
console.error(`Workspace ${S} not found`);
|
|
688
688
|
return;
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
workspaceId:
|
|
690
|
+
const h = {
|
|
691
|
+
workspaceId: S,
|
|
692
692
|
sizes: C.defaultSizes || { left: 20, middle: 45, right: 35 },
|
|
693
693
|
collapsed: C.defaultCollapsed || {
|
|
694
694
|
left: !1,
|
|
695
695
|
right: !1
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
|
-
await _.setRepositoryState(e,
|
|
698
|
+
await _.setRepositoryState(e, h), await y();
|
|
699
699
|
},
|
|
700
|
-
[e,
|
|
701
|
-
),
|
|
702
|
-
async (
|
|
700
|
+
[e, y]
|
|
701
|
+
), L = k(
|
|
702
|
+
async (S) => {
|
|
703
703
|
if (!e) {
|
|
704
704
|
console.error("Cannot update sizes without repositoryKey");
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
|
-
await _.updateRepositorySizes(e,
|
|
707
|
+
await _.updateRepositorySizes(e, S), await y();
|
|
708
708
|
},
|
|
709
|
-
[e,
|
|
710
|
-
),
|
|
711
|
-
async (
|
|
709
|
+
[e, y]
|
|
710
|
+
), j = k(
|
|
711
|
+
async (S) => {
|
|
712
712
|
if (!e) {
|
|
713
713
|
console.error("Cannot update collapsed without repositoryKey");
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
716
|
await _.updateRepositoryCollapsed(
|
|
717
717
|
e,
|
|
718
|
-
|
|
719
|
-
), await
|
|
718
|
+
S
|
|
719
|
+
), await y();
|
|
720
720
|
},
|
|
721
|
-
[e,
|
|
722
|
-
), w =
|
|
723
|
-
if (!e || !(
|
|
721
|
+
[e, y]
|
|
722
|
+
), w = k(async () => {
|
|
723
|
+
if (!e || !(a != null && a.workspaceId)) {
|
|
724
724
|
console.error("Cannot reset without repositoryKey and active workspace");
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
727
|
await _.resetRepositoryToWorkspaceDefaults(
|
|
728
728
|
e,
|
|
729
|
-
|
|
730
|
-
), await
|
|
731
|
-
}, [e,
|
|
732
|
-
await
|
|
733
|
-
}, [
|
|
729
|
+
a.workspaceId
|
|
730
|
+
), await y();
|
|
731
|
+
}, [e, a == null ? void 0 : a.workspaceId, y]), v = k(async () => {
|
|
732
|
+
await y();
|
|
733
|
+
}, [y]);
|
|
734
734
|
return {
|
|
735
735
|
workspaces: s,
|
|
736
|
-
repositoryState:
|
|
737
|
-
activeWorkspace:
|
|
738
|
-
loading:
|
|
739
|
-
error:
|
|
736
|
+
repositoryState: a,
|
|
737
|
+
activeWorkspace: f,
|
|
738
|
+
loading: g,
|
|
739
|
+
error: p,
|
|
740
740
|
getWorkspace: c,
|
|
741
|
-
createWorkspace:
|
|
742
|
-
updateWorkspace:
|
|
743
|
-
deleteWorkspace:
|
|
744
|
-
applyWorkspace:
|
|
745
|
-
updateSizes:
|
|
746
|
-
updateCollapsed:
|
|
741
|
+
createWorkspace: b,
|
|
742
|
+
updateWorkspace: P,
|
|
743
|
+
deleteWorkspace: D,
|
|
744
|
+
applyWorkspace: W,
|
|
745
|
+
updateSizes: L,
|
|
746
|
+
updateCollapsed: j,
|
|
747
747
|
resetToDefaults: w,
|
|
748
|
-
refresh:
|
|
748
|
+
refresh: v
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function st(o = {}) {
|
|
752
752
|
const {
|
|
753
753
|
initialFocus: e = null,
|
|
754
754
|
collapsed: t = {},
|
|
755
755
|
panelType: r = "three-panel",
|
|
756
756
|
onFocusChange: s,
|
|
757
|
-
events:
|
|
758
|
-
getPanelId:
|
|
759
|
-
} = o, [
|
|
757
|
+
events: n,
|
|
758
|
+
getPanelId: a
|
|
759
|
+
} = o, [l, f] = R(
|
|
760
760
|
e
|
|
761
|
-
), u =
|
|
761
|
+
), u = k(
|
|
762
762
|
(c) => {
|
|
763
|
-
const
|
|
764
|
-
if (
|
|
765
|
-
if (
|
|
766
|
-
const
|
|
767
|
-
|
|
763
|
+
const b = l;
|
|
764
|
+
if (f(c), s == null || s(c), n && a) {
|
|
765
|
+
if (b) {
|
|
766
|
+
const D = a(b);
|
|
767
|
+
D && n.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:
|
|
772
|
+
panelId: D,
|
|
773
|
+
panelSlot: b,
|
|
774
|
+
nextPanelId: a(c)
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
|
|
778
|
+
const P = a(c);
|
|
779
|
+
P && n.emit({
|
|
780
780
|
type: "panel:focus",
|
|
781
781
|
source: "panel-layouts",
|
|
782
782
|
timestamp: Date.now(),
|
|
783
783
|
payload: {
|
|
784
|
-
panelId:
|
|
784
|
+
panelId: P,
|
|
785
785
|
panelSlot: c,
|
|
786
786
|
source: "keyboard-shortcut"
|
|
787
787
|
}
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
|
-
[
|
|
792
|
-
),
|
|
793
|
-
const c =
|
|
794
|
-
if (
|
|
795
|
-
const
|
|
796
|
-
|
|
791
|
+
[l, s, n, a]
|
|
792
|
+
), g = k(() => {
|
|
793
|
+
const c = l;
|
|
794
|
+
if (f(null), s == null || s(null), n && a && c) {
|
|
795
|
+
const b = a(c);
|
|
796
|
+
b && n.emit({
|
|
797
797
|
type: "panel:blur",
|
|
798
798
|
source: "panel-layouts",
|
|
799
799
|
timestamp: Date.now(),
|
|
800
800
|
payload: {
|
|
801
|
-
panelId:
|
|
801
|
+
panelId: b,
|
|
802
802
|
panelSlot: c
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
}, [
|
|
806
|
+
}, [l, s, n, a]), d = k(() => {
|
|
807
807
|
const c = [];
|
|
808
808
|
return t.left || c.push("left"), c.push("middle"), r === "three-panel" && !t.right && c.push("right"), c;
|
|
809
|
-
}, [t, r]),
|
|
809
|
+
}, [t, r]), p = k(() => {
|
|
810
810
|
const c = d();
|
|
811
811
|
if (c.length === 0) return;
|
|
812
|
-
if (
|
|
812
|
+
if (l === null) {
|
|
813
813
|
u(c[0]);
|
|
814
814
|
return;
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
816
|
+
const b = c.indexOf(l);
|
|
817
|
+
if (b === -1) {
|
|
818
818
|
u(c[0]);
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
|
-
const
|
|
822
|
-
u(c[
|
|
823
|
-
}, [
|
|
821
|
+
const P = (b + 1) % c.length;
|
|
822
|
+
u(c[P]);
|
|
823
|
+
}, [l, d, u]), m = k(() => {
|
|
824
824
|
const c = d();
|
|
825
825
|
if (c.length === 0) return;
|
|
826
|
-
if (
|
|
826
|
+
if (l === null) {
|
|
827
827
|
u(c[c.length - 1]);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
830
|
+
const b = c.indexOf(l);
|
|
831
|
+
if (b === -1) {
|
|
832
832
|
u(c[c.length - 1]);
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
836
|
-
u(c[
|
|
837
|
-
}, [
|
|
838
|
-
(c) =>
|
|
839
|
-
[
|
|
835
|
+
const P = b === 0 ? c.length - 1 : b - 1;
|
|
836
|
+
u(c[P]);
|
|
837
|
+
}, [l, d, u]), y = k(
|
|
838
|
+
(c) => l === c,
|
|
839
|
+
[l]
|
|
840
840
|
);
|
|
841
841
|
return {
|
|
842
|
-
focusedPanel:
|
|
842
|
+
focusedPanel: l,
|
|
843
843
|
setFocus: u,
|
|
844
|
-
clearFocus:
|
|
845
|
-
focusNext:
|
|
846
|
-
focusPrevious:
|
|
847
|
-
isFocused:
|
|
844
|
+
clearFocus: g,
|
|
845
|
+
focusNext: p,
|
|
846
|
+
focusPrevious: m,
|
|
847
|
+
isFocused: y
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function nt(o) {
|
|
851
851
|
const {
|
|
852
852
|
enabled: e = !0,
|
|
853
853
|
focusedPanel: t,
|
|
854
854
|
collapsed: r,
|
|
855
855
|
panelType: s,
|
|
856
|
-
setFocus:
|
|
857
|
-
onExpand:
|
|
858
|
-
onCollapse:
|
|
859
|
-
} = o,
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
}, [t]),
|
|
856
|
+
setFocus: n,
|
|
857
|
+
onExpand: a,
|
|
858
|
+
onCollapse: l
|
|
859
|
+
} = o, f = $(t), u = $(r), g = $(s);
|
|
860
|
+
A(() => {
|
|
861
|
+
f.current = t;
|
|
862
|
+
}, [t]), A(() => {
|
|
863
863
|
u.current = r;
|
|
864
|
-
}, [r]),
|
|
865
|
-
|
|
864
|
+
}, [r]), A(() => {
|
|
865
|
+
g.current = s;
|
|
866
866
|
}, [s]);
|
|
867
|
-
const d =
|
|
868
|
-
(
|
|
869
|
-
if (!
|
|
867
|
+
const d = k(
|
|
868
|
+
(p) => {
|
|
869
|
+
if (!p.altKey || p.ctrlKey || p.metaKey || p.shiftKey)
|
|
870
870
|
return;
|
|
871
|
-
const
|
|
872
|
-
|
|
871
|
+
const m = p.code, y = f.current, c = u.current, b = g.current;
|
|
872
|
+
m === "Digit1" || m === "Numpad1" ? (p.preventDefault(), c.left ? a("left") : y !== "left" ? n("left") : (l("left"), n("middle"))) : m === "Digit2" || m === "Numpad2" ? (p.preventDefault(), n("middle")) : (m === "Digit3" || m === "Numpad3") && b === "three-panel" && (p.preventDefault(), c.right ? a("right") : y !== "right" ? n("right") : (l("right"), n("middle")));
|
|
873
873
|
},
|
|
874
|
-
[
|
|
874
|
+
[n, a, l]
|
|
875
875
|
);
|
|
876
|
-
|
|
876
|
+
A(() => {
|
|
877
877
|
if (e)
|
|
878
878
|
return window.addEventListener("keydown", d), () => {
|
|
879
879
|
window.removeEventListener("keydown", d);
|
|
@@ -881,25 +881,25 @@ function st(o) {
|
|
|
881
881
|
}, [e, d]);
|
|
882
882
|
}
|
|
883
883
|
function at(o, e, t, r) {
|
|
884
|
-
|
|
884
|
+
A(() => {
|
|
885
885
|
const s = e.on(
|
|
886
886
|
"panel:focus",
|
|
887
|
-
(
|
|
888
|
-
|
|
887
|
+
(a) => {
|
|
888
|
+
a.payload.panelId === o && t();
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
|
-
let
|
|
892
|
-
return r && (
|
|
891
|
+
let n;
|
|
892
|
+
return r && (n = e.on(
|
|
893
893
|
"panel:blur",
|
|
894
|
-
(
|
|
895
|
-
|
|
894
|
+
(a) => {
|
|
895
|
+
a.payload.panelId === o && r();
|
|
896
896
|
}
|
|
897
897
|
)), () => {
|
|
898
|
-
s(),
|
|
898
|
+
s(), n == null || n();
|
|
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 = {}
|
|
@@ -920,7 +920,7 @@ const nt = ({
|
|
|
920
920
|
transition: "opacity 0.15s ease-in-out",
|
|
921
921
|
...t
|
|
922
922
|
};
|
|
923
|
-
return /* @__PURE__ */
|
|
923
|
+
return /* @__PURE__ */ i(
|
|
924
924
|
"div",
|
|
925
925
|
{
|
|
926
926
|
className: `panel-focus-indicator ${e}`,
|
|
@@ -929,54 +929,54 @@ const nt = ({
|
|
|
929
929
|
"aria-hidden": "true"
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
},
|
|
932
|
+
}, Ie = ({
|
|
933
933
|
value: o,
|
|
934
934
|
onChange: e,
|
|
935
935
|
placeholder: t = "> Type a command...",
|
|
936
936
|
onClose: r,
|
|
937
937
|
onEnter: s
|
|
938
938
|
}) => {
|
|
939
|
-
const { theme:
|
|
940
|
-
|
|
941
|
-
|
|
939
|
+
const { theme: n } = q(), a = $(null);
|
|
940
|
+
A(() => {
|
|
941
|
+
a.current && a.current.focus();
|
|
942
942
|
}, []);
|
|
943
|
-
const
|
|
944
|
-
switch (
|
|
943
|
+
const l = (f) => {
|
|
944
|
+
switch (f.key) {
|
|
945
945
|
case "Enter":
|
|
946
|
-
|
|
946
|
+
f.preventDefault(), s == null || s();
|
|
947
947
|
break;
|
|
948
948
|
case "Escape":
|
|
949
|
-
|
|
949
|
+
f.preventDefault(), r();
|
|
950
950
|
break;
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
|
-
return /* @__PURE__ */
|
|
953
|
+
return /* @__PURE__ */ i(
|
|
954
954
|
"div",
|
|
955
955
|
{
|
|
956
956
|
style: {
|
|
957
957
|
padding: "0",
|
|
958
|
-
borderBottom: `1px solid ${
|
|
959
|
-
backgroundColor:
|
|
958
|
+
borderBottom: `1px solid ${n.colors.border}`,
|
|
959
|
+
backgroundColor: n.colors.background
|
|
960
960
|
},
|
|
961
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ i(
|
|
962
962
|
"input",
|
|
963
963
|
{
|
|
964
|
-
ref:
|
|
964
|
+
ref: a,
|
|
965
965
|
type: "text",
|
|
966
966
|
value: o,
|
|
967
|
-
onChange: (
|
|
968
|
-
onKeyDown:
|
|
967
|
+
onChange: (f) => e(f.target.value),
|
|
968
|
+
onKeyDown: l,
|
|
969
969
|
placeholder: t,
|
|
970
970
|
style: {
|
|
971
971
|
width: "100%",
|
|
972
972
|
padding: "16px 20px",
|
|
973
973
|
fontSize: "16px",
|
|
974
|
-
fontFamily:
|
|
974
|
+
fontFamily: n.fonts.monospace,
|
|
975
975
|
backgroundColor: "transparent",
|
|
976
976
|
border: "none",
|
|
977
977
|
outline: "none",
|
|
978
|
-
color:
|
|
979
|
-
caretColor:
|
|
978
|
+
color: n.colors.text,
|
|
979
|
+
caretColor: n.colors.primary
|
|
980
980
|
},
|
|
981
981
|
autoComplete: "off",
|
|
982
982
|
autoCorrect: "off",
|
|
@@ -986,10 +986,10 @@ const nt = ({
|
|
|
986
986
|
)
|
|
987
987
|
}
|
|
988
988
|
);
|
|
989
|
-
},
|
|
989
|
+
}, ne = Se(
|
|
990
990
|
({ command: o, isSelected: e, onClick: t, onMouseEnter: r }, s) => {
|
|
991
|
-
const { theme:
|
|
992
|
-
return /* @__PURE__ */
|
|
991
|
+
const { theme: n } = q(), { label: a, description: l, icon: f, shortcut: u } = o, [g, d] = ve.useState(!1);
|
|
992
|
+
return /* @__PURE__ */ x(
|
|
993
993
|
"div",
|
|
994
994
|
{
|
|
995
995
|
ref: s,
|
|
@@ -1001,18 +1001,18 @@ const nt = ({
|
|
|
1001
1001
|
style: {
|
|
1002
1002
|
padding: "10px 16px",
|
|
1003
1003
|
cursor: "pointer",
|
|
1004
|
-
backgroundColor: e ||
|
|
1005
|
-
borderLeft: e ||
|
|
1004
|
+
backgroundColor: e || g ? n.colors.backgroundSecondary : "transparent",
|
|
1005
|
+
borderLeft: e || g ? `3px solid ${n.colors.primary}` : "3px solid transparent",
|
|
1006
1006
|
transition: "all 0.1s ease",
|
|
1007
1007
|
display: "flex",
|
|
1008
1008
|
alignItems: "center",
|
|
1009
1009
|
gap: "12px"
|
|
1010
1010
|
},
|
|
1011
|
-
onMouseDown: (
|
|
1012
|
-
|
|
1011
|
+
onMouseDown: (p) => {
|
|
1012
|
+
p.preventDefault();
|
|
1013
1013
|
},
|
|
1014
1014
|
children: [
|
|
1015
|
-
|
|
1015
|
+
f && /* @__PURE__ */ i(
|
|
1016
1016
|
"div",
|
|
1017
1017
|
{
|
|
1018
1018
|
style: {
|
|
@@ -1023,50 +1023,50 @@ const nt = ({
|
|
|
1023
1023
|
alignItems: "center",
|
|
1024
1024
|
justifyContent: "center",
|
|
1025
1025
|
fontSize: "16px",
|
|
1026
|
-
color: e ||
|
|
1026
|
+
color: e || g ? n.colors.primary : n.colors.textSecondary
|
|
1027
1027
|
},
|
|
1028
|
-
children:
|
|
1028
|
+
children: f
|
|
1029
1029
|
}
|
|
1030
1030
|
),
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ x("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1032
|
+
/* @__PURE__ */ i(
|
|
1033
1033
|
"div",
|
|
1034
1034
|
{
|
|
1035
1035
|
style: {
|
|
1036
1036
|
fontSize: "14px",
|
|
1037
1037
|
fontWeight: 500,
|
|
1038
|
-
color: e ||
|
|
1039
|
-
marginBottom:
|
|
1038
|
+
color: e || g ? n.colors.text : n.colors.textSecondary,
|
|
1039
|
+
marginBottom: l ? "2px" : 0
|
|
1040
1040
|
},
|
|
1041
|
-
children:
|
|
1041
|
+
children: a
|
|
1042
1042
|
}
|
|
1043
1043
|
),
|
|
1044
|
-
|
|
1044
|
+
l && /* @__PURE__ */ i(
|
|
1045
1045
|
"div",
|
|
1046
1046
|
{
|
|
1047
1047
|
style: {
|
|
1048
1048
|
fontSize: "12px",
|
|
1049
|
-
color:
|
|
1049
|
+
color: n.colors.textMuted,
|
|
1050
1050
|
overflow: "hidden",
|
|
1051
1051
|
textOverflow: "ellipsis",
|
|
1052
1052
|
whiteSpace: "nowrap"
|
|
1053
1053
|
},
|
|
1054
|
-
children:
|
|
1054
|
+
children: l
|
|
1055
1055
|
}
|
|
1056
1056
|
)
|
|
1057
1057
|
] }),
|
|
1058
|
-
u && /* @__PURE__ */
|
|
1058
|
+
u && /* @__PURE__ */ i(
|
|
1059
1059
|
"div",
|
|
1060
1060
|
{
|
|
1061
1061
|
style: {
|
|
1062
1062
|
flexShrink: 0,
|
|
1063
1063
|
fontSize: "11px",
|
|
1064
|
-
color:
|
|
1064
|
+
color: n.colors.textMuted,
|
|
1065
1065
|
padding: "2px 8px",
|
|
1066
|
-
backgroundColor:
|
|
1067
|
-
border: `1px solid ${
|
|
1066
|
+
backgroundColor: n.colors.background,
|
|
1067
|
+
border: `1px solid ${n.colors.border}`,
|
|
1068
1068
|
borderRadius: "4px",
|
|
1069
|
-
fontFamily:
|
|
1069
|
+
fontFamily: n.fonts.monospace
|
|
1070
1070
|
},
|
|
1071
1071
|
children: u
|
|
1072
1072
|
}
|
|
@@ -1076,37 +1076,37 @@ const nt = ({
|
|
|
1076
1076
|
);
|
|
1077
1077
|
}
|
|
1078
1078
|
);
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1079
|
+
ne.displayName = "CommandItem";
|
|
1080
|
+
const Re = ({
|
|
1081
1081
|
commands: o,
|
|
1082
1082
|
selectedIndex: e,
|
|
1083
1083
|
onSelect: t,
|
|
1084
1084
|
onHover: r,
|
|
1085
1085
|
maxResults: s = 10
|
|
1086
1086
|
}) => {
|
|
1087
|
-
const { theme:
|
|
1088
|
-
|
|
1089
|
-
if (
|
|
1090
|
-
const d =
|
|
1091
|
-
|
|
1087
|
+
const { theme: n } = q(), a = $(null), l = $(null), f = o.slice(0, s);
|
|
1088
|
+
A(() => {
|
|
1089
|
+
if (l.current && a.current) {
|
|
1090
|
+
const d = l.current, p = a.current, m = d.offsetTop, y = m + d.offsetHeight, c = p.scrollTop, b = p.clientHeight;
|
|
1091
|
+
m < c ? p.scrollTop = m - 8 : y > c + b && (p.scrollTop = y - b + 8);
|
|
1092
1092
|
}
|
|
1093
1093
|
}, [e]);
|
|
1094
|
-
const u =
|
|
1095
|
-
const
|
|
1096
|
-
return d[
|
|
1097
|
-
}, {}),
|
|
1098
|
-
return /* @__PURE__ */
|
|
1094
|
+
const u = f.reduce((d, p, m) => {
|
|
1095
|
+
const y = p.category || "Other";
|
|
1096
|
+
return d[y] || (d[y] = []), d[y].push({ command: p, index: m }), d;
|
|
1097
|
+
}, {}), g = Object.keys(u).sort((d, p) => d === "Other" ? 1 : p === "Other" ? -1 : d.localeCompare(p));
|
|
1098
|
+
return /* @__PURE__ */ x(
|
|
1099
1099
|
"div",
|
|
1100
1100
|
{
|
|
1101
|
-
ref:
|
|
1101
|
+
ref: a,
|
|
1102
1102
|
style: {
|
|
1103
1103
|
overflowY: "auto",
|
|
1104
1104
|
maxHeight: "400px",
|
|
1105
1105
|
padding: "8px 0"
|
|
1106
1106
|
},
|
|
1107
1107
|
children: [
|
|
1108
|
-
|
|
1109
|
-
|
|
1108
|
+
g.map((d) => /* @__PURE__ */ x("div", { children: [
|
|
1109
|
+
g.length > 1 && /* @__PURE__ */ i(
|
|
1110
1110
|
"div",
|
|
1111
1111
|
{
|
|
1112
1112
|
style: {
|
|
@@ -1114,33 +1114,33 @@ const Ie = ({
|
|
|
1114
1114
|
fontSize: "11px",
|
|
1115
1115
|
fontWeight: 600,
|
|
1116
1116
|
textTransform: "uppercase",
|
|
1117
|
-
color:
|
|
1117
|
+
color: n.colors.textMuted,
|
|
1118
1118
|
letterSpacing: "0.5px"
|
|
1119
1119
|
},
|
|
1120
1120
|
children: d
|
|
1121
1121
|
}
|
|
1122
1122
|
),
|
|
1123
|
-
u[d].map(({ command:
|
|
1124
|
-
|
|
1123
|
+
u[d].map(({ command: p, index: m }) => /* @__PURE__ */ i(
|
|
1124
|
+
ne,
|
|
1125
1125
|
{
|
|
1126
|
-
command:
|
|
1127
|
-
isSelected:
|
|
1128
|
-
onClick: () => t(
|
|
1129
|
-
onMouseEnter: () => r(
|
|
1130
|
-
ref:
|
|
1126
|
+
command: p,
|
|
1127
|
+
isSelected: m === e,
|
|
1128
|
+
onClick: () => t(p),
|
|
1129
|
+
onMouseEnter: () => r(m),
|
|
1130
|
+
ref: m === e ? l : void 0
|
|
1131
1131
|
},
|
|
1132
|
-
|
|
1132
|
+
p.id
|
|
1133
1133
|
))
|
|
1134
1134
|
] }, d)),
|
|
1135
|
-
o.length > s && /* @__PURE__ */
|
|
1135
|
+
o.length > s && /* @__PURE__ */ x(
|
|
1136
1136
|
"div",
|
|
1137
1137
|
{
|
|
1138
1138
|
style: {
|
|
1139
1139
|
padding: "8px 16px",
|
|
1140
1140
|
fontSize: "12px",
|
|
1141
|
-
color:
|
|
1141
|
+
color: n.colors.textMuted,
|
|
1142
1142
|
textAlign: "center",
|
|
1143
|
-
borderTop: `1px solid ${
|
|
1143
|
+
borderTop: `1px solid ${n.colors.border}`
|
|
1144
1144
|
},
|
|
1145
1145
|
children: [
|
|
1146
1146
|
"Showing ",
|
|
@@ -1154,35 +1154,35 @@ const Ie = ({
|
|
|
1154
1154
|
]
|
|
1155
1155
|
}
|
|
1156
1156
|
);
|
|
1157
|
-
},
|
|
1157
|
+
}, lt = ({
|
|
1158
1158
|
commandPalette: o,
|
|
1159
1159
|
config: e
|
|
1160
1160
|
}) => {
|
|
1161
|
-
const { theme: t } = q(), r =
|
|
1161
|
+
const { theme: t } = q(), r = $(null), {
|
|
1162
1162
|
isOpen: s,
|
|
1163
|
-
close:
|
|
1164
|
-
query:
|
|
1165
|
-
setQuery:
|
|
1166
|
-
filteredCommands:
|
|
1163
|
+
close: n,
|
|
1164
|
+
query: a,
|
|
1165
|
+
setQuery: l,
|
|
1166
|
+
filteredCommands: f,
|
|
1167
1167
|
selectedIndex: u,
|
|
1168
|
-
setSelectedIndex:
|
|
1168
|
+
setSelectedIndex: g,
|
|
1169
1169
|
executeSelected: d
|
|
1170
1170
|
} = o;
|
|
1171
|
-
if (
|
|
1171
|
+
if (A(() => {
|
|
1172
1172
|
if (!s) return;
|
|
1173
|
-
const
|
|
1174
|
-
r.current && !r.current.contains(
|
|
1173
|
+
const y = (b) => {
|
|
1174
|
+
r.current && !r.current.contains(b.target) && n();
|
|
1175
1175
|
}, c = setTimeout(() => {
|
|
1176
|
-
document.addEventListener("mousedown",
|
|
1176
|
+
document.addEventListener("mousedown", y);
|
|
1177
1177
|
}, 100);
|
|
1178
1178
|
return () => {
|
|
1179
|
-
clearTimeout(c), document.removeEventListener("mousedown",
|
|
1179
|
+
clearTimeout(c), document.removeEventListener("mousedown", y);
|
|
1180
1180
|
};
|
|
1181
|
-
}, [s,
|
|
1181
|
+
}, [s, n]), !s)
|
|
1182
1182
|
return null;
|
|
1183
|
-
const
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
/* @__PURE__ */
|
|
1183
|
+
const p = (e == null ? void 0 : e.maxHeight) || "50vh", m = (e == null ? void 0 : e.placeholder) || "> Type a command...";
|
|
1184
|
+
return /* @__PURE__ */ x(se, { children: [
|
|
1185
|
+
/* @__PURE__ */ i(
|
|
1186
1186
|
"div",
|
|
1187
1187
|
{
|
|
1188
1188
|
style: {
|
|
@@ -1192,10 +1192,10 @@ const Ie = ({
|
|
|
1192
1192
|
backdropFilter: "blur(2px)",
|
|
1193
1193
|
zIndex: 999
|
|
1194
1194
|
},
|
|
1195
|
-
onClick:
|
|
1195
|
+
onClick: n
|
|
1196
1196
|
}
|
|
1197
1197
|
),
|
|
1198
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ x(
|
|
1199
1199
|
"div",
|
|
1200
1200
|
{
|
|
1201
1201
|
ref: r,
|
|
@@ -1205,7 +1205,7 @@ const Ie = ({
|
|
|
1205
1205
|
bottom: 0,
|
|
1206
1206
|
left: 0,
|
|
1207
1207
|
right: 0,
|
|
1208
|
-
maxHeight:
|
|
1208
|
+
maxHeight: p,
|
|
1209
1209
|
backgroundColor: t.colors.surface,
|
|
1210
1210
|
borderTop: `1px solid ${t.colors.border}`,
|
|
1211
1211
|
boxShadow: t.shadows[2],
|
|
@@ -1215,18 +1215,18 @@ const Ie = ({
|
|
|
1215
1215
|
...e == null ? void 0 : e.style
|
|
1216
1216
|
},
|
|
1217
1217
|
children: [
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
|
|
1218
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1219
|
+
/* @__PURE__ */ i(
|
|
1220
|
+
Ie,
|
|
1221
1221
|
{
|
|
1222
|
-
value:
|
|
1223
|
-
onChange:
|
|
1224
|
-
placeholder:
|
|
1225
|
-
onClose:
|
|
1222
|
+
value: a,
|
|
1223
|
+
onChange: l,
|
|
1224
|
+
placeholder: m,
|
|
1225
|
+
onClose: n,
|
|
1226
1226
|
onEnter: d
|
|
1227
1227
|
}
|
|
1228
1228
|
),
|
|
1229
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ x(
|
|
1230
1230
|
"div",
|
|
1231
1231
|
{
|
|
1232
1232
|
style: {
|
|
@@ -1239,31 +1239,31 @@ const Ie = ({
|
|
|
1239
1239
|
backgroundColor: t.colors.background
|
|
1240
1240
|
},
|
|
1241
1241
|
children: [
|
|
1242
|
-
/* @__PURE__ */
|
|
1243
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ x("span", { children: [
|
|
1243
|
+
/* @__PURE__ */ i("kbd", { style: { padding: "2px 6px", backgroundColor: t.colors.backgroundSecondary, borderRadius: "3px", border: `1px solid ${t.colors.border}` }, children: "Enter" }),
|
|
1244
1244
|
" Execute"
|
|
1245
1245
|
] }),
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1246
|
+
/* @__PURE__ */ x("span", { children: [
|
|
1247
|
+
/* @__PURE__ */ i("kbd", { style: { padding: "2px 6px", backgroundColor: t.colors.backgroundSecondary, borderRadius: "3px", border: `1px solid ${t.colors.border}` }, children: "Esc" }),
|
|
1248
1248
|
" Close"
|
|
1249
1249
|
] })
|
|
1250
1250
|
]
|
|
1251
1251
|
}
|
|
1252
1252
|
)
|
|
1253
1253
|
] }),
|
|
1254
|
-
|
|
1255
|
-
|
|
1254
|
+
f.length > 0 && /* @__PURE__ */ i(
|
|
1255
|
+
Re,
|
|
1256
1256
|
{
|
|
1257
|
-
commands:
|
|
1257
|
+
commands: f,
|
|
1258
1258
|
selectedIndex: u,
|
|
1259
|
-
onSelect: (
|
|
1260
|
-
o.executeCommand(
|
|
1259
|
+
onSelect: (y) => {
|
|
1260
|
+
o.executeCommand(y.id);
|
|
1261
1261
|
},
|
|
1262
|
-
onHover:
|
|
1262
|
+
onHover: g,
|
|
1263
1263
|
maxResults: e == null ? void 0 : e.maxResults
|
|
1264
1264
|
}
|
|
1265
1265
|
),
|
|
1266
|
-
|
|
1266
|
+
a && f.length === 0 && /* @__PURE__ */ x(
|
|
1267
1267
|
"div",
|
|
1268
1268
|
{
|
|
1269
1269
|
style: {
|
|
@@ -1274,7 +1274,7 @@ const Ie = ({
|
|
|
1274
1274
|
},
|
|
1275
1275
|
children: [
|
|
1276
1276
|
'No commands found for "',
|
|
1277
|
-
|
|
1277
|
+
a,
|
|
1278
1278
|
'"'
|
|
1279
1279
|
]
|
|
1280
1280
|
}
|
|
@@ -1284,10 +1284,10 @@ const Ie = ({
|
|
|
1284
1284
|
)
|
|
1285
1285
|
] });
|
|
1286
1286
|
};
|
|
1287
|
-
class
|
|
1287
|
+
class ae {
|
|
1288
1288
|
constructor() {
|
|
1289
|
-
|
|
1290
|
-
|
|
1289
|
+
J(this, "commands", /* @__PURE__ */ new Map());
|
|
1290
|
+
J(this, "listeners", /* @__PURE__ */ new Set());
|
|
1291
1291
|
}
|
|
1292
1292
|
/**
|
|
1293
1293
|
* Register one or more commands
|
|
@@ -1344,7 +1344,7 @@ class ne {
|
|
|
1344
1344
|
* @param context - Command context
|
|
1345
1345
|
*/
|
|
1346
1346
|
async executeCommand(e, t) {
|
|
1347
|
-
var s,
|
|
1347
|
+
var s, n;
|
|
1348
1348
|
const r = this.commands.get(e);
|
|
1349
1349
|
if (!r) {
|
|
1350
1350
|
console.warn(`Command not found: ${e}`);
|
|
@@ -1364,14 +1364,14 @@ class ne {
|
|
|
1364
1364
|
commandLabel: r.label
|
|
1365
1365
|
}
|
|
1366
1366
|
});
|
|
1367
|
-
} catch (
|
|
1368
|
-
console.error(`Error executing command ${e}:`,
|
|
1367
|
+
} catch (a) {
|
|
1368
|
+
console.error(`Error executing command ${e}:`, a), (n = t.events) == null || n.emit({
|
|
1369
1369
|
type: "command:error",
|
|
1370
1370
|
source: "command-palette",
|
|
1371
1371
|
timestamp: Date.now(),
|
|
1372
1372
|
payload: {
|
|
1373
1373
|
commandId: r.id,
|
|
1374
|
-
error:
|
|
1374
|
+
error: a instanceof Error ? a.message : String(a)
|
|
1375
1375
|
}
|
|
1376
1376
|
});
|
|
1377
1377
|
}
|
|
@@ -1387,13 +1387,13 @@ class ne {
|
|
|
1387
1387
|
if (!e.trim())
|
|
1388
1388
|
return this.sortCommands(r);
|
|
1389
1389
|
const s = e.toLowerCase();
|
|
1390
|
-
return r.map((
|
|
1391
|
-
var
|
|
1392
|
-
let
|
|
1393
|
-
return
|
|
1390
|
+
return r.map((a) => {
|
|
1391
|
+
var f, u;
|
|
1392
|
+
let l = 0;
|
|
1393
|
+
return a.label.toLowerCase() === s ? l += 1e3 : a.label.toLowerCase().startsWith(s) ? l += 500 : a.label.toLowerCase().includes(s) && (l += 250), (f = a.description) != null && f.toLowerCase().includes(s) && (l += 100), a.keywords && a.keywords.some(
|
|
1394
1394
|
(d) => d.toLowerCase().includes(s)
|
|
1395
|
-
) && (
|
|
1396
|
-
}).filter((
|
|
1395
|
+
) && (l += 150), (u = a.category) != null && u.toLowerCase().includes(s) && (l += 50), l > 0 && a.priority && (l += a.priority), { command: a, score: l };
|
|
1396
|
+
}).filter((a) => a.score > 0).sort((a, l) => l.score - a.score).map((a) => a.command);
|
|
1397
1397
|
}
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Sort commands by priority and label
|
|
@@ -1405,8 +1405,8 @@ class ne {
|
|
|
1405
1405
|
const s = (r.priority || 0) - (t.priority || 0);
|
|
1406
1406
|
if (s !== 0)
|
|
1407
1407
|
return s;
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1408
|
+
const n = t.category || "", a = r.category || "", l = n.localeCompare(a);
|
|
1409
|
+
return l !== 0 ? l : t.label.localeCompare(r.label);
|
|
1410
1410
|
});
|
|
1411
1411
|
}
|
|
1412
1412
|
/**
|
|
@@ -1438,136 +1438,136 @@ class ne {
|
|
|
1438
1438
|
this.listeners.forEach((e) => e());
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
let
|
|
1442
|
-
function lt() {
|
|
1443
|
-
return Y || (Y = new ne()), Y;
|
|
1444
|
-
}
|
|
1441
|
+
let Z = null;
|
|
1445
1442
|
function ct() {
|
|
1446
|
-
|
|
1443
|
+
return Z || (Z = new ae()), Z;
|
|
1444
|
+
}
|
|
1445
|
+
function dt() {
|
|
1446
|
+
Z = null;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function pt({
|
|
1449
1449
|
context: o,
|
|
1450
1450
|
commands: e = [],
|
|
1451
1451
|
keyboard: t = { key: " ", altKey: !0 },
|
|
1452
1452
|
config: r = {},
|
|
1453
1453
|
registry: s
|
|
1454
1454
|
}) {
|
|
1455
|
-
const [
|
|
1456
|
-
() => s || new
|
|
1455
|
+
const [n, a] = R(!1), [l, f] = R(""), [u, g] = R(0), [d, p] = R([]), m = Y(
|
|
1456
|
+
() => s || new ae(),
|
|
1457
1457
|
[s]
|
|
1458
|
-
),
|
|
1458
|
+
), y = Y(
|
|
1459
1459
|
() => ({
|
|
1460
1460
|
...o,
|
|
1461
|
-
closeCommandPalette: () =>
|
|
1461
|
+
closeCommandPalette: () => a(!1)
|
|
1462
1462
|
}),
|
|
1463
1463
|
[o]
|
|
1464
1464
|
);
|
|
1465
|
-
|
|
1466
|
-
let
|
|
1467
|
-
const
|
|
1468
|
-
if (
|
|
1469
|
-
const E =
|
|
1470
|
-
|
|
1465
|
+
A(() => {
|
|
1466
|
+
let h = !0;
|
|
1467
|
+
const I = m.subscribe(() => {
|
|
1468
|
+
if (h) {
|
|
1469
|
+
const E = m.getCommands(y);
|
|
1470
|
+
p(E);
|
|
1471
1471
|
}
|
|
1472
1472
|
});
|
|
1473
1473
|
if (e.length > 0)
|
|
1474
|
-
|
|
1474
|
+
m.registerCommands(e);
|
|
1475
1475
|
else {
|
|
1476
|
-
const E =
|
|
1477
|
-
|
|
1476
|
+
const E = m.getCommands(y);
|
|
1477
|
+
p(E);
|
|
1478
1478
|
}
|
|
1479
1479
|
return () => {
|
|
1480
|
-
|
|
1480
|
+
h = !1, I();
|
|
1481
1481
|
};
|
|
1482
|
-
}, [
|
|
1483
|
-
const c =
|
|
1484
|
-
|
|
1485
|
-
|
|
1482
|
+
}, [m]);
|
|
1483
|
+
const c = Y(() => (r.fuzzySearch === !1, m.searchCommands(l, y)), [l, m, y, r.fuzzySearch]);
|
|
1484
|
+
A(() => {
|
|
1485
|
+
g(0);
|
|
1486
1486
|
}, [c]);
|
|
1487
|
-
const
|
|
1488
|
-
var
|
|
1489
|
-
|
|
1487
|
+
const b = k(() => {
|
|
1488
|
+
var h;
|
|
1489
|
+
a(!0), f(""), g(0), (h = o.events) == null || h.emit({
|
|
1490
1490
|
type: "command-palette:opened",
|
|
1491
1491
|
source: "command-palette",
|
|
1492
1492
|
timestamp: Date.now(),
|
|
1493
1493
|
payload: {}
|
|
1494
1494
|
});
|
|
1495
|
-
}, [o.events]),
|
|
1496
|
-
var
|
|
1497
|
-
|
|
1495
|
+
}, [o.events]), P = k(() => {
|
|
1496
|
+
var h;
|
|
1497
|
+
a(!1), f(""), g(0), (h = o.events) == null || h.emit({
|
|
1498
1498
|
type: "command-palette:closed",
|
|
1499
1499
|
source: "command-palette",
|
|
1500
1500
|
timestamp: Date.now(),
|
|
1501
1501
|
payload: {}
|
|
1502
1502
|
});
|
|
1503
|
-
}, [o.events]),
|
|
1504
|
-
|
|
1505
|
-
}, [
|
|
1506
|
-
async (
|
|
1507
|
-
await
|
|
1503
|
+
}, [o.events]), D = k(() => {
|
|
1504
|
+
n ? P() : b();
|
|
1505
|
+
}, [n, b, P]), W = k(
|
|
1506
|
+
async (h) => {
|
|
1507
|
+
await m.executeCommand(h, y), P();
|
|
1508
1508
|
},
|
|
1509
|
-
[
|
|
1510
|
-
),
|
|
1511
|
-
|
|
1512
|
-
const
|
|
1513
|
-
return
|
|
1509
|
+
[m, y, P]
|
|
1510
|
+
), L = k(() => {
|
|
1511
|
+
g((h) => {
|
|
1512
|
+
const I = r.maxResults || c.length, E = Math.min(c.length, I) - 1;
|
|
1513
|
+
return h < E ? h + 1 : 0;
|
|
1514
1514
|
});
|
|
1515
|
-
}, [c.length, r.maxResults]),
|
|
1516
|
-
|
|
1517
|
-
const
|
|
1518
|
-
return
|
|
1515
|
+
}, [c.length, r.maxResults]), j = k(() => {
|
|
1516
|
+
g((h) => {
|
|
1517
|
+
const I = r.maxResults || c.length, E = Math.min(c.length, I) - 1;
|
|
1518
|
+
return h > 0 ? h - 1 : E;
|
|
1519
1519
|
});
|
|
1520
|
-
}, [c.length, r.maxResults]), w =
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
}, [c,
|
|
1524
|
-
(
|
|
1525
|
-
|
|
1520
|
+
}, [c.length, r.maxResults]), w = k(async () => {
|
|
1521
|
+
const h = c[0];
|
|
1522
|
+
h && await W(h.id);
|
|
1523
|
+
}, [c, W]), v = k(
|
|
1524
|
+
(h) => {
|
|
1525
|
+
m.registerCommands(h);
|
|
1526
1526
|
},
|
|
1527
|
-
[
|
|
1528
|
-
),
|
|
1529
|
-
(
|
|
1530
|
-
|
|
1527
|
+
[m]
|
|
1528
|
+
), S = k(
|
|
1529
|
+
(h) => {
|
|
1530
|
+
m.unregisterCommands(h);
|
|
1531
1531
|
},
|
|
1532
|
-
[
|
|
1533
|
-
), C =
|
|
1534
|
-
(
|
|
1532
|
+
[m]
|
|
1533
|
+
), C = k(
|
|
1534
|
+
(h) => {
|
|
1535
1535
|
const {
|
|
1536
|
-
key:
|
|
1536
|
+
key: I = " ",
|
|
1537
1537
|
altKey: E = !0,
|
|
1538
|
-
ctrlKey:
|
|
1538
|
+
ctrlKey: O = !1,
|
|
1539
1539
|
metaKey: V = !1,
|
|
1540
|
-
shiftKey:
|
|
1541
|
-
} = t,
|
|
1542
|
-
if ((
|
|
1543
|
-
const G =
|
|
1540
|
+
shiftKey: z = !1
|
|
1541
|
+
} = t, U = h.altKey === E && h.ctrlKey === O && h.metaKey === V && h.shiftKey === z;
|
|
1542
|
+
if ((I === " " ? h.code === "Space" : h.key === I) && U) {
|
|
1543
|
+
const G = h.target;
|
|
1544
1544
|
if (G.tagName === "INPUT" || G.tagName === "TEXTAREA" || G.isContentEditable)
|
|
1545
1545
|
return;
|
|
1546
|
-
|
|
1546
|
+
h.preventDefault(), D();
|
|
1547
1547
|
}
|
|
1548
1548
|
},
|
|
1549
|
-
[t,
|
|
1549
|
+
[t, D]
|
|
1550
1550
|
);
|
|
1551
|
-
return
|
|
1552
|
-
isOpen:
|
|
1553
|
-
open:
|
|
1554
|
-
close:
|
|
1555
|
-
toggle:
|
|
1556
|
-
query:
|
|
1557
|
-
setQuery:
|
|
1551
|
+
return A(() => (window.addEventListener("keydown", C), () => window.removeEventListener("keydown", C)), [C]), {
|
|
1552
|
+
isOpen: n,
|
|
1553
|
+
open: b,
|
|
1554
|
+
close: P,
|
|
1555
|
+
toggle: D,
|
|
1556
|
+
query: l,
|
|
1557
|
+
setQuery: f,
|
|
1558
1558
|
filteredCommands: c,
|
|
1559
|
-
executeCommand:
|
|
1559
|
+
executeCommand: W,
|
|
1560
1560
|
selectedIndex: u,
|
|
1561
|
-
setSelectedIndex:
|
|
1562
|
-
selectNext:
|
|
1563
|
-
selectPrevious:
|
|
1561
|
+
setSelectedIndex: g,
|
|
1562
|
+
selectNext: L,
|
|
1563
|
+
selectPrevious: j,
|
|
1564
1564
|
executeSelected: w,
|
|
1565
1565
|
commands: d,
|
|
1566
|
-
registerCommands:
|
|
1567
|
-
unregisterCommands:
|
|
1566
|
+
registerCommands: v,
|
|
1567
|
+
unregisterCommands: S
|
|
1568
1568
|
};
|
|
1569
1569
|
}
|
|
1570
|
-
const
|
|
1570
|
+
const Le = [
|
|
1571
1571
|
{
|
|
1572
1572
|
id: "panel.focus.left",
|
|
1573
1573
|
label: "Focus Left Panel",
|
|
@@ -1721,8 +1721,8 @@ const Re = [
|
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
];
|
|
1724
|
-
function
|
|
1725
|
-
return
|
|
1724
|
+
function ut() {
|
|
1725
|
+
return Le;
|
|
1726
1726
|
}
|
|
1727
1727
|
const ie = ({
|
|
1728
1728
|
value: o,
|
|
@@ -1730,34 +1730,35 @@ const ie = ({
|
|
|
1730
1730
|
onSubmit: t,
|
|
1731
1731
|
onClose: r,
|
|
1732
1732
|
onHistoryPrevious: s,
|
|
1733
|
-
onHistoryNext:
|
|
1734
|
-
mode:
|
|
1735
|
-
status:
|
|
1736
|
-
placeholder:
|
|
1733
|
+
onHistoryNext: n,
|
|
1734
|
+
mode: a,
|
|
1735
|
+
status: l,
|
|
1736
|
+
placeholder: f = "What would you like to do?",
|
|
1737
1737
|
disabled: u = !1,
|
|
1738
|
-
autoFocus:
|
|
1738
|
+
autoFocus: g = !0,
|
|
1739
|
+
agentAvailable: d = !0
|
|
1739
1740
|
}) => {
|
|
1740
|
-
const { theme:
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
}, [
|
|
1744
|
-
const
|
|
1745
|
-
switch (
|
|
1741
|
+
const { theme: p } = q(), m = $(null);
|
|
1742
|
+
A(() => {
|
|
1743
|
+
g && m.current && m.current.focus();
|
|
1744
|
+
}, [g]);
|
|
1745
|
+
const y = (b) => {
|
|
1746
|
+
switch (b.stopPropagation(), b.key) {
|
|
1746
1747
|
case "Enter":
|
|
1747
|
-
|
|
1748
|
+
b.preventDefault(), t();
|
|
1748
1749
|
break;
|
|
1749
1750
|
case "Escape":
|
|
1750
|
-
|
|
1751
|
+
b.preventDefault(), r();
|
|
1751
1752
|
break;
|
|
1752
1753
|
case "ArrowUp":
|
|
1753
|
-
|
|
1754
|
+
b.preventDefault(), s();
|
|
1754
1755
|
break;
|
|
1755
1756
|
case "ArrowDown":
|
|
1756
|
-
|
|
1757
|
+
b.preventDefault(), n();
|
|
1757
1758
|
break;
|
|
1758
1759
|
}
|
|
1759
|
-
},
|
|
1760
|
-
return /* @__PURE__ */
|
|
1760
|
+
}, c = l === "thinking" || l === "executing";
|
|
1761
|
+
return /* @__PURE__ */ x(
|
|
1761
1762
|
"div",
|
|
1762
1763
|
{
|
|
1763
1764
|
style: {
|
|
@@ -1765,57 +1766,94 @@ const ie = ({
|
|
|
1765
1766
|
alignItems: "center",
|
|
1766
1767
|
gap: "8px",
|
|
1767
1768
|
padding: "12px 16px",
|
|
1768
|
-
backgroundColor:
|
|
1769
|
-
borderBottom: `1px solid ${
|
|
1769
|
+
backgroundColor: p.colors.background,
|
|
1770
|
+
borderBottom: `1px solid ${p.colors.border}`
|
|
1770
1771
|
},
|
|
1771
1772
|
children: [
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ i(
|
|
1773
1774
|
"span",
|
|
1774
1775
|
{
|
|
1775
1776
|
style: {
|
|
1776
|
-
color:
|
|
1777
|
-
fontFamily:
|
|
1777
|
+
color: a === "quick-command" ? p.colors.info : d ? p.colors.primary : p.colors.textMuted,
|
|
1778
|
+
fontFamily: p.fonts.monospace,
|
|
1778
1779
|
fontSize: "14px",
|
|
1779
|
-
userSelect: "none"
|
|
1780
|
+
userSelect: "none",
|
|
1781
|
+
display: "flex",
|
|
1782
|
+
alignItems: "center"
|
|
1780
1783
|
},
|
|
1781
|
-
children:
|
|
1784
|
+
children: a === "quick-command" ? /* @__PURE__ */ x(
|
|
1785
|
+
"svg",
|
|
1786
|
+
{
|
|
1787
|
+
width: "16",
|
|
1788
|
+
height: "16",
|
|
1789
|
+
viewBox: "0 0 24 24",
|
|
1790
|
+
fill: "none",
|
|
1791
|
+
stroke: "currentColor",
|
|
1792
|
+
strokeWidth: "2",
|
|
1793
|
+
strokeLinecap: "round",
|
|
1794
|
+
strokeLinejoin: "round",
|
|
1795
|
+
children: [
|
|
1796
|
+
/* @__PURE__ */ i("polyline", { points: "4 17 10 11 4 5" }),
|
|
1797
|
+
/* @__PURE__ */ i("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
) : d ? /* @__PURE__ */ x(
|
|
1801
|
+
"svg",
|
|
1802
|
+
{
|
|
1803
|
+
width: "16",
|
|
1804
|
+
height: "16",
|
|
1805
|
+
viewBox: "0 0 24 24",
|
|
1806
|
+
fill: "none",
|
|
1807
|
+
stroke: "currentColor",
|
|
1808
|
+
strokeWidth: "2",
|
|
1809
|
+
strokeLinecap: "round",
|
|
1810
|
+
strokeLinejoin: "round",
|
|
1811
|
+
children: [
|
|
1812
|
+
/* @__PURE__ */ i("rect", { x: "3", y: "11", width: "18", height: "10", rx: "2" }),
|
|
1813
|
+
/* @__PURE__ */ i("circle", { cx: "12", cy: "5", r: "2" }),
|
|
1814
|
+
/* @__PURE__ */ i("path", { d: "M12 7v4" }),
|
|
1815
|
+
/* @__PURE__ */ i("line", { x1: "8", y1: "16", x2: "8", y2: "16" }),
|
|
1816
|
+
/* @__PURE__ */ i("line", { x1: "16", y1: "16", x2: "16", y2: "16" })
|
|
1817
|
+
]
|
|
1818
|
+
}
|
|
1819
|
+
) : ">"
|
|
1782
1820
|
}
|
|
1783
1821
|
),
|
|
1784
|
-
/* @__PURE__ */
|
|
1822
|
+
/* @__PURE__ */ i(
|
|
1785
1823
|
"input",
|
|
1786
1824
|
{
|
|
1787
|
-
ref:
|
|
1825
|
+
ref: m,
|
|
1788
1826
|
"data-agent-command-palette-input": !0,
|
|
1789
1827
|
type: "text",
|
|
1790
1828
|
value: o,
|
|
1791
|
-
onChange: (
|
|
1792
|
-
onKeyDown:
|
|
1793
|
-
placeholder:
|
|
1794
|
-
disabled: u ||
|
|
1829
|
+
onChange: (b) => e(b.target.value),
|
|
1830
|
+
onKeyDown: y,
|
|
1831
|
+
placeholder: f,
|
|
1832
|
+
disabled: u || c,
|
|
1795
1833
|
style: {
|
|
1796
1834
|
flex: 1,
|
|
1797
1835
|
backgroundColor: "transparent",
|
|
1798
1836
|
border: "none",
|
|
1799
1837
|
outline: "none",
|
|
1800
|
-
color:
|
|
1801
|
-
fontFamily:
|
|
1838
|
+
color: p.colors.text,
|
|
1839
|
+
fontFamily: p.fonts.monospace,
|
|
1802
1840
|
fontSize: "14px",
|
|
1803
|
-
caretColor:
|
|
1841
|
+
caretColor: p.colors.primary
|
|
1804
1842
|
}
|
|
1805
1843
|
}
|
|
1806
1844
|
),
|
|
1807
|
-
|
|
1845
|
+
c && /* @__PURE__ */ x(
|
|
1808
1846
|
"span",
|
|
1809
1847
|
{
|
|
1810
1848
|
style: {
|
|
1811
|
-
color:
|
|
1849
|
+
color: p.colors.info,
|
|
1812
1850
|
fontSize: "12px",
|
|
1813
1851
|
display: "flex",
|
|
1814
1852
|
alignItems: "center",
|
|
1815
1853
|
gap: "4px"
|
|
1816
1854
|
},
|
|
1817
1855
|
children: [
|
|
1818
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ i(
|
|
1819
1857
|
"span",
|
|
1820
1858
|
{
|
|
1821
1859
|
style: {
|
|
@@ -1823,25 +1861,25 @@ const ie = ({
|
|
|
1823
1861
|
width: "8px",
|
|
1824
1862
|
height: "8px",
|
|
1825
1863
|
borderRadius: "50%",
|
|
1826
|
-
backgroundColor:
|
|
1864
|
+
backgroundColor: p.colors.info,
|
|
1827
1865
|
animation: "pulse 1s ease-in-out infinite"
|
|
1828
1866
|
}
|
|
1829
1867
|
}
|
|
1830
1868
|
),
|
|
1831
|
-
|
|
1869
|
+
l === "thinking" ? "Thinking..." : "Executing..."
|
|
1832
1870
|
]
|
|
1833
1871
|
}
|
|
1834
1872
|
),
|
|
1835
|
-
!
|
|
1873
|
+
!c && /* @__PURE__ */ i(
|
|
1836
1874
|
"kbd",
|
|
1837
1875
|
{
|
|
1838
1876
|
style: {
|
|
1839
1877
|
padding: "2px 6px",
|
|
1840
|
-
backgroundColor:
|
|
1878
|
+
backgroundColor: p.colors.backgroundSecondary,
|
|
1841
1879
|
borderRadius: "3px",
|
|
1842
|
-
border: `1px solid ${
|
|
1880
|
+
border: `1px solid ${p.colors.border}`,
|
|
1843
1881
|
fontSize: "11px",
|
|
1844
|
-
color:
|
|
1882
|
+
color: p.colors.textMuted
|
|
1845
1883
|
},
|
|
1846
1884
|
children: "Alt+P"
|
|
1847
1885
|
}
|
|
@@ -1851,7 +1889,7 @@ const ie = ({
|
|
|
1851
1889
|
);
|
|
1852
1890
|
};
|
|
1853
1891
|
ie.displayName = "AgentCommandInput";
|
|
1854
|
-
const
|
|
1892
|
+
const We = ({ status: o }) => {
|
|
1855
1893
|
const { theme: e } = q(), t = {
|
|
1856
1894
|
display: "inline-flex",
|
|
1857
1895
|
alignItems: "center",
|
|
@@ -1862,9 +1900,9 @@ const Le = ({ status: o }) => {
|
|
|
1862
1900
|
};
|
|
1863
1901
|
switch (o) {
|
|
1864
1902
|
case "pending":
|
|
1865
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ i("span", { style: { ...t, color: e.colors.textMuted }, children: "○" });
|
|
1866
1904
|
case "running":
|
|
1867
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ i(
|
|
1868
1906
|
"span",
|
|
1869
1907
|
{
|
|
1870
1908
|
style: {
|
|
@@ -1876,16 +1914,16 @@ const Le = ({ status: o }) => {
|
|
|
1876
1914
|
}
|
|
1877
1915
|
);
|
|
1878
1916
|
case "success":
|
|
1879
|
-
return /* @__PURE__ */
|
|
1917
|
+
return /* @__PURE__ */ i("span", { style: { ...t, color: e.colors.success }, children: "✓" });
|
|
1880
1918
|
case "error":
|
|
1881
|
-
return /* @__PURE__ */
|
|
1919
|
+
return /* @__PURE__ */ i("span", { style: { ...t, color: e.colors.error }, children: "✗" });
|
|
1882
1920
|
}
|
|
1883
1921
|
}, Ae = (o) => {
|
|
1884
1922
|
const e = Object.entries(o);
|
|
1885
1923
|
return e.length === 0 ? "" : e.map(([t, r]) => t === "args" && Array.isArray(r) ? r.join(", ") : typeof r == "string" ? `"${r}"` : JSON.stringify(r)).join(", ");
|
|
1886
|
-
},
|
|
1924
|
+
}, De = ({ tool: o, compact: e }) => {
|
|
1887
1925
|
const { theme: t } = q(), r = Ae(o.args);
|
|
1888
|
-
return /* @__PURE__ */
|
|
1926
|
+
return /* @__PURE__ */ x(
|
|
1889
1927
|
"div",
|
|
1890
1928
|
{
|
|
1891
1929
|
style: {
|
|
@@ -1897,16 +1935,16 @@ const Le = ({ status: o }) => {
|
|
|
1897
1935
|
fontSize: "13px"
|
|
1898
1936
|
},
|
|
1899
1937
|
children: [
|
|
1900
|
-
/* @__PURE__ */
|
|
1901
|
-
/* @__PURE__ */
|
|
1938
|
+
/* @__PURE__ */ i(We, { status: o.status }),
|
|
1939
|
+
/* @__PURE__ */ x("span", { style: { color: t.colors.text }, children: [
|
|
1902
1940
|
o.name,
|
|
1903
|
-
r && /* @__PURE__ */
|
|
1941
|
+
r && /* @__PURE__ */ x("span", { style: { color: t.colors.textMuted }, children: [
|
|
1904
1942
|
"(",
|
|
1905
1943
|
r,
|
|
1906
1944
|
")"
|
|
1907
1945
|
] })
|
|
1908
1946
|
] }),
|
|
1909
|
-
o.status === "running" && /* @__PURE__ */
|
|
1947
|
+
o.status === "running" && /* @__PURE__ */ i(
|
|
1910
1948
|
"span",
|
|
1911
1949
|
{
|
|
1912
1950
|
style: {
|
|
@@ -1917,7 +1955,7 @@ const Le = ({ status: o }) => {
|
|
|
1917
1955
|
children: "[running]"
|
|
1918
1956
|
}
|
|
1919
1957
|
),
|
|
1920
|
-
o.status === "success" && /* @__PURE__ */
|
|
1958
|
+
o.status === "success" && /* @__PURE__ */ i(
|
|
1921
1959
|
"span",
|
|
1922
1960
|
{
|
|
1923
1961
|
style: {
|
|
@@ -1928,7 +1966,7 @@ const Le = ({ status: o }) => {
|
|
|
1928
1966
|
children: "[done]"
|
|
1929
1967
|
}
|
|
1930
1968
|
),
|
|
1931
|
-
o.status === "error" && /* @__PURE__ */
|
|
1969
|
+
o.status === "error" && /* @__PURE__ */ i(
|
|
1932
1970
|
"span",
|
|
1933
1971
|
{
|
|
1934
1972
|
style: {
|
|
@@ -1948,7 +1986,7 @@ const Le = ({ status: o }) => {
|
|
|
1948
1986
|
compact: e = !1
|
|
1949
1987
|
}) => {
|
|
1950
1988
|
const { theme: t } = q();
|
|
1951
|
-
return o.length === 0 ? null : /* @__PURE__ */
|
|
1989
|
+
return o.length === 0 ? null : /* @__PURE__ */ i(
|
|
1952
1990
|
"div",
|
|
1953
1991
|
{
|
|
1954
1992
|
style: {
|
|
@@ -1957,7 +1995,7 @@ const Le = ({ status: o }) => {
|
|
|
1957
1995
|
borderRadius: "4px",
|
|
1958
1996
|
margin: "8px 16px"
|
|
1959
1997
|
},
|
|
1960
|
-
children: o.map((r) => /* @__PURE__ */
|
|
1998
|
+
children: o.map((r) => /* @__PURE__ */ i(De, { tool: r, compact: e }, r.id))
|
|
1961
1999
|
}
|
|
1962
2000
|
);
|
|
1963
2001
|
};
|
|
@@ -1970,7 +2008,7 @@ const ce = ({
|
|
|
1970
2008
|
if (!o)
|
|
1971
2009
|
return null;
|
|
1972
2010
|
const r = o.toLowerCase().startsWith("error"), s = o.toLowerCase().startsWith("done") || o.toLowerCase().startsWith("executed");
|
|
1973
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ x(
|
|
1974
2012
|
"div",
|
|
1975
2013
|
{
|
|
1976
2014
|
style: {
|
|
@@ -1982,11 +2020,11 @@ const ce = ({
|
|
|
1982
2020
|
gap: "8px"
|
|
1983
2021
|
},
|
|
1984
2022
|
children: [
|
|
1985
|
-
s && /* @__PURE__ */
|
|
1986
|
-
r && /* @__PURE__ */
|
|
1987
|
-
/* @__PURE__ */
|
|
2023
|
+
s && /* @__PURE__ */ i("span", { children: "✓" }),
|
|
2024
|
+
r && /* @__PURE__ */ i("span", { children: "✗" }),
|
|
2025
|
+
/* @__PURE__ */ x("span", { children: [
|
|
1988
2026
|
o,
|
|
1989
|
-
e && /* @__PURE__ */
|
|
2027
|
+
e && /* @__PURE__ */ i(
|
|
1990
2028
|
"span",
|
|
1991
2029
|
{
|
|
1992
2030
|
style: {
|
|
@@ -2005,56 +2043,57 @@ const ce = ({
|
|
|
2005
2043
|
);
|
|
2006
2044
|
};
|
|
2007
2045
|
ce.displayName = "AgentResponseDisplay";
|
|
2008
|
-
const
|
|
2046
|
+
const Ee = ({
|
|
2009
2047
|
palette: o,
|
|
2010
2048
|
config: e
|
|
2011
2049
|
}) => {
|
|
2012
|
-
const { theme: t } = q(), r =
|
|
2050
|
+
const { theme: t } = q(), r = $(null), {
|
|
2013
2051
|
isOpen: s,
|
|
2014
|
-
close:
|
|
2015
|
-
query:
|
|
2016
|
-
setQuery:
|
|
2017
|
-
mode:
|
|
2052
|
+
close: n,
|
|
2053
|
+
query: a,
|
|
2054
|
+
setQuery: l,
|
|
2055
|
+
mode: f,
|
|
2018
2056
|
status: u,
|
|
2019
|
-
pendingTools:
|
|
2057
|
+
pendingTools: g,
|
|
2020
2058
|
completedTools: d,
|
|
2021
|
-
agentResponse:
|
|
2022
|
-
submit:
|
|
2023
|
-
historyPrevious:
|
|
2059
|
+
agentResponse: p,
|
|
2060
|
+
submit: m,
|
|
2061
|
+
historyPrevious: y,
|
|
2024
2062
|
historyNext: c,
|
|
2025
|
-
suggestions:
|
|
2063
|
+
suggestions: b,
|
|
2064
|
+
agentAvailable: P
|
|
2026
2065
|
} = o;
|
|
2027
|
-
|
|
2066
|
+
A(() => {
|
|
2028
2067
|
if (!s) return;
|
|
2029
|
-
const
|
|
2030
|
-
r.current && !r.current.contains(
|
|
2031
|
-
},
|
|
2032
|
-
document.addEventListener("mousedown",
|
|
2068
|
+
const O = (z) => {
|
|
2069
|
+
r.current && !r.current.contains(z.target) && n();
|
|
2070
|
+
}, V = setTimeout(() => {
|
|
2071
|
+
document.addEventListener("mousedown", O);
|
|
2033
2072
|
}, 100);
|
|
2034
2073
|
return () => {
|
|
2035
|
-
clearTimeout(
|
|
2074
|
+
clearTimeout(V), document.removeEventListener("mousedown", O);
|
|
2036
2075
|
};
|
|
2037
|
-
}, [s,
|
|
2038
|
-
const [
|
|
2039
|
-
if (
|
|
2076
|
+
}, [s, n]);
|
|
2077
|
+
const [D, W] = R(!1), [L, j] = R(!1);
|
|
2078
|
+
if (A(() => {
|
|
2040
2079
|
if (s)
|
|
2041
|
-
|
|
2080
|
+
j(!0), requestAnimationFrame(() => {
|
|
2042
2081
|
requestAnimationFrame(() => {
|
|
2043
|
-
|
|
2082
|
+
W(!0);
|
|
2044
2083
|
});
|
|
2045
2084
|
});
|
|
2046
2085
|
else {
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2086
|
+
W(!1);
|
|
2087
|
+
const O = setTimeout(() => {
|
|
2088
|
+
j(!1);
|
|
2050
2089
|
}, 150);
|
|
2051
|
-
return () => clearTimeout(
|
|
2090
|
+
return () => clearTimeout(O);
|
|
2052
2091
|
}
|
|
2053
|
-
}, [s]), !
|
|
2092
|
+
}, [s]), !L)
|
|
2054
2093
|
return null;
|
|
2055
|
-
const
|
|
2056
|
-
return /* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2094
|
+
const w = P ? (e == null ? void 0 : e.placeholder) || "What would you like to do?" : "Quick command mode (agent unavailable)", v = [...d, ...g], S = v.length > 0, C = p && u !== "idle", h = P && !a && u === "idle" && b.length > 0, I = (f === "quick-command" || !P) && u === "idle", E = !P && f !== "quick-command" && u === "idle";
|
|
2095
|
+
return /* @__PURE__ */ x(se, { children: [
|
|
2096
|
+
/* @__PURE__ */ i(
|
|
2058
2097
|
"div",
|
|
2059
2098
|
{
|
|
2060
2099
|
style: {
|
|
@@ -2062,10 +2101,10 @@ const De = ({
|
|
|
2062
2101
|
inset: 0,
|
|
2063
2102
|
zIndex: 999
|
|
2064
2103
|
},
|
|
2065
|
-
onClick:
|
|
2104
|
+
onClick: n
|
|
2066
2105
|
}
|
|
2067
2106
|
),
|
|
2068
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ x(
|
|
2069
2108
|
"div",
|
|
2070
2109
|
{
|
|
2071
2110
|
ref: r,
|
|
@@ -2083,27 +2122,28 @@ const De = ({
|
|
|
2083
2122
|
display: "flex",
|
|
2084
2123
|
flexDirection: "column-reverse",
|
|
2085
2124
|
overflow: "hidden",
|
|
2086
|
-
transform:
|
|
2125
|
+
transform: D ? "translateY(0)" : "translateY(100%)",
|
|
2087
2126
|
transition: "transform 150ms ease-out",
|
|
2088
2127
|
...e == null ? void 0 : e.style
|
|
2089
2128
|
},
|
|
2090
2129
|
children: [
|
|
2091
|
-
/* @__PURE__ */
|
|
2092
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ x("div", { children: [
|
|
2131
|
+
/* @__PURE__ */ i(
|
|
2093
2132
|
ie,
|
|
2094
2133
|
{
|
|
2095
|
-
value:
|
|
2096
|
-
onChange:
|
|
2097
|
-
onSubmit:
|
|
2098
|
-
onClose:
|
|
2099
|
-
onHistoryPrevious:
|
|
2134
|
+
value: a,
|
|
2135
|
+
onChange: l,
|
|
2136
|
+
onSubmit: m,
|
|
2137
|
+
onClose: n,
|
|
2138
|
+
onHistoryPrevious: y,
|
|
2100
2139
|
onHistoryNext: c,
|
|
2101
|
-
mode:
|
|
2140
|
+
mode: f,
|
|
2102
2141
|
status: u,
|
|
2103
|
-
placeholder:
|
|
2142
|
+
placeholder: w,
|
|
2143
|
+
agentAvailable: P
|
|
2104
2144
|
}
|
|
2105
2145
|
),
|
|
2106
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ x(
|
|
2107
2147
|
"div",
|
|
2108
2148
|
{
|
|
2109
2149
|
style: {
|
|
@@ -2116,8 +2156,8 @@ const De = ({
|
|
|
2116
2156
|
backgroundColor: t.colors.background
|
|
2117
2157
|
},
|
|
2118
2158
|
children: [
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2160
|
+
/* @__PURE__ */ i(
|
|
2121
2161
|
"kbd",
|
|
2122
2162
|
{
|
|
2123
2163
|
style: {
|
|
@@ -2132,8 +2172,8 @@ const De = ({
|
|
|
2132
2172
|
" ",
|
|
2133
2173
|
"Execute"
|
|
2134
2174
|
] }),
|
|
2135
|
-
/* @__PURE__ */
|
|
2136
|
-
/* @__PURE__ */
|
|
2175
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2176
|
+
/* @__PURE__ */ i(
|
|
2137
2177
|
"kbd",
|
|
2138
2178
|
{
|
|
2139
2179
|
style: {
|
|
@@ -2148,8 +2188,8 @@ const De = ({
|
|
|
2148
2188
|
" ",
|
|
2149
2189
|
"Close"
|
|
2150
2190
|
] }),
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2192
|
+
/* @__PURE__ */ i(
|
|
2153
2193
|
"kbd",
|
|
2154
2194
|
{
|
|
2155
2195
|
style: {
|
|
@@ -2164,8 +2204,8 @@ const De = ({
|
|
|
2164
2204
|
" ",
|
|
2165
2205
|
"History"
|
|
2166
2206
|
] }),
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ x("span", { style: { marginLeft: "auto" }, children: [
|
|
2208
|
+
/* @__PURE__ */ i(
|
|
2169
2209
|
"kbd",
|
|
2170
2210
|
{
|
|
2171
2211
|
style: {
|
|
@@ -2184,16 +2224,16 @@ const De = ({
|
|
|
2184
2224
|
}
|
|
2185
2225
|
)
|
|
2186
2226
|
] }),
|
|
2187
|
-
/* @__PURE__ */
|
|
2188
|
-
|
|
2189
|
-
|
|
2227
|
+
/* @__PURE__ */ x("div", { style: { overflow: "auto" }, children: [
|
|
2228
|
+
S && /* @__PURE__ */ i(le, { tools: v, compact: v.length > 3 }),
|
|
2229
|
+
C && /* @__PURE__ */ i(
|
|
2190
2230
|
ce,
|
|
2191
2231
|
{
|
|
2192
|
-
response:
|
|
2232
|
+
response: p,
|
|
2193
2233
|
streaming: u === "thinking"
|
|
2194
2234
|
}
|
|
2195
2235
|
),
|
|
2196
|
-
|
|
2236
|
+
h && /* @__PURE__ */ x(
|
|
2197
2237
|
"div",
|
|
2198
2238
|
{
|
|
2199
2239
|
style: {
|
|
@@ -2203,7 +2243,7 @@ const De = ({
|
|
|
2203
2243
|
flexWrap: "wrap"
|
|
2204
2244
|
},
|
|
2205
2245
|
children: [
|
|
2206
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ i(
|
|
2207
2247
|
"span",
|
|
2208
2248
|
{
|
|
2209
2249
|
style: {
|
|
@@ -2214,11 +2254,11 @@ const De = ({
|
|
|
2214
2254
|
children: "Try:"
|
|
2215
2255
|
}
|
|
2216
2256
|
),
|
|
2217
|
-
|
|
2257
|
+
b.map((O, V) => /* @__PURE__ */ x(
|
|
2218
2258
|
"button",
|
|
2219
2259
|
{
|
|
2220
2260
|
onClick: () => {
|
|
2221
|
-
|
|
2261
|
+
l(O);
|
|
2222
2262
|
},
|
|
2223
2263
|
style: {
|
|
2224
2264
|
padding: "4px 10px",
|
|
@@ -2230,24 +2270,50 @@ const De = ({
|
|
|
2230
2270
|
cursor: "pointer",
|
|
2231
2271
|
transition: "background-color 150ms ease"
|
|
2232
2272
|
},
|
|
2233
|
-
onMouseEnter: (
|
|
2234
|
-
|
|
2273
|
+
onMouseEnter: (z) => {
|
|
2274
|
+
z.currentTarget.style.backgroundColor = t.colors.backgroundTertiary;
|
|
2235
2275
|
},
|
|
2236
|
-
onMouseLeave: (
|
|
2237
|
-
|
|
2276
|
+
onMouseLeave: (z) => {
|
|
2277
|
+
z.currentTarget.style.backgroundColor = t.colors.backgroundSecondary;
|
|
2238
2278
|
},
|
|
2239
2279
|
children: [
|
|
2240
2280
|
'"',
|
|
2241
|
-
|
|
2281
|
+
O,
|
|
2242
2282
|
'"'
|
|
2243
2283
|
]
|
|
2244
2284
|
},
|
|
2245
|
-
|
|
2285
|
+
V
|
|
2246
2286
|
))
|
|
2247
2287
|
]
|
|
2248
2288
|
}
|
|
2249
2289
|
),
|
|
2250
|
-
|
|
2290
|
+
E && /* @__PURE__ */ x(
|
|
2291
|
+
"div",
|
|
2292
|
+
{
|
|
2293
|
+
style: {
|
|
2294
|
+
padding: "12px 16px",
|
|
2295
|
+
fontSize: "12px",
|
|
2296
|
+
color: t.colors.warning,
|
|
2297
|
+
display: "flex",
|
|
2298
|
+
alignItems: "center",
|
|
2299
|
+
gap: "8px"
|
|
2300
|
+
},
|
|
2301
|
+
children: [
|
|
2302
|
+
/* @__PURE__ */ i("span", { children: "Agent unavailable." }),
|
|
2303
|
+
/* @__PURE__ */ x("span", { style: { color: t.colors.textMuted }, children: [
|
|
2304
|
+
"Use quick commands (start with ",
|
|
2305
|
+
/* @__PURE__ */ i("kbd", { style: {
|
|
2306
|
+
padding: "2px 6px",
|
|
2307
|
+
backgroundColor: t.colors.backgroundSecondary,
|
|
2308
|
+
borderRadius: "3px",
|
|
2309
|
+
border: `1px solid ${t.colors.border}`
|
|
2310
|
+
}, children: "/" }),
|
|
2311
|
+
")"
|
|
2312
|
+
] })
|
|
2313
|
+
]
|
|
2314
|
+
}
|
|
2315
|
+
),
|
|
2316
|
+
I && /* @__PURE__ */ x(
|
|
2251
2317
|
"div",
|
|
2252
2318
|
{
|
|
2253
2319
|
style: {
|
|
@@ -2257,29 +2323,29 @@ const De = ({
|
|
|
2257
2323
|
fontFamily: t.fonts.monospace
|
|
2258
2324
|
},
|
|
2259
2325
|
children: [
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
/* @__PURE__ */
|
|
2262
|
-
/* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2326
|
+
/* @__PURE__ */ i("div", { style: { marginBottom: "8px", color: t.colors.textSecondary }, children: "Quick commands:" }),
|
|
2327
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
2328
|
+
/* @__PURE__ */ x("div", { children: [
|
|
2329
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.info }, children: "/toggle" }),
|
|
2264
2330
|
" ",
|
|
2265
|
-
/* @__PURE__ */
|
|
2331
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.textMuted }, children: "<left|right>" }),
|
|
2266
2332
|
" ",
|
|
2267
2333
|
"- Toggle sidebar visibility"
|
|
2268
2334
|
] }),
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ x("div", { children: [
|
|
2336
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.info }, children: "/switch" }),
|
|
2271
2337
|
" ",
|
|
2272
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.textMuted }, children: "<slot> <panel>" }),
|
|
2273
2339
|
" ",
|
|
2274
2340
|
"- Switch panel content"
|
|
2275
2341
|
] }),
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ x("div", { children: [
|
|
2343
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.info }, children: "/collapse" }),
|
|
2278
2344
|
" ",
|
|
2279
2345
|
"- Collapse all sidebars"
|
|
2280
2346
|
] }),
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ x("div", { children: [
|
|
2348
|
+
/* @__PURE__ */ i("span", { style: { color: t.colors.info }, children: "/expand" }),
|
|
2283
2349
|
" ",
|
|
2284
2350
|
"- Expand all sidebars"
|
|
2285
2351
|
] })
|
|
@@ -2291,7 +2357,7 @@ const De = ({
|
|
|
2291
2357
|
]
|
|
2292
2358
|
}
|
|
2293
2359
|
),
|
|
2294
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ i("style", { children: `
|
|
2295
2361
|
@keyframes pulse {
|
|
2296
2362
|
0%, 100% { opacity: 1; }
|
|
2297
2363
|
50% { opacity: 0.5; }
|
|
@@ -2307,108 +2373,113 @@ const De = ({
|
|
|
2307
2373
|
` })
|
|
2308
2374
|
] });
|
|
2309
2375
|
};
|
|
2310
|
-
|
|
2311
|
-
const
|
|
2376
|
+
Ee.displayName = "AgentCommandPalette";
|
|
2377
|
+
const _e = [
|
|
2312
2378
|
"hide sidebars",
|
|
2313
2379
|
"show terminal",
|
|
2314
2380
|
"focus editor"
|
|
2315
2381
|
];
|
|
2316
|
-
function
|
|
2382
|
+
function ft({
|
|
2317
2383
|
events: o,
|
|
2318
2384
|
keyboard: e = { key: "p", altKey: !0 },
|
|
2319
2385
|
config: t = {},
|
|
2320
2386
|
onExecuteTool: r,
|
|
2321
|
-
initialSuggestions: s =
|
|
2387
|
+
initialSuggestions: s = _e,
|
|
2388
|
+
agentAvailable: n = !0
|
|
2322
2389
|
} = {}) {
|
|
2323
|
-
const [a,
|
|
2324
|
-
|
|
2325
|
-
}, []),
|
|
2326
|
-
|
|
2390
|
+
const [a, l] = R(!1), [f, u] = R(""), [g, d] = R("natural"), [p, m] = R("idle"), [y, c] = R([]), [b, P] = R([]), [D, W] = R(""), [L, j] = R([]), [w, v] = R(-1), S = Y(() => s, [s]), C = k((T) => {
|
|
2391
|
+
u(T), d(T.startsWith("/") ? "quick-command" : "natural");
|
|
2392
|
+
}, []), h = k(() => {
|
|
2393
|
+
l(!0), n ? (u(""), d("natural")) : (u("/"), d("quick-command")), m("idle"), c([]), P([]), W(""), v(-1), o == null || o.emit({
|
|
2327
2394
|
type: "agent-command-palette:opened",
|
|
2328
2395
|
source: "agent-command-palette",
|
|
2329
2396
|
timestamp: Date.now(),
|
|
2330
2397
|
payload: {}
|
|
2331
2398
|
});
|
|
2332
|
-
}, [o]),
|
|
2333
|
-
|
|
2399
|
+
}, [o, n]), I = k(() => {
|
|
2400
|
+
l(!1), o == null || o.emit({
|
|
2334
2401
|
type: "agent-command-palette:closed",
|
|
2335
2402
|
source: "agent-command-palette",
|
|
2336
2403
|
timestamp: Date.now(),
|
|
2337
2404
|
payload: {}
|
|
2338
2405
|
});
|
|
2339
|
-
}, [o]),
|
|
2340
|
-
a ?
|
|
2341
|
-
}, [a,
|
|
2342
|
-
|
|
2343
|
-
}, []),
|
|
2344
|
-
const
|
|
2406
|
+
}, [o]), E = k(() => {
|
|
2407
|
+
a ? I() : h();
|
|
2408
|
+
}, [a, h, I]), O = k(() => {
|
|
2409
|
+
u(""), d("natural"), m("idle"), c([]), P([]), W(""), v(-1);
|
|
2410
|
+
}, []), V = k((T) => {
|
|
2411
|
+
const M = {
|
|
2345
2412
|
...T,
|
|
2346
2413
|
status: "pending"
|
|
2347
2414
|
};
|
|
2348
|
-
return
|
|
2349
|
-
}, []),
|
|
2350
|
-
(T,
|
|
2351
|
-
|
|
2352
|
-
const
|
|
2353
|
-
if (!
|
|
2354
|
-
const
|
|
2355
|
-
...
|
|
2356
|
-
status:
|
|
2357
|
-
result:
|
|
2358
|
-
error:
|
|
2415
|
+
return c((N) => [...N, M]), M;
|
|
2416
|
+
}, []), z = k(
|
|
2417
|
+
(T, M, N, Q) => {
|
|
2418
|
+
c((F) => {
|
|
2419
|
+
const B = F.find((H) => H.id === T);
|
|
2420
|
+
if (!B) return F;
|
|
2421
|
+
const K = {
|
|
2422
|
+
...B,
|
|
2423
|
+
status: M,
|
|
2424
|
+
result: N,
|
|
2425
|
+
error: Q
|
|
2359
2426
|
};
|
|
2360
|
-
return
|
|
2427
|
+
return M === "success" || M === "error" ? (P((H) => [...H, K]), F.filter((H) => H.id !== T)) : F.map((H) => H.id === T ? K : H);
|
|
2361
2428
|
});
|
|
2362
2429
|
},
|
|
2363
2430
|
[]
|
|
2364
|
-
),
|
|
2431
|
+
), U = k(
|
|
2365
2432
|
async (T) => {
|
|
2366
|
-
const
|
|
2367
|
-
if (!
|
|
2368
|
-
|
|
2369
|
-
const
|
|
2370
|
-
|
|
2371
|
-
id:
|
|
2372
|
-
name:
|
|
2373
|
-
args: { args:
|
|
2374
|
-
}),
|
|
2433
|
+
const M = T.replace(/^\//, "").trim().split(/\s+/), N = M[0], Q = M.slice(1);
|
|
2434
|
+
if (!N) return;
|
|
2435
|
+
m("executing");
|
|
2436
|
+
const F = `quick-${Date.now()}`;
|
|
2437
|
+
V({
|
|
2438
|
+
id: F,
|
|
2439
|
+
name: N,
|
|
2440
|
+
args: { args: Q }
|
|
2441
|
+
}), z(F, "running");
|
|
2375
2442
|
try {
|
|
2376
2443
|
if (r) {
|
|
2377
|
-
const
|
|
2378
|
-
|
|
2444
|
+
const K = await r(N, { args: Q });
|
|
2445
|
+
z(F, "success", String(K));
|
|
2379
2446
|
} else
|
|
2380
|
-
|
|
2381
|
-
|
|
2447
|
+
z(F, "success", "Tool executed (no handler)");
|
|
2448
|
+
j((K) => [
|
|
2382
2449
|
{
|
|
2383
2450
|
query: T,
|
|
2384
2451
|
timestamp: Date.now(),
|
|
2385
|
-
toolsExecuted: [
|
|
2452
|
+
toolsExecuted: [N],
|
|
2386
2453
|
success: !0
|
|
2387
2454
|
},
|
|
2388
|
-
...
|
|
2389
|
-
]),
|
|
2390
|
-
const
|
|
2391
|
-
|
|
2392
|
-
} catch (
|
|
2393
|
-
const
|
|
2394
|
-
|
|
2455
|
+
...K.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
2456
|
+
]), m("complete"), W(`Executed: ${N}`);
|
|
2457
|
+
const B = t.autoCloseDelay ?? 1e3;
|
|
2458
|
+
B > 0 && setTimeout(() => I(), B);
|
|
2459
|
+
} catch (B) {
|
|
2460
|
+
const K = B instanceof Error ? B.message : "Unknown error";
|
|
2461
|
+
z(F, "error", void 0, K), m("error"), W(`Error: ${K}`);
|
|
2395
2462
|
}
|
|
2396
2463
|
},
|
|
2397
|
-
[r,
|
|
2398
|
-
),
|
|
2399
|
-
if (
|
|
2400
|
-
if (
|
|
2401
|
-
|
|
2464
|
+
[r, V, z, t.autoCloseDelay, t.maxHistoryEntries, I]
|
|
2465
|
+
), te = k(() => {
|
|
2466
|
+
if (f.trim()) {
|
|
2467
|
+
if (g === "quick-command") {
|
|
2468
|
+
U(f);
|
|
2469
|
+
return;
|
|
2470
|
+
}
|
|
2471
|
+
if (!n) {
|
|
2472
|
+
W("Agent unavailable. Use quick commands (start with /)."), m("error");
|
|
2402
2473
|
return;
|
|
2403
2474
|
}
|
|
2404
|
-
|
|
2475
|
+
m("thinking"), o == null || o.emit({
|
|
2405
2476
|
type: "agent-command-palette:submit",
|
|
2406
2477
|
source: "agent-command-palette",
|
|
2407
2478
|
timestamp: Date.now(),
|
|
2408
|
-
payload: { query:
|
|
2409
|
-
}),
|
|
2479
|
+
payload: { query: f, mode: g }
|
|
2480
|
+
}), j((T) => [
|
|
2410
2481
|
{
|
|
2411
|
-
query:
|
|
2482
|
+
query: f,
|
|
2412
2483
|
timestamp: Date.now(),
|
|
2413
2484
|
toolsExecuted: [],
|
|
2414
2485
|
success: !0
|
|
@@ -2416,65 +2487,67 @@ function ut({
|
|
|
2416
2487
|
...T.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
2417
2488
|
]);
|
|
2418
2489
|
}
|
|
2419
|
-
}, [
|
|
2420
|
-
if (
|
|
2421
|
-
const T =
|
|
2422
|
-
|
|
2423
|
-
}, [
|
|
2424
|
-
if (
|
|
2425
|
-
|
|
2490
|
+
}, [f, g, U, o, t.maxHistoryEntries, n]), G = k(() => {
|
|
2491
|
+
if (L.length === 0) return;
|
|
2492
|
+
const T = w < L.length - 1 ? w + 1 : w;
|
|
2493
|
+
v(T), L[T] && (u(L[T].query), d(L[T].query.startsWith("/") ? "quick-command" : "natural"));
|
|
2494
|
+
}, [L, w]), ke = k(() => {
|
|
2495
|
+
if (w <= 0) {
|
|
2496
|
+
v(-1), u(""), d("natural");
|
|
2426
2497
|
return;
|
|
2427
2498
|
}
|
|
2428
|
-
const T =
|
|
2429
|
-
|
|
2430
|
-
}, [
|
|
2499
|
+
const T = w - 1;
|
|
2500
|
+
v(T), L[T] && (u(L[T].query), d(L[T].query.startsWith("/") ? "quick-command" : "natural"));
|
|
2501
|
+
}, [L, w]), ee = k(
|
|
2431
2502
|
(T) => {
|
|
2432
2503
|
const {
|
|
2433
|
-
key:
|
|
2434
|
-
altKey:
|
|
2435
|
-
ctrlKey:
|
|
2436
|
-
metaKey:
|
|
2437
|
-
shiftKey:
|
|
2438
|
-
} = e,
|
|
2439
|
-
if ((
|
|
2440
|
-
const
|
|
2441
|
-
if (!
|
|
2504
|
+
key: M = "p",
|
|
2505
|
+
altKey: N = !0,
|
|
2506
|
+
ctrlKey: Q = !1,
|
|
2507
|
+
metaKey: F = !1,
|
|
2508
|
+
shiftKey: B = !1
|
|
2509
|
+
} = e, K = T.altKey === N && T.ctrlKey === Q && T.metaKey === F && T.shiftKey === B;
|
|
2510
|
+
if ((N ? T.code === `Key${M.toUpperCase()}` : T.key.toLowerCase() === M.toLowerCase()) && K) {
|
|
2511
|
+
const X = T.target;
|
|
2512
|
+
if (!X.closest("[data-agent-command-palette-input]") && (X.tagName === "INPUT" || X.tagName === "TEXTAREA" || X.isContentEditable))
|
|
2442
2513
|
return;
|
|
2443
|
-
T.preventDefault(),
|
|
2514
|
+
T.preventDefault(), E();
|
|
2444
2515
|
}
|
|
2445
2516
|
},
|
|
2446
|
-
[e,
|
|
2517
|
+
[e, E]
|
|
2447
2518
|
);
|
|
2448
|
-
return
|
|
2519
|
+
return A(() => (window.addEventListener("keydown", ee), () => window.removeEventListener("keydown", ee)), [ee]), {
|
|
2520
|
+
// Agent availability
|
|
2521
|
+
agentAvailable: n,
|
|
2449
2522
|
// Visibility
|
|
2450
2523
|
isOpen: a,
|
|
2451
|
-
open:
|
|
2452
|
-
close:
|
|
2453
|
-
toggle:
|
|
2524
|
+
open: h,
|
|
2525
|
+
close: I,
|
|
2526
|
+
toggle: E,
|
|
2454
2527
|
// Input
|
|
2455
|
-
query:
|
|
2456
|
-
setQuery:
|
|
2457
|
-
mode:
|
|
2528
|
+
query: f,
|
|
2529
|
+
setQuery: C,
|
|
2530
|
+
mode: g,
|
|
2458
2531
|
// Execution
|
|
2459
|
-
status:
|
|
2460
|
-
setStatus:
|
|
2461
|
-
pendingTools:
|
|
2462
|
-
completedTools:
|
|
2463
|
-
agentResponse:
|
|
2464
|
-
setAgentResponse:
|
|
2465
|
-
submit:
|
|
2466
|
-
executeQuickCommand:
|
|
2532
|
+
status: p,
|
|
2533
|
+
setStatus: m,
|
|
2534
|
+
pendingTools: y,
|
|
2535
|
+
completedTools: b,
|
|
2536
|
+
agentResponse: D,
|
|
2537
|
+
setAgentResponse: W,
|
|
2538
|
+
submit: te,
|
|
2539
|
+
executeQuickCommand: U,
|
|
2467
2540
|
// Tool management (for external AI integration)
|
|
2468
|
-
addPendingTool:
|
|
2469
|
-
updateToolStatus:
|
|
2541
|
+
addPendingTool: V,
|
|
2542
|
+
updateToolStatus: z,
|
|
2470
2543
|
// History
|
|
2471
|
-
history:
|
|
2472
|
-
historyPrevious:
|
|
2473
|
-
historyNext:
|
|
2544
|
+
history: L,
|
|
2545
|
+
historyPrevious: G,
|
|
2546
|
+
historyNext: ke,
|
|
2474
2547
|
// Suggestions
|
|
2475
|
-
suggestions:
|
|
2548
|
+
suggestions: S,
|
|
2476
2549
|
// Actions
|
|
2477
|
-
clear:
|
|
2550
|
+
clear: O
|
|
2478
2551
|
};
|
|
2479
2552
|
}
|
|
2480
2553
|
const de = {
|
|
@@ -2755,7 +2828,7 @@ const de = {
|
|
|
2755
2828
|
call_template_type: "panel_event",
|
|
2756
2829
|
event_type: "panel:reset-layout"
|
|
2757
2830
|
}
|
|
2758
|
-
},
|
|
2831
|
+
}, ze = [
|
|
2759
2832
|
// State query tools
|
|
2760
2833
|
de,
|
|
2761
2834
|
pe,
|
|
@@ -2767,42 +2840,42 @@ const de = {
|
|
|
2767
2840
|
he,
|
|
2768
2841
|
ge,
|
|
2769
2842
|
xe
|
|
2770
|
-
],
|
|
2843
|
+
], mt = [
|
|
2771
2844
|
de,
|
|
2772
2845
|
pe,
|
|
2773
2846
|
ue
|
|
2774
|
-
],
|
|
2847
|
+
], yt = [
|
|
2775
2848
|
fe,
|
|
2776
2849
|
me,
|
|
2777
2850
|
ye,
|
|
2778
2851
|
he,
|
|
2779
2852
|
ge,
|
|
2780
2853
|
xe
|
|
2781
|
-
],
|
|
2854
|
+
], ht = {
|
|
2782
2855
|
id: "panel-layouts",
|
|
2783
2856
|
name: "Panel Layouts",
|
|
2784
2857
|
description: "Generic panel layout and state query operations",
|
|
2785
|
-
tools:
|
|
2858
|
+
tools: ze
|
|
2786
2859
|
};
|
|
2787
|
-
function
|
|
2860
|
+
function $e(o, e, t = {}) {
|
|
2788
2861
|
const {
|
|
2789
2862
|
categoryPrefix: r = "Panel Tools",
|
|
2790
2863
|
basePriority: s = 50,
|
|
2791
|
-
includePanelInCategory:
|
|
2792
|
-
} = t,
|
|
2864
|
+
includePanelInCategory: n = !0
|
|
2865
|
+
} = t, a = n ? `${r} > ${o.panelId}` : r, l = je(o.inputs);
|
|
2793
2866
|
return {
|
|
2794
2867
|
id: `tool.${o.qualifiedName}`,
|
|
2795
|
-
label:
|
|
2868
|
+
label: qe(o.name),
|
|
2796
2869
|
description: o.description,
|
|
2797
|
-
category:
|
|
2870
|
+
category: a,
|
|
2798
2871
|
keywords: [...o.tags, o.panelId, "tool"],
|
|
2799
2872
|
priority: s,
|
|
2800
|
-
execute: async (
|
|
2801
|
-
var
|
|
2802
|
-
if (
|
|
2873
|
+
execute: async (f) => {
|
|
2874
|
+
var g;
|
|
2875
|
+
if (l) {
|
|
2803
2876
|
console.warn(
|
|
2804
2877
|
`Tool "${o.qualifiedName}" requires parameters. Invoke programmatically with: registry.invokeTool('${o.qualifiedName}', { ... })`
|
|
2805
|
-
), (
|
|
2878
|
+
), (g = f.events) == null || g.emit({
|
|
2806
2879
|
type: "tool:requires-parameters",
|
|
2807
2880
|
source: "command-palette",
|
|
2808
2881
|
timestamp: Date.now(),
|
|
@@ -2818,42 +2891,42 @@ function ze(o, e, t = {}) {
|
|
|
2818
2891
|
{},
|
|
2819
2892
|
"command-palette"
|
|
2820
2893
|
);
|
|
2821
|
-
u.success || console.error(`Tool invocation failed: ${u.error}`),
|
|
2894
|
+
u.success || console.error(`Tool invocation failed: ${u.error}`), f.closeCommandPalette();
|
|
2822
2895
|
}
|
|
2823
2896
|
};
|
|
2824
2897
|
}
|
|
2825
2898
|
function be(o, e = {}) {
|
|
2826
|
-
return o.getAllTools().map((r) =>
|
|
2899
|
+
return o.getAllTools().map((r) => $e(r, o, e));
|
|
2827
2900
|
}
|
|
2828
|
-
function
|
|
2901
|
+
function gt(o, e = {}) {
|
|
2829
2902
|
return () => be(o, e);
|
|
2830
2903
|
}
|
|
2831
|
-
function
|
|
2904
|
+
function qe(o) {
|
|
2832
2905
|
return o.split("_").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
2833
2906
|
}
|
|
2834
|
-
function
|
|
2907
|
+
function je(o) {
|
|
2835
2908
|
return !(o.type !== "object" || !o.required || o.required.length === 0);
|
|
2836
2909
|
}
|
|
2837
|
-
function
|
|
2910
|
+
function xt(o, e = {}) {
|
|
2838
2911
|
return be(o, e);
|
|
2839
2912
|
}
|
|
2840
|
-
function
|
|
2913
|
+
function bt(o) {
|
|
2841
2914
|
const { inputs: e } = o;
|
|
2842
2915
|
if (e.type !== "object" || !e.properties)
|
|
2843
2916
|
return [];
|
|
2844
2917
|
const t = new Set(e.required || []), r = [];
|
|
2845
|
-
for (const [s,
|
|
2918
|
+
for (const [s, n] of Object.entries(e.properties))
|
|
2846
2919
|
r.push({
|
|
2847
2920
|
name: s,
|
|
2848
|
-
type:
|
|
2849
|
-
description:
|
|
2921
|
+
type: n.type || "unknown",
|
|
2922
|
+
description: n.description || "",
|
|
2850
2923
|
required: t.has(s),
|
|
2851
|
-
default:
|
|
2852
|
-
enum:
|
|
2924
|
+
default: n.default,
|
|
2925
|
+
enum: n.enum
|
|
2853
2926
|
});
|
|
2854
2927
|
return r;
|
|
2855
2928
|
}
|
|
2856
|
-
function
|
|
2929
|
+
function Me(o) {
|
|
2857
2930
|
const e = {};
|
|
2858
2931
|
if (o.inputs.properties)
|
|
2859
2932
|
for (const [t, r] of Object.entries(o.inputs.properties)) {
|
|
@@ -2874,12 +2947,12 @@ function je(o) {
|
|
|
2874
2947
|
}
|
|
2875
2948
|
};
|
|
2876
2949
|
}
|
|
2877
|
-
function
|
|
2950
|
+
function kt(o) {
|
|
2878
2951
|
return {
|
|
2879
|
-
functionDeclarations: o.map(
|
|
2952
|
+
functionDeclarations: o.map(Me)
|
|
2880
2953
|
};
|
|
2881
2954
|
}
|
|
2882
|
-
function
|
|
2955
|
+
function Ne(o) {
|
|
2883
2956
|
return {
|
|
2884
2957
|
type: "function",
|
|
2885
2958
|
function: {
|
|
@@ -2890,45 +2963,45 @@ function Me(o) {
|
|
|
2890
2963
|
};
|
|
2891
2964
|
}
|
|
2892
2965
|
function wt(o) {
|
|
2893
|
-
return o.map(
|
|
2966
|
+
return o.map(Ne);
|
|
2894
2967
|
}
|
|
2895
|
-
function
|
|
2968
|
+
function Fe(o) {
|
|
2896
2969
|
return {
|
|
2897
2970
|
name: o.name,
|
|
2898
2971
|
description: o.description,
|
|
2899
2972
|
input_schema: o.inputs
|
|
2900
2973
|
};
|
|
2901
2974
|
}
|
|
2902
|
-
function
|
|
2903
|
-
return o.map(
|
|
2975
|
+
function Ct(o) {
|
|
2976
|
+
return o.map(Fe);
|
|
2904
2977
|
}
|
|
2905
|
-
function
|
|
2978
|
+
function Oe(o) {
|
|
2906
2979
|
return {
|
|
2907
2980
|
name: o.name,
|
|
2908
2981
|
description: o.description,
|
|
2909
2982
|
parameters: o.inputs
|
|
2910
2983
|
};
|
|
2911
2984
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return o.map(
|
|
2985
|
+
function vt(o) {
|
|
2986
|
+
return o.map(Oe);
|
|
2914
2987
|
}
|
|
2915
|
-
function
|
|
2988
|
+
function St(o, e = {}) {
|
|
2916
2989
|
const {
|
|
2917
2990
|
header: t = "You have access to the following tools:",
|
|
2918
2991
|
includeParameters: r = !0
|
|
2919
|
-
} = e, s = o.map((
|
|
2920
|
-
let
|
|
2921
|
-
if (r &&
|
|
2922
|
-
const
|
|
2923
|
-
var
|
|
2924
|
-
const
|
|
2925
|
-
return ` - ${
|
|
2992
|
+
} = e, s = o.map((n) => {
|
|
2993
|
+
let a = `- ${n.name}: ${n.description}`;
|
|
2994
|
+
if (r && n.inputs.properties) {
|
|
2995
|
+
const l = Object.entries(n.inputs.properties).map(([f, u]) => {
|
|
2996
|
+
var p;
|
|
2997
|
+
const g = u, d = (p = n.inputs.required) != null && p.includes(f) ? " (required)" : "";
|
|
2998
|
+
return ` - ${f}: ${g.description || g.type}${d}`;
|
|
2926
2999
|
}).join(`
|
|
2927
3000
|
`);
|
|
2928
|
-
|
|
2929
|
-
${
|
|
3001
|
+
l && (a += `
|
|
3002
|
+
${l}`);
|
|
2930
3003
|
}
|
|
2931
|
-
return
|
|
3004
|
+
return a;
|
|
2932
3005
|
});
|
|
2933
3006
|
return `${t}
|
|
2934
3007
|
|
|
@@ -2936,7 +3009,7 @@ ${s.join(`
|
|
|
2936
3009
|
|
|
2937
3010
|
`)}`;
|
|
2938
3011
|
}
|
|
2939
|
-
const
|
|
3012
|
+
const Ke = ({ size: o = 18 }) => /* @__PURE__ */ x(
|
|
2940
3013
|
"svg",
|
|
2941
3014
|
{
|
|
2942
3015
|
width: o,
|
|
@@ -2948,11 +3021,11 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
2948
3021
|
strokeLinecap: "round",
|
|
2949
3022
|
strokeLinejoin: "round",
|
|
2950
3023
|
children: [
|
|
2951
|
-
/* @__PURE__ */
|
|
2952
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ i("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3025
|
+
/* @__PURE__ */ i("path", { d: "M9 3v18" })
|
|
2953
3026
|
]
|
|
2954
3027
|
}
|
|
2955
|
-
),
|
|
3028
|
+
), Be = ({ size: o = 18 }) => /* @__PURE__ */ x(
|
|
2956
3029
|
"svg",
|
|
2957
3030
|
{
|
|
2958
3031
|
width: o,
|
|
@@ -2964,12 +3037,12 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
2964
3037
|
strokeLinecap: "round",
|
|
2965
3038
|
strokeLinejoin: "round",
|
|
2966
3039
|
children: [
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ i("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3041
|
+
/* @__PURE__ */ i("path", { d: "M9 3v18" }),
|
|
3042
|
+
/* @__PURE__ */ i("path", { d: "m16 15-3-3 3-3" })
|
|
2970
3043
|
]
|
|
2971
3044
|
}
|
|
2972
|
-
),
|
|
3045
|
+
), Ve = ({ size: o = 18 }) => /* @__PURE__ */ x(
|
|
2973
3046
|
"svg",
|
|
2974
3047
|
{
|
|
2975
3048
|
width: o,
|
|
@@ -2981,11 +3054,11 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
2981
3054
|
strokeLinecap: "round",
|
|
2982
3055
|
strokeLinejoin: "round",
|
|
2983
3056
|
children: [
|
|
2984
|
-
/* @__PURE__ */
|
|
2985
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ i("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3058
|
+
/* @__PURE__ */ i("path", { d: "M15 3v18" })
|
|
2986
3059
|
]
|
|
2987
3060
|
}
|
|
2988
|
-
),
|
|
3061
|
+
), He = ({ size: o = 18 }) => /* @__PURE__ */ x(
|
|
2989
3062
|
"svg",
|
|
2990
3063
|
{
|
|
2991
3064
|
width: o,
|
|
@@ -2997,9 +3070,9 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
2997
3070
|
strokeLinecap: "round",
|
|
2998
3071
|
strokeLinejoin: "round",
|
|
2999
3072
|
children: [
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
-
/* @__PURE__ */
|
|
3002
|
-
/* @__PURE__ */
|
|
3073
|
+
/* @__PURE__ */ i("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3074
|
+
/* @__PURE__ */ i("path", { d: "M15 3v18" }),
|
|
3075
|
+
/* @__PURE__ */ i("path", { d: "m8 9 3 3-3 3" })
|
|
3003
3076
|
]
|
|
3004
3077
|
}
|
|
3005
3078
|
), oe = ({
|
|
@@ -3008,21 +3081,21 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3008
3081
|
side: t = "left",
|
|
3009
3082
|
iconSize: r = 18,
|
|
3010
3083
|
style: s,
|
|
3011
|
-
shortcutHint:
|
|
3012
|
-
title:
|
|
3013
|
-
className:
|
|
3084
|
+
shortcutHint: n = "Cmd/Ctrl+B",
|
|
3085
|
+
title: a,
|
|
3086
|
+
className: l
|
|
3014
3087
|
}) => {
|
|
3015
|
-
const { theme:
|
|
3016
|
-
return /* @__PURE__ */
|
|
3088
|
+
const { theme: f } = q(), u = () => t === "right" ? o ? /* @__PURE__ */ i(Ve, { size: r }) : /* @__PURE__ */ i(He, { size: r }) : o ? /* @__PURE__ */ i(Ke, { size: r }) : /* @__PURE__ */ i(Be, { size: r });
|
|
3089
|
+
return /* @__PURE__ */ i(
|
|
3017
3090
|
"button",
|
|
3018
3091
|
{
|
|
3019
3092
|
onClick: e,
|
|
3020
|
-
title:
|
|
3021
|
-
className:
|
|
3093
|
+
title: a ?? `${o ? "Show" : "Hide"} ${t === "right" ? "Right Panel" : "Sidebar"}${n ? ` (${n})` : ""}`,
|
|
3094
|
+
className: l,
|
|
3022
3095
|
style: {
|
|
3023
3096
|
background: "transparent",
|
|
3024
3097
|
border: "none",
|
|
3025
|
-
color: o ?
|
|
3098
|
+
color: o ? f.colors.textSecondary : f.colors.primary,
|
|
3026
3099
|
cursor: "pointer",
|
|
3027
3100
|
padding: "6px",
|
|
3028
3101
|
borderRadius: "4px",
|
|
@@ -3035,15 +3108,15 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3035
3108
|
...s
|
|
3036
3109
|
},
|
|
3037
3110
|
onMouseEnter: (d) => {
|
|
3038
|
-
d.currentTarget.style.backgroundColor =
|
|
3111
|
+
d.currentTarget.style.backgroundColor = f.colors.backgroundTertiary, d.currentTarget.style.color = f.colors.primary;
|
|
3039
3112
|
},
|
|
3040
3113
|
onMouseLeave: (d) => {
|
|
3041
|
-
d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.color = o ?
|
|
3114
|
+
d.currentTarget.style.backgroundColor = "transparent", d.currentTarget.style.color = o ? f.colors.textSecondary : f.colors.primary;
|
|
3042
3115
|
},
|
|
3043
3116
|
children: u()
|
|
3044
3117
|
}
|
|
3045
3118
|
);
|
|
3046
|
-
},
|
|
3119
|
+
}, Je = ({ size: o = 14 }) => /* @__PURE__ */ x(
|
|
3047
3120
|
"svg",
|
|
3048
3121
|
{
|
|
3049
3122
|
width: o,
|
|
@@ -3055,13 +3128,13 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3055
3128
|
strokeLinecap: "round",
|
|
3056
3129
|
strokeLinejoin: "round",
|
|
3057
3130
|
children: [
|
|
3058
|
-
/* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3131
|
+
/* @__PURE__ */ i("path", { d: "M8 3 4 7l4 4" }),
|
|
3132
|
+
/* @__PURE__ */ i("path", { d: "M4 7h16" }),
|
|
3133
|
+
/* @__PURE__ */ i("path", { d: "m16 21 4-4-4-4" }),
|
|
3134
|
+
/* @__PURE__ */ i("path", { d: "M20 17H4" })
|
|
3062
3135
|
]
|
|
3063
3136
|
}
|
|
3064
|
-
),
|
|
3137
|
+
), Qe = ({ size: o = 14 }) => /* @__PURE__ */ x(
|
|
3065
3138
|
"svg",
|
|
3066
3139
|
{
|
|
3067
3140
|
width: o,
|
|
@@ -3073,10 +3146,10 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3073
3146
|
strokeLinecap: "round",
|
|
3074
3147
|
strokeLinejoin: "round",
|
|
3075
3148
|
children: [
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ i("path", { d: "m16 3 4 4-4 4" }),
|
|
3150
|
+
/* @__PURE__ */ i("path", { d: "M20 7H4" }),
|
|
3151
|
+
/* @__PURE__ */ i("path", { d: "m8 21-4-4 4-4" }),
|
|
3152
|
+
/* @__PURE__ */ i("path", { d: "M4 17h16" })
|
|
3080
3153
|
]
|
|
3081
3154
|
}
|
|
3082
3155
|
), re = ({
|
|
@@ -3085,19 +3158,19 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3085
3158
|
iconSize: t = 14,
|
|
3086
3159
|
style: r,
|
|
3087
3160
|
title: s,
|
|
3088
|
-
className:
|
|
3161
|
+
className: n
|
|
3089
3162
|
}) => {
|
|
3090
|
-
const { theme:
|
|
3091
|
-
return /* @__PURE__ */
|
|
3163
|
+
const { theme: a } = q(), l = () => e === "left-middle" ? "Switch left and middle panels" : "Switch right and middle panels", f = e === "left-middle" ? Je : Qe;
|
|
3164
|
+
return /* @__PURE__ */ i(
|
|
3092
3165
|
"button",
|
|
3093
3166
|
{
|
|
3094
3167
|
onClick: o,
|
|
3095
|
-
title: s ??
|
|
3096
|
-
className:
|
|
3168
|
+
title: s ?? l(),
|
|
3169
|
+
className: n,
|
|
3097
3170
|
style: {
|
|
3098
3171
|
background: "transparent",
|
|
3099
3172
|
border: "none",
|
|
3100
|
-
color:
|
|
3173
|
+
color: a.colors.textSecondary,
|
|
3101
3174
|
cursor: "pointer",
|
|
3102
3175
|
padding: "6px",
|
|
3103
3176
|
borderRadius: "4px",
|
|
@@ -3110,15 +3183,15 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3110
3183
|
...r
|
|
3111
3184
|
},
|
|
3112
3185
|
onMouseEnter: (u) => {
|
|
3113
|
-
u.currentTarget.style.backgroundColor =
|
|
3186
|
+
u.currentTarget.style.backgroundColor = a.colors.backgroundTertiary, u.currentTarget.style.color = a.colors.text;
|
|
3114
3187
|
},
|
|
3115
3188
|
onMouseLeave: (u) => {
|
|
3116
|
-
u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color =
|
|
3189
|
+
u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = a.colors.textSecondary;
|
|
3117
3190
|
},
|
|
3118
|
-
children: /* @__PURE__ */
|
|
3191
|
+
children: /* @__PURE__ */ i(f, { size: t })
|
|
3119
3192
|
}
|
|
3120
3193
|
);
|
|
3121
|
-
},
|
|
3194
|
+
}, Ue = ({ size: o = 14 }) => /* @__PURE__ */ x(
|
|
3122
3195
|
"svg",
|
|
3123
3196
|
{
|
|
3124
3197
|
width: o,
|
|
@@ -3130,9 +3203,9 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3130
3203
|
strokeLinecap: "round",
|
|
3131
3204
|
strokeLinejoin: "round",
|
|
3132
3205
|
children: [
|
|
3133
|
-
/* @__PURE__ */
|
|
3134
|
-
/* @__PURE__ */
|
|
3135
|
-
/* @__PURE__ */
|
|
3206
|
+
/* @__PURE__ */ i("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3207
|
+
/* @__PURE__ */ i("path", { d: "M3 9h18" }),
|
|
3208
|
+
/* @__PURE__ */ i("path", { d: "M9 21V9" })
|
|
3136
3209
|
]
|
|
3137
3210
|
}
|
|
3138
3211
|
), Ge = ({
|
|
@@ -3142,8 +3215,8 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3142
3215
|
title: r = "Configure panel layout",
|
|
3143
3216
|
className: s
|
|
3144
3217
|
}) => {
|
|
3145
|
-
const { theme:
|
|
3146
|
-
return /* @__PURE__ */
|
|
3218
|
+
const { theme: n } = q();
|
|
3219
|
+
return /* @__PURE__ */ i(
|
|
3147
3220
|
"button",
|
|
3148
3221
|
{
|
|
3149
3222
|
onClick: o,
|
|
@@ -3152,7 +3225,7 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3152
3225
|
style: {
|
|
3153
3226
|
background: "transparent",
|
|
3154
3227
|
border: "none",
|
|
3155
|
-
color:
|
|
3228
|
+
color: n.colors.textSecondary,
|
|
3156
3229
|
cursor: "pointer",
|
|
3157
3230
|
padding: "6px",
|
|
3158
3231
|
borderRadius: "4px",
|
|
@@ -3164,92 +3237,92 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3164
3237
|
height: "32px",
|
|
3165
3238
|
...t
|
|
3166
3239
|
},
|
|
3167
|
-
onMouseEnter: (
|
|
3168
|
-
|
|
3240
|
+
onMouseEnter: (a) => {
|
|
3241
|
+
a.currentTarget.style.backgroundColor = n.colors.backgroundTertiary, a.currentTarget.style.color = n.colors.text;
|
|
3169
3242
|
},
|
|
3170
|
-
onMouseLeave: (
|
|
3171
|
-
|
|
3243
|
+
onMouseLeave: (a) => {
|
|
3244
|
+
a.currentTarget.style.backgroundColor = "transparent", a.currentTarget.style.color = n.colors.textSecondary;
|
|
3172
3245
|
},
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3246
|
+
children: /* @__PURE__ */ i(Ue, { size: e })
|
|
3174
3247
|
}
|
|
3175
3248
|
);
|
|
3176
|
-
},
|
|
3249
|
+
}, Tt = ({
|
|
3177
3250
|
leftSidebarCollapsed: o = !1,
|
|
3178
3251
|
onToggleLeftSidebar: e,
|
|
3179
3252
|
showLeftSidebarControl: t = !1,
|
|
3180
3253
|
rightSidebarCollapsed: r = !1,
|
|
3181
3254
|
onToggleRightSidebar: s,
|
|
3182
|
-
showRightSidebarControl:
|
|
3183
|
-
onSwitchLeftMiddlePanels:
|
|
3184
|
-
showSwitchLeftMiddle:
|
|
3185
|
-
onSwitchRightMiddlePanels:
|
|
3255
|
+
showRightSidebarControl: n = !1,
|
|
3256
|
+
onSwitchLeftMiddlePanels: a,
|
|
3257
|
+
showSwitchLeftMiddle: l = !1,
|
|
3258
|
+
onSwitchRightMiddlePanels: f,
|
|
3186
3259
|
showSwitchRightMiddle: u = !1,
|
|
3187
|
-
onConfigurePanels:
|
|
3260
|
+
onConfigurePanels: g,
|
|
3188
3261
|
showConfigureButton: d = !1,
|
|
3189
|
-
gap:
|
|
3190
|
-
style:
|
|
3191
|
-
className:
|
|
3262
|
+
gap: p = 4,
|
|
3263
|
+
style: m,
|
|
3264
|
+
className: y,
|
|
3192
3265
|
iconSize: c,
|
|
3193
|
-
leftCollapseButtonProps:
|
|
3194
|
-
rightCollapseButtonProps:
|
|
3195
|
-
leftMiddleSwitchButtonProps:
|
|
3196
|
-
rightMiddleSwitchButtonProps:
|
|
3197
|
-
configureButtonProps:
|
|
3198
|
-
}) => t && e ||
|
|
3266
|
+
leftCollapseButtonProps: b,
|
|
3267
|
+
rightCollapseButtonProps: P,
|
|
3268
|
+
leftMiddleSwitchButtonProps: D,
|
|
3269
|
+
rightMiddleSwitchButtonProps: W,
|
|
3270
|
+
configureButtonProps: L
|
|
3271
|
+
}) => t && e || l && a || d && g || u && f || n && s ? /* @__PURE__ */ x(
|
|
3199
3272
|
"div",
|
|
3200
3273
|
{
|
|
3201
|
-
className:
|
|
3274
|
+
className: y,
|
|
3202
3275
|
style: {
|
|
3203
3276
|
display: "flex",
|
|
3204
3277
|
alignItems: "center",
|
|
3205
|
-
gap: `${
|
|
3206
|
-
...
|
|
3278
|
+
gap: `${p}px`,
|
|
3279
|
+
...m
|
|
3207
3280
|
},
|
|
3208
3281
|
children: [
|
|
3209
|
-
t && e && /* @__PURE__ */
|
|
3282
|
+
t && e && /* @__PURE__ */ i(
|
|
3210
3283
|
oe,
|
|
3211
3284
|
{
|
|
3212
3285
|
isCollapsed: o,
|
|
3213
3286
|
onToggle: e,
|
|
3214
3287
|
side: "left",
|
|
3215
3288
|
iconSize: c ?? 18,
|
|
3216
|
-
...
|
|
3289
|
+
...b
|
|
3217
3290
|
}
|
|
3218
3291
|
),
|
|
3219
|
-
|
|
3292
|
+
l && a && /* @__PURE__ */ i(
|
|
3220
3293
|
re,
|
|
3221
3294
|
{
|
|
3222
|
-
onSwitch:
|
|
3295
|
+
onSwitch: a,
|
|
3223
3296
|
variant: "left-middle",
|
|
3224
3297
|
iconSize: c ?? 14,
|
|
3225
|
-
...
|
|
3298
|
+
...D
|
|
3226
3299
|
}
|
|
3227
3300
|
),
|
|
3228
|
-
d &&
|
|
3301
|
+
d && g && /* @__PURE__ */ i(
|
|
3229
3302
|
Ge,
|
|
3230
3303
|
{
|
|
3231
|
-
onConfigure:
|
|
3304
|
+
onConfigure: g,
|
|
3232
3305
|
iconSize: c ?? 14,
|
|
3233
|
-
|
|
3306
|
+
...L
|
|
3234
3307
|
}
|
|
3235
3308
|
),
|
|
3236
|
-
u &&
|
|
3309
|
+
u && f && /* @__PURE__ */ i(
|
|
3237
3310
|
re,
|
|
3238
3311
|
{
|
|
3239
|
-
onSwitch:
|
|
3312
|
+
onSwitch: f,
|
|
3240
3313
|
variant: "right-middle",
|
|
3241
3314
|
iconSize: c ?? 14,
|
|
3242
|
-
...
|
|
3315
|
+
...W
|
|
3243
3316
|
}
|
|
3244
3317
|
),
|
|
3245
|
-
|
|
3318
|
+
n && s && /* @__PURE__ */ i(
|
|
3246
3319
|
oe,
|
|
3247
3320
|
{
|
|
3248
3321
|
isCollapsed: r,
|
|
3249
3322
|
onToggle: s,
|
|
3250
3323
|
side: "right",
|
|
3251
3324
|
iconSize: c ?? 18,
|
|
3252
|
-
...
|
|
3325
|
+
...P
|
|
3253
3326
|
}
|
|
3254
3327
|
)
|
|
3255
3328
|
]
|
|
@@ -3257,63 +3330,63 @@ const Oe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
|
3257
3330
|
) : null;
|
|
3258
3331
|
export {
|
|
3259
3332
|
ie as AgentCommandInput,
|
|
3260
|
-
|
|
3333
|
+
Ee as AgentCommandPalette,
|
|
3261
3334
|
ce as AgentResponseDisplay,
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3335
|
+
Ie as CommandInput,
|
|
3336
|
+
ne as CommandItem,
|
|
3337
|
+
Re as CommandList,
|
|
3338
|
+
lt as CommandPalette,
|
|
3339
|
+
ae as CommandRegistryService,
|
|
3340
|
+
Rt as EditableConfigurablePanelLayout,
|
|
3341
|
+
it as FocusIndicator,
|
|
3342
|
+
Te as LocalStoragePersistenceAdapter,
|
|
3343
|
+
Pe as LocalStorageWorkspaceAdapter,
|
|
3271
3344
|
oe as PanelCollapseButton,
|
|
3272
3345
|
Ge as PanelConfigureButton,
|
|
3273
|
-
|
|
3346
|
+
Tt as PanelControls,
|
|
3274
3347
|
re as PanelSwitchButton,
|
|
3275
|
-
|
|
3348
|
+
Lt as ResponsiveConfigurablePanelLayout,
|
|
3276
3349
|
le as ToolExecutionList,
|
|
3277
3350
|
_ as WorkspaceLayoutService,
|
|
3278
3351
|
me as collapseAllPanelsTool,
|
|
3279
|
-
|
|
3352
|
+
gt as createToolCommandsProvider,
|
|
3280
3353
|
ye as expandAllPanelsTool,
|
|
3281
3354
|
ge as focusPanelTool,
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3355
|
+
St as generateToolsSystemPrompt,
|
|
3356
|
+
ct as getGlobalCommandRegistry,
|
|
3357
|
+
ut as getPanelCommands,
|
|
3285
3358
|
pe as getPanelStateTool,
|
|
3286
|
-
|
|
3359
|
+
bt as getToolParameterInfo,
|
|
3287
3360
|
de as getVisiblePanelsTool,
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3361
|
+
yt as layoutActionTools,
|
|
3362
|
+
ze as layoutTools,
|
|
3363
|
+
ht as layoutToolsMetadata,
|
|
3291
3364
|
ue as listPanelsWithStateTool,
|
|
3292
|
-
|
|
3365
|
+
Wt as mapThemeToPanelVars,
|
|
3293
3366
|
At as mapThemeToTabVars,
|
|
3294
|
-
|
|
3295
|
-
|
|
3367
|
+
Le as panelCommands,
|
|
3368
|
+
dt as resetGlobalCommandRegistry,
|
|
3296
3369
|
xe as resetLayoutTool,
|
|
3297
|
-
|
|
3370
|
+
mt as stateQueryTools,
|
|
3298
3371
|
he as switchPanelTool,
|
|
3299
3372
|
fe as togglePanelTool,
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3373
|
+
Oe as toolToAIFunction,
|
|
3374
|
+
Fe as toolToAnthropicFormat,
|
|
3375
|
+
$e as toolToCommand,
|
|
3376
|
+
Me as toolToGeminiFunction,
|
|
3377
|
+
Ne as toolToOpenAIFunction,
|
|
3378
|
+
vt as toolsToAIFunctions,
|
|
3379
|
+
Ct as toolsToAnthropicFormat,
|
|
3307
3380
|
be as toolsToCommands,
|
|
3308
|
-
|
|
3381
|
+
kt as toolsToGeminiFormat,
|
|
3309
3382
|
wt as toolsToOpenAIFormat,
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3383
|
+
ft as useAgentCommandPalette,
|
|
3384
|
+
pt as useCommandPalette,
|
|
3385
|
+
st as usePanelFocus,
|
|
3313
3386
|
at as usePanelFocusListener,
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3387
|
+
nt as usePanelKeyboardShortcuts,
|
|
3388
|
+
ot as usePanelPersistence,
|
|
3389
|
+
xt as useToolCommands,
|
|
3390
|
+
rt as useWorkspace
|
|
3318
3391
|
};
|
|
3319
3392
|
//# sourceMappingURL=index.esm.js.map
|