@principal-ade/panel-layouts 0.3.5 → 0.3.7

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