@principal-ade/panel-layouts 0.3.6 → 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,10 +1,10 @@
1
- import './index.css';var Le = Object.defineProperty;
2
- var Ee = (o, e, t) => e in o ? Le(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
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
3
  var le = (o, e, t) => Ee(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { EditableConfigurablePanelLayout as zt, ResponsiveConfigurablePanelLayout as Pt, mapThemeToPanelVars as Wt, mapThemeToTabVars as _t } from "@principal-ade/panels";
5
- import { useState as _, useRef as H, useEffect as R, useCallback as S, useMemo as oe } from "react";
6
- import { jsx as a, jsxs as k, Fragment as ce } from "react/jsx-runtime";
7
- import { useTheme as Q } from "@principal-ade/industry-theme";
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
10
  le(this, "storageKey", "panel-layouts");
@@ -34,40 +34,40 @@ function dt(o) {
34
34
  defaultSizes: t,
35
35
  panelType: r,
36
36
  adapter: s = new Re()
37
- } = o, [i, l] = _(t), [n, f] = _(o.collapsed), c = H(o.collapsed), y = H({}), g = H(null), h = H(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
40
  const w = await s.load(e);
41
- w != null && w.sizes && (l(w.sizes), v(w.sizes));
41
+ w != null && w.sizes && (l(w.sizes), C(w.sizes));
42
42
  })();
43
43
  }, [e]);
