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