@principal-ade/panel-layouts 0.3.18 → 0.3.20
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 -3
- package/dist/index.esm.js +787 -828
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './index.css';var
|
|
2
|
-
var
|
|
3
|
-
var le = (o, e, t) =>
|
|
1
|
+
import './index.css';var Ee = Object.defineProperty;
|
|
2
|
+
var Re = (o, e, t) => e in o ? Ee(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var le = (o, e, t) => Re(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { EditableConfigurablePanelLayout as zt, ResponsiveConfigurablePanelLayout as Pt, mapThemeToPanelVars as Lt, mapThemeToTabVars as Wt } from "@principal-ade/panels";
|
|
5
|
-
import { useState as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
class
|
|
5
|
+
import { useState as _, useRef as U, useEffect as E, useCallback as w, useMemo as ne } from "react";
|
|
6
|
+
import { jsx as l, jsxs as b, Fragment as ce } from "react/jsx-runtime";
|
|
7
|
+
import { useTheme as ee } from "@principal-ade/industry-theme";
|
|
8
|
+
class De {
|
|
9
9
|
constructor() {
|
|
10
10
|
le(this, "storageKey", "panel-layouts");
|
|
11
11
|
}
|
|
@@ -33,114 +33,114 @@ function dt(o) {
|
|
|
33
33
|
viewKey: e,
|
|
34
34
|
defaultSizes: t,
|
|
35
35
|
panelType: r,
|
|
36
|
-
adapter: s = new
|
|
37
|
-
} = o, [i,
|
|
38
|
-
|
|
36
|
+
adapter: s = new De()
|
|
37
|
+
} = o, [i, a] = _(t), [n, g] = _(o.collapsed), c = U(o.collapsed), x = U({}), p = U(null), h = U(null);
|
|
38
|
+
E(() => {
|
|
39
39
|
(async () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const S = await s.load(e);
|
|
41
|
+
S != null && S.sizes && (a(S.sizes), C(S.sizes));
|
|
42
42
|
})();
|
|
43
43
|
}, [e]);
|
|
44
|
-
const C =
|
|
45
|
-
(
|
|
46
|
-
"left" in
|
|
44
|
+
const C = w(
|
|
45
|
+
(v) => {
|
|
46
|
+
"left" in v && v.left > 0 && (x.current.left = v.left), "middle" in v && v.middle > 0 && (x.current.middle = v.middle), "right" in v && v.right > 0 && (x.current.right = v.right);
|
|
47
47
|
},
|
|
48
48
|
[]
|
|
49
|
-
), f =
|
|
50
|
-
(
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
-
if (
|
|
49
|
+
), f = w(
|
|
50
|
+
(v) => {
|
|
51
|
+
const S = x.current[v];
|
|
52
|
+
if (S && S > 0)
|
|
53
|
+
return S;
|
|
54
|
+
if (v === "left" && "left" in t && t.left > 0)
|
|
55
55
|
return t.left;
|
|
56
|
-
if (
|
|
56
|
+
if (v === "right" && "right" in t && t.right > 0)
|
|
57
57
|
return t.right;
|
|
58
58
|
},
|
|
59
59
|
[t]
|
|
60
|
-
), d =
|
|
61
|
-
|
|
62
|
-
("left" in t && t.left !== d.current.left || "middle" in t && "middle" in d.current && t.middle !== d.current.middle || "right" in t && t.right !== d.current.right) && (
|
|
63
|
-
}, [t, C]),
|
|
64
|
-
const
|
|
65
|
-
(
|
|
60
|
+
), d = U(t);
|
|
61
|
+
E(() => {
|
|
62
|
+
("left" in t && t.left !== d.current.left || "middle" in t && "middle" in d.current && t.middle !== d.current.middle || "right" in t && t.right !== d.current.right) && (a(t), C(t), d.current = t);
|
|
63
|
+
}, [t, C]), E(() => {
|
|
64
|
+
const v = o.collapsed.left !== c.current.left, S = "right" in o.collapsed && "right" in c.current && o.collapsed.right !== c.current.right;
|
|
65
|
+
(v || S) && (g(o.collapsed), c.current = { ...o.collapsed });
|
|
66
66
|
}, [o.collapsed.left, o.collapsed.right]);
|
|
67
|
-
const
|
|
68
|
-
async (
|
|
67
|
+
const u = w(
|
|
68
|
+
async (v) => {
|
|
69
69
|
try {
|
|
70
|
-
await s.save(e, { sizes:
|
|
71
|
-
} catch (
|
|
70
|
+
await s.save(e, { sizes: v });
|
|
71
|
+
} catch (S) {
|
|
72
72
|
console.error(
|
|
73
73
|
`Failed to save panel preferences for ${e}:`,
|
|
74
|
-
|
|
74
|
+
S
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
[e, s]
|
|
79
|
-
),
|
|
80
|
-
(
|
|
81
|
-
const
|
|
82
|
-
let
|
|
83
|
-
if ("left" in
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
79
|
+
), y = w(
|
|
80
|
+
(v) => {
|
|
81
|
+
const S = { ...v };
|
|
82
|
+
let k = !0;
|
|
83
|
+
if ("left" in v) {
|
|
84
|
+
const I = !!(n != null && n.left), W = v.left;
|
|
85
|
+
if (I) {
|
|
86
86
|
const $ = f("left");
|
|
87
|
-
$ !== void 0 && $ > 0 ?
|
|
88
|
-
} else
|
|
87
|
+
$ !== void 0 && $ > 0 ? S.left = $ : k = !1;
|
|
88
|
+
} else W === 0 && (k = !1);
|
|
89
89
|
}
|
|
90
|
-
if (r === "three-panel" && "right" in
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
90
|
+
if (r === "three-panel" && "right" in v) {
|
|
91
|
+
const I = !!(n != null && n.right), W = v.right;
|
|
92
|
+
if (I) {
|
|
93
93
|
const $ = f("right");
|
|
94
|
-
$ !== void 0 && $ > 0 ?
|
|
95
|
-
} else
|
|
94
|
+
$ !== void 0 && $ > 0 ? S.right = $ : k = !1;
|
|
95
|
+
} else W === 0 && (k = !1);
|
|
96
96
|
}
|
|
97
|
-
if (
|
|
97
|
+
if (a(S), C(S), p.current && (clearTimeout(p.current), p.current = null), !k) {
|
|
98
98
|
h.current = null;
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
h.current =
|
|
102
|
-
const
|
|
103
|
-
|
|
101
|
+
h.current = S, p.current = setTimeout(() => {
|
|
102
|
+
const I = h.current;
|
|
103
|
+
I && (u(I), h.current = null), p.current = null;
|
|
104
104
|
}, 500);
|
|
105
105
|
},
|
|
106
106
|
[
|
|
107
107
|
n,
|
|
108
108
|
f,
|
|
109
109
|
r,
|
|
110
|
-
|
|
110
|
+
u,
|
|
111
111
|
C
|
|
112
112
|
]
|
|
113
113
|
);
|
|
114
|
-
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
|
|
114
|
+
E(() => () => {
|
|
115
|
+
if (p.current) {
|
|
116
|
+
const v = h.current;
|
|
117
|
+
v && (u(v), h.current = null), clearTimeout(p.current), p.current = null;
|
|
118
118
|
}
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
}, []),
|
|
122
|
-
}, []),
|
|
123
|
-
}, []),
|
|
119
|
+
}, [u]);
|
|
120
|
+
const L = w(async () => {
|
|
121
|
+
}, []), q = w(async () => {
|
|
122
|
+
}, []), z = w(async () => {
|
|
123
|
+
}, []), A = w(async () => {
|
|
124
124
|
}, []);
|
|
125
125
|
return r === "three-panel" ? {
|
|
126
126
|
type: "three-panel",
|
|
127
127
|
sizes: i,
|
|
128
128
|
collapsed: n,
|
|
129
|
-
handlePanelResize:
|
|
130
|
-
handleLeftCollapseComplete:
|
|
131
|
-
handleLeftExpandComplete:
|
|
132
|
-
handleRightCollapseComplete:
|
|
133
|
-
handleRightExpandComplete:
|
|
129
|
+
handlePanelResize: y,
|
|
130
|
+
handleLeftCollapseComplete: L,
|
|
131
|
+
handleLeftExpandComplete: q,
|
|
132
|
+
handleRightCollapseComplete: z,
|
|
133
|
+
handleRightExpandComplete: A
|
|
134
134
|
} : {
|
|
135
135
|
type: "two-panel",
|
|
136
136
|
sizes: i,
|
|
137
137
|
collapsed: n,
|
|
138
|
-
handlePanelResize:
|
|
139
|
-
handleLeftCollapseComplete:
|
|
140
|
-
handleLeftExpandComplete:
|
|
138
|
+
handlePanelResize: y,
|
|
139
|
+
handleLeftCollapseComplete: L,
|
|
140
|
+
handleLeftExpandComplete: q
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class Me {
|
|
144
144
|
constructor() {
|
|
145
145
|
le(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
|
|
146
146
|
le(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
|
|
@@ -207,10 +207,10 @@ class De {
|
|
|
207
207
|
if (i)
|
|
208
208
|
try {
|
|
209
209
|
e[s] = JSON.parse(i);
|
|
210
|
-
} catch (
|
|
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
|
}
|
|
@@ -281,11 +281,11 @@ class O {
|
|
|
281
281
|
createdAt: s.createdAt,
|
|
282
282
|
// Preserve creation time
|
|
283
283
|
updatedAt: Date.now()
|
|
284
|
-
},
|
|
284
|
+
}, a = {
|
|
285
285
|
...r,
|
|
286
286
|
[e]: i
|
|
287
287
|
};
|
|
288
|
-
return await this.adapter.saveWorkspacePresets(
|
|
288
|
+
return await this.adapter.saveWorkspacePresets(a), i;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
291
|
* Delete a workspace layout
|
|
@@ -610,20 +610,20 @@ class O {
|
|
|
610
610
|
Object.keys(e).length;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
le(O, "adapter", new
|
|
613
|
+
le(O, "adapter", new Me());
|
|
614
614
|
function pt(o = {}) {
|
|
615
|
-
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s, i] =
|
|
615
|
+
const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s, i] = _(
|
|
616
616
|
{}
|
|
617
|
-
), [
|
|
617
|
+
), [a, n] = _(null), [g, c] = _(null), [x, p] = _(!0), [h, C] = _(null), f = w(async () => {
|
|
618
618
|
try {
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
if (i(
|
|
622
|
-
let
|
|
623
|
-
if (!
|
|
624
|
-
const
|
|
625
|
-
$ && (
|
|
626
|
-
workspaceId:
|
|
619
|
+
p(!0), C(null);
|
|
620
|
+
const k = await O.getWorkspaceLayouts();
|
|
621
|
+
if (i(k), e) {
|
|
622
|
+
let I = await O.getRepositoryState(e);
|
|
623
|
+
if (!I && t) {
|
|
624
|
+
const W = r || "project-management", $ = await O.getWorkspaceLayout(W);
|
|
625
|
+
$ && (I = {
|
|
626
|
+
workspaceId: W,
|
|
627
627
|
sizes: $.defaultSizes || {
|
|
628
628
|
left: 20,
|
|
629
629
|
middle: 45,
|
|
@@ -635,117 +635,117 @@ function pt(o = {}) {
|
|
|
635
635
|
}
|
|
636
636
|
}, await O.setRepositoryState(
|
|
637
637
|
e,
|
|
638
|
-
|
|
638
|
+
I
|
|
639
639
|
));
|
|
640
640
|
}
|
|
641
|
-
if (n(
|
|
642
|
-
const
|
|
643
|
-
|
|
641
|
+
if (n(I), I != null && I.workspaceId) {
|
|
642
|
+
const W = await O.getWorkspaceLayout(
|
|
643
|
+
I.workspaceId
|
|
644
644
|
);
|
|
645
|
-
c(
|
|
645
|
+
c(W);
|
|
646
646
|
} else
|
|
647
647
|
c(null);
|
|
648
648
|
}
|
|
649
|
-
} catch (
|
|
650
|
-
C(
|
|
649
|
+
} catch (k) {
|
|
650
|
+
C(k), console.error("Failed to load workspace data:", k);
|
|
651
651
|
} finally {
|
|
652
|
-
|
|
652
|
+
p(!1);
|
|
653
653
|
}
|
|
654
654
|
}, [e, t, r]);
|
|
655
|
-
|
|
655
|
+
E(() => {
|
|
656
656
|
f();
|
|
657
657
|
}, [f]);
|
|
658
|
-
const d =
|
|
659
|
-
async (
|
|
658
|
+
const d = w(
|
|
659
|
+
async (k) => await O.getWorkspaceLayout(k),
|
|
660
660
|
[]
|
|
661
|
-
),
|
|
662
|
-
async (
|
|
663
|
-
const
|
|
664
|
-
return await f(),
|
|
661
|
+
), u = w(
|
|
662
|
+
async (k) => {
|
|
663
|
+
const I = await O.createWorkspaceLayout(k);
|
|
664
|
+
return await f(), I;
|
|
665
665
|
},
|
|
666
666
|
[f]
|
|
667
|
-
),
|
|
668
|
-
async (
|
|
669
|
-
const
|
|
670
|
-
return await f(),
|
|
667
|
+
), y = w(
|
|
668
|
+
async (k, I) => {
|
|
669
|
+
const W = await O.updateWorkspaceLayout(k, I);
|
|
670
|
+
return await f(), W;
|
|
671
671
|
},
|
|
672
672
|
[f]
|
|
673
|
-
),
|
|
674
|
-
async (
|
|
675
|
-
const
|
|
676
|
-
return
|
|
673
|
+
), L = w(
|
|
674
|
+
async (k) => {
|
|
675
|
+
const I = await O.deleteWorkspaceLayout(k);
|
|
676
|
+
return I && await f(), I;
|
|
677
677
|
},
|
|
678
678
|
[f]
|
|
679
|
-
),
|
|
680
|
-
async (
|
|
679
|
+
), q = w(
|
|
680
|
+
async (k) => {
|
|
681
681
|
if (!e) {
|
|
682
682
|
console.error("Cannot apply workspace without repositoryKey");
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
console.error(`Workspace ${
|
|
685
|
+
const I = await O.getWorkspaceLayout(k);
|
|
686
|
+
if (!I) {
|
|
687
|
+
console.error(`Workspace ${k} not found`);
|
|
688
688
|
return;
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
workspaceId:
|
|
692
|
-
sizes:
|
|
693
|
-
collapsed:
|
|
690
|
+
const W = {
|
|
691
|
+
workspaceId: k,
|
|
692
|
+
sizes: I.defaultSizes || { left: 20, middle: 45, right: 35 },
|
|
693
|
+
collapsed: I.defaultCollapsed || {
|
|
694
694
|
left: !1,
|
|
695
695
|
right: !1
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
|
-
await O.setRepositoryState(e,
|
|
698
|
+
await O.setRepositoryState(e, W), await f();
|
|
699
699
|
},
|
|
700
700
|
[e, f]
|
|
701
|
-
),
|
|
702
|
-
async (
|
|
701
|
+
), z = w(
|
|
702
|
+
async (k) => {
|
|
703
703
|
if (!e) {
|
|
704
704
|
console.error("Cannot update sizes without repositoryKey");
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
|
-
await O.updateRepositorySizes(e,
|
|
707
|
+
await O.updateRepositorySizes(e, k), await f();
|
|
708
708
|
},
|
|
709
709
|
[e, f]
|
|
710
|
-
),
|
|
711
|
-
async (
|
|
710
|
+
), A = w(
|
|
711
|
+
async (k) => {
|
|
712
712
|
if (!e) {
|
|
713
713
|
console.error("Cannot update collapsed without repositoryKey");
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
716
|
await O.updateRepositoryCollapsed(
|
|
717
717
|
e,
|
|
718
|
-
|
|
718
|
+
k
|
|
719
719
|
), await f();
|
|
720
720
|
},
|
|
721
721
|
[e, f]
|
|
722
|
-
),
|
|
723
|
-
if (!e || !(
|
|
722
|
+
), v = w(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 O.resetRepositoryToWorkspaceDefaults(
|
|
728
728
|
e,
|
|
729
|
-
|
|
729
|
+
a.workspaceId
|
|
730
730
|
), await f();
|
|
731
|
-
}, [e,
|
|
731
|
+
}, [e, a == null ? void 0 : a.workspaceId, f]), S = w(async () => {
|
|
732
732
|
await f();
|
|
733
733
|
}, [f]);
|
|
734
734
|
return {
|
|
735
735
|
workspaces: s,
|
|
736
|
-
repositoryState:
|
|
736
|
+
repositoryState: a,
|
|
737
737
|
activeWorkspace: g,
|
|
738
|
-
loading:
|
|
738
|
+
loading: x,
|
|
739
739
|
error: h,
|
|
740
740
|
getWorkspace: d,
|
|
741
|
-
createWorkspace:
|
|
742
|
-
updateWorkspace:
|
|
743
|
-
deleteWorkspace:
|
|
744
|
-
applyWorkspace:
|
|
745
|
-
updateSizes:
|
|
746
|
-
updateCollapsed:
|
|
747
|
-
resetToDefaults:
|
|
748
|
-
refresh:
|
|
741
|
+
createWorkspace: u,
|
|
742
|
+
updateWorkspace: y,
|
|
743
|
+
deleteWorkspace: L,
|
|
744
|
+
applyWorkspace: q,
|
|
745
|
+
updateSizes: z,
|
|
746
|
+
updateCollapsed: A,
|
|
747
|
+
resetToDefaults: v,
|
|
748
|
+
refresh: S
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
function ut(o = {}) {
|
|
@@ -755,93 +755,93 @@ function ut(o = {}) {
|
|
|
755
755
|
panelType: r = "three-panel",
|
|
756
756
|
onFocusChange: s,
|
|
757
757
|
events: i,
|
|
758
|
-
getPanelId:
|
|
759
|
-
} = o, [n, g] =
|
|
758
|
+
getPanelId: a
|
|
759
|
+
} = o, [n, g] = _(
|
|
760
760
|
e
|
|
761
|
-
), c =
|
|
761
|
+
), c = w(
|
|
762
762
|
(d) => {
|
|
763
|
-
const
|
|
764
|
-
if (g(d), s == null || s(d), i &&
|
|
765
|
-
if (
|
|
766
|
-
const
|
|
767
|
-
|
|
763
|
+
const u = n;
|
|
764
|
+
if (g(d), s == null || s(d), i && a) {
|
|
765
|
+
if (u) {
|
|
766
|
+
const L = a(u);
|
|
767
|
+
L && i.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: L,
|
|
773
|
+
panelSlot: u,
|
|
774
|
+
nextPanelId: a(d)
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
|
|
778
|
+
const y = a(d);
|
|
779
|
+
y && i.emit({
|
|
780
780
|
type: "panel:focus",
|
|
781
781
|
source: "panel-layouts",
|
|
782
782
|
timestamp: Date.now(),
|
|
783
783
|
payload: {
|
|
784
|
-
panelId:
|
|
784
|
+
panelId: y,
|
|
785
785
|
panelSlot: d,
|
|
786
786
|
source: "keyboard-shortcut"
|
|
787
787
|
}
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
|
-
[n, s, i,
|
|
792
|
-
),
|
|
791
|
+
[n, s, i, a]
|
|
792
|
+
), x = w(() => {
|
|
793
793
|
const d = n;
|
|
794
|
-
if (g(null), s == null || s(null), i &&
|
|
795
|
-
const
|
|
796
|
-
|
|
794
|
+
if (g(null), s == null || s(null), i && a && d) {
|
|
795
|
+
const u = a(d);
|
|
796
|
+
u && i.emit({
|
|
797
797
|
type: "panel:blur",
|
|
798
798
|
source: "panel-layouts",
|
|
799
799
|
timestamp: Date.now(),
|
|
800
800
|
payload: {
|
|
801
|
-
panelId:
|
|
801
|
+
panelId: u,
|
|
802
802
|
panelSlot: d
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
}, [n, s, i,
|
|
806
|
+
}, [n, s, i, a]), p = w(() => {
|
|
807
807
|
const d = [];
|
|
808
808
|
return t.left || d.push("left"), d.push("middle"), r === "three-panel" && !t.right && d.push("right"), d;
|
|
809
|
-
}, [t, r]), h =
|
|
810
|
-
const d =
|
|
809
|
+
}, [t, r]), h = w(() => {
|
|
810
|
+
const d = p();
|
|
811
811
|
if (d.length === 0) return;
|
|
812
812
|
if (n === null) {
|
|
813
813
|
c(d[0]);
|
|
814
814
|
return;
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
816
|
+
const u = d.indexOf(n);
|
|
817
|
+
if (u === -1) {
|
|
818
818
|
c(d[0]);
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
|
-
const
|
|
822
|
-
c(d[
|
|
823
|
-
}, [n,
|
|
824
|
-
const d =
|
|
821
|
+
const y = (u + 1) % d.length;
|
|
822
|
+
c(d[y]);
|
|
823
|
+
}, [n, p, c]), C = w(() => {
|
|
824
|
+
const d = p();
|
|
825
825
|
if (d.length === 0) return;
|
|
826
826
|
if (n === null) {
|
|
827
827
|
c(d[d.length - 1]);
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
830
|
+
const u = d.indexOf(n);
|
|
831
|
+
if (u === -1) {
|
|
832
832
|
c(d[d.length - 1]);
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
836
|
-
c(d[
|
|
837
|
-
}, [n,
|
|
835
|
+
const y = u === 0 ? d.length - 1 : u - 1;
|
|
836
|
+
c(d[y]);
|
|
837
|
+
}, [n, p, c]), f = w(
|
|
838
838
|
(d) => n === d,
|
|
839
839
|
[n]
|
|
840
840
|
);
|
|
841
841
|
return {
|
|
842
842
|
focusedPanel: n,
|
|
843
843
|
setFocus: c,
|
|
844
|
-
clearFocus:
|
|
844
|
+
clearFocus: x,
|
|
845
845
|
focusNext: h,
|
|
846
846
|
focusPrevious: C,
|
|
847
847
|
isFocused: f
|
|
@@ -854,45 +854,45 @@ function ft(o) {
|
|
|
854
854
|
collapsed: r,
|
|
855
855
|
panelType: s,
|
|
856
856
|
setFocus: i,
|
|
857
|
-
onExpand:
|
|
857
|
+
onExpand: a,
|
|
858
858
|
onCollapse: n
|
|
859
|
-
} = o, g =
|
|
860
|
-
|
|
859
|
+
} = o, g = U(t), c = U(r), x = U(s);
|
|
860
|
+
E(() => {
|
|
861
861
|
g.current = t;
|
|
862
|
-
}, [t]),
|
|
862
|
+
}, [t]), E(() => {
|
|
863
863
|
c.current = r;
|
|
864
|
-
}, [r]),
|
|
865
|
-
|
|
864
|
+
}, [r]), E(() => {
|
|
865
|
+
x.current = s;
|
|
866
866
|
}, [s]);
|
|
867
|
-
const
|
|
867
|
+
const p = w(
|
|
868
868
|
(h) => {
|
|
869
869
|
if (!h.altKey || h.ctrlKey || h.metaKey || h.shiftKey)
|
|
870
870
|
return;
|
|
871
|
-
const C = h.code, f = g.current, d = c.current,
|
|
872
|
-
C === "Digit1" || C === "Numpad1" ? (h.preventDefault(), d.left ?
|
|
871
|
+
const C = h.code, f = g.current, d = c.current, u = x.current;
|
|
872
|
+
C === "Digit1" || C === "Numpad1" ? (h.preventDefault(), d.left ? a("left") : f !== "left" ? i("left") : (n("left"), i("middle"))) : C === "Digit2" || C === "Numpad2" ? (h.preventDefault(), i("middle")) : (C === "Digit3" || C === "Numpad3") && u === "three-panel" && (h.preventDefault(), d.right ? a("right") : f !== "right" ? i("right") : (n("right"), i("middle")));
|
|
873
873
|
},
|
|
874
|
-
[i,
|
|
874
|
+
[i, a, n]
|
|
875
875
|
);
|
|
876
|
-
|
|
876
|
+
E(() => {
|
|
877
877
|
if (e)
|
|
878
|
-
return window.addEventListener("keydown",
|
|
879
|
-
window.removeEventListener("keydown",
|
|
878
|
+
return window.addEventListener("keydown", p), () => {
|
|
879
|
+
window.removeEventListener("keydown", p);
|
|
880
880
|
};
|
|
881
|
-
}, [e,
|
|
881
|
+
}, [e, p]);
|
|
882
882
|
}
|
|
883
883
|
function gt(o, e, t, r) {
|
|
884
|
-
|
|
884
|
+
E(() => {
|
|
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
891
|
let i;
|
|
892
892
|
return r && (i = e.on(
|
|
893
893
|
"panel:blur",
|
|
894
|
-
(
|
|
895
|
-
|
|
894
|
+
(a) => {
|
|
895
|
+
a.payload.panelId === o && r();
|
|
896
896
|
}
|
|
897
897
|
)), () => {
|
|
898
898
|
s(), i == null || i();
|
|
@@ -920,7 +920,7 @@ const ht = ({
|
|
|
920
920
|
transition: "opacity 0.15s ease-in-out",
|
|
921
921
|
...t
|
|
922
922
|
};
|
|
923
|
-
return /* @__PURE__ */
|
|
923
|
+
return /* @__PURE__ */ l(
|
|
924
924
|
"div",
|
|
925
925
|
{
|
|
926
926
|
className: `panel-focus-indicator ${e}`,
|
|
@@ -929,10 +929,10 @@ const ht = ({
|
|
|
929
929
|
"aria-hidden": "true"
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
},
|
|
933
|
-
if (typeof document > "u" || document.getElementById(
|
|
932
|
+
}, ge = "focus-mode-overlay-keyframes", je = () => {
|
|
933
|
+
if (typeof document > "u" || document.getElementById(ge)) return;
|
|
934
934
|
const o = document.createElement("style");
|
|
935
|
-
o.id =
|
|
935
|
+
o.id = ge, o.textContent = `
|
|
936
936
|
@keyframes focus-overlay-vignette-drift {
|
|
937
937
|
0%, 100% {
|
|
938
938
|
background-position: 50% 50%;
|
|
@@ -984,56 +984,56 @@ const ht = ({
|
|
|
984
984
|
opacity: r = 0.95,
|
|
985
985
|
animationDuration: s = 300,
|
|
986
986
|
cascadeDelay: i = 0,
|
|
987
|
-
color:
|
|
987
|
+
color: a,
|
|
988
988
|
hideOnHover: n = !0,
|
|
989
989
|
className: g = "",
|
|
990
990
|
style: c = {}
|
|
991
991
|
}) => {
|
|
992
|
-
const { theme:
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
}, []),
|
|
992
|
+
const { theme: x } = ee(), [p, h] = _(!1), [C, f] = _(!1), d = U(null);
|
|
993
|
+
E(() => {
|
|
994
|
+
je();
|
|
995
|
+
}, []), E(() => {
|
|
996
996
|
if (!n || !o) {
|
|
997
997
|
f(!1);
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
|
-
const
|
|
1000
|
+
const te = (H) => {
|
|
1001
1001
|
if (d.current) {
|
|
1002
|
-
const M = d.current.getBoundingClientRect(),
|
|
1003
|
-
f(
|
|
1002
|
+
const M = d.current.getBoundingClientRect(), oe = H.clientX >= M.left && H.clientX <= M.right && H.clientY >= M.top && H.clientY <= M.bottom;
|
|
1003
|
+
f(oe);
|
|
1004
1004
|
}
|
|
1005
1005
|
};
|
|
1006
|
-
return document.addEventListener("mousemove",
|
|
1007
|
-
}, [n, o]),
|
|
1006
|
+
return document.addEventListener("mousemove", te), () => document.removeEventListener("mousemove", te);
|
|
1007
|
+
}, [n, o]), E(() => {
|
|
1008
1008
|
if (o) {
|
|
1009
|
-
const
|
|
1010
|
-
return () => clearTimeout(
|
|
1009
|
+
const te = setTimeout(() => h(!0), i);
|
|
1010
|
+
return () => clearTimeout(te);
|
|
1011
1011
|
} else
|
|
1012
1012
|
h(!1);
|
|
1013
1013
|
}, [o, i]);
|
|
1014
|
-
const
|
|
1014
|
+
const u = a || x.colors.background, y = () => {
|
|
1015
1015
|
switch (e) {
|
|
1016
1016
|
case "soft-fade":
|
|
1017
1017
|
return {
|
|
1018
|
-
backgroundColor:
|
|
1019
|
-
opacity:
|
|
1018
|
+
backgroundColor: u,
|
|
1019
|
+
opacity: p ? r : 0,
|
|
1020
1020
|
transition: `opacity ${s}ms ease-out`
|
|
1021
1021
|
};
|
|
1022
1022
|
case "cascading-fade":
|
|
1023
1023
|
return {
|
|
1024
|
-
backgroundColor:
|
|
1025
|
-
opacity:
|
|
1024
|
+
backgroundColor: u,
|
|
1025
|
+
opacity: p ? r : 0,
|
|
1026
1026
|
transition: `opacity ${s}ms ease-out`,
|
|
1027
|
-
transitionDelay:
|
|
1027
|
+
transitionDelay: p ? "0ms" : `${i}ms`
|
|
1028
1028
|
};
|
|
1029
1029
|
default:
|
|
1030
1030
|
return {
|
|
1031
|
-
backgroundColor:
|
|
1032
|
-
opacity:
|
|
1031
|
+
backgroundColor: u,
|
|
1032
|
+
opacity: p ? r : 0,
|
|
1033
1033
|
transition: `opacity ${s}ms ease-out`
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
|
-
},
|
|
1036
|
+
}, L = n && C, q = {
|
|
1037
1037
|
position: "absolute",
|
|
1038
1038
|
top: 0,
|
|
1039
1039
|
left: 0,
|
|
@@ -1042,49 +1042,49 @@ const ht = ({
|
|
|
1042
1042
|
pointerEvents: "none",
|
|
1043
1043
|
zIndex: 999,
|
|
1044
1044
|
overflow: "hidden",
|
|
1045
|
-
...
|
|
1045
|
+
...y(),
|
|
1046
1046
|
// Override opacity when hovered
|
|
1047
|
-
...
|
|
1047
|
+
...L ? { opacity: 0 } : {},
|
|
1048
1048
|
...c
|
|
1049
|
-
},
|
|
1050
|
-
const M = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(
|
|
1049
|
+
}, z = t.includes("vignette-drift"), A = t.includes("radial-breathing"), v = t.includes("snowfall"), S = (te, H) => {
|
|
1050
|
+
const M = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(te);
|
|
1051
1051
|
if (!M) return `rgba(255, 255, 255, ${H})`;
|
|
1052
|
-
const
|
|
1053
|
-
return `rgba(${
|
|
1054
|
-
},
|
|
1052
|
+
const oe = parseInt(M[1], 16), V = parseInt(M[2], 16), Y = parseInt(M[3], 16);
|
|
1053
|
+
return `rgba(${oe}, ${V}, ${Y}, ${H})`;
|
|
1054
|
+
}, k = x.colors.primary, I = {
|
|
1055
1055
|
position: "absolute",
|
|
1056
1056
|
top: 0,
|
|
1057
1057
|
left: 0,
|
|
1058
1058
|
right: 0,
|
|
1059
1059
|
bottom: 0,
|
|
1060
1060
|
pointerEvents: "none",
|
|
1061
|
-
opacity:
|
|
1061
|
+
opacity: p ? 1 : 0,
|
|
1062
1062
|
transition: `opacity ${s}ms ease-out`,
|
|
1063
|
-
background: `radial-gradient(circle at 50% 50%, ${
|
|
1063
|
+
background: `radial-gradient(circle at 50% 50%, ${S(k, 0.12)} 0%, ${S(k, 0.06)} 25%, transparent 50%)`,
|
|
1064
1064
|
backgroundSize: "150% 150%",
|
|
1065
|
-
animation:
|
|
1066
|
-
},
|
|
1065
|
+
animation: p ? "focus-overlay-vignette-drift 12s ease-in-out infinite" : "none"
|
|
1066
|
+
}, W = {
|
|
1067
1067
|
position: "absolute",
|
|
1068
1068
|
top: 0,
|
|
1069
1069
|
left: 0,
|
|
1070
1070
|
right: 0,
|
|
1071
1071
|
bottom: 0,
|
|
1072
1072
|
pointerEvents: "none",
|
|
1073
|
-
opacity:
|
|
1073
|
+
opacity: p ? 1 : 0,
|
|
1074
1074
|
transition: `opacity ${s}ms ease-out`,
|
|
1075
|
-
background: `radial-gradient(circle at center, ${
|
|
1076
|
-
animation:
|
|
1077
|
-
}, $ =
|
|
1075
|
+
background: `radial-gradient(circle at center, ${S(k, 0.15)} 0%, ${S(k, 0.06)} 30%, transparent 55%)`,
|
|
1076
|
+
animation: p ? "focus-overlay-radial-breathing 4s ease-in-out infinite" : "none"
|
|
1077
|
+
}, $ = S(k, 0.6), T = S(k, 0.4), P = S(k, 0.25), B = {
|
|
1078
1078
|
position: "absolute",
|
|
1079
1079
|
top: 0,
|
|
1080
1080
|
left: 0,
|
|
1081
1081
|
right: 0,
|
|
1082
1082
|
bottom: 0,
|
|
1083
1083
|
pointerEvents: "none",
|
|
1084
|
-
opacity:
|
|
1084
|
+
opacity: p ? 1 : 0,
|
|
1085
1085
|
transition: `opacity ${s}ms ease-out`
|
|
1086
|
-
},
|
|
1087
|
-
...
|
|
1086
|
+
}, se = {
|
|
1087
|
+
...B,
|
|
1088
1088
|
background: `
|
|
1089
1089
|
radial-gradient(circle, ${$} 0%, ${$} 3px, transparent 3px),
|
|
1090
1090
|
radial-gradient(circle, ${$} 0%, ${$} 3px, transparent 3px),
|
|
@@ -1093,21 +1093,21 @@ const ht = ({
|
|
|
1093
1093
|
`,
|
|
1094
1094
|
backgroundSize: "150px 150px",
|
|
1095
1095
|
backgroundPosition: "10px 20px, 60px 80px, 110px 40px, 40px 120px",
|
|
1096
|
-
animation:
|
|
1097
|
-
},
|
|
1098
|
-
...
|
|
1096
|
+
animation: p ? "focus-overlay-snowfall-1 4s linear infinite" : "none"
|
|
1097
|
+
}, G = {
|
|
1098
|
+
...B,
|
|
1099
1099
|
background: `
|
|
1100
|
-
radial-gradient(circle, ${
|
|
1101
|
-
radial-gradient(circle, ${
|
|
1102
|
-
radial-gradient(circle, ${
|
|
1103
|
-
radial-gradient(circle, ${
|
|
1104
|
-
radial-gradient(circle, ${
|
|
1100
|
+
radial-gradient(circle, ${T} 0%, ${T} 2px, transparent 2px),
|
|
1101
|
+
radial-gradient(circle, ${T} 0%, ${T} 2px, transparent 2px),
|
|
1102
|
+
radial-gradient(circle, ${T} 0%, ${T} 2px, transparent 2px),
|
|
1103
|
+
radial-gradient(circle, ${T} 0%, ${T} 2px, transparent 2px),
|
|
1104
|
+
radial-gradient(circle, ${T} 0%, ${T} 2px, transparent 2px)
|
|
1105
1105
|
`,
|
|
1106
1106
|
backgroundSize: "150px 150px",
|
|
1107
1107
|
backgroundPosition: "30px 10px, 90px 60px, 15px 100px, 120px 30px, 70px 130px",
|
|
1108
|
-
animation:
|
|
1109
|
-
},
|
|
1110
|
-
...
|
|
1108
|
+
animation: p ? "focus-overlay-snowfall-2 7s linear infinite" : "none"
|
|
1109
|
+
}, K = {
|
|
1110
|
+
...B,
|
|
1111
1111
|
background: `
|
|
1112
1112
|
radial-gradient(circle, ${P} 0%, ${P} 1.5px, transparent 1.5px),
|
|
1113
1113
|
radial-gradient(circle, ${P} 0%, ${P} 1.5px, transparent 1.5px),
|
|
@@ -1118,101 +1118,102 @@ const ht = ({
|
|
|
1118
1118
|
`,
|
|
1119
1119
|
backgroundSize: "150px 150px",
|
|
1120
1120
|
backgroundPosition: "20px 5px, 80px 45px, 45px 90px, 130px 20px, 5px 70px, 100px 110px",
|
|
1121
|
-
animation:
|
|
1121
|
+
animation: p ? "focus-overlay-snowfall-3 12s linear infinite" : "none"
|
|
1122
1122
|
};
|
|
1123
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ b(
|
|
1124
1124
|
"div",
|
|
1125
1125
|
{
|
|
1126
1126
|
ref: d,
|
|
1127
1127
|
className: `focus-mode-overlay focus-mode-overlay--${e} ${g}`,
|
|
1128
|
-
style:
|
|
1128
|
+
style: q,
|
|
1129
1129
|
role: "presentation",
|
|
1130
1130
|
"aria-hidden": "true",
|
|
1131
1131
|
"data-active": o,
|
|
1132
1132
|
"data-variant": e,
|
|
1133
1133
|
children: [
|
|
1134
|
-
|
|
1134
|
+
z && /* @__PURE__ */ l(
|
|
1135
1135
|
"div",
|
|
1136
1136
|
{
|
|
1137
1137
|
className: "focus-mode-overlay__vignette-drift",
|
|
1138
|
-
style:
|
|
1138
|
+
style: I
|
|
1139
1139
|
}
|
|
1140
1140
|
),
|
|
1141
|
-
|
|
1141
|
+
A && /* @__PURE__ */ l(
|
|
1142
1142
|
"div",
|
|
1143
1143
|
{
|
|
1144
1144
|
className: "focus-mode-overlay__radial-breathing",
|
|
1145
|
-
style:
|
|
1145
|
+
style: W
|
|
1146
1146
|
}
|
|
1147
1147
|
),
|
|
1148
|
-
|
|
1149
|
-
/* @__PURE__ */
|
|
1148
|
+
v && /* @__PURE__ */ b(ce, { children: [
|
|
1149
|
+
/* @__PURE__ */ l(
|
|
1150
1150
|
"div",
|
|
1151
1151
|
{
|
|
1152
1152
|
className: "focus-mode-overlay__snowfall-layer-3",
|
|
1153
|
-
style:
|
|
1153
|
+
style: K
|
|
1154
1154
|
}
|
|
1155
1155
|
),
|
|
1156
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ l(
|
|
1157
1157
|
"div",
|
|
1158
1158
|
{
|
|
1159
1159
|
className: "focus-mode-overlay__snowfall-layer-2",
|
|
1160
|
-
style:
|
|
1160
|
+
style: G
|
|
1161
1161
|
}
|
|
1162
1162
|
),
|
|
1163
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ l(
|
|
1164
1164
|
"div",
|
|
1165
1165
|
{
|
|
1166
1166
|
className: "focus-mode-overlay__snowfall-layer-1",
|
|
1167
|
-
style:
|
|
1167
|
+
style: se
|
|
1168
1168
|
}
|
|
1169
1169
|
)
|
|
1170
1170
|
] })
|
|
1171
1171
|
]
|
|
1172
1172
|
}
|
|
1173
1173
|
);
|
|
1174
|
-
},
|
|
1174
|
+
}, xe = ({
|
|
1175
1175
|
value: o,
|
|
1176
1176
|
onChange: e,
|
|
1177
1177
|
onSubmit: t,
|
|
1178
1178
|
onClose: r,
|
|
1179
1179
|
onHistoryPrevious: s,
|
|
1180
1180
|
onHistoryNext: i,
|
|
1181
|
-
mode:
|
|
1181
|
+
mode: a,
|
|
1182
1182
|
status: n,
|
|
1183
1183
|
placeholder: g = "What would you like to do?",
|
|
1184
1184
|
disabled: c = !1,
|
|
1185
|
-
autoFocus:
|
|
1186
|
-
agentAvailable:
|
|
1185
|
+
autoFocus: x = !0,
|
|
1186
|
+
agentAvailable: p = !0,
|
|
1187
1187
|
showAutocomplete: h = !1,
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
autocompleteItemCount: C = 0,
|
|
1189
|
+
onAutocompleteNext: f,
|
|
1190
|
+
onAutocompletePrevious: d,
|
|
1191
|
+
onAutocompleteAccept: u
|
|
1191
1192
|
}) => {
|
|
1192
|
-
const { theme:
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
}, [
|
|
1196
|
-
const
|
|
1197
|
-
switch (
|
|
1193
|
+
const { theme: y } = ee(), L = U(null);
|
|
1194
|
+
E(() => {
|
|
1195
|
+
x && L.current && L.current.focus();
|
|
1196
|
+
}, [x]);
|
|
1197
|
+
const q = (A) => {
|
|
1198
|
+
switch (A.stopPropagation(), A.key) {
|
|
1198
1199
|
case "Enter":
|
|
1199
|
-
|
|
1200
|
+
A.preventDefault(), h && C === 1 && u ? u(!0) : t();
|
|
1200
1201
|
break;
|
|
1201
1202
|
case "Escape":
|
|
1202
|
-
|
|
1203
|
+
A.preventDefault(), r();
|
|
1203
1204
|
break;
|
|
1204
1205
|
case "Tab":
|
|
1205
|
-
h &&
|
|
1206
|
+
h && u && (A.preventDefault(), u());
|
|
1206
1207
|
break;
|
|
1207
1208
|
case "ArrowUp":
|
|
1208
|
-
|
|
1209
|
+
A.preventDefault(), h && d ? d() : s();
|
|
1209
1210
|
break;
|
|
1210
1211
|
case "ArrowDown":
|
|
1211
|
-
|
|
1212
|
+
A.preventDefault(), h && f ? f() : i();
|
|
1212
1213
|
break;
|
|
1213
1214
|
}
|
|
1214
|
-
},
|
|
1215
|
-
return /* @__PURE__ */
|
|
1215
|
+
}, z = n === "thinking" || n === "executing";
|
|
1216
|
+
return /* @__PURE__ */ b(
|
|
1216
1217
|
"div",
|
|
1217
1218
|
{
|
|
1218
1219
|
style: {
|
|
@@ -1220,22 +1221,22 @@ const ht = ({
|
|
|
1220
1221
|
alignItems: "center",
|
|
1221
1222
|
gap: "8px",
|
|
1222
1223
|
padding: "12px 16px",
|
|
1223
|
-
backgroundColor:
|
|
1224
|
-
borderBottom: `1px solid ${
|
|
1224
|
+
backgroundColor: y.colors.background,
|
|
1225
|
+
borderBottom: `1px solid ${y.colors.border}`
|
|
1225
1226
|
},
|
|
1226
1227
|
children: [
|
|
1227
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ l(
|
|
1228
1229
|
"span",
|
|
1229
1230
|
{
|
|
1230
1231
|
style: {
|
|
1231
|
-
color:
|
|
1232
|
-
fontFamily:
|
|
1233
|
-
fontSize:
|
|
1232
|
+
color: a === "quick-command" ? y.colors.info : p ? y.colors.primary : y.colors.textMuted,
|
|
1233
|
+
fontFamily: y.fonts.monospace,
|
|
1234
|
+
fontSize: y.fontSizes[1],
|
|
1234
1235
|
userSelect: "none",
|
|
1235
1236
|
display: "flex",
|
|
1236
1237
|
alignItems: "center"
|
|
1237
1238
|
},
|
|
1238
|
-
children:
|
|
1239
|
+
children: a === "quick-command" ? /* @__PURE__ */ b(
|
|
1239
1240
|
"svg",
|
|
1240
1241
|
{
|
|
1241
1242
|
width: "16",
|
|
@@ -1247,11 +1248,11 @@ const ht = ({
|
|
|
1247
1248
|
strokeLinecap: "round",
|
|
1248
1249
|
strokeLinejoin: "round",
|
|
1249
1250
|
children: [
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ l("polyline", { points: "4 17 10 11 4 5" }),
|
|
1252
|
+
/* @__PURE__ */ l("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
|
|
1252
1253
|
]
|
|
1253
1254
|
}
|
|
1254
|
-
) :
|
|
1255
|
+
) : p ? /* @__PURE__ */ b(
|
|
1255
1256
|
"svg",
|
|
1256
1257
|
{
|
|
1257
1258
|
width: "16",
|
|
@@ -1263,51 +1264,51 @@ const ht = ({
|
|
|
1263
1264
|
strokeLinecap: "round",
|
|
1264
1265
|
strokeLinejoin: "round",
|
|
1265
1266
|
children: [
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */
|
|
1267
|
+
/* @__PURE__ */ l("rect", { x: "3", y: "11", width: "18", height: "10", rx: "2" }),
|
|
1268
|
+
/* @__PURE__ */ l("circle", { cx: "12", cy: "5", r: "2" }),
|
|
1269
|
+
/* @__PURE__ */ l("path", { d: "M12 7v4" }),
|
|
1270
|
+
/* @__PURE__ */ l("line", { x1: "8", y1: "16", x2: "8", y2: "16" }),
|
|
1271
|
+
/* @__PURE__ */ l("line", { x1: "16", y1: "16", x2: "16", y2: "16" })
|
|
1271
1272
|
]
|
|
1272
1273
|
}
|
|
1273
1274
|
) : ">"
|
|
1274
1275
|
}
|
|
1275
1276
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ l(
|
|
1277
1278
|
"input",
|
|
1278
1279
|
{
|
|
1279
|
-
ref:
|
|
1280
|
+
ref: L,
|
|
1280
1281
|
"data-agent-command-palette-input": !0,
|
|
1281
1282
|
type: "text",
|
|
1282
1283
|
value: o,
|
|
1283
|
-
onChange: (
|
|
1284
|
-
onKeyDown:
|
|
1284
|
+
onChange: (A) => e(A.target.value),
|
|
1285
|
+
onKeyDown: q,
|
|
1285
1286
|
placeholder: g,
|
|
1286
|
-
disabled: c ||
|
|
1287
|
+
disabled: c || z,
|
|
1287
1288
|
style: {
|
|
1288
1289
|
flex: 1,
|
|
1289
1290
|
backgroundColor: "transparent",
|
|
1290
1291
|
border: "none",
|
|
1291
1292
|
outline: "none",
|
|
1292
|
-
color:
|
|
1293
|
-
fontFamily:
|
|
1294
|
-
fontSize:
|
|
1295
|
-
caretColor:
|
|
1293
|
+
color: y.colors.text,
|
|
1294
|
+
fontFamily: y.fonts.monospace,
|
|
1295
|
+
fontSize: y.fontSizes[1],
|
|
1296
|
+
caretColor: y.colors.primary
|
|
1296
1297
|
}
|
|
1297
1298
|
}
|
|
1298
1299
|
),
|
|
1299
|
-
|
|
1300
|
+
z && /* @__PURE__ */ b(
|
|
1300
1301
|
"span",
|
|
1301
1302
|
{
|
|
1302
1303
|
style: {
|
|
1303
|
-
color:
|
|
1304
|
-
fontSize:
|
|
1304
|
+
color: y.colors.info,
|
|
1305
|
+
fontSize: y.fontSizes[0],
|
|
1305
1306
|
display: "flex",
|
|
1306
1307
|
alignItems: "center",
|
|
1307
1308
|
gap: "4px"
|
|
1308
1309
|
},
|
|
1309
1310
|
children: [
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ l(
|
|
1311
1312
|
"span",
|
|
1312
1313
|
{
|
|
1313
1314
|
style: {
|
|
@@ -1315,7 +1316,7 @@ const ht = ({
|
|
|
1315
1316
|
width: "8px",
|
|
1316
1317
|
height: "8px",
|
|
1317
1318
|
borderRadius: "50%",
|
|
1318
|
-
backgroundColor:
|
|
1319
|
+
backgroundColor: y.colors.info,
|
|
1319
1320
|
animation: "pulse 1s ease-in-out infinite"
|
|
1320
1321
|
}
|
|
1321
1322
|
}
|
|
@@ -1324,16 +1325,16 @@ const ht = ({
|
|
|
1324
1325
|
]
|
|
1325
1326
|
}
|
|
1326
1327
|
),
|
|
1327
|
-
!
|
|
1328
|
+
!z && /* @__PURE__ */ l(
|
|
1328
1329
|
"kbd",
|
|
1329
1330
|
{
|
|
1330
1331
|
style: {
|
|
1331
1332
|
padding: "2px 6px",
|
|
1332
|
-
backgroundColor:
|
|
1333
|
+
backgroundColor: y.colors.backgroundSecondary,
|
|
1333
1334
|
borderRadius: "3px",
|
|
1334
|
-
border: `1px solid ${
|
|
1335
|
-
fontSize:
|
|
1336
|
-
color:
|
|
1335
|
+
border: `1px solid ${y.colors.border}`,
|
|
1336
|
+
fontSize: y.fontSizes[0],
|
|
1337
|
+
color: y.colors.textMuted
|
|
1337
1338
|
},
|
|
1338
1339
|
children: "Alt+P"
|
|
1339
1340
|
}
|
|
@@ -1342,9 +1343,9 @@ const ht = ({
|
|
|
1342
1343
|
}
|
|
1343
1344
|
);
|
|
1344
1345
|
};
|
|
1345
|
-
|
|
1346
|
-
const
|
|
1347
|
-
const { theme: e } =
|
|
1346
|
+
xe.displayName = "AgentCommandInput";
|
|
1347
|
+
const qe = ({ status: o }) => {
|
|
1348
|
+
const { theme: e } = ee(), t = {
|
|
1348
1349
|
display: "inline-flex",
|
|
1349
1350
|
alignItems: "center",
|
|
1350
1351
|
justifyContent: "center",
|
|
@@ -1354,9 +1355,9 @@ const je = ({ status: o }) => {
|
|
|
1354
1355
|
};
|
|
1355
1356
|
switch (o) {
|
|
1356
1357
|
case "pending":
|
|
1357
|
-
return /* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ l("span", { style: { ...t, color: e.colors.textMuted }, children: "○" });
|
|
1358
1359
|
case "running":
|
|
1359
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ l(
|
|
1360
1361
|
"span",
|
|
1361
1362
|
{
|
|
1362
1363
|
style: {
|
|
@@ -1368,16 +1369,16 @@ const je = ({ status: o }) => {
|
|
|
1368
1369
|
}
|
|
1369
1370
|
);
|
|
1370
1371
|
case "success":
|
|
1371
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ l("span", { style: { ...t, color: e.colors.success }, children: "✓" });
|
|
1372
1373
|
case "error":
|
|
1373
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ l("span", { style: { ...t, color: e.colors.error }, children: "✗" });
|
|
1374
1375
|
}
|
|
1375
|
-
},
|
|
1376
|
+
}, Ne = (o) => {
|
|
1376
1377
|
const e = Object.entries(o);
|
|
1377
1378
|
return e.length === 0 ? "" : e.map(([t, r]) => t === "args" && Array.isArray(r) ? r.join(", ") : typeof r == "string" ? `"${r}"` : JSON.stringify(r)).join(", ");
|
|
1378
|
-
},
|
|
1379
|
-
const { theme: t } =
|
|
1380
|
-
return /* @__PURE__ */
|
|
1379
|
+
}, Fe = ({ tool: o, compact: e }) => {
|
|
1380
|
+
const { theme: t } = ee(), r = Ne(o.args);
|
|
1381
|
+
return /* @__PURE__ */ b(
|
|
1381
1382
|
"div",
|
|
1382
1383
|
{
|
|
1383
1384
|
style: {
|
|
@@ -1389,16 +1390,16 @@ const je = ({ status: o }) => {
|
|
|
1389
1390
|
fontSize: t.fontSizes[1]
|
|
1390
1391
|
},
|
|
1391
1392
|
children: [
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ l(qe, { status: o.status }),
|
|
1394
|
+
/* @__PURE__ */ b("span", { style: { color: t.colors.text }, children: [
|
|
1394
1395
|
o.name,
|
|
1395
|
-
r && /* @__PURE__ */
|
|
1396
|
+
r && /* @__PURE__ */ b("span", { style: { color: t.colors.textMuted }, children: [
|
|
1396
1397
|
"(",
|
|
1397
1398
|
r,
|
|
1398
1399
|
")"
|
|
1399
1400
|
] })
|
|
1400
1401
|
] }),
|
|
1401
|
-
o.status === "running" && /* @__PURE__ */
|
|
1402
|
+
o.status === "running" && /* @__PURE__ */ l(
|
|
1402
1403
|
"span",
|
|
1403
1404
|
{
|
|
1404
1405
|
style: {
|
|
@@ -1409,7 +1410,7 @@ const je = ({ status: o }) => {
|
|
|
1409
1410
|
children: "[running]"
|
|
1410
1411
|
}
|
|
1411
1412
|
),
|
|
1412
|
-
o.status === "success" && /* @__PURE__ */
|
|
1413
|
+
o.status === "success" && /* @__PURE__ */ l(
|
|
1413
1414
|
"span",
|
|
1414
1415
|
{
|
|
1415
1416
|
style: {
|
|
@@ -1420,7 +1421,7 @@ const je = ({ status: o }) => {
|
|
|
1420
1421
|
children: "[done]"
|
|
1421
1422
|
}
|
|
1422
1423
|
),
|
|
1423
|
-
o.status === "error" && /* @__PURE__ */
|
|
1424
|
+
o.status === "error" && /* @__PURE__ */ l(
|
|
1424
1425
|
"span",
|
|
1425
1426
|
{
|
|
1426
1427
|
style: {
|
|
@@ -1435,12 +1436,12 @@ const je = ({ status: o }) => {
|
|
|
1435
1436
|
]
|
|
1436
1437
|
}
|
|
1437
1438
|
);
|
|
1438
|
-
},
|
|
1439
|
+
}, ke = ({
|
|
1439
1440
|
tools: o,
|
|
1440
1441
|
compact: e = !1
|
|
1441
1442
|
}) => {
|
|
1442
|
-
const { theme: t } =
|
|
1443
|
-
return o.length === 0 ? null : /* @__PURE__ */
|
|
1443
|
+
const { theme: t } = ee();
|
|
1444
|
+
return o.length === 0 ? null : /* @__PURE__ */ l(
|
|
1444
1445
|
"div",
|
|
1445
1446
|
{
|
|
1446
1447
|
style: {
|
|
@@ -1449,20 +1450,20 @@ const je = ({ status: o }) => {
|
|
|
1449
1450
|
borderRadius: "4px",
|
|
1450
1451
|
margin: "8px 16px"
|
|
1451
1452
|
},
|
|
1452
|
-
children: o.map((r) => /* @__PURE__ */
|
|
1453
|
+
children: o.map((r) => /* @__PURE__ */ l(Fe, { tool: r, compact: e }, r.id))
|
|
1453
1454
|
}
|
|
1454
1455
|
);
|
|
1455
1456
|
};
|
|
1456
|
-
|
|
1457
|
-
const
|
|
1457
|
+
ke.displayName = "ToolExecutionList";
|
|
1458
|
+
const be = ({
|
|
1458
1459
|
response: o,
|
|
1459
1460
|
streaming: e = !1
|
|
1460
1461
|
}) => {
|
|
1461
|
-
const { theme: t } =
|
|
1462
|
+
const { theme: t } = ee();
|
|
1462
1463
|
if (!o)
|
|
1463
1464
|
return null;
|
|
1464
1465
|
const r = o.toLowerCase().startsWith("error"), s = o.toLowerCase().startsWith("done") || o.toLowerCase().startsWith("executed");
|
|
1465
|
-
return /* @__PURE__ */
|
|
1466
|
+
return /* @__PURE__ */ b(
|
|
1466
1467
|
"div",
|
|
1467
1468
|
{
|
|
1468
1469
|
style: {
|
|
@@ -1474,11 +1475,11 @@ const ke = ({
|
|
|
1474
1475
|
gap: "8px"
|
|
1475
1476
|
},
|
|
1476
1477
|
children: [
|
|
1477
|
-
s && /* @__PURE__ */
|
|
1478
|
-
r && /* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1478
|
+
s && /* @__PURE__ */ l("span", { children: "✓" }),
|
|
1479
|
+
r && /* @__PURE__ */ l("span", { children: "✗" }),
|
|
1480
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1480
1481
|
o,
|
|
1481
|
-
e && /* @__PURE__ */
|
|
1482
|
+
e && /* @__PURE__ */ l(
|
|
1482
1483
|
"span",
|
|
1483
1484
|
{
|
|
1484
1485
|
style: {
|
|
@@ -1496,45 +1497,45 @@ const ke = ({
|
|
|
1496
1497
|
}
|
|
1497
1498
|
);
|
|
1498
1499
|
};
|
|
1499
|
-
|
|
1500
|
-
function
|
|
1500
|
+
be.displayName = "AgentResponseDisplay";
|
|
1501
|
+
function he({
|
|
1501
1502
|
text: o,
|
|
1502
1503
|
matchedIndices: e,
|
|
1503
1504
|
highlightColor: t
|
|
1504
1505
|
}) {
|
|
1505
1506
|
if (!e.length)
|
|
1506
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ l(ce, { children: o });
|
|
1507
1508
|
const r = new Set(e), s = o.split("");
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ l(ce, { children: s.map((i, a) => /* @__PURE__ */ l(
|
|
1509
1510
|
"span",
|
|
1510
1511
|
{
|
|
1511
1512
|
style: {
|
|
1512
|
-
color: r.has(
|
|
1513
|
-
fontWeight: r.has(
|
|
1513
|
+
color: r.has(a) ? t : "inherit",
|
|
1514
|
+
fontWeight: r.has(a) ? 600 : "inherit"
|
|
1514
1515
|
},
|
|
1515
1516
|
children: i
|
|
1516
1517
|
},
|
|
1517
|
-
|
|
1518
|
+
a
|
|
1518
1519
|
)) });
|
|
1519
1520
|
}
|
|
1520
|
-
const
|
|
1521
|
+
const we = ({
|
|
1521
1522
|
matches: o,
|
|
1522
1523
|
argumentMatches: e = [],
|
|
1523
1524
|
currentArg: t,
|
|
1524
1525
|
isEnteringArgs: r = !1,
|
|
1525
1526
|
selectedIndex: s,
|
|
1526
1527
|
onSelect: i,
|
|
1527
|
-
maxVisible:
|
|
1528
|
+
maxVisible: a = 6
|
|
1528
1529
|
}) => {
|
|
1529
|
-
const { theme: n } =
|
|
1530
|
-
if (
|
|
1530
|
+
const { theme: n } = ee(), g = U(null), c = U(null);
|
|
1531
|
+
if (E(() => {
|
|
1531
1532
|
c.current && g.current && c.current.scrollIntoView({
|
|
1532
1533
|
block: "nearest",
|
|
1533
1534
|
behavior: "smooth"
|
|
1534
1535
|
});
|
|
1535
1536
|
}, [s]), r && e.length > 0) {
|
|
1536
|
-
const C = 40 *
|
|
1537
|
-
return /* @__PURE__ */
|
|
1537
|
+
const C = 40 * a;
|
|
1538
|
+
return /* @__PURE__ */ b(
|
|
1538
1539
|
"div",
|
|
1539
1540
|
{
|
|
1540
1541
|
ref: g,
|
|
@@ -1544,7 +1545,7 @@ const be = ({
|
|
|
1544
1545
|
borderTop: `1px solid ${n.colors.border}`
|
|
1545
1546
|
},
|
|
1546
1547
|
children: [
|
|
1547
|
-
t && /* @__PURE__ */
|
|
1548
|
+
t && /* @__PURE__ */ b(
|
|
1548
1549
|
"div",
|
|
1549
1550
|
{
|
|
1550
1551
|
style: {
|
|
@@ -1555,8 +1556,8 @@ const be = ({
|
|
|
1555
1556
|
borderBottom: `1px solid ${n.colors.border}`
|
|
1556
1557
|
},
|
|
1557
1558
|
children: [
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
t.description && /* @__PURE__ */
|
|
1559
|
+
/* @__PURE__ */ l("span", { style: { color: n.colors.textSecondary }, children: t.name }),
|
|
1560
|
+
t.description && /* @__PURE__ */ b("span", { style: { marginLeft: "8px" }, children: [
|
|
1560
1561
|
"— ",
|
|
1561
1562
|
t.description
|
|
1562
1563
|
] })
|
|
@@ -1564,11 +1565,11 @@ const be = ({
|
|
|
1564
1565
|
}
|
|
1565
1566
|
),
|
|
1566
1567
|
e.map((f, d) => {
|
|
1567
|
-
const
|
|
1568
|
-
return /* @__PURE__ */
|
|
1568
|
+
const u = d === s;
|
|
1569
|
+
return /* @__PURE__ */ b(
|
|
1569
1570
|
"div",
|
|
1570
1571
|
{
|
|
1571
|
-
ref:
|
|
1572
|
+
ref: u ? c : void 0,
|
|
1572
1573
|
onClick: () => i(d),
|
|
1573
1574
|
style: {
|
|
1574
1575
|
display: "flex",
|
|
@@ -1576,18 +1577,18 @@ const be = ({
|
|
|
1576
1577
|
gap: "12px",
|
|
1577
1578
|
padding: "8px 16px",
|
|
1578
1579
|
cursor: "pointer",
|
|
1579
|
-
backgroundColor:
|
|
1580
|
-
borderLeft:
|
|
1580
|
+
backgroundColor: u ? n.colors.backgroundSecondary : "transparent",
|
|
1581
|
+
borderLeft: u ? `2px solid ${n.colors.primary}` : "2px solid transparent",
|
|
1581
1582
|
transition: "background-color 100ms ease"
|
|
1582
1583
|
},
|
|
1583
|
-
onMouseEnter: (
|
|
1584
|
-
|
|
1584
|
+
onMouseEnter: (y) => {
|
|
1585
|
+
u || (y.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
|
|
1585
1586
|
},
|
|
1586
|
-
onMouseLeave: (
|
|
1587
|
-
|
|
1587
|
+
onMouseLeave: (y) => {
|
|
1588
|
+
u || (y.currentTarget.style.backgroundColor = "transparent");
|
|
1588
1589
|
},
|
|
1589
1590
|
children: [
|
|
1590
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ l(
|
|
1591
1592
|
"span",
|
|
1592
1593
|
{
|
|
1593
1594
|
style: {
|
|
@@ -1596,8 +1597,8 @@ const be = ({
|
|
|
1596
1597
|
color: n.colors.text,
|
|
1597
1598
|
flex: 1
|
|
1598
1599
|
},
|
|
1599
|
-
children: /* @__PURE__ */
|
|
1600
|
-
|
|
1600
|
+
children: /* @__PURE__ */ l(
|
|
1601
|
+
he,
|
|
1601
1602
|
{
|
|
1602
1603
|
text: f.option,
|
|
1603
1604
|
matchedIndices: f.matchedIndices,
|
|
@@ -1606,7 +1607,7 @@ const be = ({
|
|
|
1606
1607
|
)
|
|
1607
1608
|
}
|
|
1608
1609
|
),
|
|
1609
|
-
|
|
1610
|
+
u && /* @__PURE__ */ l(
|
|
1610
1611
|
"kbd",
|
|
1611
1612
|
{
|
|
1612
1613
|
style: {
|
|
@@ -1632,19 +1633,19 @@ const be = ({
|
|
|
1632
1633
|
}
|
|
1633
1634
|
if (o.length === 0)
|
|
1634
1635
|
return null;
|
|
1635
|
-
const
|
|
1636
|
-
return /* @__PURE__ */
|
|
1636
|
+
const p = 48 * a;
|
|
1637
|
+
return /* @__PURE__ */ l(
|
|
1637
1638
|
"div",
|
|
1638
1639
|
{
|
|
1639
1640
|
ref: g,
|
|
1640
1641
|
style: {
|
|
1641
|
-
maxHeight: `${
|
|
1642
|
+
maxHeight: `${p}px`,
|
|
1642
1643
|
overflowY: "auto",
|
|
1643
1644
|
borderTop: `1px solid ${n.colors.border}`
|
|
1644
1645
|
},
|
|
1645
1646
|
children: o.map((h, C) => {
|
|
1646
1647
|
const f = C === s, d = h.command;
|
|
1647
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ b(
|
|
1648
1649
|
"div",
|
|
1649
1650
|
{
|
|
1650
1651
|
ref: f ? c : void 0,
|
|
@@ -1659,14 +1660,14 @@ const be = ({
|
|
|
1659
1660
|
borderLeft: f ? `2px solid ${n.colors.primary}` : "2px solid transparent",
|
|
1660
1661
|
transition: "background-color 100ms ease"
|
|
1661
1662
|
},
|
|
1662
|
-
onMouseEnter: (
|
|
1663
|
-
f || (
|
|
1663
|
+
onMouseEnter: (u) => {
|
|
1664
|
+
f || (u.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
|
|
1664
1665
|
},
|
|
1665
|
-
onMouseLeave: (
|
|
1666
|
-
f || (
|
|
1666
|
+
onMouseLeave: (u) => {
|
|
1667
|
+
f || (u.currentTarget.style.backgroundColor = "transparent");
|
|
1667
1668
|
},
|
|
1668
1669
|
children: [
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ l(
|
|
1670
1671
|
"span",
|
|
1671
1672
|
{
|
|
1672
1673
|
style: {
|
|
@@ -1678,8 +1679,8 @@ const be = ({
|
|
|
1678
1679
|
children: "/"
|
|
1679
1680
|
}
|
|
1680
1681
|
),
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1682
|
+
/* @__PURE__ */ b("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1683
|
+
/* @__PURE__ */ b(
|
|
1683
1684
|
"div",
|
|
1684
1685
|
{
|
|
1685
1686
|
style: {
|
|
@@ -1688,15 +1689,15 @@ const be = ({
|
|
|
1688
1689
|
color: n.colors.text
|
|
1689
1690
|
},
|
|
1690
1691
|
children: [
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
|
|
1692
|
+
/* @__PURE__ */ l(
|
|
1693
|
+
he,
|
|
1693
1694
|
{
|
|
1694
1695
|
text: d.name,
|
|
1695
1696
|
matchedIndices: h.matchedOn === d.name ? h.matchedIndices : [],
|
|
1696
1697
|
highlightColor: n.colors.primary
|
|
1697
1698
|
}
|
|
1698
1699
|
),
|
|
1699
|
-
h.matchedOn !== d.name && /* @__PURE__ */
|
|
1700
|
+
h.matchedOn !== d.name && /* @__PURE__ */ b(
|
|
1700
1701
|
"span",
|
|
1701
1702
|
{
|
|
1702
1703
|
style: {
|
|
@@ -1714,7 +1715,7 @@ const be = ({
|
|
|
1714
1715
|
]
|
|
1715
1716
|
}
|
|
1716
1717
|
),
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ l(
|
|
1718
1719
|
"div",
|
|
1719
1720
|
{
|
|
1720
1721
|
style: {
|
|
@@ -1729,7 +1730,7 @@ const be = ({
|
|
|
1729
1730
|
}
|
|
1730
1731
|
)
|
|
1731
1732
|
] }),
|
|
1732
|
-
d.args && d.args.length > 0 && /* @__PURE__ */
|
|
1733
|
+
d.args && d.args.length > 0 && /* @__PURE__ */ l(
|
|
1733
1734
|
"div",
|
|
1734
1735
|
{
|
|
1735
1736
|
style: {
|
|
@@ -1738,21 +1739,21 @@ const be = ({
|
|
|
1738
1739
|
fontFamily: n.fonts.monospace,
|
|
1739
1740
|
flexShrink: 0
|
|
1740
1741
|
},
|
|
1741
|
-
children: d.args.map((
|
|
1742
|
-
|
|
1743
|
-
/* @__PURE__ */
|
|
1742
|
+
children: d.args.map((u, y) => /* @__PURE__ */ b("span", { children: [
|
|
1743
|
+
y > 0 && " ",
|
|
1744
|
+
/* @__PURE__ */ l(
|
|
1744
1745
|
"span",
|
|
1745
1746
|
{
|
|
1746
1747
|
style: {
|
|
1747
|
-
color:
|
|
1748
|
+
color: u.required ? n.colors.warning : n.colors.textMuted
|
|
1748
1749
|
},
|
|
1749
|
-
children:
|
|
1750
|
+
children: u.required ? `<${u.name}>` : `[${u.name}]`
|
|
1750
1751
|
}
|
|
1751
1752
|
)
|
|
1752
|
-
] },
|
|
1753
|
+
] }, u.name))
|
|
1753
1754
|
}
|
|
1754
1755
|
),
|
|
1755
|
-
f && /* @__PURE__ */
|
|
1756
|
+
f && /* @__PURE__ */ l(
|
|
1756
1757
|
"kbd",
|
|
1757
1758
|
{
|
|
1758
1759
|
style: {
|
|
@@ -1775,68 +1776,69 @@ const be = ({
|
|
|
1775
1776
|
}
|
|
1776
1777
|
);
|
|
1777
1778
|
};
|
|
1778
|
-
|
|
1779
|
-
const
|
|
1779
|
+
we.displayName = "QuickCommandAutocomplete";
|
|
1780
|
+
const Oe = ({
|
|
1780
1781
|
palette: o,
|
|
1781
1782
|
config: e
|
|
1782
1783
|
}) => {
|
|
1783
|
-
const { theme: t } =
|
|
1784
|
+
const { theme: t } = ee(), r = U(null), {
|
|
1784
1785
|
isOpen: s,
|
|
1785
1786
|
close: i,
|
|
1786
|
-
query:
|
|
1787
|
+
query: a,
|
|
1787
1788
|
setQuery: n,
|
|
1788
1789
|
mode: g,
|
|
1789
1790
|
status: c,
|
|
1790
|
-
pendingTools:
|
|
1791
|
-
completedTools:
|
|
1791
|
+
pendingTools: x,
|
|
1792
|
+
completedTools: p,
|
|
1792
1793
|
agentResponse: h,
|
|
1793
1794
|
submit: C,
|
|
1794
1795
|
historyPrevious: f,
|
|
1795
1796
|
historyNext: d,
|
|
1796
|
-
suggestions:
|
|
1797
|
-
agentAvailable:
|
|
1797
|
+
suggestions: u,
|
|
1798
|
+
agentAvailable: y,
|
|
1798
1799
|
// Autocomplete
|
|
1799
|
-
quickCommandMatches:
|
|
1800
|
-
argumentOptionMatches:
|
|
1801
|
-
parsedQuery:
|
|
1802
|
-
currentArgDef:
|
|
1803
|
-
selectedAutocompleteIndex:
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1800
|
+
quickCommandMatches: L,
|
|
1801
|
+
argumentOptionMatches: q,
|
|
1802
|
+
parsedQuery: z,
|
|
1803
|
+
currentArgDef: A,
|
|
1804
|
+
selectedAutocompleteIndex: v,
|
|
1805
|
+
autocompleteItemCount: S,
|
|
1806
|
+
autocompleteNext: k,
|
|
1807
|
+
autocompletePrevious: I,
|
|
1808
|
+
autocompleteAccept: W,
|
|
1809
|
+
showAutocomplete: $
|
|
1808
1810
|
} = o;
|
|
1809
|
-
|
|
1811
|
+
E(() => {
|
|
1810
1812
|
if (!s) return;
|
|
1811
|
-
const
|
|
1812
|
-
r.current && !r.current.contains(
|
|
1813
|
-
},
|
|
1814
|
-
document.addEventListener("mousedown",
|
|
1813
|
+
const V = (N) => {
|
|
1814
|
+
r.current && !r.current.contains(N.target) && i();
|
|
1815
|
+
}, Y = setTimeout(() => {
|
|
1816
|
+
document.addEventListener("mousedown", V);
|
|
1815
1817
|
}, 100);
|
|
1816
1818
|
return () => {
|
|
1817
|
-
clearTimeout(
|
|
1819
|
+
clearTimeout(Y), document.removeEventListener("mousedown", V);
|
|
1818
1820
|
};
|
|
1819
1821
|
}, [s, i]);
|
|
1820
|
-
const [
|
|
1821
|
-
if (
|
|
1822
|
+
const [T, P] = _(!1), [B, se] = _(!1);
|
|
1823
|
+
if (E(() => {
|
|
1822
1824
|
if (s)
|
|
1823
|
-
|
|
1825
|
+
se(!0), requestAnimationFrame(() => {
|
|
1824
1826
|
requestAnimationFrame(() => {
|
|
1825
|
-
|
|
1827
|
+
P(!0);
|
|
1826
1828
|
});
|
|
1827
1829
|
});
|
|
1828
1830
|
else {
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1831
|
-
|
|
1831
|
+
P(!1);
|
|
1832
|
+
const V = setTimeout(() => {
|
|
1833
|
+
se(!1);
|
|
1832
1834
|
}, 150);
|
|
1833
|
-
return () => clearTimeout(
|
|
1835
|
+
return () => clearTimeout(V);
|
|
1834
1836
|
}
|
|
1835
|
-
}, [s]), !
|
|
1837
|
+
}, [s]), !B)
|
|
1836
1838
|
return null;
|
|
1837
|
-
const
|
|
1838
|
-
return /* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */
|
|
1839
|
+
const G = y ? (e == null ? void 0 : e.placeholder) || "What would you like to do?" : "Quick command mode (agent unavailable)", K = [...p, ...x], te = K.length > 0, H = h && c !== "idle", M = y && !a && c === "idle" && u.length > 0, oe = !y && g !== "quick-command" && c === "idle";
|
|
1840
|
+
return /* @__PURE__ */ b(ce, { children: [
|
|
1841
|
+
/* @__PURE__ */ l(
|
|
1840
1842
|
"div",
|
|
1841
1843
|
{
|
|
1842
1844
|
style: {
|
|
@@ -1847,7 +1849,7 @@ const Fe = ({
|
|
|
1847
1849
|
onClick: i
|
|
1848
1850
|
}
|
|
1849
1851
|
),
|
|
1850
|
-
/* @__PURE__ */
|
|
1852
|
+
/* @__PURE__ */ b(
|
|
1851
1853
|
"div",
|
|
1852
1854
|
{
|
|
1853
1855
|
ref: r,
|
|
@@ -1865,16 +1867,16 @@ const Fe = ({
|
|
|
1865
1867
|
display: "flex",
|
|
1866
1868
|
flexDirection: "column-reverse",
|
|
1867
1869
|
overflow: "hidden",
|
|
1868
|
-
transform:
|
|
1870
|
+
transform: T ? "translateY(0)" : "translateY(100%)",
|
|
1869
1871
|
transition: "transform 150ms ease-out",
|
|
1870
1872
|
...e == null ? void 0 : e.style
|
|
1871
1873
|
},
|
|
1872
1874
|
children: [
|
|
1873
|
-
/* @__PURE__ */
|
|
1874
|
-
/* @__PURE__ */
|
|
1875
|
-
|
|
1875
|
+
/* @__PURE__ */ b("div", { children: [
|
|
1876
|
+
/* @__PURE__ */ l(
|
|
1877
|
+
xe,
|
|
1876
1878
|
{
|
|
1877
|
-
value:
|
|
1879
|
+
value: a,
|
|
1878
1880
|
onChange: n,
|
|
1879
1881
|
onSubmit: C,
|
|
1880
1882
|
onClose: i,
|
|
@@ -1882,15 +1884,16 @@ const Fe = ({
|
|
|
1882
1884
|
onHistoryNext: d,
|
|
1883
1885
|
mode: g,
|
|
1884
1886
|
status: c,
|
|
1885
|
-
placeholder:
|
|
1886
|
-
agentAvailable:
|
|
1887
|
-
showAutocomplete:
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1887
|
+
placeholder: G,
|
|
1888
|
+
agentAvailable: y,
|
|
1889
|
+
showAutocomplete: $,
|
|
1890
|
+
autocompleteItemCount: S,
|
|
1891
|
+
onAutocompleteNext: k,
|
|
1892
|
+
onAutocompletePrevious: I,
|
|
1893
|
+
onAutocompleteAccept: W
|
|
1891
1894
|
}
|
|
1892
1895
|
),
|
|
1893
|
-
/* @__PURE__ */
|
|
1896
|
+
/* @__PURE__ */ b(
|
|
1894
1897
|
"div",
|
|
1895
1898
|
{
|
|
1896
1899
|
style: {
|
|
@@ -1903,8 +1906,8 @@ const Fe = ({
|
|
|
1903
1906
|
backgroundColor: t.colors.background
|
|
1904
1907
|
},
|
|
1905
1908
|
children: [
|
|
1906
|
-
/* @__PURE__ */
|
|
1907
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1910
|
+
/* @__PURE__ */ l(
|
|
1908
1911
|
"kbd",
|
|
1909
1912
|
{
|
|
1910
1913
|
style: {
|
|
@@ -1919,8 +1922,8 @@ const Fe = ({
|
|
|
1919
1922
|
" ",
|
|
1920
1923
|
"Execute"
|
|
1921
1924
|
] }),
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1926
|
+
/* @__PURE__ */ l(
|
|
1924
1927
|
"kbd",
|
|
1925
1928
|
{
|
|
1926
1929
|
style: {
|
|
@@ -1935,8 +1938,8 @@ const Fe = ({
|
|
|
1935
1938
|
" ",
|
|
1936
1939
|
"Close"
|
|
1937
1940
|
] }),
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
1941
|
+
/* @__PURE__ */ b("span", { children: [
|
|
1942
|
+
/* @__PURE__ */ l(
|
|
1940
1943
|
"kbd",
|
|
1941
1944
|
{
|
|
1942
1945
|
style: {
|
|
@@ -1951,8 +1954,8 @@ const Fe = ({
|
|
|
1951
1954
|
" ",
|
|
1952
1955
|
"History"
|
|
1953
1956
|
] }),
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ b("span", { style: { marginLeft: "auto" }, children: [
|
|
1958
|
+
/* @__PURE__ */ l(
|
|
1956
1959
|
"kbd",
|
|
1957
1960
|
{
|
|
1958
1961
|
style: {
|
|
@@ -1971,16 +1974,16 @@ const Fe = ({
|
|
|
1971
1974
|
}
|
|
1972
1975
|
)
|
|
1973
1976
|
] }),
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1977
|
+
/* @__PURE__ */ b("div", { style: { overflow: "auto" }, children: [
|
|
1978
|
+
te && /* @__PURE__ */ l(ke, { tools: K, compact: K.length > 3 }),
|
|
1979
|
+
H && /* @__PURE__ */ l(
|
|
1980
|
+
be,
|
|
1978
1981
|
{
|
|
1979
1982
|
response: h,
|
|
1980
1983
|
streaming: c === "thinking"
|
|
1981
1984
|
}
|
|
1982
1985
|
),
|
|
1983
|
-
|
|
1986
|
+
M && /* @__PURE__ */ b(
|
|
1984
1987
|
"div",
|
|
1985
1988
|
{
|
|
1986
1989
|
style: {
|
|
@@ -1990,7 +1993,7 @@ const Fe = ({
|
|
|
1990
1993
|
flexWrap: "wrap"
|
|
1991
1994
|
},
|
|
1992
1995
|
children: [
|
|
1993
|
-
/* @__PURE__ */
|
|
1996
|
+
/* @__PURE__ */ l(
|
|
1994
1997
|
"span",
|
|
1995
1998
|
{
|
|
1996
1999
|
style: {
|
|
@@ -2001,11 +2004,11 @@ const Fe = ({
|
|
|
2001
2004
|
children: "Try:"
|
|
2002
2005
|
}
|
|
2003
2006
|
),
|
|
2004
|
-
|
|
2007
|
+
u.map((V, Y) => /* @__PURE__ */ b(
|
|
2005
2008
|
"button",
|
|
2006
2009
|
{
|
|
2007
2010
|
onClick: () => {
|
|
2008
|
-
n(
|
|
2011
|
+
n(V);
|
|
2009
2012
|
},
|
|
2010
2013
|
style: {
|
|
2011
2014
|
padding: "4px 10px",
|
|
@@ -2017,24 +2020,24 @@ const Fe = ({
|
|
|
2017
2020
|
cursor: "pointer",
|
|
2018
2021
|
transition: "background-color 150ms ease"
|
|
2019
2022
|
},
|
|
2020
|
-
onMouseEnter: (
|
|
2021
|
-
|
|
2023
|
+
onMouseEnter: (N) => {
|
|
2024
|
+
N.currentTarget.style.backgroundColor = t.colors.backgroundTertiary;
|
|
2022
2025
|
},
|
|
2023
|
-
onMouseLeave: (
|
|
2024
|
-
|
|
2026
|
+
onMouseLeave: (N) => {
|
|
2027
|
+
N.currentTarget.style.backgroundColor = t.colors.backgroundSecondary;
|
|
2025
2028
|
},
|
|
2026
2029
|
children: [
|
|
2027
2030
|
'"',
|
|
2028
|
-
|
|
2031
|
+
V,
|
|
2029
2032
|
'"'
|
|
2030
2033
|
]
|
|
2031
2034
|
},
|
|
2032
|
-
|
|
2035
|
+
Y
|
|
2033
2036
|
))
|
|
2034
2037
|
]
|
|
2035
2038
|
}
|
|
2036
2039
|
),
|
|
2037
|
-
|
|
2040
|
+
oe && /* @__PURE__ */ b(
|
|
2038
2041
|
"div",
|
|
2039
2042
|
{
|
|
2040
2043
|
style: {
|
|
@@ -2046,10 +2049,10 @@ const Fe = ({
|
|
|
2046
2049
|
gap: "8px"
|
|
2047
2050
|
},
|
|
2048
2051
|
children: [
|
|
2049
|
-
/* @__PURE__ */
|
|
2050
|
-
/* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ l("span", { children: "Agent unavailable." }),
|
|
2053
|
+
/* @__PURE__ */ b("span", { style: { color: t.colors.textMuted }, children: [
|
|
2051
2054
|
"Use quick commands (start with ",
|
|
2052
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ l("kbd", { style: {
|
|
2053
2056
|
padding: "2px 6px",
|
|
2054
2057
|
backgroundColor: t.colors.backgroundSecondary,
|
|
2055
2058
|
borderRadius: "3px",
|
|
@@ -2060,73 +2063,33 @@ const Fe = ({
|
|
|
2060
2063
|
]
|
|
2061
2064
|
}
|
|
2062
2065
|
),
|
|
2063
|
-
|
|
2064
|
-
|
|
2066
|
+
$ && /* @__PURE__ */ l(
|
|
2067
|
+
we,
|
|
2065
2068
|
{
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
/* @__PURE__ */ y("div", { children: [
|
|
2083
|
-
/* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/switch" }),
|
|
2084
|
-
" ",
|
|
2085
|
-
/* @__PURE__ */ a("span", { style: { color: t.colors.textMuted }, children: "<slot> <panel>" }),
|
|
2086
|
-
" ",
|
|
2087
|
-
"- Switch panel content"
|
|
2088
|
-
] }),
|
|
2089
|
-
/* @__PURE__ */ y("div", { children: [
|
|
2090
|
-
/* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/collapse" }),
|
|
2091
|
-
" ",
|
|
2092
|
-
"- Collapse all sidebars"
|
|
2093
|
-
] }),
|
|
2094
|
-
/* @__PURE__ */ y("div", { children: [
|
|
2095
|
-
/* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/expand" }),
|
|
2096
|
-
" ",
|
|
2097
|
-
"- Expand all sidebars"
|
|
2098
|
-
] })
|
|
2099
|
-
] })
|
|
2100
|
-
]
|
|
2101
|
-
}
|
|
2102
|
-
),
|
|
2103
|
-
z && /* @__PURE__ */ a(
|
|
2104
|
-
be,
|
|
2105
|
-
{
|
|
2106
|
-
matches: W,
|
|
2107
|
-
argumentMatches: D,
|
|
2108
|
-
currentArg: _,
|
|
2109
|
-
isEnteringArgs: I.isEnteringArgs,
|
|
2110
|
-
selectedIndex: S,
|
|
2111
|
-
onSelect: (B) => {
|
|
2112
|
-
var j;
|
|
2113
|
-
if (I.isEnteringArgs) {
|
|
2114
|
-
const Z = D[B];
|
|
2115
|
-
if (Z) {
|
|
2116
|
-
let oe = `/${I.commandName}`;
|
|
2117
|
-
for (const ie of I.enteredArgs)
|
|
2118
|
-
oe += ` ${ie}`;
|
|
2119
|
-
oe += ` ${Z.option}`;
|
|
2120
|
-
const de = I.currentArgIndex + 1;
|
|
2121
|
-
((j = I.command) == null ? void 0 : j.args) && de < I.command.args.length && (oe += " "), n(oe);
|
|
2069
|
+
matches: L,
|
|
2070
|
+
argumentMatches: q,
|
|
2071
|
+
currentArg: A,
|
|
2072
|
+
isEnteringArgs: z.isEnteringArgs,
|
|
2073
|
+
selectedIndex: v,
|
|
2074
|
+
onSelect: (V) => {
|
|
2075
|
+
var N;
|
|
2076
|
+
if (z.isEnteringArgs) {
|
|
2077
|
+
const Q = q[V];
|
|
2078
|
+
if (Q) {
|
|
2079
|
+
let re = `/${z.commandName}`;
|
|
2080
|
+
for (const ae of z.enteredArgs)
|
|
2081
|
+
re += ` ${ae}`;
|
|
2082
|
+
re += ` ${Q.option}`;
|
|
2083
|
+
const de = z.currentArgIndex + 1;
|
|
2084
|
+
((N = z.command) == null ? void 0 : N.args) && de < z.command.args.length && (re += " "), n(re);
|
|
2122
2085
|
}
|
|
2123
2086
|
return;
|
|
2124
2087
|
}
|
|
2125
|
-
const
|
|
2126
|
-
if (
|
|
2127
|
-
const
|
|
2128
|
-
let
|
|
2129
|
-
|
|
2088
|
+
const Y = L[V];
|
|
2089
|
+
if (Y) {
|
|
2090
|
+
const Q = Y.command;
|
|
2091
|
+
let re = `/${Q.name}`;
|
|
2092
|
+
Q.args && Q.args.length > 0 && (re += " "), n(re);
|
|
2130
2093
|
}
|
|
2131
2094
|
}
|
|
2132
2095
|
}
|
|
@@ -2135,7 +2098,7 @@ const Fe = ({
|
|
|
2135
2098
|
]
|
|
2136
2099
|
}
|
|
2137
2100
|
),
|
|
2138
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ l("style", { children: `
|
|
2139
2102
|
@keyframes pulse {
|
|
2140
2103
|
0%, 100% { opacity: 1; }
|
|
2141
2104
|
50% { opacity: 0.5; }
|
|
@@ -2151,34 +2114,29 @@ const Fe = ({
|
|
|
2151
2114
|
` })
|
|
2152
2115
|
] });
|
|
2153
2116
|
};
|
|
2154
|
-
|
|
2117
|
+
Oe.displayName = "AgentCommandPalette";
|
|
2155
2118
|
function pe(o, e) {
|
|
2156
2119
|
const t = o.toLowerCase(), r = e.toLowerCase();
|
|
2157
2120
|
if (!t)
|
|
2158
2121
|
return { score: 0, matchedIndices: [] };
|
|
2159
2122
|
const s = [];
|
|
2160
|
-
let i = 0,
|
|
2123
|
+
let i = 0, a = 0, n = 0, g = -1;
|
|
2161
2124
|
for (let c = 0; c < r.length && i < t.length; c++)
|
|
2162
|
-
r[c] === t[i] && (s.push(c), g === c - 1 ? (n++,
|
|
2163
|
-
return i < t.length ? null : (
|
|
2125
|
+
r[c] === t[i] && (s.push(c), g === c - 1 ? (n++, a += n * 2) : n = 1, c === 0 && (a += 10), c > 0 && /[_\-\s]/.test(e[c - 1]) && (a += 5), a += 1, g = c, i++);
|
|
2126
|
+
return i < t.length ? null : (a -= e.length * 0.1, t === r && (a += 20), r.startsWith(t) && (a += 15), { score: a, matchedIndices: s });
|
|
2164
2127
|
}
|
|
2165
|
-
function
|
|
2128
|
+
function Ve(o, e, t = 10) {
|
|
2166
2129
|
const r = o.replace(/^\//, "").trim();
|
|
2167
2130
|
if (!r)
|
|
2168
|
-
return
|
|
2169
|
-
command: i,
|
|
2170
|
-
score: 0,
|
|
2171
|
-
matchedIndices: [],
|
|
2172
|
-
matchedOn: i.name
|
|
2173
|
-
}));
|
|
2131
|
+
return [];
|
|
2174
2132
|
const s = [];
|
|
2175
2133
|
for (const i of e) {
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2134
|
+
const a = pe(r, i.name);
|
|
2135
|
+
if (a) {
|
|
2178
2136
|
s.push({
|
|
2179
2137
|
command: i,
|
|
2180
|
-
score:
|
|
2181
|
-
matchedIndices:
|
|
2138
|
+
score: a.score,
|
|
2139
|
+
matchedIndices: a.matchedIndices,
|
|
2182
2140
|
matchedOn: i.name
|
|
2183
2141
|
});
|
|
2184
2142
|
continue;
|
|
@@ -2198,16 +2156,16 @@ function Oe(o, e, t = 10) {
|
|
|
2198
2156
|
}
|
|
2199
2157
|
}
|
|
2200
2158
|
}
|
|
2201
|
-
return s.sort((i,
|
|
2159
|
+
return s.sort((i, a) => a.score - i.score).slice(0, t);
|
|
2202
2160
|
}
|
|
2203
|
-
function
|
|
2204
|
-
const r = o.replace(/^\//, "").split(/\s+/), s = r[0] || "", i = o.endsWith(" ") && o.trim().length > 0,
|
|
2161
|
+
function Be(o, e) {
|
|
2162
|
+
const r = o.replace(/^\//, "").split(/\s+/), s = r[0] || "", i = o.endsWith(" ") && o.trim().length > 0, a = e.find(
|
|
2205
2163
|
(g) => {
|
|
2206
2164
|
var c;
|
|
2207
|
-
return g.name.toLowerCase() === s.toLowerCase() || ((c = g.aliases) == null ? void 0 : c.some((
|
|
2165
|
+
return g.name.toLowerCase() === s.toLowerCase() || ((c = g.aliases) == null ? void 0 : c.some((x) => x.toLowerCase() === s.toLowerCase()));
|
|
2208
2166
|
}
|
|
2209
2167
|
) || null;
|
|
2210
|
-
if (!
|
|
2168
|
+
if (!a)
|
|
2211
2169
|
return {
|
|
2212
2170
|
commandName: s,
|
|
2213
2171
|
command: null,
|
|
@@ -2219,8 +2177,8 @@ function Ve(o, e) {
|
|
|
2219
2177
|
const n = r.slice(1);
|
|
2220
2178
|
if (i)
|
|
2221
2179
|
return {
|
|
2222
|
-
commandName:
|
|
2223
|
-
command:
|
|
2180
|
+
commandName: a.name,
|
|
2181
|
+
command: a,
|
|
2224
2182
|
enteredArgs: n,
|
|
2225
2183
|
currentArgValue: "",
|
|
2226
2184
|
currentArgIndex: n.length,
|
|
@@ -2229,8 +2187,8 @@ function Ve(o, e) {
|
|
|
2229
2187
|
if (n.length > 0) {
|
|
2230
2188
|
const g = n.slice(0, -1), c = n[n.length - 1];
|
|
2231
2189
|
return {
|
|
2232
|
-
commandName:
|
|
2233
|
-
command:
|
|
2190
|
+
commandName: a.name,
|
|
2191
|
+
command: a,
|
|
2234
2192
|
enteredArgs: g,
|
|
2235
2193
|
currentArgValue: c,
|
|
2236
2194
|
currentArgIndex: g.length,
|
|
@@ -2238,15 +2196,15 @@ function Ve(o, e) {
|
|
|
2238
2196
|
};
|
|
2239
2197
|
}
|
|
2240
2198
|
return {
|
|
2241
|
-
commandName:
|
|
2242
|
-
command:
|
|
2199
|
+
commandName: a.name,
|
|
2200
|
+
command: a,
|
|
2243
2201
|
enteredArgs: [],
|
|
2244
2202
|
currentArgValue: "",
|
|
2245
2203
|
currentArgIndex: -1,
|
|
2246
2204
|
isEnteringArgs: !1
|
|
2247
2205
|
};
|
|
2248
2206
|
}
|
|
2249
|
-
function
|
|
2207
|
+
function Ke(o, e, t = 10) {
|
|
2250
2208
|
if (!e.length)
|
|
2251
2209
|
return [];
|
|
2252
2210
|
if (!o)
|
|
@@ -2266,7 +2224,7 @@ function Be(o, e, t = 10) {
|
|
|
2266
2224
|
}
|
|
2267
2225
|
return r.sort((s, i) => i.score - s.score).slice(0, t);
|
|
2268
2226
|
}
|
|
2269
|
-
const
|
|
2227
|
+
const He = [
|
|
2270
2228
|
"hide sidebars",
|
|
2271
2229
|
"show terminal",
|
|
2272
2230
|
"focus editor"
|
|
@@ -2276,121 +2234,121 @@ function yt({
|
|
|
2276
2234
|
keyboard: e = { key: "p", altKey: !0 },
|
|
2277
2235
|
config: t = {},
|
|
2278
2236
|
onExecuteTool: r,
|
|
2279
|
-
initialSuggestions: s =
|
|
2237
|
+
initialSuggestions: s = He,
|
|
2280
2238
|
agentAvailable: i = !0,
|
|
2281
|
-
quickCommands:
|
|
2239
|
+
quickCommands: a = []
|
|
2282
2240
|
} = {}) {
|
|
2283
|
-
const [n, g] =
|
|
2241
|
+
const [n, g] = _(!1), [c, x] = _(""), [p, h] = _("natural"), [C, f] = _("idle"), [d, u] = _([]), [y, L] = _([]), [q, z] = _(""), [A, v] = _([]), [S, k] = _(-1), I = ne(() => s, [s]), [W, $] = _(-1), T = ne(() => p !== "quick-command" || !a.length ? {
|
|
2284
2242
|
commandName: "",
|
|
2285
2243
|
command: null,
|
|
2286
2244
|
enteredArgs: [],
|
|
2287
2245
|
currentArgValue: "",
|
|
2288
2246
|
currentArgIndex: -1,
|
|
2289
2247
|
isEnteringArgs: !1
|
|
2290
|
-
} :
|
|
2291
|
-
var
|
|
2292
|
-
if (!
|
|
2248
|
+
} : Be(c, a), [c, p, a]), P = ne(() => p !== "quick-command" || !a.length || T.isEnteringArgs ? [] : Ve(c, a), [c, p, a, T.isEnteringArgs]), B = ne(() => {
|
|
2249
|
+
var R;
|
|
2250
|
+
if (!T.isEnteringArgs || !((R = T.command) != null && R.args))
|
|
2293
2251
|
return [];
|
|
2294
|
-
const m =
|
|
2295
|
-
return m != null && m.options ?
|
|
2296
|
-
}, [
|
|
2252
|
+
const m = T.command.args[T.currentArgIndex];
|
|
2253
|
+
return m != null && m.options ? Ke(T.currentArgValue, m.options) : [];
|
|
2254
|
+
}, [T]), se = ne(() => {
|
|
2297
2255
|
var m;
|
|
2298
|
-
return !
|
|
2299
|
-
}, [
|
|
2300
|
-
|
|
2301
|
-
$(
|
|
2302
|
-
}, [
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2305
|
-
}, []), H =
|
|
2306
|
-
g(!0), i ? (
|
|
2256
|
+
return !T.isEnteringArgs || !((m = T.command) != null && m.args) ? null : T.command.args[T.currentArgIndex] || null;
|
|
2257
|
+
}, [T]), G = ne(() => p !== "quick-command" || C !== "idle" || c.length === 0 ? !1 : P.length > 0 || B.length > 0, [p, C, c.length, P.length, B.length]), K = ne(() => T.isEnteringArgs ? B.length : P.length, [T.isEnteringArgs, B.length, P.length]);
|
|
2258
|
+
E(() => {
|
|
2259
|
+
$(K > 0 ? 0 : -1);
|
|
2260
|
+
}, [K]);
|
|
2261
|
+
const te = w((m) => {
|
|
2262
|
+
x(m), h(m.startsWith("/") ? "quick-command" : "natural");
|
|
2263
|
+
}, []), H = w(() => {
|
|
2264
|
+
g(!0), i ? (x(""), h("natural")) : (x("/"), h("quick-command")), f("idle"), u([]), L([]), z(""), k(-1), o == null || o.emit({
|
|
2307
2265
|
type: "agent-command-palette:opened",
|
|
2308
2266
|
source: "agent-command-palette",
|
|
2309
2267
|
timestamp: Date.now(),
|
|
2310
2268
|
payload: {}
|
|
2311
2269
|
});
|
|
2312
|
-
}, [o, i]), M =
|
|
2270
|
+
}, [o, i]), M = w(() => {
|
|
2313
2271
|
g(!1), o == null || o.emit({
|
|
2314
2272
|
type: "agent-command-palette:closed",
|
|
2315
2273
|
source: "agent-command-palette",
|
|
2316
2274
|
timestamp: Date.now(),
|
|
2317
2275
|
payload: {}
|
|
2318
2276
|
});
|
|
2319
|
-
}, [o]),
|
|
2277
|
+
}, [o]), oe = w(() => {
|
|
2320
2278
|
n ? M() : H();
|
|
2321
|
-
}, [n, H, M]),
|
|
2322
|
-
|
|
2323
|
-
}, []),
|
|
2324
|
-
const
|
|
2279
|
+
}, [n, H, M]), V = w(() => {
|
|
2280
|
+
x(""), h("natural"), f("idle"), u([]), L([]), z(""), k(-1);
|
|
2281
|
+
}, []), Y = w((m) => {
|
|
2282
|
+
const R = {
|
|
2325
2283
|
...m,
|
|
2326
2284
|
status: "pending"
|
|
2327
2285
|
};
|
|
2328
|
-
return
|
|
2329
|
-
}, []),
|
|
2330
|
-
(m,
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2333
|
-
if (!
|
|
2334
|
-
const
|
|
2335
|
-
...
|
|
2336
|
-
status:
|
|
2337
|
-
result:
|
|
2338
|
-
error:
|
|
2286
|
+
return u((j) => [...j, R]), R;
|
|
2287
|
+
}, []), N = w(
|
|
2288
|
+
(m, R, j, X) => {
|
|
2289
|
+
u((F) => {
|
|
2290
|
+
const J = F.find((Z) => Z.id === m);
|
|
2291
|
+
if (!J) return F;
|
|
2292
|
+
const D = {
|
|
2293
|
+
...J,
|
|
2294
|
+
status: R,
|
|
2295
|
+
result: j,
|
|
2296
|
+
error: X
|
|
2339
2297
|
};
|
|
2340
|
-
return
|
|
2298
|
+
return R === "success" || R === "error" ? (L((Z) => [...Z, D]), F.filter((Z) => Z.id !== m)) : F.map((Z) => Z.id === m ? D : Z);
|
|
2341
2299
|
});
|
|
2342
2300
|
},
|
|
2343
2301
|
[]
|
|
2344
|
-
),
|
|
2302
|
+
), Q = w(
|
|
2345
2303
|
async (m) => {
|
|
2346
|
-
const
|
|
2347
|
-
if (!
|
|
2304
|
+
const R = m.replace(/^\//, "").trim().split(/\s+/), j = R[0], X = R.slice(1);
|
|
2305
|
+
if (!j) return;
|
|
2348
2306
|
f("executing");
|
|
2349
|
-
const
|
|
2350
|
-
|
|
2351
|
-
id:
|
|
2352
|
-
name:
|
|
2353
|
-
args: { args:
|
|
2354
|
-
}),
|
|
2307
|
+
const F = `quick-${Date.now()}`;
|
|
2308
|
+
Y({
|
|
2309
|
+
id: F,
|
|
2310
|
+
name: j,
|
|
2311
|
+
args: { args: X }
|
|
2312
|
+
}), N(F, "running");
|
|
2355
2313
|
try {
|
|
2356
2314
|
if (r) {
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2315
|
+
const D = await r(j, { args: X });
|
|
2316
|
+
N(F, "success", String(D));
|
|
2359
2317
|
} else
|
|
2360
|
-
|
|
2361
|
-
|
|
2318
|
+
N(F, "success", "Tool executed (no handler)");
|
|
2319
|
+
v((D) => [
|
|
2362
2320
|
{
|
|
2363
2321
|
query: m,
|
|
2364
2322
|
timestamp: Date.now(),
|
|
2365
|
-
toolsExecuted: [
|
|
2323
|
+
toolsExecuted: [j],
|
|
2366
2324
|
success: !0
|
|
2367
2325
|
},
|
|
2368
|
-
...
|
|
2369
|
-
]), f("complete"),
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2372
|
-
} catch (
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2326
|
+
...D.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
2327
|
+
]), f("complete"), z(`Executed: ${j}`);
|
|
2328
|
+
const J = t.autoCloseDelay ?? 1e3;
|
|
2329
|
+
J > 0 && setTimeout(() => M(), J);
|
|
2330
|
+
} catch (J) {
|
|
2331
|
+
const D = J instanceof Error ? J.message : "Unknown error";
|
|
2332
|
+
N(F, "error", void 0, D), f("error"), z(`Error: ${D}`);
|
|
2375
2333
|
}
|
|
2376
2334
|
},
|
|
2377
|
-
[r,
|
|
2378
|
-
),
|
|
2335
|
+
[r, Y, N, t.autoCloseDelay, t.maxHistoryEntries, M]
|
|
2336
|
+
), re = w(() => {
|
|
2379
2337
|
if (c.trim()) {
|
|
2380
|
-
if (
|
|
2381
|
-
|
|
2338
|
+
if (p === "quick-command") {
|
|
2339
|
+
Q(c);
|
|
2382
2340
|
return;
|
|
2383
2341
|
}
|
|
2384
2342
|
if (!i) {
|
|
2385
|
-
|
|
2343
|
+
z("Agent unavailable. Use quick commands (start with /)."), f("error");
|
|
2386
2344
|
return;
|
|
2387
2345
|
}
|
|
2388
2346
|
f("thinking"), o == null || o.emit({
|
|
2389
2347
|
type: "agent-command-palette:submit",
|
|
2390
2348
|
source: "agent-command-palette",
|
|
2391
2349
|
timestamp: Date.now(),
|
|
2392
|
-
payload: { query: c, mode:
|
|
2393
|
-
}),
|
|
2350
|
+
payload: { query: c, mode: p }
|
|
2351
|
+
}), v((m) => [
|
|
2394
2352
|
{
|
|
2395
2353
|
query: c,
|
|
2396
2354
|
timestamp: Date.now(),
|
|
@@ -2400,64 +2358,64 @@ function yt({
|
|
|
2400
2358
|
...m.slice(0, (t.maxHistoryEntries || 50) - 1)
|
|
2401
2359
|
]);
|
|
2402
2360
|
}
|
|
2403
|
-
}, [c,
|
|
2404
|
-
if (
|
|
2405
|
-
const m =
|
|
2406
|
-
|
|
2407
|
-
}, [
|
|
2408
|
-
if (
|
|
2409
|
-
|
|
2361
|
+
}, [c, p, Q, o, t.maxHistoryEntries, i]), de = w(() => {
|
|
2362
|
+
if (A.length === 0) return;
|
|
2363
|
+
const m = S < A.length - 1 ? S + 1 : S;
|
|
2364
|
+
k(m), A[m] && (x(A[m].query), h(A[m].query.startsWith("/") ? "quick-command" : "natural"));
|
|
2365
|
+
}, [A, S]), ue = w(() => {
|
|
2366
|
+
if (S <= 0) {
|
|
2367
|
+
k(-1), x(""), h("natural");
|
|
2410
2368
|
return;
|
|
2411
2369
|
}
|
|
2412
|
-
const m =
|
|
2413
|
-
|
|
2414
|
-
}, [
|
|
2370
|
+
const m = S - 1;
|
|
2371
|
+
k(m), A[m] && (x(A[m].query), h(A[m].query.startsWith("/") ? "quick-command" : "natural"));
|
|
2372
|
+
}, [A, S]), ae = w(
|
|
2415
2373
|
(m) => {
|
|
2416
2374
|
const {
|
|
2417
|
-
key:
|
|
2418
|
-
altKey:
|
|
2419
|
-
ctrlKey:
|
|
2420
|
-
metaKey:
|
|
2421
|
-
shiftKey:
|
|
2422
|
-
} = e,
|
|
2423
|
-
if ((
|
|
2424
|
-
const
|
|
2425
|
-
if (!
|
|
2375
|
+
key: R = "p",
|
|
2376
|
+
altKey: j = !0,
|
|
2377
|
+
ctrlKey: X = !1,
|
|
2378
|
+
metaKey: F = !1,
|
|
2379
|
+
shiftKey: J = !1
|
|
2380
|
+
} = e, D = m.altKey === j && m.ctrlKey === X && m.metaKey === F && m.shiftKey === J;
|
|
2381
|
+
if ((j ? m.code === `Key${R.toUpperCase()}` : m.key.toLowerCase() === R.toLowerCase()) && D) {
|
|
2382
|
+
const ie = m.target;
|
|
2383
|
+
if (!ie.closest("[data-agent-command-palette-input]") && (ie.tagName === "INPUT" || ie.tagName === "TEXTAREA" || ie.isContentEditable))
|
|
2426
2384
|
return;
|
|
2427
|
-
m.preventDefault(),
|
|
2385
|
+
m.preventDefault(), oe();
|
|
2428
2386
|
}
|
|
2429
2387
|
},
|
|
2430
|
-
[e,
|
|
2388
|
+
[e, oe]
|
|
2431
2389
|
);
|
|
2432
|
-
|
|
2433
|
-
const
|
|
2434
|
-
|
|
2435
|
-
(m) => m <
|
|
2390
|
+
E(() => (window.addEventListener("keydown", ae), () => window.removeEventListener("keydown", ae)), [ae]);
|
|
2391
|
+
const Le = w(() => {
|
|
2392
|
+
G && $(
|
|
2393
|
+
(m) => m < K - 1 ? m + 1 : 0
|
|
2436
2394
|
);
|
|
2437
|
-
}, [
|
|
2438
|
-
|
|
2439
|
-
(m) => m > 0 ? m - 1 :
|
|
2395
|
+
}, [G, K]), We = w(() => {
|
|
2396
|
+
G && $(
|
|
2397
|
+
(m) => m > 0 ? m - 1 : K - 1
|
|
2440
2398
|
);
|
|
2441
|
-
}, [
|
|
2442
|
-
var
|
|
2443
|
-
if (!
|
|
2444
|
-
if (
|
|
2445
|
-
const
|
|
2446
|
-
if (!
|
|
2447
|
-
let
|
|
2448
|
-
for (const
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
const
|
|
2452
|
-
((
|
|
2399
|
+
}, [G, K]), _e = w((m = !1) => {
|
|
2400
|
+
var F;
|
|
2401
|
+
if (!G || W < 0) return;
|
|
2402
|
+
if (T.isEnteringArgs) {
|
|
2403
|
+
const J = B[W];
|
|
2404
|
+
if (!J) return;
|
|
2405
|
+
let D = `/${T.commandName}`;
|
|
2406
|
+
for (const fe of T.enteredArgs)
|
|
2407
|
+
D += ` ${fe}`;
|
|
2408
|
+
D += ` ${J.option}`;
|
|
2409
|
+
const Z = T.currentArgIndex + 1;
|
|
2410
|
+
((F = T.command) == null ? void 0 : F.args) && Z < T.command.args.length ? (D += " ", x(D), $(-1)) : (x(D), $(-1), m && setTimeout(() => Q(D), 0));
|
|
2453
2411
|
return;
|
|
2454
2412
|
}
|
|
2455
|
-
const
|
|
2456
|
-
if (!
|
|
2457
|
-
const
|
|
2458
|
-
let
|
|
2459
|
-
|
|
2460
|
-
}, [
|
|
2413
|
+
const R = P[W];
|
|
2414
|
+
if (!R) return;
|
|
2415
|
+
const j = R.command;
|
|
2416
|
+
let X = `/${j.name}`;
|
|
2417
|
+
j.args && j.args.length > 0 ? (X += " ", x(X), $(-1)) : (x(X), $(-1), m && setTimeout(() => Q(X), 0));
|
|
2418
|
+
}, [G, W, T, B, P, Q]);
|
|
2461
2419
|
return {
|
|
2462
2420
|
// Agent availability
|
|
2463
2421
|
agentAvailable: i,
|
|
@@ -2465,44 +2423,45 @@ function yt({
|
|
|
2465
2423
|
isOpen: n,
|
|
2466
2424
|
open: H,
|
|
2467
2425
|
close: M,
|
|
2468
|
-
toggle:
|
|
2426
|
+
toggle: oe,
|
|
2469
2427
|
// Input
|
|
2470
2428
|
query: c,
|
|
2471
|
-
setQuery:
|
|
2472
|
-
mode:
|
|
2429
|
+
setQuery: te,
|
|
2430
|
+
mode: p,
|
|
2473
2431
|
// Execution
|
|
2474
2432
|
status: C,
|
|
2475
2433
|
setStatus: f,
|
|
2476
2434
|
pendingTools: d,
|
|
2477
|
-
completedTools:
|
|
2478
|
-
agentResponse:
|
|
2479
|
-
setAgentResponse:
|
|
2480
|
-
submit:
|
|
2481
|
-
executeQuickCommand:
|
|
2435
|
+
completedTools: y,
|
|
2436
|
+
agentResponse: q,
|
|
2437
|
+
setAgentResponse: z,
|
|
2438
|
+
submit: re,
|
|
2439
|
+
executeQuickCommand: Q,
|
|
2482
2440
|
// Tool management (for external AI integration)
|
|
2483
|
-
addPendingTool:
|
|
2484
|
-
updateToolStatus:
|
|
2441
|
+
addPendingTool: Y,
|
|
2442
|
+
updateToolStatus: N,
|
|
2485
2443
|
// History
|
|
2486
|
-
history:
|
|
2444
|
+
history: A,
|
|
2487
2445
|
historyPrevious: de,
|
|
2488
2446
|
historyNext: ue,
|
|
2489
2447
|
// Suggestions
|
|
2490
|
-
suggestions:
|
|
2448
|
+
suggestions: I,
|
|
2491
2449
|
// Actions
|
|
2492
|
-
clear:
|
|
2450
|
+
clear: V,
|
|
2493
2451
|
// Quick command autocomplete
|
|
2494
2452
|
quickCommandMatches: P,
|
|
2495
|
-
argumentOptionMatches:
|
|
2496
|
-
parsedQuery:
|
|
2497
|
-
currentArgDef:
|
|
2498
|
-
selectedAutocompleteIndex:
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2453
|
+
argumentOptionMatches: B,
|
|
2454
|
+
parsedQuery: T,
|
|
2455
|
+
currentArgDef: se,
|
|
2456
|
+
selectedAutocompleteIndex: W,
|
|
2457
|
+
autocompleteItemCount: K,
|
|
2458
|
+
autocompleteNext: Le,
|
|
2459
|
+
autocompletePrevious: We,
|
|
2460
|
+
autocompleteAccept: _e,
|
|
2461
|
+
showAutocomplete: G
|
|
2503
2462
|
};
|
|
2504
2463
|
}
|
|
2505
|
-
const
|
|
2464
|
+
const Se = {
|
|
2506
2465
|
name: "get_visible_panels",
|
|
2507
2466
|
description: "Get the current visibility state of all panel slots (left, middle, right). Returns which panels are active in each slot and whether side panels are collapsed.",
|
|
2508
2467
|
inputs: {
|
|
@@ -2571,7 +2530,7 @@ const we = {
|
|
|
2571
2530
|
call_template_type: "panel_event",
|
|
2572
2531
|
event_type: "panel:get-visibility"
|
|
2573
2532
|
}
|
|
2574
|
-
},
|
|
2533
|
+
}, ve = {
|
|
2575
2534
|
name: "get_panel_state",
|
|
2576
2535
|
description: "Get the current state of a specific panel. Returns panel-specific state data if the panel supports state queries.",
|
|
2577
2536
|
inputs: {
|
|
@@ -2603,7 +2562,7 @@ const we = {
|
|
|
2603
2562
|
call_template_type: "panel_event",
|
|
2604
2563
|
event_type: "panel:get-state"
|
|
2605
2564
|
}
|
|
2606
|
-
},
|
|
2565
|
+
}, Te = {
|
|
2607
2566
|
name: "list_panels_with_state",
|
|
2608
2567
|
description: "Get a list of all panels that support state queries. Use this to discover which panels can be queried with get_panel_state.",
|
|
2609
2568
|
inputs: {
|
|
@@ -2663,7 +2622,7 @@ const we = {
|
|
|
2663
2622
|
call_template_type: "panel_event",
|
|
2664
2623
|
event_type: "panel:toggle"
|
|
2665
2624
|
}
|
|
2666
|
-
},
|
|
2625
|
+
}, Ie = {
|
|
2667
2626
|
name: "collapse_all_panels",
|
|
2668
2627
|
description: "Collapse both left and right panels to maximize the main content area. Useful for focus mode.",
|
|
2669
2628
|
inputs: {
|
|
@@ -2683,7 +2642,7 @@ const we = {
|
|
|
2683
2642
|
call_template_type: "panel_event",
|
|
2684
2643
|
event_type: "panel:collapse-all"
|
|
2685
2644
|
}
|
|
2686
|
-
},
|
|
2645
|
+
}, $e = {
|
|
2687
2646
|
name: "expand_all_panels",
|
|
2688
2647
|
description: "Expand both left and right panels to show all content. Restores the default layout.",
|
|
2689
2648
|
inputs: {
|
|
@@ -2734,7 +2693,7 @@ const we = {
|
|
|
2734
2693
|
call_template_type: "panel_event",
|
|
2735
2694
|
event_type: "panel:switch"
|
|
2736
2695
|
}
|
|
2737
|
-
},
|
|
2696
|
+
}, ze = {
|
|
2738
2697
|
name: "focus_panel",
|
|
2739
2698
|
description: "Set focus to a specific panel slot for keyboard navigation.",
|
|
2740
2699
|
inputs: {
|
|
@@ -2760,7 +2719,7 @@ const we = {
|
|
|
2760
2719
|
call_template_type: "panel_event",
|
|
2761
2720
|
event_type: "panel:focus"
|
|
2762
2721
|
}
|
|
2763
|
-
},
|
|
2722
|
+
}, Pe = {
|
|
2764
2723
|
name: "reset_layout",
|
|
2765
2724
|
description: "Reset panel sizes to the default layout configuration.",
|
|
2766
2725
|
inputs: {
|
|
@@ -2780,36 +2739,36 @@ const we = {
|
|
|
2780
2739
|
call_template_type: "panel_event",
|
|
2781
2740
|
event_type: "panel:reset-layout"
|
|
2782
2741
|
}
|
|
2783
|
-
},
|
|
2742
|
+
}, Qe = [
|
|
2784
2743
|
// State query tools
|
|
2785
|
-
we,
|
|
2786
2744
|
Se,
|
|
2787
2745
|
ve,
|
|
2746
|
+
Te,
|
|
2788
2747
|
// Layout action tools
|
|
2789
2748
|
Ce,
|
|
2790
|
-
Te,
|
|
2791
2749
|
Ie,
|
|
2792
|
-
Ae,
|
|
2793
2750
|
$e,
|
|
2794
|
-
|
|
2751
|
+
Ae,
|
|
2752
|
+
ze,
|
|
2753
|
+
Pe
|
|
2795
2754
|
], xt = [
|
|
2796
|
-
we,
|
|
2797
2755
|
Se,
|
|
2798
|
-
ve
|
|
2756
|
+
ve,
|
|
2757
|
+
Te
|
|
2799
2758
|
], kt = [
|
|
2800
2759
|
Ce,
|
|
2801
|
-
Te,
|
|
2802
2760
|
Ie,
|
|
2803
|
-
Ae,
|
|
2804
2761
|
$e,
|
|
2805
|
-
|
|
2762
|
+
Ae,
|
|
2763
|
+
ze,
|
|
2764
|
+
Pe
|
|
2806
2765
|
], bt = {
|
|
2807
2766
|
id: "panel-layouts",
|
|
2808
2767
|
name: "Panel Layouts",
|
|
2809
2768
|
description: "Generic panel layout and state query operations",
|
|
2810
|
-
tools:
|
|
2769
|
+
tools: Qe
|
|
2811
2770
|
};
|
|
2812
|
-
function
|
|
2771
|
+
function Je(o) {
|
|
2813
2772
|
const e = {};
|
|
2814
2773
|
if (o.inputs.properties)
|
|
2815
2774
|
for (const [t, r] of Object.entries(o.inputs.properties)) {
|
|
@@ -2832,10 +2791,10 @@ function Qe(o) {
|
|
|
2832
2791
|
}
|
|
2833
2792
|
function wt(o) {
|
|
2834
2793
|
return {
|
|
2835
|
-
functionDeclarations: o.map(
|
|
2794
|
+
functionDeclarations: o.map(Je)
|
|
2836
2795
|
};
|
|
2837
2796
|
}
|
|
2838
|
-
function
|
|
2797
|
+
function Ue(o) {
|
|
2839
2798
|
return {
|
|
2840
2799
|
type: "function",
|
|
2841
2800
|
function: {
|
|
@@ -2846,9 +2805,9 @@ function Je(o) {
|
|
|
2846
2805
|
};
|
|
2847
2806
|
}
|
|
2848
2807
|
function St(o) {
|
|
2849
|
-
return o.map(
|
|
2808
|
+
return o.map(Ue);
|
|
2850
2809
|
}
|
|
2851
|
-
function
|
|
2810
|
+
function Ye(o) {
|
|
2852
2811
|
return {
|
|
2853
2812
|
name: o.name,
|
|
2854
2813
|
description: o.description,
|
|
@@ -2856,35 +2815,35 @@ function Ue(o) {
|
|
|
2856
2815
|
};
|
|
2857
2816
|
}
|
|
2858
2817
|
function vt(o) {
|
|
2859
|
-
return o.map(
|
|
2818
|
+
return o.map(Ye);
|
|
2860
2819
|
}
|
|
2861
|
-
function
|
|
2820
|
+
function Ge(o) {
|
|
2862
2821
|
return {
|
|
2863
2822
|
name: o.name,
|
|
2864
2823
|
description: o.description,
|
|
2865
2824
|
parameters: o.inputs
|
|
2866
2825
|
};
|
|
2867
2826
|
}
|
|
2868
|
-
function
|
|
2869
|
-
return o.map(
|
|
2827
|
+
function Tt(o) {
|
|
2828
|
+
return o.map(Ge);
|
|
2870
2829
|
}
|
|
2871
|
-
function
|
|
2830
|
+
function Ct(o, e = {}) {
|
|
2872
2831
|
const {
|
|
2873
2832
|
header: t = "You have access to the following tools:",
|
|
2874
2833
|
includeParameters: r = !0
|
|
2875
2834
|
} = e, s = o.map((i) => {
|
|
2876
|
-
let
|
|
2835
|
+
let a = `- ${i.name}: ${i.description}`;
|
|
2877
2836
|
if (r && i.inputs.properties) {
|
|
2878
2837
|
const n = Object.entries(i.inputs.properties).map(([g, c]) => {
|
|
2879
2838
|
var h;
|
|
2880
|
-
const
|
|
2881
|
-
return ` - ${g}: ${
|
|
2839
|
+
const x = c, p = (h = i.inputs.required) != null && h.includes(g) ? " (required)" : "";
|
|
2840
|
+
return ` - ${g}: ${x.description || x.type}${p}`;
|
|
2882
2841
|
}).join(`
|
|
2883
2842
|
`);
|
|
2884
|
-
n && (
|
|
2843
|
+
n && (a += `
|
|
2885
2844
|
${n}`);
|
|
2886
2845
|
}
|
|
2887
|
-
return
|
|
2846
|
+
return a;
|
|
2888
2847
|
});
|
|
2889
2848
|
return `${t}
|
|
2890
2849
|
|
|
@@ -2892,7 +2851,7 @@ ${s.join(`
|
|
|
2892
2851
|
|
|
2893
2852
|
`)}`;
|
|
2894
2853
|
}
|
|
2895
|
-
const
|
|
2854
|
+
const Xe = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
2896
2855
|
"svg",
|
|
2897
2856
|
{
|
|
2898
2857
|
width: o,
|
|
@@ -2904,11 +2863,11 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
2904
2863
|
strokeLinecap: "round",
|
|
2905
2864
|
strokeLinejoin: "round",
|
|
2906
2865
|
children: [
|
|
2907
|
-
/* @__PURE__ */
|
|
2908
|
-
/* @__PURE__ */
|
|
2866
|
+
/* @__PURE__ */ l("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
2867
|
+
/* @__PURE__ */ l("path", { d: "M9 3v18" })
|
|
2909
2868
|
]
|
|
2910
2869
|
}
|
|
2911
|
-
),
|
|
2870
|
+
), Ze = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
2912
2871
|
"svg",
|
|
2913
2872
|
{
|
|
2914
2873
|
width: o,
|
|
@@ -2920,12 +2879,12 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
2920
2879
|
strokeLinecap: "round",
|
|
2921
2880
|
strokeLinejoin: "round",
|
|
2922
2881
|
children: [
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
2882
|
+
/* @__PURE__ */ l("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
2883
|
+
/* @__PURE__ */ l("path", { d: "M9 3v18" }),
|
|
2884
|
+
/* @__PURE__ */ l("path", { d: "m16 15-3-3 3-3" })
|
|
2926
2885
|
]
|
|
2927
2886
|
}
|
|
2928
|
-
),
|
|
2887
|
+
), et = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
2929
2888
|
"svg",
|
|
2930
2889
|
{
|
|
2931
2890
|
width: o,
|
|
@@ -2937,11 +2896,11 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
2937
2896
|
strokeLinecap: "round",
|
|
2938
2897
|
strokeLinejoin: "round",
|
|
2939
2898
|
children: [
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ l("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
2900
|
+
/* @__PURE__ */ l("path", { d: "M15 3v18" })
|
|
2942
2901
|
]
|
|
2943
2902
|
}
|
|
2944
|
-
),
|
|
2903
|
+
), tt = ({ size: o = 18 }) => /* @__PURE__ */ b(
|
|
2945
2904
|
"svg",
|
|
2946
2905
|
{
|
|
2947
2906
|
width: o,
|
|
@@ -2953,27 +2912,27 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
2953
2912
|
strokeLinecap: "round",
|
|
2954
2913
|
strokeLinejoin: "round",
|
|
2955
2914
|
children: [
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ l("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
2916
|
+
/* @__PURE__ */ l("path", { d: "M15 3v18" }),
|
|
2917
|
+
/* @__PURE__ */ l("path", { d: "m8 9 3 3-3 3" })
|
|
2959
2918
|
]
|
|
2960
2919
|
}
|
|
2961
|
-
),
|
|
2920
|
+
), me = ({
|
|
2962
2921
|
isCollapsed: o,
|
|
2963
2922
|
onToggle: e,
|
|
2964
2923
|
side: t = "left",
|
|
2965
2924
|
iconSize: r = 18,
|
|
2966
2925
|
style: s,
|
|
2967
2926
|
shortcutHint: i = "Cmd/Ctrl+B",
|
|
2968
|
-
title:
|
|
2927
|
+
title: a,
|
|
2969
2928
|
className: n
|
|
2970
2929
|
}) => {
|
|
2971
|
-
const { theme: g } =
|
|
2972
|
-
return /* @__PURE__ */
|
|
2930
|
+
const { theme: g } = ee(), c = () => t === "right" ? o ? /* @__PURE__ */ l(et, { size: r }) : /* @__PURE__ */ l(tt, { size: r }) : o ? /* @__PURE__ */ l(Xe, { size: r }) : /* @__PURE__ */ l(Ze, { size: r });
|
|
2931
|
+
return /* @__PURE__ */ l(
|
|
2973
2932
|
"button",
|
|
2974
2933
|
{
|
|
2975
2934
|
onClick: e,
|
|
2976
|
-
title:
|
|
2935
|
+
title: a ?? `${o ? "Show" : "Hide"} ${t === "right" ? "Right Panel" : "Sidebar"}${i ? ` (${i})` : ""}`,
|
|
2977
2936
|
className: n,
|
|
2978
2937
|
style: {
|
|
2979
2938
|
background: "transparent",
|
|
@@ -2990,16 +2949,16 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
2990
2949
|
height: "32px",
|
|
2991
2950
|
...s
|
|
2992
2951
|
},
|
|
2993
|
-
onMouseEnter: (
|
|
2994
|
-
|
|
2952
|
+
onMouseEnter: (p) => {
|
|
2953
|
+
p.currentTarget.style.backgroundColor = g.colors.backgroundTertiary, p.currentTarget.style.color = g.colors.primary;
|
|
2995
2954
|
},
|
|
2996
|
-
onMouseLeave: (
|
|
2997
|
-
|
|
2955
|
+
onMouseLeave: (p) => {
|
|
2956
|
+
p.currentTarget.style.backgroundColor = "transparent", p.currentTarget.style.color = o ? g.colors.textSecondary : g.colors.primary;
|
|
2998
2957
|
},
|
|
2999
2958
|
children: c()
|
|
3000
2959
|
}
|
|
3001
2960
|
);
|
|
3002
|
-
},
|
|
2961
|
+
}, ot = ({ size: o = 14 }) => /* @__PURE__ */ b(
|
|
3003
2962
|
"svg",
|
|
3004
2963
|
{
|
|
3005
2964
|
width: o,
|
|
@@ -3011,13 +2970,13 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3011
2970
|
strokeLinecap: "round",
|
|
3012
2971
|
strokeLinejoin: "round",
|
|
3013
2972
|
children: [
|
|
3014
|
-
/* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ l("path", { d: "M8 3 4 7l4 4" }),
|
|
2974
|
+
/* @__PURE__ */ l("path", { d: "M4 7h16" }),
|
|
2975
|
+
/* @__PURE__ */ l("path", { d: "m16 21 4-4-4-4" }),
|
|
2976
|
+
/* @__PURE__ */ l("path", { d: "M20 17H4" })
|
|
3018
2977
|
]
|
|
3019
2978
|
}
|
|
3020
|
-
),
|
|
2979
|
+
), rt = ({ size: o = 14 }) => /* @__PURE__ */ b(
|
|
3021
2980
|
"svg",
|
|
3022
2981
|
{
|
|
3023
2982
|
width: o,
|
|
@@ -3029,13 +2988,13 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3029
2988
|
strokeLinecap: "round",
|
|
3030
2989
|
strokeLinejoin: "round",
|
|
3031
2990
|
children: [
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3035
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ l("path", { d: "m16 3 4 4-4 4" }),
|
|
2992
|
+
/* @__PURE__ */ l("path", { d: "M20 7H4" }),
|
|
2993
|
+
/* @__PURE__ */ l("path", { d: "m8 21-4-4 4-4" }),
|
|
2994
|
+
/* @__PURE__ */ l("path", { d: "M4 17h16" })
|
|
3036
2995
|
]
|
|
3037
2996
|
}
|
|
3038
|
-
),
|
|
2997
|
+
), ye = ({
|
|
3039
2998
|
onSwitch: o,
|
|
3040
2999
|
variant: e = "left-middle",
|
|
3041
3000
|
iconSize: t = 14,
|
|
@@ -3043,8 +3002,8 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3043
3002
|
title: s,
|
|
3044
3003
|
className: i
|
|
3045
3004
|
}) => {
|
|
3046
|
-
const { theme:
|
|
3047
|
-
return /* @__PURE__ */
|
|
3005
|
+
const { theme: a } = ee(), n = () => e === "left-middle" ? "Switch left and middle panels" : "Switch right and middle panels", g = e === "left-middle" ? ot : rt;
|
|
3006
|
+
return /* @__PURE__ */ l(
|
|
3048
3007
|
"button",
|
|
3049
3008
|
{
|
|
3050
3009
|
onClick: o,
|
|
@@ -3053,7 +3012,7 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3053
3012
|
style: {
|
|
3054
3013
|
background: "transparent",
|
|
3055
3014
|
border: "none",
|
|
3056
|
-
color:
|
|
3015
|
+
color: a.colors.textSecondary,
|
|
3057
3016
|
cursor: "pointer",
|
|
3058
3017
|
padding: "6px",
|
|
3059
3018
|
borderRadius: "4px",
|
|
@@ -3066,15 +3025,15 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3066
3025
|
...r
|
|
3067
3026
|
},
|
|
3068
3027
|
onMouseEnter: (c) => {
|
|
3069
|
-
c.currentTarget.style.backgroundColor =
|
|
3028
|
+
c.currentTarget.style.backgroundColor = a.colors.backgroundTertiary, c.currentTarget.style.color = a.colors.text;
|
|
3070
3029
|
},
|
|
3071
3030
|
onMouseLeave: (c) => {
|
|
3072
|
-
c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.color =
|
|
3031
|
+
c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.color = a.colors.textSecondary;
|
|
3073
3032
|
},
|
|
3074
|
-
children: /* @__PURE__ */
|
|
3033
|
+
children: /* @__PURE__ */ l(g, { size: t })
|
|
3075
3034
|
}
|
|
3076
3035
|
);
|
|
3077
|
-
},
|
|
3036
|
+
}, nt = ({ size: o = 14 }) => /* @__PURE__ */ b(
|
|
3078
3037
|
"svg",
|
|
3079
3038
|
{
|
|
3080
3039
|
width: o,
|
|
@@ -3086,20 +3045,20 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3086
3045
|
strokeLinecap: "round",
|
|
3087
3046
|
strokeLinejoin: "round",
|
|
3088
3047
|
children: [
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3048
|
+
/* @__PURE__ */ l("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
3049
|
+
/* @__PURE__ */ l("path", { d: "M3 9h18" }),
|
|
3050
|
+
/* @__PURE__ */ l("path", { d: "M9 21V9" })
|
|
3092
3051
|
]
|
|
3093
3052
|
}
|
|
3094
|
-
),
|
|
3053
|
+
), st = ({
|
|
3095
3054
|
onConfigure: o,
|
|
3096
3055
|
iconSize: e = 14,
|
|
3097
3056
|
style: t,
|
|
3098
3057
|
title: r = "Configure panel layout",
|
|
3099
3058
|
className: s
|
|
3100
3059
|
}) => {
|
|
3101
|
-
const { theme: i } =
|
|
3102
|
-
return /* @__PURE__ */
|
|
3060
|
+
const { theme: i } = ee();
|
|
3061
|
+
return /* @__PURE__ */ l(
|
|
3103
3062
|
"button",
|
|
3104
3063
|
{
|
|
3105
3064
|
onClick: o,
|
|
@@ -3120,13 +3079,13 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3120
3079
|
height: "32px",
|
|
3121
3080
|
...t
|
|
3122
3081
|
},
|
|
3123
|
-
onMouseEnter: (
|
|
3124
|
-
|
|
3082
|
+
onMouseEnter: (a) => {
|
|
3083
|
+
a.currentTarget.style.backgroundColor = i.colors.backgroundTertiary, a.currentTarget.style.color = i.colors.text;
|
|
3125
3084
|
},
|
|
3126
|
-
onMouseLeave: (
|
|
3127
|
-
|
|
3085
|
+
onMouseLeave: (a) => {
|
|
3086
|
+
a.currentTarget.style.backgroundColor = "transparent", a.currentTarget.style.color = i.colors.textSecondary;
|
|
3128
3087
|
},
|
|
3129
|
-
children: /* @__PURE__ */
|
|
3088
|
+
children: /* @__PURE__ */ l(nt, { size: e })
|
|
3130
3089
|
}
|
|
3131
3090
|
);
|
|
3132
3091
|
}, It = ({
|
|
@@ -3136,22 +3095,22 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3136
3095
|
rightSidebarCollapsed: r = !1,
|
|
3137
3096
|
onToggleRightSidebar: s,
|
|
3138
3097
|
showRightSidebarControl: i = !1,
|
|
3139
|
-
onSwitchLeftMiddlePanels:
|
|
3098
|
+
onSwitchLeftMiddlePanels: a,
|
|
3140
3099
|
showSwitchLeftMiddle: n = !1,
|
|
3141
3100
|
onSwitchRightMiddlePanels: g,
|
|
3142
3101
|
showSwitchRightMiddle: c = !1,
|
|
3143
|
-
onConfigurePanels:
|
|
3144
|
-
showConfigureButton:
|
|
3102
|
+
onConfigurePanels: x,
|
|
3103
|
+
showConfigureButton: p = !1,
|
|
3145
3104
|
gap: h = 4,
|
|
3146
3105
|
style: C,
|
|
3147
3106
|
className: f,
|
|
3148
3107
|
iconSize: d,
|
|
3149
|
-
leftCollapseButtonProps:
|
|
3150
|
-
rightCollapseButtonProps:
|
|
3151
|
-
leftMiddleSwitchButtonProps:
|
|
3152
|
-
rightMiddleSwitchButtonProps:
|
|
3153
|
-
configureButtonProps:
|
|
3154
|
-
}) => t && e || n &&
|
|
3108
|
+
leftCollapseButtonProps: u,
|
|
3109
|
+
rightCollapseButtonProps: y,
|
|
3110
|
+
leftMiddleSwitchButtonProps: L,
|
|
3111
|
+
rightMiddleSwitchButtonProps: q,
|
|
3112
|
+
configureButtonProps: z
|
|
3113
|
+
}) => t && e || n && a || p && x || c && g || i && s ? /* @__PURE__ */ b(
|
|
3155
3114
|
"div",
|
|
3156
3115
|
{
|
|
3157
3116
|
className: f,
|
|
@@ -3162,95 +3121,95 @@ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
|
|
|
3162
3121
|
...C
|
|
3163
3122
|
},
|
|
3164
3123
|
children: [
|
|
3165
|
-
t && e && /* @__PURE__ */
|
|
3166
|
-
|
|
3124
|
+
t && e && /* @__PURE__ */ l(
|
|
3125
|
+
me,
|
|
3167
3126
|
{
|
|
3168
3127
|
isCollapsed: o,
|
|
3169
3128
|
onToggle: e,
|
|
3170
3129
|
side: "left",
|
|
3171
3130
|
iconSize: d ?? 18,
|
|
3172
|
-
...
|
|
3131
|
+
...u
|
|
3173
3132
|
}
|
|
3174
3133
|
),
|
|
3175
|
-
n &&
|
|
3176
|
-
|
|
3134
|
+
n && a && /* @__PURE__ */ l(
|
|
3135
|
+
ye,
|
|
3177
3136
|
{
|
|
3178
|
-
onSwitch:
|
|
3137
|
+
onSwitch: a,
|
|
3179
3138
|
variant: "left-middle",
|
|
3180
3139
|
iconSize: d ?? 14,
|
|
3181
|
-
...
|
|
3140
|
+
...L
|
|
3182
3141
|
}
|
|
3183
3142
|
),
|
|
3184
|
-
|
|
3185
|
-
|
|
3143
|
+
p && x && /* @__PURE__ */ l(
|
|
3144
|
+
st,
|
|
3186
3145
|
{
|
|
3187
|
-
onConfigure:
|
|
3146
|
+
onConfigure: x,
|
|
3188
3147
|
iconSize: d ?? 14,
|
|
3189
|
-
...
|
|
3148
|
+
...z
|
|
3190
3149
|
}
|
|
3191
3150
|
),
|
|
3192
|
-
c && g && /* @__PURE__ */
|
|
3193
|
-
|
|
3151
|
+
c && g && /* @__PURE__ */ l(
|
|
3152
|
+
ye,
|
|
3194
3153
|
{
|
|
3195
3154
|
onSwitch: g,
|
|
3196
3155
|
variant: "right-middle",
|
|
3197
3156
|
iconSize: d ?? 14,
|
|
3198
|
-
...
|
|
3157
|
+
...q
|
|
3199
3158
|
}
|
|
3200
3159
|
),
|
|
3201
|
-
i && s && /* @__PURE__ */
|
|
3202
|
-
|
|
3160
|
+
i && s && /* @__PURE__ */ l(
|
|
3161
|
+
me,
|
|
3203
3162
|
{
|
|
3204
3163
|
isCollapsed: r,
|
|
3205
3164
|
onToggle: s,
|
|
3206
3165
|
side: "right",
|
|
3207
3166
|
iconSize: d ?? 18,
|
|
3208
|
-
...
|
|
3167
|
+
...y
|
|
3209
3168
|
}
|
|
3210
3169
|
)
|
|
3211
3170
|
]
|
|
3212
3171
|
}
|
|
3213
3172
|
) : null;
|
|
3214
3173
|
export {
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3174
|
+
xe as AgentCommandInput,
|
|
3175
|
+
Oe as AgentCommandPalette,
|
|
3176
|
+
be as AgentResponseDisplay,
|
|
3218
3177
|
zt as EditableConfigurablePanelLayout,
|
|
3219
3178
|
ht as FocusIndicator,
|
|
3220
3179
|
mt as FocusModeOverlay,
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3180
|
+
De as LocalStoragePersistenceAdapter,
|
|
3181
|
+
Me as LocalStorageWorkspaceAdapter,
|
|
3182
|
+
me as PanelCollapseButton,
|
|
3183
|
+
st as PanelConfigureButton,
|
|
3225
3184
|
It as PanelControls,
|
|
3226
|
-
|
|
3227
|
-
|
|
3185
|
+
ye as PanelSwitchButton,
|
|
3186
|
+
we as QuickCommandAutocomplete,
|
|
3228
3187
|
Pt as ResponsiveConfigurablePanelLayout,
|
|
3229
|
-
|
|
3188
|
+
ke as ToolExecutionList,
|
|
3230
3189
|
O as WorkspaceLayoutService,
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3190
|
+
Ie as collapseAllPanelsTool,
|
|
3191
|
+
$e as expandAllPanelsTool,
|
|
3192
|
+
ze as focusPanelTool,
|
|
3234
3193
|
pe as fuzzyMatch,
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3194
|
+
Ct as generateToolsSystemPrompt,
|
|
3195
|
+
ve as getPanelStateTool,
|
|
3196
|
+
Se as getVisiblePanelsTool,
|
|
3238
3197
|
kt as layoutActionTools,
|
|
3239
|
-
|
|
3198
|
+
Qe as layoutTools,
|
|
3240
3199
|
bt as layoutToolsMetadata,
|
|
3241
|
-
|
|
3200
|
+
Te as listPanelsWithStateTool,
|
|
3242
3201
|
Lt as mapThemeToPanelVars,
|
|
3243
3202
|
Wt as mapThemeToTabVars,
|
|
3244
|
-
|
|
3245
|
-
|
|
3203
|
+
Pe as resetLayoutTool,
|
|
3204
|
+
Ve as searchQuickCommands,
|
|
3246
3205
|
xt as stateQueryTools,
|
|
3247
3206
|
Ae as switchPanelTool,
|
|
3248
3207
|
Ce as togglePanelTool,
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3208
|
+
Ge as toolToAIFunction,
|
|
3209
|
+
Ye as toolToAnthropicFormat,
|
|
3210
|
+
Je as toolToGeminiFunction,
|
|
3211
|
+
Ue as toolToOpenAIFunction,
|
|
3212
|
+
Tt as toolsToAIFunctions,
|
|
3254
3213
|
vt as toolsToAnthropicFormat,
|
|
3255
3214
|
wt as toolsToGeminiFormat,
|
|
3256
3215
|
St as toolsToOpenAIFormat,
|