44
- const v = S(
45
- (b) => {
46
- "left" in b && b.left > 0 && (y.current.left = b.left), "middle" in b && b.middle > 0 && (y.current.middle = b.middle), "right" in b && b.right > 0 && (y.current.right = b.right);
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 = S(
50
- (b) => {
51
- const w = y.current[b];
49
+ ), f = b(
50
+ (S) => {
51
+ const w = k.current[S];
52
52
  if (w && w > 0)
53
53
  return w;
54
- if (b === "left" && "left" in t && t.left > 0)
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 = H(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) && (l(t), v(t), d.current = t);
63
- }, [t, v]), R(() => {
64
- const b = o.collapsed.left !== c.current.left, w = "right" in o.collapsed && "right" in c.current && o.collapsed.right !== c.current.right;
65
- (b || w) && (f(o.collapsed), c.current = { ...o.collapsed });
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 = S(
68
- async (b) => {
67
+ const p = b(
68
+ async (S) => {
69
69
  try {
70
- await s.save(e, { sizes: b });
70
+ await s.save(e, { sizes: S });
71
71
  } catch (w) {
72
72
  console.error(
73
73
  `Failed to save panel preferences for ${e}:`,
@@ -76,68 +76,68 @@ function dt(o) {
76
76
  }
77
77
  },
78
78
  [e, s]
79
- ), C = S(
80
- (b) => {
81
- const w = { ...b };
79
+ ), T = b(
80
+ (S) => {
81
+ const w = { ...S };
82
82
  let x = !0;
83
- if ("left" in b) {
84
- const T = !!(n != null && n.left), P = b.left;
85
- if (T) {
86
- const W = u("left");
87
- W !== void 0 && W > 0 ? w.left = W : x = !1;
88
- } else P === 0 && (x = !1);
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 T = !!(n != null && n.right), P = b.right;
92
- if (T) {
93
- const W = u("right");
94
- W !== void 0 && W > 0 ? w.right = W : x = !1;
95
- } else P === 0 && (x = !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 (l(w), v(w), g.current && (clearTimeout(g.current), g.current = null), !x) {
97
+ if (l(w), C(w), u.current && (clearTimeout(u.current), u.current = null), !x) {
98
98
  h.current = null;
99
99
  return;
100
100
  }
101
- h.current = w, g.current = setTimeout(() => {
102
- const T = h.current;
103
- T && (p(T), h.current = null), g.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
- v
111
+ C
112
112
  ]
113
113
  );
114
114
  R(() => () => {
115
- if (g.current) {
116
- const b = h.current;
117
- b && (p(b), h.current = null), clearTimeout(g.current), g.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 $ = S(async () => {
121
- }, []), z = S(async () => {
122
- }, []), I = S(async () => {
123
- }, []), L = S(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: C,
130
- handleLeftCollapseComplete: $,
131
- handleLeftExpandComplete: z,
129
+ handlePanelResize: T,
130
+ handleLeftCollapseComplete: W,
131
+ handleLeftExpandComplete: D,
132
132
  handleRightCollapseComplete: I,
133
- handleRightExpandComplete: L
133
+ handleRightExpandComplete: _
134
134
  } : {
135
135
  type: "two-panel",
136
136
  sizes: i,
137
137
  collapsed: n,
138
- handlePanelResize: C,
139
- handleLeftCollapseComplete: $,
140
- handleLeftExpandComplete: z
138
+ handlePanelResize: T,
139
+ handleLeftCollapseComplete: W,
140
+ handleLeftExpandComplete: D
141
141
  };
142
142
  }
143
143
  class De {
@@ -221,7 +221,7 @@ class De {
221
221
  }
222
222
  }
223
223
  }
224
- class N {
224
+ class O {
225
225
  /**
226
226
  * Configure a custom storage adapter (for Electron IPC or remote storage)
227
227
  */
@@ -610,141 +610,141 @@ class N {
610
610
  Object.keys(e).length;
611
611
  }
612
612
  }
613
- le(N, "adapter", new De());
613
+ le(O, "adapter", new De());
614
614
  function pt(o = {}) {
615
- const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s, i] = _(
615
+ const { repositoryKey: e, autoInitialize: t = !1, defaultWorkspaceId: r } = o, [s, i] = L(
616
616
  {}
617
- ), [l, n] = _(null), [f, c] = _(null), [y, g] = _(!0), [h, v] = _(null), u = S(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
- g(!0), v(null);
620
- const x = await N.getWorkspaceLayouts();
619
+ u(!0), C(null);
620
+ const x = await O.getWorkspaceLayouts();
621
621
  if (i(x), e) {
622
- let T = await N.getRepositoryState(e);
623
- if (!T && t) {
624
- const P = r || "project-management", W = await N.getWorkspaceLayout(P);
625
- W && (T = {
626
- workspaceId: P,
627
- sizes: W.defaultSizes || {
622
+ let A = await O.getRepositoryState(e);
623
+ if (!A && t) {
624
+ const z = r || "project-management", $ = await O.getWorkspaceLayout(z);
625
+ $ && (A = {
626
+ workspaceId: z,
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
- }, await N.setRepositoryState(
636
+ }, await O.setRepositoryState(
637
637
  e,
638
- T
638
+ A
639
639
  ));
640
640
  }
641
- if (n(T), T != null && T.workspaceId) {
642
- const P = await N.getWorkspaceLayout(
643
- T.workspaceId
641
+ if (n(A), A != null && A.workspaceId) {
642
+ const z = await O.getWorkspaceLayout(
643
+ A.workspaceId
644
644
  );
645
- c(P);
645
+ c(z);
646
646
  } else
647
647
  c(null);
648
648
  }
649
649
  } catch (x) {
650
- v(x), console.error("Failed to load workspace data:", x);
650
+ C(x), console.error("Failed to load workspace data:", x);
651
651
  } finally {
652
- g(!1);
652
+ u(!1);
653
653
  }
654
654
  }, [e, t, r]);
655
655
  R(() => {
656
- u();
657
- }, [u]);
658
- const d = S(
659
- async (x) => await N.getWorkspaceLayout(x),
656
+ f();
657
+ }, [f]);
658
+ const d = b(
659
+ async (x) => await O.getWorkspaceLayout(x),
660
660
  []
661
- ), p = S(
661
+ ), p = b(
662
662
  async (x) => {
663
- const T = await N.createWorkspaceLayout(x);
664
- return await u(), T;
663
+ const A = await O.createWorkspaceLayout(x);
664
+ return await f(), A;
665
665
  },
666
- [u]
667
- ), C = S(
668
- async (x, T) => {
669
- const P = await N.updateWorkspaceLayout(x, T);
670
- return await u(), P;
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
- ), $ = S(
672
+ [f]
673
+ ), W = b(
674
674
  async (x) => {
675
- const T = await N.deleteWorkspaceLayout(x);
676
- return T && await u(), T;
675
+ const A = await O.deleteWorkspaceLayout(x);
676
+ return A && await f(), A;
677
677
  },
678
- [u]
679
- ), z = S(
678
+ [f]
679
+ ), D = b(
680
680
  async (x) => {
681
681
  if (!e) {
682
682
  console.error("Cannot apply workspace without repositoryKey");
683
683
  return;
684
684
  }
685
- const T = await N.getWorkspaceLayout(x);
686
- if (!T) {
685
+ const A = await O.getWorkspaceLayout(x);
686
+ if (!A) {
687
687
  console.error(`Workspace ${x} not found`);
688
688
  return;
689
689
  }
690
- const P = {
690
+ const z = {
691
691
  workspaceId: x,
692
- sizes: T.defaultSizes || { left: 20, middle: 45, right: 35 },
693
- collapsed: T.defaultCollapsed || {
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 N.setRepositoryState(e, P), await u();
698
+ await O.setRepositoryState(e, z), await f();
699
699
  },
700
- [e, u]
701
- ), I = S(
700
+ [e, f]
701
+ ), I = b(
702
702
  async (x) => {
703
703
  if (!e) {
704
704
  console.error("Cannot update sizes without repositoryKey");
705
705
  return;
706
706
  }
707
- await N.updateRepositorySizes(e, x), await u();
707
+ await O.updateRepositorySizes(e, x), await f();
708
708
  },
709
- [e, u]
710
- ), L = S(
709
+ [e, f]
710
+ ), _ = b(
711
711
  async (x) => {
712
712
  if (!e) {
713
713
  console.error("Cannot update collapsed without repositoryKey");
714
714
  return;
715
715
  }
716
- await N.updateRepositoryCollapsed(
716
+ await O.updateRepositoryCollapsed(
717
717
  e,
718
718
  x
719
- ), await u();
719
+ ), await f();
720
720
  },
721
- [e, u]
722
- ), b = S(async () => {
721
+ [e, f]
722
+ ), S = b(async () => {
723
723
  if (!e || !(l != null && l.workspaceId)) {
724
724
  console.error("Cannot reset without repositoryKey and active workspace");
725
725
  return;
726
726
  }
727
- await N.resetRepositoryToWorkspaceDefaults(
727
+ await O.resetRepositoryToWorkspaceDefaults(
728
728
  e,
729
729
  l.workspaceId
730
- ), await u();
731
- }, [e, l == null ? void 0 : l.workspaceId, u]), w = S(async () => {
732
- await u();
733
- }, [u]);
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
736
  repositoryState: l,
737
- activeWorkspace: f,
738
- loading: y,
737
+ activeWorkspace: g,
738
+ loading: k,
739
739
  error: h,
740
740
  getWorkspace: d,
741
741
  createWorkspace: p,
742
- updateWorkspace: C,
743
- deleteWorkspace: $,
744
- applyWorkspace: z,
742
+ updateWorkspace: T,
743
+ deleteWorkspace: W,
744
+ applyWorkspace: D,
745
745
  updateSizes: I,
746
- updateCollapsed: L,
747
- resetToDefaults: b,
746
+ updateCollapsed: _,
747
+ resetToDefaults: S,
748
748
  refresh: w
749
749
  };
750
750
  }
@@ -756,32 +756,32 @@ function ut(o = {}) {
756
756
  onFocusChange: s,
757
757
  events: i,
758
758
  getPanelId: l
759
- } = o, [n, f] = _(
759
+ } = o, [n, g] = L(
760
760
  e
761
- ), c = S(
761
+ ), c = b(
762
762
  (d) => {
763
763
  const p = n;
764
- if (f(d), s == null || s(d), i && l) {
764
+ if (g(d), s == null || s(d), i && l) {
765
765
  if (p) {
766
- const $ = l(p);
767
- $ && 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: $,
772
+ panelId: W,
773
773
  panelSlot: p,
774
774
  nextPanelId: l(d)
775
775
  }
776
776
  });
777
777
  }
778
- const C = l(d);
779
- C && 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: C,
784
+ panelId: T,
785
785
  panelSlot: d,
786
786
  source: "keyboard-shortcut"
787
787
  }
@@ -789,9 +789,9 @@ function ut(o = {}) {
789
789
  }
790
790
  },
791
791
  [n, s, i, l]
792
- ), y = S(() => {
792
+ ), k = b(() => {
793
793
  const d = n;
794
- if (f(null), s == null || s(null), i && l && d) {
794
+ if (g(null), s == null || s(null), i && l && d) {
795
795
  const p = l(d);
796
796
  p && i.emit({
797
797
  type: "panel:blur",
@@ -803,11 +803,11 @@ function ut(o = {}) {
803
803
  }
804
804
  });
805
805
  }
806
- }, [n, s, i, l]), g = S(() => {
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]), h = S(() => {
810
- const d = g();
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 ut(o = {}) {
818
818
  c(d[0]);
819
819
  return;
820
820
  }
821
- const C = (p + 1) % d.length;
822
- c(d[C]);
823
- }, [n, g, c]), v = S(() => {
824
- const d = g();
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,19 +832,19 @@ function ut(o = {}) {
832
832
  c(d[d.length - 1]);
833
833
  return;
834
834
  }
835
- const C = p === 0 ? d.length - 1 : p - 1;
836
- c(d[C]);
837
- }, [n, g, c]), u = S(
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: y,
844
+ clearFocus: k,
845
845
  focusNext: h,
846
- focusPrevious: v,
847
- isFocused: u
846
+ focusPrevious: C,
847
+ isFocused: f
848
848
  };
849
849
  }
850
850
  function ft(o) {
@@ -856,29 +856,29 @@ function ft(o) {
856
856
  setFocus: i,
857
857
  onExpand: l,
858
858
  onCollapse: n
859
- } = o, f = H(t), c = H(r), y = H(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
- y.current = s;
865
+ k.current = s;
866
866
  }, [s]);
867
- const g = S(
867
+ const u = b(
868
868
  (h) => {
869
869
  if (!h.altKey || h.ctrlKey || h.metaKey || h.shiftKey)
870
870
  return;
871
- const v = h.code, u = f.current, d = c.current, p = y.current;
872
- v === "Digit1" || v === "Numpad1" ? (h.preventDefault(), d.left ? l("left") : u !== "left" ? i("left") : (n("left"), i("middle"))) : v === "Digit2" || v === "Numpad2" ? (h.preventDefault(), i("middle")) : (v === "Digit3" || v === "Numpad3") && p === "three-panel" && (h.preventDefault(), d.right ? l("right") : u !== "right" ? i("right") : (n("right"), i("middle")));
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
874
  [i, l, n]
875
875
  );
876
876
  R(() => {
877
877
  if (e)
878
- return window.addEventListener("keydown", g), () => {
879
- window.removeEventListener("keydown", g);
878
+ return window.addEventListener("keydown", u), () => {
879
+ window.removeEventListener("keydown", u);
880
880
  };
881
- }, [e, g]);
881
+ }, [e, u]);
882
882
  }
883
883
  function gt(o, e, t, r) {
884
884
  R(() => {
@@ -977,7 +977,7 @@ const ht = ({
977
977
  }
978
978
 
979
979
  `, document.head.appendChild(o);
980
- }, yt = ({
980
+ }, mt = ({
981
981
  active: o,
982
982
  variant: e = "soft-fade",
983
983
  effects: t = [],
@@ -985,20 +985,55 @@ const ht = ({
985
985
  animationDuration: s = 300,
986
986
  cascadeDelay: i = 0,
987
987
  color: l,
988
- className: n = "",
989
- style: f = {}
988
+ hideOnHover: n = !0,
989
+ className: g = "",
990
+ style: c = {}
990
991
  }) => {
991
- const { theme: c } = Q(), [y, g] = _(!1);
992
+ const { theme: k } = Y(), [u, h] = L(!1), [C, f] = L(!1), d = J(null);
992
993
  R(() => {
993
994
  Me();
994
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(() => {
995
1008
  if (o) {
996
- const O = setTimeout(() => g(!0), i);
997
- return () => clearTimeout(O);
1009
+ const X = setTimeout(() => h(!0), i);
1010
+ return () => clearTimeout(X);
998
1011
  } else
999
- g(!1);
1012
+ h(!1);
1000
1013
  }, [o, i]);
1001
- const h = l || c.colors.background, u = {
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 = {
1002
1037
  position: "absolute",
1003
1038
  top: 0,
1004
1039
  left: 0,
@@ -1007,155 +1042,136 @@ const ht = ({
1007
1042
  pointerEvents: "none",
1008
1043
  zIndex: 999,
1009
1044
  overflow: "hidden",
1010
- ...(() => {
1011
- switch (e) {
1012
- case "soft-fade":
1013
- return {
1014
- backgroundColor: h,
1015
- opacity: y ? r : 0,
1016
- transition: `opacity ${s}ms ease-out`
1017
- };
1018
- case "cascading-fade":
1019
- return {
1020
- backgroundColor: h,
1021
- opacity: y ? r : 0,
1022
- transition: `opacity ${s}ms ease-out`,
1023
- transitionDelay: y ? "0ms" : `${i}ms`
1024
- };
1025
- default:
1026
- return {
1027
- backgroundColor: h,
1028
- opacity: y ? r : 0,
1029
- transition: `opacity ${s}ms ease-out`
1030
- };
1031
- }
1032
- })(),
1033
- ...f
1034
- }, d = t.includes("vignette-drift"), p = t.includes("radial-breathing"), C = t.includes("snowfall"), $ = (O, F) => {
1035
- const ee = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(O);
1036
- if (!ee) return `rgba(255, 255, 255, ${F})`;
1037
- const V = parseInt(ee[1], 16), J = parseInt(ee[2], 16), ne = parseInt(ee[3], 16);
1038
- return `rgba(${V}, ${J}, ${ne}, ${F})`;
1039
- }, z = c.colors.primary, I = {
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 = {
1040
1055
  position: "absolute",
1041
1056
  top: 0,
1042
1057
  left: 0,
1043
1058
  right: 0,
1044
1059
  bottom: 0,
1045
1060
  pointerEvents: "none",
1046
- opacity: y ? 1 : 0,
1061
+ opacity: u ? 1 : 0,
1047
1062
  transition: `opacity ${s}ms ease-out`,
1048
- background: `radial-gradient(circle at 50% 50%, ${$(z, 0.12)} 0%, ${$(z, 0.06)} 25%, transparent 50%)`,
1063
+ background: `radial-gradient(circle at 50% 50%, ${w(x, 0.12)} 0%, ${w(x, 0.06)} 25%, transparent 50%)`,
1049
1064
  backgroundSize: "150% 150%",
1050
- animation: y ? "focus-overlay-vignette-drift 12s ease-in-out infinite" : "none"
1051
- }, L = {
1065
+ animation: u ? "focus-overlay-vignette-drift 12s ease-in-out infinite" : "none"
1066
+ }, z = {
1052
1067
  position: "absolute",
1053
1068
  top: 0,
1054
1069
  left: 0,
1055
1070
  right: 0,
1056
1071
  bottom: 0,
1057
1072
  pointerEvents: "none",
1058
- opacity: y ? 1 : 0,
1073
+ opacity: u ? 1 : 0,
1059
1074
  transition: `opacity ${s}ms ease-out`,
1060
- background: `radial-gradient(circle at center, ${$(z, 0.15)} 0%, ${$(z, 0.06)} 30%, transparent 55%)`,
1061
- animation: y ? "focus-overlay-radial-breathing 4s ease-in-out infinite" : "none"
1062
- }, b = $(z, 0.6), w = $(z, 0.4), x = $(z, 0.25), T = {
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 = {
1063
1078
  position: "absolute",
1064
1079
  top: 0,
1065
1080
  left: 0,
1066
1081
  right: 0,
1067
1082
  bottom: 0,
1068
1083
  pointerEvents: "none",
1069
- opacity: y ? 1 : 0,
1084
+ opacity: u ? 1 : 0,
1070
1085
  transition: `opacity ${s}ms ease-out`
1071
- }, P = {
1072
- ...T,
1086
+ }, ae = {
1087
+ ...V,
1073
1088
  background: `
1074
- radial-gradient(circle, ${b} 0%, ${b} 3px, transparent 3px),
1075
- radial-gradient(circle, ${b} 0%, ${b} 3px, transparent 3px),
1076
- radial-gradient(circle, ${b} 0%, ${b} 3px, transparent 3px),
1077
- radial-gradient(circle, ${b} 0%, ${b} 3px, transparent 3px)
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)
1078
1093
  `,
1079
1094
  backgroundSize: "150px 150px",
1080
1095
  backgroundPosition: "10px 20px, 60px 80px, 110px 40px, 40px 120px",
1081
- animation: y ? "focus-overlay-snowfall-1 4s linear infinite" : "none"
1082
- }, W = {
1083
- ...T,
1096
+ animation: u ? "focus-overlay-snowfall-1 4s linear infinite" : "none"
1097
+ }, K = {
1098
+ ...V,
1084
1099
  background: `
1085
- radial-gradient(circle, ${w} 0%, ${w} 2px, transparent 2px),
1086
- radial-gradient(circle, ${w} 0%, ${w} 2px, transparent 2px),
1087
- radial-gradient(circle, ${w} 0%, ${w} 2px, transparent 2px),
1088
- radial-gradient(circle, ${w} 0%, ${w} 2px, transparent 2px),
1089
- radial-gradient(circle, ${w} 0%, ${w} 2px, transparent 2px)
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)
1090
1105
  `,
1091
1106
  backgroundSize: "150px 150px",
1092
1107
  backgroundPosition: "30px 10px, 90px 60px, 15px 100px, 120px 30px, 70px 130px",
1093
- animation: y ? "focus-overlay-snowfall-2 7s linear infinite" : "none"
1094
- }, A = {
1095
- ...T,
1108
+ animation: u ? "focus-overlay-snowfall-2 7s linear infinite" : "none"
1109
+ }, G = {
1110
+ ...V,
1096
1111
  background: `
1097
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px),
1098
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px),
1099
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px),
1100
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px),
1101
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px),
1102
- radial-gradient(circle, ${x} 0%, ${x} 1.5px, transparent 1.5px)
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)
1103
1118
  `,
1104
1119
  backgroundSize: "150px 150px",
1105
1120
  backgroundPosition: "20px 5px, 80px 45px, 45px 90px, 130px 20px, 5px 70px, 100px 110px",
1106
- animation: y ? "focus-overlay-snowfall-3 12s linear infinite" : "none"
1121
+ animation: u ? "focus-overlay-snowfall-3 12s linear infinite" : "none"
1107
1122
  };
1108
- return /* @__PURE__ */ k(
1123
+ return /* @__PURE__ */ y(
1109
1124
  "div",
1110
1125
  {
1111
- className: `focus-mode-overlay focus-mode-overlay--${e} ${n}`,
1112
- style: u,
1126
+ ref: d,
1127
+ className: `focus-mode-overlay focus-mode-overlay--${e} ${g}`,
1128
+ style: D,
1113
1129
  role: "presentation",
1114
1130
  "aria-hidden": "true",
1115
1131
  "data-active": o,
1116
1132
  "data-variant": e,
1117
1133
  children: [
1118
- d && /* @__PURE__ */ a(
1134
+ I && /* @__PURE__ */ a(
1119
1135
  "div",
1120
1136
  {
1121
1137
  className: "focus-mode-overlay__vignette-drift",
1122
- style: I
1138
+ style: A
1123
1139
  }
1124
1140
  ),
1125
- p && /* @__PURE__ */ a(
1141
+ _ && /* @__PURE__ */ a(
1126
1142
  "div",
1127
1143
  {
1128
1144
  className: "focus-mode-overlay__radial-breathing",
1129
- style: L
1145
+ style: z
1130
1146
  }
1131
1147
  ),
1132
- C && /* @__PURE__ */ k(ce, { children: [
1148
+ S && /* @__PURE__ */ y(ce, { children: [
1133
1149
  /* @__PURE__ */ a(
1134
1150
  "div",
1135
1151
  {
1136
1152
  className: "focus-mode-overlay__snowfall-layer-3",
1137
- style: A
1153
+ style: G
1138
1154
  }
1139
1155
  ),
1140
1156
  /* @__PURE__ */ a(
1141
1157
  "div",
1142
1158
  {
1143
1159
  className: "focus-mode-overlay__snowfall-layer-2",
1144
- style: W
1160
+ style: K
1145
1161
  }
1146
1162
  ),
1147
1163
  /* @__PURE__ */ a(
1148
1164
  "div",
1149
1165
  {
1150
1166
  className: "focus-mode-overlay__snowfall-layer-1",
1151
- style: P
1167
+ style: ae
1152
1168
  }
1153
1169
  )
1154
1170
  ] })
1155
1171
  ]
1156
1172
  }
1157
1173
  );
1158
- }, me = ({
1174
+ }, ye = ({
1159
1175
  value: o,
1160
1176
  onChange: e,
1161
1177
  onSubmit: t,
@@ -1164,20 +1180,20 @@ const ht = ({
1164
1180
  onHistoryNext: i,
1165
1181
  mode: l,
1166
1182
  status: n,
1167
- placeholder: f = "What would you like to do?",
1183
+ placeholder: g = "What would you like to do?",
1168
1184
  disabled: c = !1,
1169
- autoFocus: y = !0,
1170
- agentAvailable: g = !0,
1185
+ autoFocus: k = !0,
1186
+ agentAvailable: u = !0,
1171
1187
  showAutocomplete: h = !1,
1172
- onAutocompleteNext: v,
1173
- onAutocompletePrevious: u,
1188
+ onAutocompleteNext: C,
1189
+ onAutocompletePrevious: f,
1174
1190
  onAutocompleteAccept: d
1175
1191
  }) => {
1176
- const { theme: p } = Q(), C = H(null);
1192
+ const { theme: p } = Y(), T = J(null);
1177
1193
  R(() => {
1178
- y && C.current && C.current.focus();
1179
- }, [y]);
1180
- const $ = (I) => {
1194
+ k && T.current && T.current.focus();
1195
+ }, [k]);
1196
+ const W = (I) => {
1181
1197
  switch (I.stopPropagation(), I.key) {
1182
1198
  case "Enter":
1183
1199
  I.preventDefault(), t();
@@ -1189,14 +1205,14 @@ const ht = ({
1189
1205
  h && d && (I.preventDefault(), d());
1190
1206
  break;
1191
1207
  case "ArrowUp":
1192
- I.preventDefault(), h && u ? u() : s();
1208
+ I.preventDefault(), h && f ? f() : s();
1193
1209
  break;
1194
1210
  case "ArrowDown":
1195
- I.preventDefault(), h && v ? v() : i();
1211
+ I.preventDefault(), h && C ? C() : i();
1196
1212
  break;
1197
1213
  }
1198
- }, z = n === "thinking" || n === "executing";
1199
- return /* @__PURE__ */ k(
1214
+ }, D = n === "thinking" || n === "executing";
1215
+ return /* @__PURE__ */ y(
1200
1216
  "div",
1201
1217
  {
1202
1218
  style: {
@@ -1212,14 +1228,14 @@ const ht = ({
1212
1228
  "span",
1213
1229
  {
1214
1230
  style: {
1215
- color: l === "quick-command" ? p.colors.info : g ? p.colors.primary : p.colors.textMuted,
1231
+ color: l === "quick-command" ? p.colors.info : u ? p.colors.primary : p.colors.textMuted,
1216
1232
  fontFamily: p.fonts.monospace,
1217
1233
  fontSize: p.fontSizes[1],
1218
1234
  userSelect: "none",
1219
1235
  display: "flex",
1220
1236
  alignItems: "center"
1221
1237
  },
1222
- children: l === "quick-command" ? /* @__PURE__ */ k(
1238
+ children: l === "quick-command" ? /* @__PURE__ */ y(
1223
1239
  "svg",
1224
1240
  {
1225
1241
  width: "16",
@@ -1235,7 +1251,7 @@ const ht = ({
1235
1251
  /* @__PURE__ */ a("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
1236
1252
  ]
1237
1253
  }
1238
- ) : g ? /* @__PURE__ */ k(
1254
+ ) : u ? /* @__PURE__ */ y(
1239
1255
  "svg",
1240
1256
  {
1241
1257
  width: "16",
@@ -1260,14 +1276,14 @@ const ht = ({
1260
1276
  /* @__PURE__ */ a(
1261
1277
  "input",
1262
1278
  {
1263
- ref: C,
1279
+ ref: T,
1264
1280
  "data-agent-command-palette-input": !0,
1265
1281
  type: "text",
1266
1282
  value: o,
1267
1283
  onChange: (I) => e(I.target.value),
1268
- onKeyDown: $,
1269
- placeholder: f,
1270
- disabled: c || z,
1284
+ onKeyDown: W,
1285
+ placeholder: g,
1286
+ disabled: c || D,
1271
1287
  style: {
1272
1288
  flex: 1,
1273
1289
  backgroundColor: "transparent",
@@ -1280,7 +1296,7 @@ const ht = ({
1280
1296
  }
1281
1297
  }
1282
1298
  ),
1283
- z && /* @__PURE__ */ k(
1299
+ D && /* @__PURE__ */ y(
1284
1300
  "span",
1285
1301
  {
1286
1302
  style: {
@@ -1308,7 +1324,7 @@ const ht = ({
1308
1324
  ]
1309
1325
  }
1310
1326
  ),
1311
- !z && /* @__PURE__ */ a(
1327
+ !D && /* @__PURE__ */ a(
1312
1328
  "kbd",
1313
1329
  {
1314
1330
  style: {
@@ -1326,9 +1342,9 @@ const ht = ({
1326
1342
  }
1327
1343
  );
1328
1344
  };
1329
- me.displayName = "AgentCommandInput";
1345
+ ye.displayName = "AgentCommandInput";
1330
1346
  const je = ({ status: o }) => {
1331
- const { theme: e } = Q(), t = {
1347
+ const { theme: e } = Y(), t = {
1332
1348
  display: "inline-flex",
1333
1349
  alignItems: "center",
1334
1350
  justifyContent: "center",
@@ -1360,8 +1376,8 @@ const je = ({ status: o }) => {
1360
1376
  const e = Object.entries(o);
1361
1377
  return e.length === 0 ? "" : e.map(([t, r]) => t === "args" && Array.isArray(r) ? r.join(", ") : typeof r == "string" ? `"${r}"` : JSON.stringify(r)).join(", ");
1362
1378
  }, Ne = ({ tool: o, compact: e }) => {
1363
- const { theme: t } = Q(), r = qe(o.args);
1364
- return /* @__PURE__ */ k(
1379
+ const { theme: t } = Y(), r = qe(o.args);
1380
+ return /* @__PURE__ */ y(
1365
1381
  "div",
1366
1382
  {
1367
1383
  style: {
@@ -1374,9 +1390,9 @@ const je = ({ status: o }) => {
1374
1390
  },
1375
1391
  children: [
1376
1392
  /* @__PURE__ */ a(je, { status: o.status }),
1377
- /* @__PURE__ */ k("span", { style: { color: t.colors.text }, children: [
1393
+ /* @__PURE__ */ y("span", { style: { color: t.colors.text }, children: [
1378
1394
  o.name,
1379
- r && /* @__PURE__ */ k("span", { style: { color: t.colors.textMuted }, children: [
1395
+ r && /* @__PURE__ */ y("span", { style: { color: t.colors.textMuted }, children: [
1380
1396
  "(",
1381
1397
  r,
1382
1398
  ")"
@@ -1423,7 +1439,7 @@ const je = ({ status: o }) => {
1423
1439
  tools: o,
1424
1440
  compact: e = !1
1425
1441
  }) => {
1426
- const { theme: t } = Q();
1442
+ const { theme: t } = Y();
1427
1443
  return o.length === 0 ? null : /* @__PURE__ */ a(
1428
1444
  "div",
1429
1445
  {
@@ -1442,11 +1458,11 @@ const ke = ({
1442
1458
  response: o,
1443
1459
  streaming: e = !1
1444
1460
  }) => {
1445
- const { theme: t } = Q();
1461
+ const { theme: t } = Y();
1446
1462
  if (!o)
1447
1463
  return null;
1448
1464
  const r = o.toLowerCase().startsWith("error"), s = o.toLowerCase().startsWith("done") || o.toLowerCase().startsWith("executed");
1449
- return /* @__PURE__ */ k(
1465
+ return /* @__PURE__ */ y(
1450
1466
  "div",
1451
1467
  {
1452
1468
  style: {
@@ -1460,7 +1476,7 @@ const ke = ({
1460
1476
  children: [
1461
1477
  s && /* @__PURE__ */ a("span", { children: "✓" }),
1462
1478
  r && /* @__PURE__ */ a("span", { children: "✗" }),
1463
- /* @__PURE__ */ k("span", { children: [
1479
+ /* @__PURE__ */ y("span", { children: [
1464
1480
  o,
1465
1481
  e && /* @__PURE__ */ a(
1466
1482
  "span",
@@ -1510,25 +1526,25 @@ const be = ({
1510
1526
  onSelect: i,
1511
1527
  maxVisible: l = 6
1512
1528
  }) => {
1513
- const { theme: n } = Q(), f = H(null), c = H(null);
1529
+ const { theme: n } = Y(), g = J(null), c = J(null);
1514
1530
  if (R(() => {
1515
- c.current && f.current && c.current.scrollIntoView({
1531
+ c.current && g.current && c.current.scrollIntoView({
1516
1532
  block: "nearest",
1517
1533
  behavior: "smooth"
1518
1534
  });
1519
1535
  }, [s]), r && e.length > 0) {
1520
- const v = 40 * l;
1521
- return /* @__PURE__ */ k(
1536
+ const C = 40 * l;
1537
+ return /* @__PURE__ */ y(
1522
1538
  "div",
1523
1539
  {
1524
- ref: f,
1540
+ ref: g,
1525
1541
  style: {
1526
- maxHeight: `${v}px`,
1542
+ maxHeight: `${C}px`,
1527
1543
  overflowY: "auto",
1528
1544
  borderTop: `1px solid ${n.colors.border}`
1529
1545
  },
1530
1546
  children: [
1531
- t && /* @__PURE__ */ k(
1547
+ t && /* @__PURE__ */ y(
1532
1548
  "div",
1533
1549
  {
1534
1550
  style: {
@@ -1540,16 +1556,16 @@ const be = ({
1540
1556
  },
1541
1557
  children: [
1542
1558
  /* @__PURE__ */ a("span", { style: { color: n.colors.textSecondary }, children: t.name }),
1543
- t.description && /* @__PURE__ */ k("span", { style: { marginLeft: "8px" }, children: [
1559
+ t.description && /* @__PURE__ */ y("span", { style: { marginLeft: "8px" }, children: [
1544
1560
  "— ",
1545
1561
  t.description
1546
1562
  ] })
1547
1563
  ]
1548
1564
  }
1549
1565
  ),
1550
- e.map((u, d) => {
1566
+ e.map((f, d) => {
1551
1567
  const p = d === s;
1552
- return /* @__PURE__ */ k(
1568
+ return /* @__PURE__ */ y(
1553
1569
  "div",
1554
1570
  {
1555
1571
  ref: p ? c : void 0,
@@ -1564,11 +1580,11 @@ const be = ({
1564
1580
  borderLeft: p ? `2px solid ${n.colors.primary}` : "2px solid transparent",
1565
1581
  transition: "background-color 100ms ease"
1566
1582
  },
1567
- onMouseEnter: (C) => {
1568
- p || (C.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
1583
+ onMouseEnter: (T) => {
1584
+ p || (T.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
1569
1585
  },
1570
- onMouseLeave: (C) => {
1571
- p || (C.currentTarget.style.backgroundColor = "transparent");
1586
+ onMouseLeave: (T) => {
1587
+ p || (T.currentTarget.style.backgroundColor = "transparent");
1572
1588
  },
1573
1589
  children: [
1574
1590
  /* @__PURE__ */ a(
@@ -1583,8 +1599,8 @@ const be = ({
1583
1599
  children: /* @__PURE__ */ a(
1584
1600
  ge,
1585
1601
  {
1586
- text: u.option,
1587
- matchedIndices: u.matchedIndices,
1602
+ text: f.option,
1603
+ matchedIndices: f.matchedIndices,
1588
1604
  highlightColor: n.colors.primary
1589
1605
  }
1590
1606
  )
@@ -1607,7 +1623,7 @@ const be = ({
1607
1623
  )
1608
1624
  ]
1609
1625
  },
1610
- `${u.option}-${d}`
1626
+ `${f.option}-${d}`
1611
1627
  );
1612
1628
  })
1613
1629
  ]
@@ -1616,38 +1632,38 @@ const be = ({
1616
1632
  }
1617
1633
  if (o.length === 0)
1618
1634
  return null;
1619
- const g = 48 * l;
1635
+ const u = 48 * l;
1620
1636
  return /* @__PURE__ */ a(
1621
1637
  "div",
1622
1638
  {
1623
- ref: f,
1639
+ ref: g,
1624
1640
  style: {
1625
- maxHeight: `${g}px`,
1641
+ maxHeight: `${u}px`,
1626
1642
  overflowY: "auto",
1627
1643
  borderTop: `1px solid ${n.colors.border}`
1628
1644
  },
1629
- children: o.map((h, v) => {
1630
- const u = v === s, d = h.command;
1631
- return /* @__PURE__ */ k(
1645
+ children: o.map((h, C) => {
1646
+ const f = C === s, d = h.command;
1647
+ return /* @__PURE__ */ y(
1632
1648
  "div",
1633
1649
  {
1634
- ref: u ? c : void 0,
1635
- onClick: () => i(v),
1650
+ ref: f ? c : void 0,
1651
+ onClick: () => i(C),
1636
1652
  style: {
1637
1653
  display: "flex",
1638
1654
  alignItems: "center",
1639
1655
  gap: "12px",
1640
1656
  padding: "10px 16px",
1641
1657
  cursor: "pointer",
1642
- backgroundColor: u ? n.colors.backgroundSecondary : "transparent",
1643
- 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",
1644
1660
  transition: "background-color 100ms ease"
1645
1661
  },
1646
1662
  onMouseEnter: (p) => {
1647
- u || (p.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
1663
+ f || (p.currentTarget.style.backgroundColor = n.colors.backgroundSecondary);
1648
1664
  },
1649
1665
  onMouseLeave: (p) => {
1650
- u || (p.currentTarget.style.backgroundColor = "transparent");
1666
+ f || (p.currentTarget.style.backgroundColor = "transparent");
1651
1667
  },
1652
1668
  children: [
1653
1669
  /* @__PURE__ */ a(
@@ -1662,8 +1678,8 @@ const be = ({
1662
1678
  children: "/"
1663
1679
  }
1664
1680
  ),
1665
- /* @__PURE__ */ k("div", { style: { flex: 1, minWidth: 0 }, children: [
1666
- /* @__PURE__ */ k(
1681
+ /* @__PURE__ */ y("div", { style: { flex: 1, minWidth: 0 }, children: [
1682
+ /* @__PURE__ */ y(
1667
1683
  "div",
1668
1684
  {
1669
1685
  style: {
@@ -1680,7 +1696,7 @@ const be = ({
1680
1696
  highlightColor: n.colors.primary
1681
1697
  }
1682
1698
  ),
1683
- h.matchedOn !== d.name && /* @__PURE__ */ k(
1699
+ h.matchedOn !== d.name && /* @__PURE__ */ y(
1684
1700
  "span",
1685
1701
  {
1686
1702
  style: {
@@ -1722,8 +1738,8 @@ const be = ({
1722
1738
  fontFamily: n.fonts.monospace,
1723
1739
  flexShrink: 0
1724
1740
  },
1725
- children: d.args.map((p, C) => /* @__PURE__ */ k("span", { children: [
1726
- C > 0 && " ",
1741
+ children: d.args.map((p, T) => /* @__PURE__ */ y("span", { children: [
1742
+ T > 0 && " ",
1727
1743
  /* @__PURE__ */ a(
1728
1744
  "span",
1729
1745
  {
@@ -1736,7 +1752,7 @@ const be = ({
1736
1752
  ] }, p.name))
1737
1753
  }
1738
1754
  ),
1739
- u && /* @__PURE__ */ a(
1755
+ f && /* @__PURE__ */ a(
1740
1756
  "kbd",
1741
1757
  {
1742
1758
  style: {
@@ -1753,73 +1769,73 @@ const be = ({
1753
1769
  )
1754
1770
  ]
1755
1771
  },
1756
- `${d.name}-${v}`
1772
+ `${d.name}-${C}`
1757
1773
  );
1758
1774
  })
1759
1775
  }
1760
1776
  );
1761
1777
  };
1762
1778
  be.displayName = "QuickCommandAutocomplete";
1763
- const Oe = ({
1779
+ const Fe = ({
1764
1780
  palette: o,
1765
1781
  config: e
1766
1782
  }) => {
1767
- const { theme: t } = Q(), r = H(null), {
1783
+ const { theme: t } = Y(), r = J(null), {
1768
1784
  isOpen: s,
1769
1785
  close: i,
1770
1786
  query: l,
1771
1787
  setQuery: n,
1772
- mode: f,
1788
+ mode: g,
1773
1789
  status: c,
1774
- pendingTools: y,
1775
- completedTools: g,
1790
+ pendingTools: k,
1791
+ completedTools: u,
1776
1792
  agentResponse: h,
1777
- submit: v,
1778
- historyPrevious: u,
1793
+ submit: C,
1794
+ historyPrevious: f,
1779
1795
  historyNext: d,
1780
1796
  suggestions: p,
1781
- agentAvailable: C,
1797
+ agentAvailable: T,
1782
1798
  // Autocomplete
1783
- quickCommandMatches: $,
1784
- argumentOptionMatches: z,
1799
+ quickCommandMatches: W,
1800
+ argumentOptionMatches: D,
1785
1801
  parsedQuery: I,
1786
- currentArgDef: L,
1787
- selectedAutocompleteIndex: b,
1802
+ currentArgDef: _,
1803
+ selectedAutocompleteIndex: S,
1788
1804
  autocompleteNext: w,
1789
1805
  autocompletePrevious: x,
1790
- autocompleteAccept: T,
1791
- showAutocomplete: P
1806
+ autocompleteAccept: A,
1807
+ showAutocomplete: z
1792
1808
  } = o;
1793
1809
  R(() => {
1794
1810
  if (!s) return;
1795
- const K = (D) => {
1796
- r.current && !r.current.contains(D.target) && i();
1811
+ const B = (j) => {
1812
+ r.current && !r.current.contains(j.target) && i();
1797
1813
  }, U = setTimeout(() => {
1798
- document.addEventListener("mousedown", K);
1814
+ document.addEventListener("mousedown", B);
1799
1815
  }, 100);
1800
1816
  return () => {
1801
- clearTimeout(U), document.removeEventListener("mousedown", K);
1817
+ clearTimeout(U), document.removeEventListener("mousedown", B);
1802
1818
  };
1803
1819
  }, [s, i]);
1804
- const [W, A] = _(!1), [O, F] = _(!1);
1820
+ const [$, v] = L(!1), [P, V] = L(!1);
1805
1821
  if (R(() => {
1806
1822
  if (s)
1807
- F(!0), requestAnimationFrame(() => {
1823
+ V(!0), requestAnimationFrame(() => {
1808
1824
  requestAnimationFrame(() => {
1809
- A(!0);
1825
+ v(!0);
1810
1826
  });
1811
1827
  });
1812
1828
  else {
1813
- A(!1);
1814
- const K = setTimeout(() => {
1815
- F(!1);
1829
+ v(!1);
1830
+ const B = setTimeout(() => {
1831
+ V(!1);
1816
1832
  }, 150);
1817
- return () => clearTimeout(K);
1833
+ return () => clearTimeout(B);
1818
1834
  }
1819
- }, [s]), !O)
1835
+ }, [s]), !P)
1820
1836
  return null;
1821
- const ee = C ? (e == null ? void 0 : e.placeholder) || "What would you like to do?" : "Quick command mode (agent unavailable)", V = [...g, ...y], J = V.length > 0, ne = h && c !== "idle", se = C && !l && c === "idle" && p.length > 0, te = (f === "quick-command" || !C) && c === "idle", ae = !C && f !== "quick-command" && c === "idle";
1822
- return /* @__PURE__ */ k(ce, { children: [
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: [
1823
1839
  /* @__PURE__ */ a(
1824
1840
  "div",
1825
1841
  {
@@ -1831,7 +1847,7 @@ const Oe = ({
1831
1847
  onClick: i
1832
1848
  }
1833
1849
  ),
1834
- /* @__PURE__ */ k(
1850
+ /* @__PURE__ */ y(
1835
1851
  "div",
1836
1852
  {
1837
1853
  ref: r,
@@ -1849,32 +1865,32 @@ const Oe = ({
1849
1865
  display: "flex",
1850
1866
  flexDirection: "column-reverse",
1851
1867
  overflow: "hidden",
1852
- transform: W ? "translateY(0)" : "translateY(100%)",
1868
+ transform: $ ? "translateY(0)" : "translateY(100%)",
1853
1869
  transition: "transform 150ms ease-out",
1854
1870
  ...e == null ? void 0 : e.style
1855
1871
  },
1856
1872
  children: [
1857
- /* @__PURE__ */ k("div", { children: [
1873
+ /* @__PURE__ */ y("div", { children: [
1858
1874
  /* @__PURE__ */ a(
1859
- me,
1875
+ ye,
1860
1876
  {
1861
1877
  value: l,
1862
1878
  onChange: n,
1863
- onSubmit: v,
1879
+ onSubmit: C,
1864
1880
  onClose: i,
1865
- onHistoryPrevious: u,
1881
+ onHistoryPrevious: f,
1866
1882
  onHistoryNext: d,
1867
- mode: f,
1883
+ mode: g,
1868
1884
  status: c,
1869
- placeholder: ee,
1870
- agentAvailable: C,
1871
- showAutocomplete: P,
1885
+ placeholder: ae,
1886
+ agentAvailable: T,
1887
+ showAutocomplete: z,
1872
1888
  onAutocompleteNext: w,
1873
1889
  onAutocompletePrevious: x,
1874
- onAutocompleteAccept: T
1890
+ onAutocompleteAccept: A
1875
1891
  }
1876
1892
  ),
1877
- /* @__PURE__ */ k(
1893
+ /* @__PURE__ */ y(
1878
1894
  "div",
1879
1895
  {
1880
1896
  style: {
@@ -1887,7 +1903,7 @@ const Oe = ({
1887
1903
  backgroundColor: t.colors.background
1888
1904
  },
1889
1905
  children: [
1890
- /* @__PURE__ */ k("span", { children: [
1906
+ /* @__PURE__ */ y("span", { children: [
1891
1907
  /* @__PURE__ */ a(
1892
1908
  "kbd",
1893
1909
  {
@@ -1903,7 +1919,7 @@ const Oe = ({
1903
1919
  " ",
1904
1920
  "Execute"
1905
1921
  ] }),
1906
- /* @__PURE__ */ k("span", { children: [
1922
+ /* @__PURE__ */ y("span", { children: [
1907
1923
  /* @__PURE__ */ a(
1908
1924
  "kbd",
1909
1925
  {
@@ -1919,7 +1935,7 @@ const Oe = ({
1919
1935
  " ",
1920
1936
  "Close"
1921
1937
  ] }),
1922
- /* @__PURE__ */ k("span", { children: [
1938
+ /* @__PURE__ */ y("span", { children: [
1923
1939
  /* @__PURE__ */ a(
1924
1940
  "kbd",
1925
1941
  {
@@ -1935,7 +1951,7 @@ const Oe = ({
1935
1951
  " ",
1936
1952
  "History"
1937
1953
  ] }),
1938
- /* @__PURE__ */ k("span", { style: { marginLeft: "auto" }, children: [
1954
+ /* @__PURE__ */ y("span", { style: { marginLeft: "auto" }, children: [
1939
1955
  /* @__PURE__ */ a(
1940
1956
  "kbd",
1941
1957
  {
@@ -1955,16 +1971,16 @@ const Oe = ({
1955
1971
  }
1956
1972
  )
1957
1973
  ] }),
1958
- /* @__PURE__ */ k("div", { style: { overflow: "auto" }, children: [
1959
- J && /* @__PURE__ */ a(xe, { tools: V, compact: V.length > 3 }),
1960
- ne && /* @__PURE__ */ a(
1974
+ /* @__PURE__ */ y("div", { style: { overflow: "auto" }, children: [
1975
+ G && /* @__PURE__ */ a(xe, { tools: K, compact: K.length > 3 }),
1976
+ X && /* @__PURE__ */ a(
1961
1977
  ke,
1962
1978
  {
1963
1979
  response: h,
1964
1980
  streaming: c === "thinking"
1965
1981
  }
1966
1982
  ),
1967
- se && /* @__PURE__ */ k(
1983
+ H && /* @__PURE__ */ y(
1968
1984
  "div",
1969
1985
  {
1970
1986
  style: {
@@ -1985,11 +2001,11 @@ const Oe = ({
1985
2001
  children: "Try:"
1986
2002
  }
1987
2003
  ),
1988
- p.map((K, U) => /* @__PURE__ */ k(
2004
+ p.map((B, U) => /* @__PURE__ */ y(
1989
2005
  "button",
1990
2006
  {
1991
2007
  onClick: () => {
1992
- n(K);
2008
+ n(B);
1993
2009
  },
1994
2010
  style: {
1995
2011
  padding: "4px 10px",
@@ -2001,15 +2017,15 @@ const Oe = ({
2001
2017
  cursor: "pointer",
2002
2018
  transition: "background-color 150ms ease"
2003
2019
  },
2004
- onMouseEnter: (D) => {
2005
- D.currentTarget.style.backgroundColor = t.colors.backgroundTertiary;
2020
+ onMouseEnter: (j) => {
2021
+ j.currentTarget.style.backgroundColor = t.colors.backgroundTertiary;
2006
2022
  },
2007
- onMouseLeave: (D) => {
2008
- D.currentTarget.style.backgroundColor = t.colors.backgroundSecondary;
2023
+ onMouseLeave: (j) => {
2024
+ j.currentTarget.style.backgroundColor = t.colors.backgroundSecondary;
2009
2025
  },
2010
2026
  children: [
2011
2027
  '"',
2012
- K,
2028
+ B,
2013
2029
  '"'
2014
2030
  ]
2015
2031
  },
@@ -2018,7 +2034,7 @@ const Oe = ({
2018
2034
  ]
2019
2035
  }
2020
2036
  ),
2021
- ae && /* @__PURE__ */ k(
2037
+ te && /* @__PURE__ */ y(
2022
2038
  "div",
2023
2039
  {
2024
2040
  style: {
@@ -2031,7 +2047,7 @@ const Oe = ({
2031
2047
  },
2032
2048
  children: [
2033
2049
  /* @__PURE__ */ a("span", { children: "Agent unavailable." }),
2034
- /* @__PURE__ */ k("span", { style: { color: t.colors.textMuted }, children: [
2050
+ /* @__PURE__ */ y("span", { style: { color: t.colors.textMuted }, children: [
2035
2051
  "Use quick commands (start with ",
2036
2052
  /* @__PURE__ */ a("kbd", { style: {
2037
2053
  padding: "2px 6px",
@@ -2044,7 +2060,7 @@ const Oe = ({
2044
2060
  ]
2045
2061
  }
2046
2062
  ),
2047
- te && /* @__PURE__ */ k(
2063
+ M && /* @__PURE__ */ y(
2048
2064
  "div",
2049
2065
  {
2050
2066
  style: {
@@ -2055,27 +2071,27 @@ const Oe = ({
2055
2071
  },
2056
2072
  children: [
2057
2073
  /* @__PURE__ */ a("div", { style: { marginBottom: "8px", color: t.colors.textSecondary }, children: "Quick commands:" }),
2058
- /* @__PURE__ */ k("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2059
- /* @__PURE__ */ k("div", { children: [
2074
+ /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2075
+ /* @__PURE__ */ y("div", { children: [
2060
2076
  /* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/toggle" }),
2061
2077
  " ",
2062
2078
  /* @__PURE__ */ a("span", { style: { color: t.colors.textMuted }, children: "<left|right>" }),
2063
2079
  " ",
2064
2080
  "- Toggle sidebar visibility"
2065
2081
  ] }),
2066
- /* @__PURE__ */ k("div", { children: [
2082
+ /* @__PURE__ */ y("div", { children: [
2067
2083
  /* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/switch" }),
2068
2084
  " ",
2069
2085
  /* @__PURE__ */ a("span", { style: { color: t.colors.textMuted }, children: "<slot> <panel>" }),
2070
2086
  " ",
2071
2087
  "- Switch panel content"
2072
2088
  ] }),
2073
- /* @__PURE__ */ k("div", { children: [
2089
+ /* @__PURE__ */ y("div", { children: [
2074
2090
  /* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/collapse" }),
2075
2091
  " ",
2076
2092
  "- Collapse all sidebars"
2077
2093
  ] }),
2078
- /* @__PURE__ */ k("div", { children: [
2094
+ /* @__PURE__ */ y("div", { children: [
2079
2095
  /* @__PURE__ */ a("span", { style: { color: t.colors.info }, children: "/expand" }),
2080
2096
  " ",
2081
2097
  "- Expand all sidebars"
@@ -2084,33 +2100,33 @@ const Oe = ({
2084
2100
  ]
2085
2101
  }
2086
2102
  ),
2087
- P && /* @__PURE__ */ a(
2103
+ z && /* @__PURE__ */ a(
2088
2104
  be,
2089
2105
  {
2090
- matches: $,
2091
- argumentMatches: z,
2092
- currentArg: L,
2106
+ matches: W,
2107
+ argumentMatches: D,
2108
+ currentArg: _,
2093
2109
  isEnteringArgs: I.isEnteringArgs,
2094
- selectedIndex: b,
2095
- onSelect: (K) => {
2096
- var D;
2110
+ selectedIndex: S,
2111
+ onSelect: (B) => {
2112
+ var j;
2097
2113
  if (I.isEnteringArgs) {
2098
- const G = z[K];
2099
- if (G) {
2100
- let X = `/${I.commandName}`;
2114
+ const Z = D[B];
2115
+ if (Z) {
2116
+ let oe = `/${I.commandName}`;
2101
2117
  for (const ie of I.enteredArgs)
2102
- X += ` ${ie}`;
2103
- X += ` ${G.option}`;
2118
+ oe += ` ${ie}`;
2119
+ oe += ` ${Z.option}`;
2104
2120
  const de = I.currentArgIndex + 1;
2105
- ((D = I.command) == null ? void 0 : D.args) && de < I.command.args.length && (X += " "), n(X);
2121
+ ((j = I.command) == null ? void 0 : j.args) && de < I.command.args.length && (oe += " "), n(oe);
2106
2122
  }
2107
2123
  return;
2108
2124
  }
2109
- const U = $[K];
2125
+ const U = W[B];
2110
2126
  if (U) {
2111
- const G = U.command;
2112
- let X = `/${G.name}`;
2113
- G.args && G.args.length > 0 && (X += " "), n(X);
2127
+ const Z = U.command;
2128
+ let oe = `/${Z.name}`;
2129
+ Z.args && Z.args.length > 0 && (oe += " "), n(oe);
2114
2130
  }
2115
2131
  }
2116
2132
  }
@@ -2135,18 +2151,18 @@ const Oe = ({
2135
2151
  ` })
2136
2152
  ] });
2137
2153
  };
2138
- Oe.displayName = "AgentCommandPalette";
2154
+ Fe.displayName = "AgentCommandPalette";
2139
2155
  function pe(o, e) {
2140
2156
  const t = o.toLowerCase(), r = e.toLowerCase();
2141
2157
  if (!t)
2142
2158
  return { score: 0, matchedIndices: [] };
2143
2159
  const s = [];
2144
- let i = 0, l = 0, n = 0, f = -1;
2160
+ let i = 0, l = 0, n = 0, g = -1;
2145
2161
  for (let c = 0; c < r.length && i < t.length; c++)
2146
- r[c] === t[i] && (s.push(c), f === c - 1 ? (n++, l += n * 2) : n = 1, c === 0 && (l += 10), c > 0 && /[_\-\s]/.test(e[c - 1]) && (l += 5), l += 1, f = c, i++);
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++);
2147
2163
  return i < t.length ? null : (l -= e.length * 0.1, t === r && (l += 20), r.startsWith(t) && (l += 15), { score: l, matchedIndices: s });
2148
2164
  }
2149
- function Fe(o, e, t = 10) {
2165
+ function Oe(o, e, t = 10) {
2150
2166
  const r = o.replace(/^\//, "").trim();
2151
2167
  if (!r)
2152
2168
  return e.slice(0, t).map((i) => ({
@@ -2169,13 +2185,13 @@ function Fe(o, e, t = 10) {
2169
2185
  }
2170
2186
  if (i.aliases)
2171
2187
  for (const n of i.aliases) {
2172
- const f = pe(r, n);
2173
- if (f) {
2188
+ const g = pe(r, n);
2189
+ if (g) {
2174
2190
  s.push({
2175
2191
  command: i,
2176
- score: f.score - 2,
2192
+ score: g.score - 2,
2177
2193
  // Slight penalty for alias match
2178
- matchedIndices: f.matchedIndices,
2194
+ matchedIndices: g.matchedIndices,
2179
2195
  matchedOn: n
2180
2196
  });
2181
2197
  break;
@@ -2186,9 +2202,9 @@ function Fe(o, e, t = 10) {
2186
2202
  }
2187
2203
  function Ve(o, e) {
2188
2204
  const r = o.replace(/^\//, "").split(/\s+/), s = r[0] || "", i = o.endsWith(" ") && o.trim().length > 0, l = e.find(
2189
- (f) => {
2205
+ (g) => {
2190
2206
  var c;
2191
- return f.name.toLowerCase() === s.toLowerCase() || ((c = f.aliases) == null ? void 0 : c.some((y) => y.toLowerCase() === s.toLowerCase()));
2207
+ return g.name.toLowerCase() === s.toLowerCase() || ((c = g.aliases) == null ? void 0 : c.some((k) => k.toLowerCase() === s.toLowerCase()));
2192
2208
  }
2193
2209
  ) || null;
2194
2210
  if (!l)
@@ -2211,13 +2227,13 @@ function Ve(o, e) {
2211
2227
  isEnteringArgs: !0
2212
2228
  };
2213
2229
  if (n.length > 0) {
2214
- const f = n.slice(0, -1), c = n[n.length - 1];
2230
+ const g = n.slice(0, -1), c = n[n.length - 1];
2215
2231
  return {
2216
2232
  commandName: l.name,
2217
2233
  command: l,
2218
- enteredArgs: f,
2234
+ enteredArgs: g,
2219
2235
  currentArgValue: c,
2220
- currentArgIndex: f.length,
2236
+ currentArgIndex: g.length,
2221
2237
  isEnteringArgs: !0
2222
2238
  };
2223
2239
  }
@@ -2255,7 +2271,7 @@ const Ke = [
2255
2271
  "show terminal",
2256
2272
  "focus editor"
2257
2273
  ];
2258
- function mt({
2274
+ function yt({
2259
2275
  events: o,
2260
2276
  keyboard: e = { key: "p", altKey: !0 },
2261
2277
  config: t = {},
@@ -2264,117 +2280,117 @@ function mt({
2264
2280
  agentAvailable: i = !0,
2265
2281
  quickCommands: l = []
2266
2282
  } = {}) {
2267
- const [n, f] = _(!1), [c, y] = _(""), [g, h] = _("natural"), [v, u] = _("idle"), [d, p] = _([]), [C, $] = _([]), [z, I] = _(""), [L, b] = _([]), [w, x] = _(-1), T = oe(() => s, [s]), [P, W] = _(-1), A = oe(() => g !== "quick-command" || !l.length ? {
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 ? {
2268
2284
  commandName: "",
2269
2285
  command: null,
2270
2286
  enteredArgs: [],
2271
2287
  currentArgValue: "",
2272
2288
  currentArgIndex: -1,
2273
2289
  isEnteringArgs: !1
2274
- } : Ve(c, l), [c, g, l]), O = oe(() => g !== "quick-command" || !l.length || A.isEnteringArgs ? [] : Fe(c, l), [c, g, l, A.isEnteringArgs]), F = oe(() => {
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(() => {
2275
2291
  var E;
2276
- if (!A.isEnteringArgs || !((E = A.command) != null && E.args))
2292
+ if (!v.isEnteringArgs || !((E = v.command) != null && E.args))
2277
2293
  return [];
2278
- const m = A.command.args[A.currentArgIndex];
2279
- return m != null && m.options ? Be(A.currentArgValue, m.options) : [];
2280
- }, [A]), ee = oe(() => {
2294
+ const m = v.command.args[v.currentArgIndex];
2295
+ return m != null && m.options ? Be(v.currentArgValue, m.options) : [];
2296
+ }, [v]), ae = ne(() => {
2281
2297
  var m;
2282
- return !A.isEnteringArgs || !((m = A.command) != null && m.args) ? null : A.command.args[A.currentArgIndex] || null;
2283
- }, [A]), V = oe(() => g !== "quick-command" || v !== "idle" || c.length === 0 ? !1 : O.length > 0 || F.length > 0, [g, v, c.length, O.length, F.length]), J = oe(() => A.isEnteringArgs ? F.length : O.length, [A.isEnteringArgs, F.length, O.length]);
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]);
2284
2300
  R(() => {
2285
- W(J > 0 ? 0 : -1);
2286
- }, [J]);
2287
- const ne = S((m) => {
2288
- y(m), h(m.startsWith("/") ? "quick-command" : "natural");
2289
- }, []), se = S(() => {
2290
- f(!0), i ? (y(""), h("natural")) : (y("/"), h("quick-command")), u("idle"), p([]), $([]), I(""), x(-1), o == null || o.emit({
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({
2291
2307
  type: "agent-command-palette:opened",
2292
2308
  source: "agent-command-palette",
2293
2309
  timestamp: Date.now(),
2294
2310
  payload: {}
2295
2311
  });
2296
- }, [o, i]), te = S(() => {
2297
- f(!1), o == null || o.emit({
2312
+ }, [o, i]), M = b(() => {
2313
+ g(!1), o == null || o.emit({
2298
2314
  type: "agent-command-palette:closed",
2299
2315
  source: "agent-command-palette",
2300
2316
  timestamp: Date.now(),
2301
2317
  payload: {}
2302
2318
  });
2303
- }, [o]), ae = S(() => {
2304
- n ? te() : se();
2305
- }, [n, se, te]), K = S(() => {
2306
- y(""), h("natural"), u("idle"), p([]), $([]), I(""), x(-1);
2307
- }, []), U = S((m) => {
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) => {
2308
2324
  const E = {
2309
2325
  ...m,
2310
2326
  status: "pending"
2311
2327
  };
2312
- return p((M) => [...M, E]), E;
2313
- }, []), D = S(
2314
- (m, E, M, Z) => {
2315
- p((j) => {
2316
- const q = j.find((Y) => Y.id === m);
2317
- if (!q) return j;
2318
- const B = {
2319
- ...q,
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,
2320
2336
  status: E,
2321
- result: M,
2322
- error: Z
2337
+ result: q,
2338
+ error: re
2323
2339
  };
2324
- return E === "success" || E === "error" ? ($((Y) => [...Y, B]), j.filter((Y) => Y.id !== m)) : j.map((Y) => Y.id === m ? B : Y);
2340
+ return E === "success" || E === "error" ? (W((ee) => [...ee, Q]), N.filter((ee) => ee.id !== m)) : N.map((ee) => ee.id === m ? Q : ee);
2325
2341
  });
2326
2342
  },
2327
2343
  []
2328
- ), G = S(
2344
+ ), Z = b(
2329
2345
  async (m) => {
2330
- const E = m.replace(/^\//, "").trim().split(/\s+/), M = E[0], Z = E.slice(1);
2331
- if (!M) return;
2332
- u("executing");
2333
- const j = `quick-${Date.now()}`;
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()}`;
2334
2350
  U({
2335
- id: j,
2336
- name: M,
2337
- args: { args: Z }
2338
- }), D(j, "running");
2351
+ id: N,
2352
+ name: q,
2353
+ args: { args: re }
2354
+ }), j(N, "running");
2339
2355
  try {
2340
2356
  if (r) {
2341
- const B = await r(M, { args: Z });
2342
- D(j, "success", String(B));
2357
+ const Q = await r(q, { args: re });
2358
+ j(N, "success", String(Q));
2343
2359
  } else
2344
- D(j, "success", "Tool executed (no handler)");
2345
- b((B) => [
2360
+ j(N, "success", "Tool executed (no handler)");
2361
+ S((Q) => [
2346
2362
  {
2347
2363
  query: m,
2348
2364
  timestamp: Date.now(),
2349
- toolsExecuted: [M],
2365
+ toolsExecuted: [q],
2350
2366
  success: !0
2351
2367
  },
2352
- ...B.slice(0, (t.maxHistoryEntries || 50) - 1)
2353
- ]), u("complete"), I(`Executed: ${M}`);
2354
- const q = t.autoCloseDelay ?? 1e3;
2355
- q > 0 && setTimeout(() => te(), q);
2356
- } catch (q) {
2357
- const B = q instanceof Error ? q.message : "Unknown error";
2358
- D(j, "error", void 0, B), u("error"), I(`Error: ${B}`);
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}`);
2359
2375
  }
2360
2376
  },
2361
- [r, U, D, t.autoCloseDelay, t.maxHistoryEntries, te]
2362
- ), X = S(() => {
2377
+ [r, U, j, t.autoCloseDelay, t.maxHistoryEntries, M]
2378
+ ), oe = b(() => {
2363
2379
  if (c.trim()) {
2364
- if (g === "quick-command") {
2365
- G(c);
2380
+ if (u === "quick-command") {
2381
+ Z(c);
2366
2382
  return;
2367
2383
  }
2368
2384
  if (!i) {
2369
- I("Agent unavailable. Use quick commands (start with /)."), u("error");
2385
+ I("Agent unavailable. Use quick commands (start with /)."), f("error");
2370
2386
  return;
2371
2387
  }
2372
- u("thinking"), o == null || o.emit({
2388
+ f("thinking"), o == null || o.emit({
2373
2389
  type: "agent-command-palette:submit",
2374
2390
  source: "agent-command-palette",
2375
2391
  timestamp: Date.now(),
2376
- payload: { query: c, mode: g }
2377
- }), b((m) => [
2392
+ payload: { query: c, mode: u }
2393
+ }), S((m) => [
2378
2394
  {
2379
2395
  query: c,
2380
2396
  timestamp: Date.now(),
@@ -2384,106 +2400,106 @@ function mt({
2384
2400
  ...m.slice(0, (t.maxHistoryEntries || 50) - 1)
2385
2401
  ]);
2386
2402
  }
2387
- }, [c, g, G, o, t.maxHistoryEntries, i]), de = S(() => {
2388
- if (L.length === 0) return;
2389
- const m = w < L.length - 1 ? w + 1 : w;
2390
- x(m), L[m] && (y(L[m].query), h(L[m].query.startsWith("/") ? "quick-command" : "natural"));
2391
- }, [L, w]), ue = S(() => {
2403
+ }, [c, u, Z, o, t.maxHistoryEntries, i]), de = b(() => {
2404
+ if (_.length === 0) return;
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(() => {
2392
2408
  if (w <= 0) {
2393
- x(-1), y(""), h("natural");
2409
+ x(-1), k(""), h("natural");
2394
2410
  return;
2395
2411
  }
2396
2412
  const m = w - 1;
2397
- x(m), L[m] && (y(L[m].query), h(L[m].query.startsWith("/") ? "quick-command" : "natural"));
2398
- }, [L, w]), ie = S(
2413
+ x(m), _[m] && (k(_[m].query), h(_[m].query.startsWith("/") ? "quick-command" : "natural"));
2414
+ }, [_, w]), ie = b(
2399
2415
  (m) => {
2400
2416
  const {
2401
2417
  key: E = "p",
2402
- altKey: M = !0,
2403
- ctrlKey: Z = !1,
2404
- metaKey: j = !1,
2405
- shiftKey: q = !1
2406
- } = e, B = m.altKey === M && m.ctrlKey === Z && m.metaKey === j && m.shiftKey === q;
2407
- if ((M ? m.code === `Key${E.toUpperCase()}` : m.key.toLowerCase() === E.toLowerCase()) && B) {
2408
- const re = m.target;
2409
- if (!re.closest("[data-agent-command-palette-input]") && (re.tagName === "INPUT" || re.tagName === "TEXTAREA" || re.isContentEditable))
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))
2410
2426
  return;
2411
- m.preventDefault(), ae();
2427
+ m.preventDefault(), te();
2412
2428
  }
2413
2429
  },
2414
- [e, ae]
2430
+ [e, te]
2415
2431
  );
2416
2432
  R(() => (window.addEventListener("keydown", ie), () => window.removeEventListener("keydown", ie)), [ie]);
2417
- const Pe = S(() => {
2418
- V && W(
2419
- (m) => m < J - 1 ? m + 1 : 0
2433
+ const Pe = b(() => {
2434
+ K && $(
2435
+ (m) => m < G - 1 ? m + 1 : 0
2420
2436
  );
2421
- }, [V, J]), We = S(() => {
2422
- V && W(
2423
- (m) => m > 0 ? m - 1 : J - 1
2437
+ }, [K, G]), Le = b(() => {
2438
+ K && $(
2439
+ (m) => m > 0 ? m - 1 : G - 1
2424
2440
  );
2425
- }, [V, J]), _e = S(() => {
2426
- var Z;
2427
- if (!V || P < 0) return;
2428
- if (A.isEnteringArgs) {
2429
- const j = F[P];
2430
- if (!j) return;
2431
- let q = `/${A.commandName}`;
2432
- for (const re of A.enteredArgs)
2433
- q += ` ${re}`;
2434
- q += ` ${j.option}`;
2435
- const B = A.currentArgIndex + 1;
2436
- ((Z = A.command) == null ? void 0 : Z.args) && B < A.command.args.length && (q += " "), y(q), W(-1);
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);
2437
2453
  return;
2438
2454
  }
2439
- const m = O[P];
2455
+ const m = P[z];
2440
2456
  if (!m) return;
2441
2457
  const E = m.command;
2442
- let M = `/${E.name}`;
2443
- E.args && E.args.length > 0 && (M += " "), y(M), W(-1);
2444
- }, [V, P, A, F, O]);
2458
+ let q = `/${E.name}`;
2459
+ E.args && E.args.length > 0 && (q += " "), k(q), $(-1);
2460
+ }, [K, z, v, V, P]);
2445
2461
  return {
2446
2462
  // Agent availability
2447
2463
  agentAvailable: i,
2448
2464
  // Visibility
2449
2465
  isOpen: n,
2450
- open: se,
2451
- close: te,
2452
- toggle: ae,
2466
+ open: H,
2467
+ close: M,
2468
+ toggle: te,
2453
2469
  // Input
2454
2470
  query: c,
2455
- setQuery: ne,
2456
- mode: g,
2471
+ setQuery: X,
2472
+ mode: u,
2457
2473
  // Execution
2458
- status: v,
2459
- setStatus: u,
2474
+ status: C,
2475
+ setStatus: f,
2460
2476
  pendingTools: d,
2461
- completedTools: C,
2462
- agentResponse: z,
2477
+ completedTools: T,
2478
+ agentResponse: D,
2463
2479
  setAgentResponse: I,
2464
- submit: X,
2465
- executeQuickCommand: G,
2480
+ submit: oe,
2481
+ executeQuickCommand: Z,
2466
2482
  // Tool management (for external AI integration)
2467
2483
  addPendingTool: U,
2468
- updateToolStatus: D,
2484
+ updateToolStatus: j,
2469
2485
  // History
2470
- history: L,
2486
+ history: _,
2471
2487
  historyPrevious: de,
2472
2488
  historyNext: ue,
2473
2489
  // Suggestions
2474
- suggestions: T,
2490
+ suggestions: A,
2475
2491
  // Actions
2476
- clear: K,
2492
+ clear: B,
2477
2493
  // Quick command autocomplete
2478
- quickCommandMatches: O,
2479
- argumentOptionMatches: F,
2480
- parsedQuery: A,
2481
- currentArgDef: ee,
2482
- selectedAutocompleteIndex: P,
2494
+ quickCommandMatches: P,
2495
+ argumentOptionMatches: V,
2496
+ parsedQuery: v,
2497
+ currentArgDef: ae,
2498
+ selectedAutocompleteIndex: z,
2483
2499
  autocompleteNext: Pe,
2484
- autocompletePrevious: We,
2485
- autocompleteAccept: _e,
2486
- showAutocomplete: V
2500
+ autocompletePrevious: Le,
2501
+ autocompleteAccept: We,
2502
+ showAutocomplete: K
2487
2503
  };
2488
2504
  }
2489
2505
  const we = {
@@ -2620,7 +2636,7 @@ const we = {
2620
2636
  call_template_type: "panel_event",
2621
2637
  event_type: "panel:list-state-panels"
2622
2638
  }
2623
- }, Te = {
2639
+ }, Ce = {
2624
2640
  name: "toggle_panel",
2625
2641
  description: "Collapse or expand a side panel to give more space to the main content area.",
2626
2642
  inputs: {
@@ -2647,7 +2663,7 @@ const we = {
2647
2663
  call_template_type: "panel_event",
2648
2664
  event_type: "panel:toggle"
2649
2665
  }
2650
- }, Ce = {
2666
+ }, Te = {
2651
2667
  name: "collapse_all_panels",
2652
2668
  description: "Collapse both left and right panels to maximize the main content area. Useful for focus mode.",
2653
2669
  inputs: {
@@ -2770,8 +2786,8 @@ const we = {
2770
2786
  Se,
2771
2787
  ve,
2772
2788
  // Layout action tools
2773
- Te,
2774
2789
  Ce,
2790
+ Te,
2775
2791
  Ie,
2776
2792
  Ae,
2777
2793
  $e,
@@ -2781,8 +2797,8 @@ const we = {
2781
2797
  Se,
2782
2798
  ve
2783
2799
  ], kt = [
2784
- Te,
2785
2800
  Ce,
2801
+ Te,
2786
2802
  Ie,
2787
2803
  Ae,
2788
2804
  $e,
@@ -2842,27 +2858,27 @@ function Ue(o) {
2842
2858
  function vt(o) {
2843
2859
  return o.map(Ue);
2844
2860
  }
2845
- function Ge(o) {
2861
+ function Ye(o) {
2846
2862
  return {
2847
2863
  name: o.name,
2848
2864
  description: o.description,
2849
2865
  parameters: o.inputs
2850
2866
  };
2851
2867
  }
2852
- function Tt(o) {
2853
- return o.map(Ge);
2868
+ function Ct(o) {
2869
+ return o.map(Ye);
2854
2870
  }
2855
- function Ct(o, e = {}) {
2871
+ function Tt(o, e = {}) {
2856
2872
  const {
2857
2873
  header: t = "You have access to the following tools:",
2858
2874
  includeParameters: r = !0
2859
2875
  } = e, s = o.map((i) => {
2860
2876
  let l = `- ${i.name}: ${i.description}`;
2861
2877
  if (r && i.inputs.properties) {
2862
- const n = Object.entries(i.inputs.properties).map(([f, c]) => {
2878
+ const n = Object.entries(i.inputs.properties).map(([g, c]) => {
2863
2879
  var h;
2864
- const y = c, g = (h = i.inputs.required) != null && h.includes(f) ? " (required)" : "";
2865
- return ` - ${f}: ${y.description || y.type}${g}`;
2880
+ const k = c, u = (h = i.inputs.required) != null && h.includes(g) ? " (required)" : "";
2881
+ return ` - ${g}: ${k.description || k.type}${u}`;
2866
2882
  }).join(`
2867
2883
  `);
2868
2884
  n && (l += `
@@ -2876,7 +2892,7 @@ ${s.join(`
2876
2892
 
2877
2893
  `)}`;
2878
2894
  }
2879
- const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2895
+ const Ge = ({ size: o = 18 }) => /* @__PURE__ */ y(
2880
2896
  "svg",
2881
2897
  {
2882
2898
  width: o,
@@ -2892,7 +2908,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2892
2908
  /* @__PURE__ */ a("path", { d: "M9 3v18" })
2893
2909
  ]
2894
2910
  }
2895
- ), Xe = ({ size: o = 18 }) => /* @__PURE__ */ k(
2911
+ ), Xe = ({ size: o = 18 }) => /* @__PURE__ */ y(
2896
2912
  "svg",
2897
2913
  {
2898
2914
  width: o,
@@ -2909,7 +2925,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2909
2925
  /* @__PURE__ */ a("path", { d: "m16 15-3-3 3-3" })
2910
2926
  ]
2911
2927
  }
2912
- ), Ze = ({ size: o = 18 }) => /* @__PURE__ */ k(
2928
+ ), Ze = ({ size: o = 18 }) => /* @__PURE__ */ y(
2913
2929
  "svg",
2914
2930
  {
2915
2931
  width: o,
@@ -2925,7 +2941,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2925
2941
  /* @__PURE__ */ a("path", { d: "M15 3v18" })
2926
2942
  ]
2927
2943
  }
2928
- ), et = ({ size: o = 18 }) => /* @__PURE__ */ k(
2944
+ ), et = ({ size: o = 18 }) => /* @__PURE__ */ y(
2929
2945
  "svg",
2930
2946
  {
2931
2947
  width: o,
@@ -2952,7 +2968,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2952
2968
  title: l,
2953
2969
  className: n
2954
2970
  }) => {
2955
- const { theme: f } = Q(), c = () => t === "right" ? o ? /* @__PURE__ */ a(Ze, { size: r }) : /* @__PURE__ */ a(et, { size: r }) : o ? /* @__PURE__ */ a(Ye, { size: r }) : /* @__PURE__ */ a(Xe, { size: r });
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 });
2956
2972
  return /* @__PURE__ */ a(
2957
2973
  "button",
2958
2974
  {
@@ -2962,7 +2978,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2962
2978
  style: {
2963
2979
  background: "transparent",
2964
2980
  border: "none",
2965
- color: o ? f.colors.textSecondary : f.colors.primary,
2981
+ color: o ? g.colors.textSecondary : g.colors.primary,
2966
2982
  cursor: "pointer",
2967
2983
  padding: "6px",
2968
2984
  borderRadius: "4px",
@@ -2974,16 +2990,16 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
2974
2990
  height: "32px",
2975
2991
  ...s
2976
2992
  },
2977
- onMouseEnter: (g) => {
2978
- g.currentTarget.style.backgroundColor = f.colors.backgroundTertiary, g.currentTarget.style.color = f.colors.primary;
2993
+ onMouseEnter: (u) => {
2994
+ u.currentTarget.style.backgroundColor = g.colors.backgroundTertiary, u.currentTarget.style.color = g.colors.primary;
2979
2995
  },
2980
- onMouseLeave: (g) => {
2981
- g.currentTarget.style.backgroundColor = "transparent", g.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;
2982
2998
  },
2983
2999
  children: c()
2984
3000
  }
2985
3001
  );
2986
- }, tt = ({ size: o = 14 }) => /* @__PURE__ */ k(
3002
+ }, tt = ({ size: o = 14 }) => /* @__PURE__ */ y(
2987
3003
  "svg",
2988
3004
  {
2989
3005
  width: o,
@@ -3001,7 +3017,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3001
3017
  /* @__PURE__ */ a("path", { d: "M20 17H4" })
3002
3018
  ]
3003
3019
  }
3004
- ), ot = ({ size: o = 14 }) => /* @__PURE__ */ k(
3020
+ ), ot = ({ size: o = 14 }) => /* @__PURE__ */ y(
3005
3021
  "svg",
3006
3022
  {
3007
3023
  width: o,
@@ -3019,7 +3035,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3019
3035
  /* @__PURE__ */ a("path", { d: "M4 17h16" })
3020
3036
  ]
3021
3037
  }
3022
- ), ye = ({
3038
+ ), me = ({
3023
3039
  onSwitch: o,
3024
3040
  variant: e = "left-middle",
3025
3041
  iconSize: t = 14,
@@ -3027,7 +3043,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3027
3043
  title: s,
3028
3044
  className: i
3029
3045
  }) => {
3030
- const { theme: l } = Q(), n = () => e === "left-middle" ? "Switch left and middle panels" : "Switch right and middle panels", f = e === "left-middle" ? tt : ot;
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;
3031
3047
  return /* @__PURE__ */ a(
3032
3048
  "button",
3033
3049
  {
@@ -3055,10 +3071,10 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3055
3071
  onMouseLeave: (c) => {
3056
3072
  c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.color = l.colors.textSecondary;
3057
3073
  },
3058
- children: /* @__PURE__ */ a(f, { size: t })
3074
+ children: /* @__PURE__ */ a(g, { size: t })
3059
3075
  }
3060
3076
  );
3061
- }, rt = ({ size: o = 14 }) => /* @__PURE__ */ k(
3077
+ }, rt = ({ size: o = 14 }) => /* @__PURE__ */ y(
3062
3078
  "svg",
3063
3079
  {
3064
3080
  width: o,
@@ -3082,7 +3098,7 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3082
3098
  title: r = "Configure panel layout",
3083
3099
  className: s
3084
3100
  }) => {
3085
- const { theme: i } = Q();
3101
+ const { theme: i } = Y();
3086
3102
  return /* @__PURE__ */ a(
3087
3103
  "button",
3088
3104
  {
@@ -3122,28 +3138,28 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3122
3138
  showRightSidebarControl: i = !1,
3123
3139
  onSwitchLeftMiddlePanels: l,
3124
3140
  showSwitchLeftMiddle: n = !1,
3125
- onSwitchRightMiddlePanels: f,
3141
+ onSwitchRightMiddlePanels: g,
3126
3142
  showSwitchRightMiddle: c = !1,
3127
- onConfigurePanels: y,
3128
- showConfigureButton: g = !1,
3143
+ onConfigurePanels: k,
3144
+ showConfigureButton: u = !1,
3129
3145
  gap: h = 4,
3130
- style: v,
3131
- className: u,
3146
+ style: C,
3147
+ className: f,
3132
3148
  iconSize: d,
3133
3149
  leftCollapseButtonProps: p,
3134
- rightCollapseButtonProps: C,
3135
- leftMiddleSwitchButtonProps: $,
3136
- rightMiddleSwitchButtonProps: z,
3150
+ rightCollapseButtonProps: T,
3151
+ leftMiddleSwitchButtonProps: W,
3152
+ rightMiddleSwitchButtonProps: D,
3137
3153
  configureButtonProps: I
3138
- }) => t && e || n && l || g && y || c && f || i && s ? /* @__PURE__ */ k(
3154
+ }) => t && e || n && l || u && k || c && g || i && s ? /* @__PURE__ */ y(
3139
3155
  "div",
3140
3156
  {
3141
- className: u,
3157
+ className: f,
3142
3158
  style: {
3143
3159
  display: "flex",
3144
3160
  alignItems: "center",
3145
3161
  gap: `${h}px`,
3146
- ...v
3162
+ ...C
3147
3163
  },
3148
3164
  children: [
3149
3165
  t && e && /* @__PURE__ */ a(
@@ -3157,29 +3173,29 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3157
3173
  }
3158
3174
  ),
3159
3175
  n && l && /* @__PURE__ */ a(
3160
- ye,
3176
+ me,
3161
3177
  {
3162
3178
  onSwitch: l,
3163
3179
  variant: "left-middle",
3164
3180
  iconSize: d ?? 14,
3165
- ...$
3181
+ ...W
3166
3182
  }
3167
3183
  ),
3168
- g && y && /* @__PURE__ */ a(
3184
+ u && k && /* @__PURE__ */ a(
3169
3185
  nt,
3170
3186
  {
3171
- onConfigure: y,
3187
+ onConfigure: k,
3172
3188
  iconSize: d ?? 14,
3173
3189
  ...I
3174
3190
  }
3175
3191
  ),
3176
- c && f && /* @__PURE__ */ a(
3177
- ye,
3192
+ c && g && /* @__PURE__ */ a(
3193
+ me,
3178
3194
  {
3179
- onSwitch: f,
3195
+ onSwitch: g,
3180
3196
  variant: "right-middle",
3181
3197
  iconSize: d ?? 14,
3182
- ...z
3198
+ ...D
3183
3199
  }
3184
3200
  ),
3185
3201
  i && s && /* @__PURE__ */ a(
@@ -3189,56 +3205,56 @@ const Ye = ({ size: o = 18 }) => /* @__PURE__ */ k(
3189
3205
  onToggle: s,
3190
3206
  side: "right",
3191
3207
  iconSize: d ?? 18,
3192
- ...C
3208
+ ...T
3193
3209
  }
3194
3210
  )
3195
3211
  ]
3196
3212
  }
3197
3213
  ) : null;
3198
3214
  export {
3199
- me as AgentCommandInput,
3200
- Oe as AgentCommandPalette,
3215
+ ye as AgentCommandInput,
3216
+ Fe as AgentCommandPalette,
3201
3217
  ke as AgentResponseDisplay,
3202
3218
  zt as EditableConfigurablePanelLayout,
3203
3219
  ht as FocusIndicator,
3204
- yt as FocusModeOverlay,
3220
+ mt as FocusModeOverlay,
3205
3221
  Re as LocalStoragePersistenceAdapter,
3206
3222
  De as LocalStorageWorkspaceAdapter,
3207
3223
  he as PanelCollapseButton,
3208
3224
  nt as PanelConfigureButton,
3209
3225
  It as PanelControls,
3210
- ye as PanelSwitchButton,
3226
+ me as PanelSwitchButton,
3211
3227
  be as QuickCommandAutocomplete,
3212
3228
  Pt as ResponsiveConfigurablePanelLayout,
3213
3229
  xe as ToolExecutionList,
3214
- N as WorkspaceLayoutService,
3215
- Ce as collapseAllPanelsTool,
3230
+ O as WorkspaceLayoutService,
3231
+ Te as collapseAllPanelsTool,
3216
3232
  Ie as expandAllPanelsTool,
3217
3233
  $e as focusPanelTool,
3218
3234
  pe as fuzzyMatch,
3219
- Ct as generateToolsSystemPrompt,
3235
+ Tt as generateToolsSystemPrompt,
3220
3236
  Se as getPanelStateTool,
3221
3237
  we as getVisiblePanelsTool,
3222
3238
  kt as layoutActionTools,
3223
3239
  He as layoutTools,
3224
3240
  bt as layoutToolsMetadata,
3225
3241
  ve as listPanelsWithStateTool,
3226
- Wt as mapThemeToPanelVars,
3227
- _t as mapThemeToTabVars,
3242
+ Lt as mapThemeToPanelVars,
3243
+ Wt as mapThemeToTabVars,
3228
3244
  ze as resetLayoutTool,
3229
- Fe as searchQuickCommands,
3245
+ Oe as searchQuickCommands,
3230
3246
  xt as stateQueryTools,
3231
3247
  Ae as switchPanelTool,
3232
- Te as togglePanelTool,
3233
- Ge as toolToAIFunction,
3248
+ Ce as togglePanelTool,
3249
+ Ye as toolToAIFunction,
3234
3250
  Ue as toolToAnthropicFormat,
3235
3251
  Qe as toolToGeminiFunction,
3236
3252
  Je as toolToOpenAIFunction,
3237
- Tt as toolsToAIFunctions,
3253
+ Ct as toolsToAIFunctions,
3238
3254
  vt as toolsToAnthropicFormat,
3239
3255
  wt as toolsToGeminiFormat,
3240
3256
  St as toolsToOpenAIFormat,
3241
- mt as useAgentCommandPalette,
3257
+ yt as useAgentCommandPalette,
3242
3258
  ut as usePanelFocus,
3243
3259
  gt as usePanelFocusListener,
3244
3260
  ft as usePanelKeyboardShortcuts,