@burdenoff/microfe-vibecontrols 2026.529.16 → 2026.529.17

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.
@@ -1,71 +1,72 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
- import { TerminalIframe as t } from "./TerminalIframe.js";
3
- import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
- import { AlertCircle as ee, ChevronDown as o, ChevronUp as te, Edit3 as ne, Expand as re, ExternalLink as s, GripVertical as ie, Loader2 as c, Maximize2 as ae, Minimize2 as oe, Plus as l, RotateCcw as u, Search as se, Shrink as ce, Square as d, Terminal as f, Wifi as le, WifiOff as ue, X as p } from "lucide-react";
5
- import { Fragment as de, jsx as m, jsxs as h } from "react/jsx-runtime";
6
- import { createPortal as fe } from "react-dom";
2
+ import { ConnectionLogPanel as t } from "../agents/ConnectionLogPanel.js";
3
+ import { TerminalIframe as n } from "./TerminalIframe.js";
4
+ import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
+ import { AlertCircle as ee, ChevronDown as te, ChevronUp as ne, Edit3 as re, Expand as ie, ExternalLink as s, GripVertical as ae, Loader2 as c, Maximize2 as oe, Minimize2 as se, Plus as l, RotateCcw as u, ScrollText as ce, Search as le, Shrink as ue, Square as d, Terminal as f, Wifi as de, WifiOff as fe, X as p } from "lucide-react";
6
+ import { Fragment as pe, jsx as m, jsxs as h } from "react/jsx-runtime";
7
+ import { createPortal as me } from "react-dom";
7
8
  //#region src/components/sessions/TerminalPanel.tsx
8
- function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenExternal: ge, onToggleCollapse: _e, collapsed: _ = !1, heightClass: ve = "h-[420px]", sessions: v, onOpenTerminal: ye, onRetryTerminal: y, onRenameSession: b, onStopTerminal: x, onRestartTerminal: S, onStopSession: C, onCreateSession: w, fullScreen: T = !1, isImmersiveFullscreen: E = !1, onToggleImmersiveFullscreen: D, contextSwitcher: be }) {
9
- let O = e(), [k, xe] = a(!1), [A, j] = a(!1), [M, N] = a(""), [P, F] = a({
9
+ function g({ tabs: g, activeTabId: he, onTabSelect: ge, onTabClose: _e, onOpenExternal: ve, onToggleCollapse: ye, collapsed: _ = !1, heightClass: be = "h-[420px]", sessions: v, onOpenTerminal: xe, onRetryTerminal: y, onRenameSession: b, onStopTerminal: Se, onRestartTerminal: x, onStopSession: S, onCreateSession: C, fullScreen: w = !1, isImmersiveFullscreen: T = !1, onToggleImmersiveFullscreen: E, contextSwitcher: Ce }) {
10
+ let D = e(), [O, we] = o(!1), [Te, Ee] = o(!1), [k, A] = o(!1), [j, M] = o(""), [N, P] = o({
10
11
  visible: !1,
11
12
  x: 0,
12
13
  y: 0,
13
14
  sessionId: null
14
- }), [I, Se] = a(null), [L, R] = a(""), [z, Ce] = a({}), [B, we] = a({}), [Te, Ee] = a(null), V = i(!1), De = i(0), Oe = i(0), ke = i(null), H = i(null), Ae = i(null), U = i(null), je = i(null), Me = i(null), Ne = i({}), W = i({}), G = i({}), K = i({}), q = g.find((e) => e.sessionId === pe) || g[0] || null, J = n((e, t) => {
15
- Ce((n) => n[e] === t ? n : {
15
+ }), [F, De] = o(null), [I, L] = o(""), [R, Oe] = o({}), [z, ke] = o({}), [Ae, je] = o(null), B = a(!1), Me = a(0), Ne = a(0), Pe = a(null), V = a(null), Fe = a(null), H = a(null), Ie = a(null), Le = a(null), Re = a({}), U = a({}), W = a({}), G = a({}), K = g.find((e) => e.sessionId === he) || g[0] || null, q = r((e, t) => {
16
+ Oe((n) => n[e] === t ? n : {
16
17
  ...n,
17
18
  [e]: t
18
19
  });
19
- }, []), Y = n((e, t) => {
20
- we((n) => n[e] === t ? n : {
20
+ }, []), J = r((e, t) => {
21
+ ke((n) => n[e] === t ? n : {
21
22
  ...n,
22
23
  [e]: t
23
24
  });
24
- }, []), Pe = n((e) => {
25
+ }, []), ze = r((e) => {
25
26
  if (!e) return null;
26
27
  try {
27
28
  let t = typeof window < "u" ? window.location.protocol : "https:", n = new URL(e).protocol;
28
- return t === "https:" && n !== "https:" ? O("vibecontrols.sessions.terminal.mixedContentBlocked", "This terminal URL is not HTTPS, so the browser blocked it on this secure page.") : null;
29
+ return t === "https:" && n !== "https:" ? D("vibecontrols.sessions.terminal.mixedContentBlocked", "This terminal URL is not HTTPS, so the browser blocked it on this secure page.") : null;
29
30
  } catch {
30
- return O("vibecontrols.sessions.terminal.invalidUrl", "The terminal URL is invalid. Restart the terminal to generate a new URL.");
31
+ return D("vibecontrols.sessions.terminal.invalidUrl", "The terminal URL is invalid. Restart the terminal to generate a new URL.");
31
32
  }
32
- }, [O]), Fe = n(() => {
33
- xe((e) => !e), Ee(null);
34
- }, []), X = (v ?? []).filter((e) => !g.some((t) => t.sessionId === e.id)), Ie = M.trim() ? X.filter((e) => e.name.toLowerCase().includes(M.trim().toLowerCase())) : X, Le = n((e) => {
35
- K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), J(e, "connected"), Y(e, void 0);
36
- }, [Y, J]), Re = n((e) => {
37
- K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), J(e, "error");
38
- }, [J]);
39
- r(() => (g.forEach((e) => {
33
+ }, [D]), Be = r(() => {
34
+ we((e) => !e), je(null);
35
+ }, []), Y = (v ?? []).filter((e) => !g.some((t) => t.sessionId === e.id)), Ve = j.trim() ? Y.filter((e) => e.name.toLowerCase().includes(j.trim().toLowerCase())) : Y, He = r((e) => {
36
+ G.current[e] && (clearTimeout(G.current[e]), delete G.current[e]), q(e, "connected"), J(e, void 0);
37
+ }, [J, q]), Ue = r((e) => {
38
+ G.current[e] && (clearTimeout(G.current[e]), delete G.current[e]), q(e, "error");
39
+ }, [q]);
40
+ i(() => (g.forEach((e) => {
40
41
  if (!e.terminalUrl || e.loading || e.error) return;
41
- let t = Pe(e.terminalUrl);
42
+ let t = ze(e.terminalUrl);
42
43
  if (t) {
43
- J(e.sessionId, "error"), Y(e.sessionId, t);
44
+ q(e.sessionId, "error"), J(e.sessionId, t);
44
45
  return;
45
46
  }
46
- z[e.sessionId] || J(e.sessionId, "connecting"), z[e.sessionId] === "connecting" && !K.current[e.sessionId] && (K.current[e.sessionId] = setTimeout(() => {
47
- delete K.current[e.sessionId], J(e.sessionId, "error"), Y(e.sessionId, O("vibecontrols.sessions.terminal.connectionTimedOut", "Timed out waiting for the terminal to connect. Check the agent tunnel and retry."));
47
+ R[e.sessionId] || q(e.sessionId, "connecting"), R[e.sessionId] === "connecting" && !G.current[e.sessionId] && (G.current[e.sessionId] = setTimeout(() => {
48
+ delete G.current[e.sessionId], q(e.sessionId, "error"), J(e.sessionId, D("vibecontrols.sessions.terminal.connectionTimedOut", "Timed out waiting for the terminal to connect. Check the agent tunnel and retry."));
48
49
  }, 12e3));
49
50
  }), () => {
50
- for (let e of Object.values(K.current)) clearTimeout(e);
51
- K.current = {};
51
+ for (let e of Object.values(G.current)) clearTimeout(e);
52
+ G.current = {};
52
53
  }), [
53
- z,
54
- Pe,
55
- Y,
54
+ R,
55
+ ze,
56
56
  J,
57
+ q,
57
58
  g,
58
- O
59
+ D
59
60
  ]);
60
- let ze = n((e) => {
61
- W.current[e] && (clearTimeout(W.current[e]), delete W.current[e]), delete G.current[e];
62
- }, []), Z = n((e) => {
63
- let t = Ne.current[e];
61
+ let X = r((e) => {
62
+ U.current[e] && (clearTimeout(U.current[e]), delete U.current[e]), delete W.current[e];
63
+ }, []), Z = r((e) => {
64
+ let t = Re.current[e];
64
65
  if (t) {
65
- ze(e), we((t) => ({
66
+ X(e), ke((t) => ({
66
67
  ...t,
67
68
  [e]: void 0
68
- })), Ce((t) => ({
69
+ })), Oe((t) => ({
69
70
  ...t,
70
71
  [e]: "connecting"
71
72
  }));
@@ -74,23 +75,23 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
74
75
  t.src = n;
75
76
  });
76
77
  }
77
- }, [ze]);
78
- r(() => {
78
+ }, [X]);
79
+ i(() => {
79
80
  for (let e of g) {
80
- let t = z[e.sessionId];
81
- if (t === "error" && e.terminalUrl && !e.error && !B[e.sessionId]) {
82
- if (W.current[e.sessionId]) continue;
83
- let t = G.current[e.sessionId] ?? 0;
81
+ let t = R[e.sessionId];
82
+ if (t === "error" && e.terminalUrl && !e.error && !z[e.sessionId]) {
83
+ if (U.current[e.sessionId]) continue;
84
+ let t = W.current[e.sessionId] ?? 0;
84
85
  if (t >= 15) continue;
85
86
  let n = Math.min(2e3 * 2 ** t, 3e4);
86
- W.current[e.sessionId] = setTimeout(() => {
87
- delete W.current[e.sessionId], G.current[e.sessionId] = t + 1;
88
- let n = Ne.current[e.sessionId];
87
+ U.current[e.sessionId] = setTimeout(() => {
88
+ delete U.current[e.sessionId], W.current[e.sessionId] = t + 1;
89
+ let n = Re.current[e.sessionId];
89
90
  if (!n) return;
90
91
  let r = e.terminalUrl, i = `${new URL(r).origin}/health`;
91
92
  fetch(i, { signal: AbortSignal.timeout(5e3) }).then((t) => {
92
93
  if (t.ok) {
93
- Ce((t) => ({
94
+ Oe((t) => ({
94
95
  ...t,
95
96
  [e.sessionId]: "connecting"
96
97
  }));
@@ -102,132 +103,132 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
102
103
  }).catch(() => {});
103
104
  }, n);
104
105
  }
105
- t === "connected" && ze(e.sessionId);
106
+ t === "connected" && X(e.sessionId);
106
107
  }
107
- let e = W.current;
108
+ let e = U.current;
108
109
  return () => {
109
110
  for (let t of Object.values(e)) clearTimeout(t);
110
111
  };
111
112
  }, [
112
113
  g,
113
- B,
114
114
  z,
115
- ze
115
+ R,
116
+ X
116
117
  ]);
117
- let Be = n((e) => {
118
- T || k || (e.preventDefault(), V.current = !0, De.current = e.clientY, Oe.current = ke.current?.offsetHeight || 420, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none");
119
- }, [T, k]);
120
- r(() => {
118
+ let We = r((e) => {
119
+ w || O || (e.preventDefault(), B.current = !0, Me.current = e.clientY, Ne.current = Pe.current?.offsetHeight || 420, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none");
120
+ }, [w, O]);
121
+ i(() => {
121
122
  let e = (e) => {
122
- if (!V.current) return;
123
- let t = De.current - e.clientY;
124
- Ee(Math.max(200, Math.min(Oe.current + t, window.innerHeight - 150)));
123
+ if (!B.current) return;
124
+ let t = Me.current - e.clientY;
125
+ je(Math.max(200, Math.min(Ne.current + t, window.innerHeight - 150)));
125
126
  }, t = () => {
126
- V.current && (V.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
127
+ B.current && (B.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
127
128
  };
128
129
  return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), () => {
129
130
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
130
131
  };
131
132
  }, []);
132
- let Ve = n((e, t) => {
133
- e.preventDefault(), e.stopPropagation(), F({
133
+ let Ge = r((e, t) => {
134
+ e.preventDefault(), e.stopPropagation(), P({
134
135
  visible: !0,
135
136
  x: e.clientX,
136
137
  y: e.clientY,
137
138
  sessionId: t
138
139
  });
139
140
  }, []);
140
- r(() => {
141
+ i(() => {
141
142
  let e = (e) => {
142
- Ae.current && !Ae.current.contains(e.target) && F((e) => ({
143
+ Fe.current && !Fe.current.contains(e.target) && P((e) => ({
143
144
  ...e,
144
145
  visible: !1
145
146
  }));
146
147
  };
147
- if (P.visible) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
148
- }, [P.visible]), r(() => {
148
+ if (N.visible) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
149
+ }, [N.visible]), i(() => {
149
150
  let e = (e) => {
150
151
  let t = e.target;
151
- je.current && !je.current.contains(t) && U.current && !U.current.contains(t) && (j(!1), N(""));
152
+ Ie.current && !Ie.current.contains(t) && H.current && !H.current.contains(t) && (A(!1), M(""));
152
153
  };
153
- if (A) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
154
- }, [A]), r(() => {
155
- A && Me.current && requestAnimationFrame(() => Me.current?.focus());
156
- }, [A]), r(() => {
157
- I && H.current && (H.current.focus(), H.current.select());
158
- }, [I]), r(() => {
159
- if (!E || !D) return;
154
+ if (k) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
155
+ }, [k]), i(() => {
156
+ k && Le.current && requestAnimationFrame(() => Le.current?.focus());
157
+ }, [k]), i(() => {
158
+ F && V.current && (V.current.focus(), V.current.select());
159
+ }, [F]), i(() => {
160
+ if (!T || !E) return;
160
161
  let e = (e) => {
161
- e.key === "Escape" && D();
162
+ e.key === "Escape" && E();
162
163
  };
163
164
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
164
- }, [E, D]);
165
- let He = n((e) => {
165
+ }, [T, E]);
166
+ let Ke = r((e) => {
166
167
  let t = g.find((t) => t.sessionId === e);
167
- t && (Se(e), R(t.name)), F((e) => ({
168
+ t && (De(e), L(t.name)), P((e) => ({
168
169
  ...e,
169
170
  visible: !1
170
171
  }));
171
- }, [g]), Q = n(() => {
172
- if (I && L.trim() && b) {
173
- let e = g.find((e) => e.sessionId === I);
174
- e && L.trim() !== e.name && b(I, L.trim());
172
+ }, [g]), Q = r(() => {
173
+ if (F && I.trim() && b) {
174
+ let e = g.find((e) => e.sessionId === F);
175
+ e && I.trim() !== e.name && b(F, I.trim());
175
176
  }
176
- Se(null), R("");
177
+ De(null), L("");
177
178
  }, [
179
+ F,
178
180
  I,
179
- L,
180
181
  b,
181
182
  g
182
- ]), Ue = n((e) => {
183
- e.key === "Enter" ? Q() : e.key === "Escape" && (Se(null), R(""));
183
+ ]), qe = r((e) => {
184
+ e.key === "Enter" ? Q() : e.key === "Escape" && (De(null), L(""));
184
185
  }, [Q]);
185
- if (g.length === 0 && !_ && !T) return null;
186
- let We = T ? "h-full" : k ? "h-[calc(100vh-120px)]" : Te ? void 0 : ve, Ge = !T && !k && Te ? { height: `${Te}px` } : void 0, $ = P.sessionId ? g.find((e) => e.sessionId === P.sessionId) : null, Ke = (e) => {
186
+ if (g.length === 0 && !_ && !w) return null;
187
+ let Je = w ? "h-full" : O ? "h-[calc(100vh-120px)]" : Ae ? void 0 : be, Ye = !w && !O && Ae ? { height: `${Ae}px` } : void 0, $ = N.sessionId ? g.find((e) => e.sessionId === N.sessionId) : null, Xe = (e) => {
187
188
  if (e.loading) return /* @__PURE__ */ m(c, { className: "size-3 animate-spin shrink-0" });
188
189
  if (e.error) return /* @__PURE__ */ m(ee, { className: "size-3 text-status-error-text shrink-0" });
189
- let t = z[e.sessionId];
190
- return t === "connected" ? /* @__PURE__ */ m(le, { className: "size-3 text-status-success-text shrink-0" }) : t === "error" ? /* @__PURE__ */ m(ue, { className: "size-3 text-status-error-text shrink-0" }) : t === "connecting" ? /* @__PURE__ */ m(c, { className: "size-3 animate-spin text-status-warning-text shrink-0" }) : /* @__PURE__ */ m(f, { className: "size-3 shrink-0" });
190
+ let t = R[e.sessionId];
191
+ return t === "connected" ? /* @__PURE__ */ m(de, { className: "size-3 text-status-success-text shrink-0" }) : t === "error" ? /* @__PURE__ */ m(fe, { className: "size-3 text-status-error-text shrink-0" }) : t === "connecting" ? /* @__PURE__ */ m(c, { className: "size-3 animate-spin text-status-warning-text shrink-0" }) : /* @__PURE__ */ m(f, { className: "size-3 shrink-0" });
191
192
  };
192
- return E ? E ? fe(/* @__PURE__ */ h("div", {
193
+ return T ? T ? me(/* @__PURE__ */ h("div", {
193
194
  className: "fixed inset-0 z-[9999] bg-bg-surface flex flex-col",
194
195
  children: [
195
196
  /* @__PURE__ */ h("div", {
196
197
  className: "flex items-center justify-between px-3 py-2 bg-bg-sunken border-b border-border-default shrink-0",
197
198
  children: [/* @__PURE__ */ m("div", {
198
199
  className: "flex items-center gap-4",
199
- children: be
200
+ children: Ce
200
201
  }), /* @__PURE__ */ h("div", {
201
202
  className: "flex items-center gap-2",
202
203
  children: [
203
- q && z[q.sessionId] === "error" && /* @__PURE__ */ m("button", {
204
+ K && R[K.sessionId] === "error" && /* @__PURE__ */ m("button", {
204
205
  type: "button",
205
- onClick: () => Z(q.sessionId),
206
+ onClick: () => Z(K.sessionId),
206
207
  className: "p-1.5 text-status-warning-text hover:text-status-warning-text/80 transition-colors",
207
208
  title: "Reconnect terminal",
208
209
  children: /* @__PURE__ */ m(u, { className: "size-4" })
209
210
  }),
210
- q?.terminalUrl && /* @__PURE__ */ m("button", {
211
+ K?.terminalUrl && /* @__PURE__ */ m("button", {
211
212
  type: "button",
212
- onClick: () => q && ge(q.sessionId),
213
+ onClick: () => K && ve(K.sessionId),
213
214
  className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
214
215
  title: "Open in new tab",
215
216
  children: /* @__PURE__ */ m(s, { className: "size-4" })
216
217
  }),
217
- q && C && /* @__PURE__ */ m("button", {
218
+ K && S && /* @__PURE__ */ m("button", {
218
219
  type: "button",
219
- onClick: () => q && C(q.sessionId),
220
+ onClick: () => K && S(K.sessionId),
220
221
  className: "p-1.5 text-status-warning-text hover:text-status-warning-text/80 transition-colors",
221
- title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
222
- "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
222
+ title: D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
223
+ "aria-label": D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
223
224
  children: /* @__PURE__ */ m(d, { className: "size-4" })
224
225
  }),
225
226
  /* @__PURE__ */ m("button", {
226
227
  type: "button",
227
- onClick: D,
228
+ onClick: E,
228
229
  className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
229
230
  title: "Exit fullscreen (ESC)",
230
- children: /* @__PURE__ */ m(ce, { className: "size-4" })
231
+ children: /* @__PURE__ */ m(ue, { className: "size-4" })
231
232
  })
232
233
  ]
233
234
  })]
@@ -240,21 +241,21 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
240
241
  role: "button",
241
242
  tabIndex: 0,
242
243
  onKeyDown: (t) => {
243
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), me(e.sessionId));
244
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), ge(e.sessionId));
244
245
  },
245
- className: `flex items-center gap-1.5 px-3 py-1.5 text-xs border-r border-border-subtle cursor-pointer transition-colors min-w-0 max-w-[180px] group ${e.sessionId === q?.sessionId ? "bg-bg-surface text-text-primary border-b-2 border-b-action-primary-bg" : "text-text-secondary hover:text-text-primary hover:bg-bg-surface/50"}`,
246
- onClick: () => me(e.sessionId),
247
- onContextMenu: (t) => Ve(t, e.sessionId),
248
- onDoubleClick: () => He(e.sessionId),
246
+ className: `flex items-center gap-1.5 px-3 py-1.5 text-xs border-r border-border-subtle cursor-pointer transition-colors min-w-0 max-w-[180px] group ${e.sessionId === K?.sessionId ? "bg-bg-surface text-text-primary border-b-2 border-b-action-primary-bg" : "text-text-secondary hover:text-text-primary hover:bg-bg-surface/50"}`,
247
+ onClick: () => ge(e.sessionId),
248
+ onContextMenu: (t) => Ge(t, e.sessionId),
249
+ onDoubleClick: () => Ke(e.sessionId),
249
250
  children: [
250
- Ke(e),
251
- I === e.sessionId ? /* @__PURE__ */ m("input", {
251
+ Xe(e),
252
+ F === e.sessionId ? /* @__PURE__ */ m("input", {
252
253
  "aria-label": "control",
253
- ref: H,
254
- value: L,
255
- onChange: (e) => R(e.target.value),
254
+ ref: V,
255
+ value: I,
256
+ onChange: (e) => L(e.target.value),
256
257
  onBlur: Q,
257
- onKeyDown: Ue,
258
+ onKeyDown: qe,
258
259
  onClick: (e) => e.stopPropagation(),
259
260
  className: "bg-bg-sunken border border-border-strong rounded px-1 py-0 text-xs text-text-primary w-[100px] outline-none"
260
261
  }) : /* @__PURE__ */ m("span", {
@@ -264,7 +265,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
264
265
  /* @__PURE__ */ m("button", {
265
266
  type: "button",
266
267
  onClick: (t) => {
267
- t.stopPropagation(), he(e.sessionId);
268
+ t.stopPropagation(), _e(e.sessionId);
268
269
  },
269
270
  className: "ml-auto opacity-0 group-hover:opacity-100 hover:text-status-error-text transition-opacity shrink-0",
270
271
  title: "Close terminal",
@@ -274,9 +275,9 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
274
275
  }, e.sessionId))
275
276
  }), /* @__PURE__ */ m("button", {
276
277
  type: "button",
277
- ref: U,
278
+ ref: H,
278
279
  onClick: () => {
279
- (w || X.length > 0) && (j((e) => !e), N(""));
280
+ (C || Y.length > 0) && (A((e) => !e), M(""));
280
281
  },
281
282
  className: "flex items-center px-2.5 py-1.5 text-text-secondary hover:text-text-primary transition-colors shrink-0 border-r border-border-subtle",
282
283
  title: "New session or open existing",
@@ -285,14 +286,14 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
285
286
  }),
286
287
  /* @__PURE__ */ m("div", {
287
288
  className: "flex-1 bg-bg-sunken text-text-primary relative overflow-hidden",
288
- children: q ? g.map((e) => {
289
- let n = z[e.sessionId], r = n === "connecting" || e.loading, i = Pe(e.terminalUrl), a = i ?? B[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && n === "error";
289
+ children: K ? g.map((e) => {
290
+ let t = R[e.sessionId], r = t === "connecting" || e.loading, i = ze(e.terminalUrl), a = i ?? z[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
290
291
  return /* @__PURE__ */ h("div", {
291
- className: `absolute inset-0 ${e.sessionId === q.sessionId ? "block" : "hidden"}`,
292
+ className: `absolute inset-0 ${e.sessionId === K.sessionId ? "block" : "hidden"}`,
292
293
  children: [
293
- o && e.terminalUrl && /* @__PURE__ */ m(t, {
294
+ o && e.terminalUrl && /* @__PURE__ */ m(n, {
294
295
  ref: (t) => {
295
- Ne.current[e.sessionId] = t;
296
+ Re.current[e.sessionId] = t;
296
297
  },
297
298
  sessionId: e.sessionId,
298
299
  agentId: e.agentId ?? null,
@@ -301,8 +302,8 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
301
302
  title: `Terminal - ${e.name}`,
302
303
  className: "w-full h-full border-0",
303
304
  allow: "clipboard-read *; clipboard-write *",
304
- onLoad: () => Le(e.sessionId),
305
- onError: () => Re(e.sessionId)
305
+ onLoad: () => He(e.sessionId),
306
+ onError: () => Ue(e.sessionId)
306
307
  }),
307
308
  o && r && /* @__PURE__ */ m("div", {
308
309
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
@@ -310,10 +311,10 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
310
311
  className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
311
312
  children: [/* @__PURE__ */ m(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
312
313
  className: "text-text-primary text-sm font-medium",
313
- children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
314
+ children: e.loading ? D("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : D("vibecontrols.sessions.terminal.connecting", "Connecting...")
314
315
  }), /* @__PURE__ */ m("p", {
315
316
  className: "text-text-secondary text-xs",
316
- children: e.loading ? O("vibecontrols.sessions.terminal.settingUpTmux", "Setting up tmux + ttyd") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
317
+ children: e.loading ? D("vibecontrols.sessions.terminal.settingUpTmux", "Setting up tmux + ttyd") : D("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
317
318
  })] })]
318
319
  })
319
320
  }),
@@ -322,23 +323,23 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
322
323
  children: /* @__PURE__ */ h("div", {
323
324
  className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
324
325
  children: [
325
- /* @__PURE__ */ m(ue, { className: "size-6 text-status-error-text" }),
326
+ /* @__PURE__ */ m(fe, { className: "size-6 text-status-error-text" }),
326
327
  /* @__PURE__ */ h("div", {
327
328
  className: "text-center",
328
329
  children: [/* @__PURE__ */ m("p", {
329
330
  className: "text-text-primary text-sm font-medium",
330
- children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
331
+ children: D("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
331
332
  }), /* @__PURE__ */ m("p", {
332
333
  className: "text-text-secondary text-xs mt-1",
333
- children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
334
+ children: a || ((W.current[e.sessionId] ?? 0) < 15 ? D("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : D("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
334
335
  })]
335
336
  }),
336
- !a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ m(c, { className: "size-4 text-text-tertiary animate-spin" }),
337
+ !a && (W.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ m(c, { className: "size-4 text-text-tertiary animate-spin" }),
337
338
  /* @__PURE__ */ h("button", {
338
339
  type: "button",
339
340
  onClick: () => Z(e.sessionId),
340
341
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
341
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
342
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
342
343
  })
343
344
  ]
344
345
  })
@@ -372,7 +373,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
372
373
  /* @__PURE__ */ m(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
373
374
  /* @__PURE__ */ m("p", {
374
375
  className: "text-status-error-text text-sm font-medium",
375
- children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
376
+ children: D("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
376
377
  }),
377
378
  /* @__PURE__ */ m("p", {
378
379
  className: "text-text-tertiary text-xs mt-2",
@@ -387,7 +388,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
387
388
  t && y(t);
388
389
  },
389
390
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
390
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
391
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.retry", "Retry")]
391
392
  })
392
393
  })
393
394
  ]
@@ -401,11 +402,11 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
401
402
  /* @__PURE__ */ m(f, { className: "size-8 text-text-secondary mx-auto" }),
402
403
  /* @__PURE__ */ m("p", {
403
404
  className: "text-text-primary text-sm font-medium",
404
- children: O("vibecontrols.sessions.terminal.terminalNotStarted", "Terminal not started yet")
405
+ children: D("vibecontrols.sessions.terminal.terminalNotStarted", "Terminal not started yet")
405
406
  }),
406
407
  /* @__PURE__ */ m("p", {
407
408
  className: "text-text-secondary text-xs",
408
- children: O("vibecontrols.sessions.terminal.startTerminalHint", "Click below to start a ttyd terminal on the agent for this session.")
409
+ children: D("vibecontrols.sessions.terminal.startTerminalHint", "Click below to start a ttyd terminal on the agent for this session.")
409
410
  }),
410
411
  y && v && /* @__PURE__ */ h("button", {
411
412
  type: "button",
@@ -414,7 +415,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
414
415
  t && y(t);
415
416
  },
416
417
  className: "px-4 py-2 bg-accent-primary text-white text-sm rounded-md hover:bg-accent-primary/90 transition-colors inline-flex items-center gap-2",
417
- children: [/* @__PURE__ */ m(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.startTerminal", "Start terminal")]
418
+ children: [/* @__PURE__ */ m(f, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.startTerminal", "Start terminal")]
418
419
  })
419
420
  ]
420
421
  })
@@ -429,28 +430,28 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
429
430
  /* @__PURE__ */ m(f, { className: "size-12 text-text-secondary mx-auto mb-4" }),
430
431
  /* @__PURE__ */ m("p", {
431
432
  className: "text-text-secondary text-base font-medium mb-2",
432
- children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
433
+ children: D("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
433
434
  }),
434
435
  /* @__PURE__ */ m("p", {
435
436
  className: "text-text-secondary text-sm mb-4",
436
- children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
437
+ children: D("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
437
438
  }),
438
- w && /* @__PURE__ */ h("button", {
439
+ C && /* @__PURE__ */ h("button", {
439
440
  type: "button",
440
- onClick: w,
441
+ onClick: C,
441
442
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
442
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
443
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), D("vibecontrols.sessions.terminal.newSession", "New Session")]
443
444
  })
444
445
  ]
445
446
  })
446
447
  })
447
448
  }),
448
- A && (w || X.length > 0) && U.current && /* @__PURE__ */ h("div", {
449
- ref: je,
449
+ k && (C || Y.length > 0) && H.current && /* @__PURE__ */ h("div", {
450
+ ref: Ie,
450
451
  className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[10000] w-[280px]",
451
452
  style: {
452
- top: U.current.getBoundingClientRect().bottom + 4,
453
- left: Math.min(U.current.getBoundingClientRect().left, window.innerWidth - 290)
453
+ top: H.current.getBoundingClientRect().bottom + 4,
454
+ left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
454
455
  },
455
456
  children: [
456
457
  /* @__PURE__ */ m("div", {
@@ -458,34 +459,34 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
458
459
  children: /* @__PURE__ */ h("div", {
459
460
  className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
460
461
  children: [
461
- /* @__PURE__ */ m(se, { className: "size-3.5 text-text-muted shrink-0" }),
462
+ /* @__PURE__ */ m(le, { className: "size-3.5 text-text-muted shrink-0" }),
462
463
  /* @__PURE__ */ m("input", {
463
464
  "aria-label": "Search sessions...",
464
- ref: Me,
465
+ ref: Le,
465
466
  type: "text",
466
- value: M,
467
- onChange: (e) => N(e.target.value),
467
+ value: j,
468
+ onChange: (e) => M(e.target.value),
468
469
  placeholder: "Search sessions...",
469
470
  className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
470
471
  }),
471
- M && /* @__PURE__ */ m("button", {
472
+ j && /* @__PURE__ */ m("button", {
472
473
  type: "button",
473
- onClick: () => N(""),
474
+ onClick: () => M(""),
474
475
  className: "text-text-muted hover:text-text-primary shrink-0",
475
476
  children: /* @__PURE__ */ m(p, { className: "size-3" })
476
477
  })
477
478
  ]
478
479
  })
479
480
  }),
480
- w && /* @__PURE__ */ h("button", {
481
+ C && /* @__PURE__ */ h("button", {
481
482
  type: "button",
482
483
  onClick: () => {
483
- w(), j(!1), N("");
484
+ C(), A(!1), M("");
484
485
  },
485
486
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left font-medium",
486
- children: [/* @__PURE__ */ m(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ m("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
487
+ children: [/* @__PURE__ */ m(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ m("span", { children: D("vibecontrols.sessions.terminal.newSession", "New Session") })]
487
488
  }),
488
- X.length > 0 && /* @__PURE__ */ h(de, { children: [
489
+ Y.length > 0 && /* @__PURE__ */ h(pe, { children: [
489
490
  /* @__PURE__ */ m("div", { className: "border-t border-border-subtle" }),
490
491
  /* @__PURE__ */ m("div", {
491
492
  className: "px-3 pt-2 pb-1",
@@ -493,17 +494,17 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
493
494
  className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
494
495
  children: [
495
496
  "Open existing (",
496
- X.length,
497
+ Y.length,
497
498
  ")"
498
499
  ]
499
500
  })
500
501
  }),
501
502
  /* @__PURE__ */ m("div", {
502
503
  className: "max-h-48 overflow-y-auto pb-1",
503
- children: Ie.length > 0 ? Ie.map((e) => /* @__PURE__ */ h("button", {
504
+ children: Ve.length > 0 ? Ve.map((e) => /* @__PURE__ */ h("button", {
504
505
  type: "button",
505
506
  onClick: () => {
506
- ye?.(e), j(!1), N("");
507
+ xe?.(e), A(!1), M("");
507
508
  },
508
509
  className: "flex items-center gap-2 w-full px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
509
510
  children: [
@@ -521,7 +522,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
521
522
  className: "px-3 py-2 text-xs text-text-muted",
522
523
  children: [
523
524
  "No sessions matching “",
524
- M,
525
+ j,
525
526
  "”"
526
527
  ]
527
528
  })
@@ -529,135 +530,135 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
529
530
  ] })
530
531
  ]
531
532
  }),
532
- P.visible && $ && /* @__PURE__ */ h("div", {
533
- ref: Ae,
533
+ N.visible && $ && /* @__PURE__ */ h("div", {
534
+ ref: Fe,
534
535
  className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[10000] min-w-[180px] py-1",
535
536
  style: {
536
- top: P.y,
537
- left: P.x
537
+ top: N.y,
538
+ left: N.x
538
539
  },
539
540
  children: [
540
541
  b && /* @__PURE__ */ h("button", {
541
542
  type: "button",
542
- onClick: () => He($.sessionId),
543
+ onClick: () => Ke($.sessionId),
543
544
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
544
- children: [/* @__PURE__ */ m(ne, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.rename", "Rename")]
545
+ children: [/* @__PURE__ */ m(re, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.rename", "Rename")]
545
546
  }),
546
547
  $.terminalUrl && /* @__PURE__ */ h("button", {
547
548
  type: "button",
548
549
  onClick: () => {
549
- ge($.sessionId), F((e) => ({
550
+ ve($.sessionId), P((e) => ({
550
551
  ...e,
551
552
  visible: !1
552
553
  }));
553
554
  },
554
555
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
555
- children: [/* @__PURE__ */ m(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
556
+ children: [/* @__PURE__ */ m(s, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
556
557
  }),
557
- $.terminalUrl && z[$.sessionId] === "error" && /* @__PURE__ */ h("button", {
558
+ $.terminalUrl && R[$.sessionId] === "error" && /* @__PURE__ */ h("button", {
558
559
  type: "button",
559
560
  onClick: () => {
560
- Z($.sessionId), F((e) => ({
561
+ Z($.sessionId), P((e) => ({
561
562
  ...e,
562
563
  visible: !1
563
564
  }));
564
565
  },
565
566
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
566
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
567
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
567
568
  }),
568
- S && /* @__PURE__ */ h("button", {
569
+ x && /* @__PURE__ */ h("button", {
569
570
  type: "button",
570
571
  onClick: () => {
571
- S($.sessionId), F((e) => ({
572
+ x($.sessionId), P((e) => ({
572
573
  ...e,
573
574
  visible: !1
574
575
  }));
575
576
  },
576
577
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
577
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.restartTerminal", "Restart Terminal")]
578
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.restartTerminal", "Restart Terminal")]
578
579
  }),
579
- x && /* @__PURE__ */ h("button", {
580
+ Se && /* @__PURE__ */ h("button", {
580
581
  type: "button",
581
582
  onClick: () => {
582
- x($.sessionId), F((e) => ({
583
+ Se($.sessionId), P((e) => ({
583
584
  ...e,
584
585
  visible: !1
585
586
  }));
586
587
  },
587
588
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
588
- children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopTerminal", "Stop Terminal")]
589
+ children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.stopTerminal", "Stop Terminal")]
589
590
  }),
590
- C && /* @__PURE__ */ h("button", {
591
+ S && /* @__PURE__ */ h("button", {
591
592
  type: "button",
592
593
  onClick: () => {
593
- C($.sessionId), F((e) => ({
594
+ S($.sessionId), P((e) => ({
594
595
  ...e,
595
596
  visible: !1
596
597
  }));
597
598
  },
598
599
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
599
- children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
600
+ children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
600
601
  }),
601
602
  /* @__PURE__ */ m("div", { className: "border-t border-border-subtle my-1" }),
602
603
  /* @__PURE__ */ h("button", {
603
604
  type: "button",
604
605
  onClick: () => {
605
- he($.sessionId), F((e) => ({
606
+ _e($.sessionId), P((e) => ({
606
607
  ...e,
607
608
  visible: !1
608
609
  }));
609
610
  },
610
611
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
611
- children: [/* @__PURE__ */ m(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
612
+ children: [/* @__PURE__ */ m(p, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
612
613
  })
613
614
  ]
614
615
  })
615
616
  ]
616
617
  }), document.body) : null : /* @__PURE__ */ h("div", {
617
- ref: ke,
618
- className: `${T ? "flex flex-col h-full" : ""} border-t border-border-default bg-bg-surface ${_ && g.length === 0 && !T ? "hidden" : ""}`,
618
+ ref: Pe,
619
+ className: `${w ? "flex flex-col h-full" : ""} border-t border-border-default bg-bg-surface ${_ && g.length === 0 && !w ? "hidden" : ""}`,
619
620
  children: [
620
- !T && !_ && g.length > 0 && /* @__PURE__ */ m("div", {
621
- onMouseDown: Be,
621
+ !w && !_ && g.length > 0 && /* @__PURE__ */ m("div", {
622
+ onMouseDown: We,
622
623
  className: "h-1 cursor-ns-resize hover:bg-action-primary-bg/30 transition-colors flex items-center justify-center group",
623
624
  title: "Drag to resize",
624
- children: /* @__PURE__ */ m(ie, { className: "w-4 h-3 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity rotate-90" })
625
+ children: /* @__PURE__ */ m(ae, { className: "w-4 h-3 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity rotate-90" })
625
626
  }),
626
627
  /* @__PURE__ */ h("div", {
627
628
  className: "flex items-center bg-bg-sunken border-b border-border-default",
628
629
  children: [
629
- !T && /* @__PURE__ */ h("button", {
630
+ !w && /* @__PURE__ */ h("button", {
630
631
  type: "button",
631
- onClick: _e,
632
+ onClick: ye,
632
633
  className: "flex items-center gap-1 px-3 py-2 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide",
633
634
  title: _ ? "Expand terminal" : "Collapse terminal",
634
635
  children: [
635
636
  /* @__PURE__ */ m(f, { className: "size-3.5" }),
636
637
  "Terminal",
637
- m(_ ? te : o, { className: "size-3" })
638
+ m(_ ? ne : te, { className: "size-3" })
638
639
  ]
639
640
  }),
640
- (!_ || T) && /* @__PURE__ */ m("div", {
641
+ (!_ || w) && /* @__PURE__ */ m("div", {
641
642
  className: "flex items-center overflow-x-auto flex-1 min-w-0",
642
643
  children: g.map((e) => /* @__PURE__ */ h("div", {
643
644
  role: "button",
644
645
  tabIndex: 0,
645
646
  onKeyDown: (t) => {
646
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), me(e.sessionId));
647
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), ge(e.sessionId));
647
648
  },
648
- className: `flex items-center gap-1.5 px-3 py-1.5 text-xs border-r border-border-subtle cursor-pointer transition-colors min-w-0 max-w-[180px] group ${e.sessionId === q?.sessionId ? "bg-bg-surface text-text-primary border-b-2 border-b-action-primary-bg" : "text-text-secondary hover:text-text-primary hover:bg-bg-surface/50"}`,
649
- onClick: () => me(e.sessionId),
650
- onContextMenu: (t) => Ve(t, e.sessionId),
651
- onDoubleClick: () => He(e.sessionId),
649
+ className: `flex items-center gap-1.5 px-3 py-1.5 text-xs border-r border-border-subtle cursor-pointer transition-colors min-w-0 max-w-[180px] group ${e.sessionId === K?.sessionId ? "bg-bg-surface text-text-primary border-b-2 border-b-action-primary-bg" : "text-text-secondary hover:text-text-primary hover:bg-bg-surface/50"}`,
650
+ onClick: () => ge(e.sessionId),
651
+ onContextMenu: (t) => Ge(t, e.sessionId),
652
+ onDoubleClick: () => Ke(e.sessionId),
652
653
  children: [
653
- Ke(e),
654
- I === e.sessionId ? /* @__PURE__ */ m("input", {
654
+ Xe(e),
655
+ F === e.sessionId ? /* @__PURE__ */ m("input", {
655
656
  "aria-label": "control",
656
- ref: H,
657
- value: L,
658
- onChange: (e) => R(e.target.value),
657
+ ref: V,
658
+ value: I,
659
+ onChange: (e) => L(e.target.value),
659
660
  onBlur: Q,
660
- onKeyDown: Ue,
661
+ onKeyDown: qe,
661
662
  onClick: (e) => e.stopPropagation(),
662
663
  className: "bg-bg-sunken border border-border-strong rounded px-1 py-0 text-xs text-text-primary w-[100px] outline-none"
663
664
  }) : /* @__PURE__ */ m("span", {
@@ -667,7 +668,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
667
668
  /* @__PURE__ */ m("button", {
668
669
  type: "button",
669
670
  onClick: (t) => {
670
- t.stopPropagation(), he(e.sessionId);
671
+ t.stopPropagation(), _e(e.sessionId);
671
672
  },
672
673
  className: "ml-auto opacity-0 group-hover:opacity-100 hover:text-status-error-text transition-opacity shrink-0",
673
674
  title: "Close terminal",
@@ -676,70 +677,105 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
676
677
  ]
677
678
  }, e.sessionId))
678
679
  }),
679
- (!_ || T) && /* @__PURE__ */ m("button", {
680
+ (!_ || w) && /* @__PURE__ */ m("button", {
680
681
  type: "button",
681
- ref: U,
682
+ ref: H,
682
683
  onClick: () => {
683
- (w || X.length > 0) && (j((e) => !e), N(""));
684
+ (C || Y.length > 0) && (A((e) => !e), M(""));
684
685
  },
685
686
  className: "flex items-center px-2.5 py-1.5 text-text-secondary hover:text-text-primary transition-colors shrink-0 border-r border-border-subtle",
686
687
  title: "New session or open existing",
687
688
  children: /* @__PURE__ */ m(l, { className: "size-3.5" })
688
689
  }),
689
- (!_ || T) && g.length > 0 && /* @__PURE__ */ h("div", {
690
+ (!_ || w) && g.length > 0 && /* @__PURE__ */ h("div", {
690
691
  className: "flex items-center gap-1 px-2 shrink-0",
691
692
  children: [
692
- q && z[q.sessionId] === "error" && /* @__PURE__ */ m("button", {
693
+ K && R[K.sessionId] === "error" && /* @__PURE__ */ m("button", {
693
694
  type: "button",
694
- onClick: () => Z(q.sessionId),
695
+ onClick: () => Z(K.sessionId),
695
696
  className: "p-1 text-status-warning-text hover:text-status-warning-text/80 transition-colors",
696
697
  title: "Reconnect terminal",
697
698
  children: /* @__PURE__ */ m(u, { className: "size-3.5" })
698
699
  }),
699
- q?.terminalUrl && /* @__PURE__ */ m("button", {
700
+ K?.terminalUrl && /* @__PURE__ */ m("button", {
700
701
  type: "button",
701
- onClick: () => q && ge(q.sessionId),
702
+ onClick: () => K && ve(K.sessionId),
702
703
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
703
704
  title: "Open in new tab",
704
705
  children: /* @__PURE__ */ m(s, { className: "size-3.5" })
705
706
  }),
706
- q && C && /* @__PURE__ */ m("button", {
707
+ K && S && /* @__PURE__ */ m("button", {
707
708
  type: "button",
708
- onClick: () => q && C(q.sessionId),
709
+ onClick: () => K && S(K.sessionId),
709
710
  className: "p-1 text-status-warning-text hover:text-status-warning-text/80 transition-colors",
710
- title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
711
- "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
711
+ title: D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
712
+ "aria-label": D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
712
713
  children: /* @__PURE__ */ m(d, { className: "size-3.5" })
713
714
  }),
714
- D && /* @__PURE__ */ m("button", {
715
+ K && /* @__PURE__ */ m("button", {
716
+ type: "button",
717
+ onClick: () => Ee((e) => !e),
718
+ className: `p-1 transition-colors ${Te ? "text-action-primary-text bg-action-primary-bg rounded" : "text-text-secondary hover:text-text-primary"}`,
719
+ title: D("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
720
+ children: /* @__PURE__ */ m(ce, { className: "size-3.5" })
721
+ }),
722
+ E && /* @__PURE__ */ m("button", {
715
723
  type: "button",
716
- onClick: D,
724
+ onClick: E,
717
725
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
718
- title: E ? "Exit fullscreen" : "Enter fullscreen",
719
- children: m(E ? ce : re, { className: "size-3.5" })
726
+ title: T ? "Exit fullscreen" : "Enter fullscreen",
727
+ children: m(T ? ue : ie, { className: "size-3.5" })
720
728
  }),
721
- !T && !E && /* @__PURE__ */ m("button", {
729
+ !w && !T && /* @__PURE__ */ m("button", {
722
730
  type: "button",
723
- onClick: Fe,
731
+ onClick: Be,
724
732
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
725
- title: k ? "Restore size" : "Maximize",
726
- children: m(k ? oe : ae, { className: "size-3.5" })
733
+ title: O ? "Restore size" : "Maximize",
734
+ children: m(O ? se : oe, { className: "size-3.5" })
727
735
  })
728
736
  ]
729
737
  })
730
738
  ]
731
739
  }),
732
- (!_ || T) && q && /* @__PURE__ */ m("div", {
733
- className: `${We || ""} bg-bg-sunken text-text-primary relative ${T ? "flex-1" : ""}`,
734
- style: Ge,
735
- children: g.map((e) => {
736
- let n = z[e.sessionId], r = n === "connecting" || e.loading, i = Pe(e.terminalUrl), a = i ?? B[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && n === "error";
740
+ (!_ || w) && K && /* @__PURE__ */ h("div", {
741
+ className: `${Je || ""} bg-bg-sunken text-text-primary relative ${w ? "flex-1" : ""}`,
742
+ style: Ye,
743
+ children: [Te && K && /* @__PURE__ */ h("div", {
744
+ className: "absolute inset-0 z-30 bg-bg-surface flex flex-col",
745
+ children: [/* @__PURE__ */ h("div", {
746
+ className: "flex items-center justify-between px-4 py-2 border-b border-border-default",
747
+ children: [/* @__PURE__ */ h("div", {
748
+ className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
749
+ children: [
750
+ /* @__PURE__ */ m(ce, { className: "size-4" }),
751
+ D("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
752
+ /* @__PURE__ */ h("span", {
753
+ className: "text-text-tertiary font-normal",
754
+ children: ["· ", K.name]
755
+ })
756
+ ]
757
+ }), /* @__PURE__ */ m("button", {
758
+ type: "button",
759
+ onClick: () => Ee(!1),
760
+ className: "p-1 text-text-secondary hover:text-text-primary",
761
+ title: D("common.close", "Close"),
762
+ children: /* @__PURE__ */ m(p, { className: "size-4" })
763
+ })]
764
+ }), /* @__PURE__ */ m("div", {
765
+ className: "flex-1 overflow-hidden",
766
+ children: /* @__PURE__ */ m(t, {
767
+ sessionId: K.sessionId,
768
+ sessionName: K.name
769
+ })
770
+ })]
771
+ }), g.map((e) => {
772
+ let t = R[e.sessionId], r = t === "connecting" || e.loading, i = ze(e.terminalUrl), a = i ?? z[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
737
773
  return /* @__PURE__ */ h("div", {
738
- className: `absolute inset-0 ${e.sessionId === q.sessionId ? "block" : "hidden"}`,
774
+ className: `absolute inset-0 ${e.sessionId === K.sessionId ? "block" : "hidden"}`,
739
775
  children: [
740
- o && e.terminalUrl && /* @__PURE__ */ m(t, {
776
+ o && e.terminalUrl && /* @__PURE__ */ m(n, {
741
777
  ref: (t) => {
742
- Ne.current[e.sessionId] = t;
778
+ Re.current[e.sessionId] = t;
743
779
  },
744
780
  sessionId: e.sessionId,
745
781
  agentId: e.agentId ?? null,
@@ -747,8 +783,8 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
747
783
  title: `Terminal - ${e.name}`,
748
784
  className: "w-full h-full border-0",
749
785
  allow: "clipboard-read *; clipboard-write *",
750
- onLoad: () => Le(e.sessionId),
751
- onError: () => Re(e.sessionId)
786
+ onLoad: () => He(e.sessionId),
787
+ onError: () => Ue(e.sessionId)
752
788
  }),
753
789
  o && r && /* @__PURE__ */ m("div", {
754
790
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
@@ -756,10 +792,10 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
756
792
  className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
757
793
  children: [/* @__PURE__ */ m(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
758
794
  className: "text-text-primary text-sm font-medium",
759
- children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
795
+ children: e.loading ? D("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : D("vibecontrols.sessions.terminal.connecting", "Connecting...")
760
796
  }), /* @__PURE__ */ m("p", {
761
797
  className: "text-text-secondary text-xs",
762
- children: e.loading ? O("vibecontrols.sessions.terminal.settingUpTmux", "Setting up tmux + ttyd") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
798
+ children: e.loading ? D("vibecontrols.sessions.terminal.settingUpTmux", "Setting up tmux + ttyd") : D("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
763
799
  })] })]
764
800
  })
765
801
  }),
@@ -768,23 +804,23 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
768
804
  children: /* @__PURE__ */ h("div", {
769
805
  className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
770
806
  children: [
771
- /* @__PURE__ */ m(ue, { className: "size-6 text-status-error-text" }),
807
+ /* @__PURE__ */ m(fe, { className: "size-6 text-status-error-text" }),
772
808
  /* @__PURE__ */ h("div", {
773
809
  className: "text-center",
774
810
  children: [/* @__PURE__ */ m("p", {
775
811
  className: "text-text-primary text-sm font-medium",
776
- children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
812
+ children: D("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
777
813
  }), /* @__PURE__ */ m("p", {
778
814
  className: "text-text-secondary text-xs mt-1",
779
- children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
815
+ children: a || ((W.current[e.sessionId] ?? 0) < 15 ? D("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : D("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
780
816
  })]
781
817
  }),
782
- !a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ m(c, { className: "size-4 text-text-tertiary animate-spin" }),
818
+ !a && (W.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ m(c, { className: "size-4 text-text-tertiary animate-spin" }),
783
819
  /* @__PURE__ */ h("button", {
784
820
  type: "button",
785
821
  onClick: () => Z(e.sessionId),
786
822
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
787
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
823
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
788
824
  })
789
825
  ]
790
826
  })
@@ -818,7 +854,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
818
854
  /* @__PURE__ */ m(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
819
855
  /* @__PURE__ */ m("p", {
820
856
  className: "text-status-error-text text-sm font-medium",
821
- children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
857
+ children: D("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
822
858
  }),
823
859
  /* @__PURE__ */ m("p", {
824
860
  className: "text-text-tertiary text-xs mt-2",
@@ -833,7 +869,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
833
869
  t && y(t);
834
870
  },
835
871
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
836
- children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
872
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.retry", "Retry")]
837
873
  })
838
874
  })
839
875
  ]
@@ -847,20 +883,20 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
847
883
  /* @__PURE__ */ m(f, { className: "size-8 text-text-secondary mx-auto mb-3" }),
848
884
  /* @__PURE__ */ m("p", {
849
885
  className: "text-text-tertiary text-sm",
850
- children: O("vibecontrols.sessions.terminal.noTerminalUrl", "No terminal URL available")
886
+ children: D("vibecontrols.sessions.terminal.noTerminalUrl", "No terminal URL available")
851
887
  }),
852
888
  /* @__PURE__ */ m("p", {
853
889
  className: "text-text-secondary text-xs mt-1",
854
- children: O("vibecontrols.sessions.terminal.agentNeedsTtyd", "The agent needs to start ttyd for this session")
890
+ children: D("vibecontrols.sessions.terminal.agentNeedsTtyd", "The agent needs to start ttyd for this session")
855
891
  })
856
892
  ]
857
893
  })
858
894
  })
859
895
  ]
860
896
  }, e.sessionId);
861
- })
897
+ })]
862
898
  }),
863
- (!_ || T) && g.length === 0 && T && /* @__PURE__ */ m("div", {
899
+ (!_ || w) && g.length === 0 && w && /* @__PURE__ */ m("div", {
864
900
  className: "flex-1 bg-bg-sunken text-text-primary flex items-center justify-center",
865
901
  children: /* @__PURE__ */ h("div", {
866
902
  className: "text-center max-w-md",
@@ -868,33 +904,33 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
868
904
  /* @__PURE__ */ m(f, { className: "size-12 text-text-secondary mx-auto mb-4" }),
869
905
  /* @__PURE__ */ m("p", {
870
906
  className: "text-text-secondary text-base font-medium mb-2",
871
- children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
907
+ children: D("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
872
908
  }),
873
909
  /* @__PURE__ */ m("p", {
874
910
  className: "text-text-secondary text-sm mb-4",
875
- children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
911
+ children: D("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
876
912
  }),
877
913
  /* @__PURE__ */ m("div", {
878
914
  className: "flex items-center justify-center gap-2 flex-wrap",
879
- children: w && /* @__PURE__ */ h("button", {
915
+ children: C && /* @__PURE__ */ h("button", {
880
916
  type: "button",
881
- onClick: w,
917
+ onClick: C,
882
918
  className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
883
- children: [/* @__PURE__ */ m(l, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
919
+ children: [/* @__PURE__ */ m(l, { className: "size-4" }), D("vibecontrols.sessions.terminal.newSession", "New Session")]
884
920
  })
885
921
  }),
886
- X.length > 0 && /* @__PURE__ */ h("div", {
922
+ Y.length > 0 && /* @__PURE__ */ h("div", {
887
923
  className: "mt-6",
888
924
  children: [/* @__PURE__ */ m("p", {
889
925
  className: "text-text-secondary text-xs uppercase tracking-wider mb-3",
890
926
  children: "Or open an existing session"
891
927
  }), /* @__PURE__ */ h("div", {
892
928
  className: "flex flex-col items-stretch gap-2 max-w-md mx-auto",
893
- children: [X.slice(0, 6).map((e) => /* @__PURE__ */ h("div", {
929
+ children: [Y.slice(0, 6).map((e) => /* @__PURE__ */ h("div", {
894
930
  className: "flex items-center gap-2 px-3 py-2 bg-bg-canvas text-text-secondary text-xs rounded-md border border-border-default",
895
931
  children: [/* @__PURE__ */ h("button", {
896
932
  type: "button",
897
- onClick: () => ye?.(e),
933
+ onClick: () => xe?.(e),
898
934
  className: "flex items-center gap-1.5 flex-1 min-w-0 text-left hover:text-text-primary transition-colors",
899
935
  title: `Open ${e.name}`,
900
936
  children: [
@@ -908,25 +944,25 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
908
944
  title: e.status
909
945
  })
910
946
  ]
911
- }), C && e.status === "RUNNING" && /* @__PURE__ */ m("button", {
947
+ }), S && e.status === "RUNNING" && /* @__PURE__ */ m("button", {
912
948
  type: "button",
913
949
  onClick: (t) => {
914
- t.stopPropagation(), C(e.id);
950
+ t.stopPropagation(), S(e.id);
915
951
  },
916
952
  className: "p-1 text-status-warning-text hover:text-status-warning-text/80 transition-colors shrink-0",
917
- title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
918
- "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
953
+ title: D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
954
+ "aria-label": D("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
919
955
  children: /* @__PURE__ */ m(d, { className: "size-3" })
920
956
  })]
921
- }, e.id)), X.length > 6 && /* @__PURE__ */ h("button", {
957
+ }, e.id)), Y.length > 6 && /* @__PURE__ */ h("button", {
922
958
  type: "button",
923
959
  onClick: () => {
924
- j(!0), N("");
960
+ A(!0), M("");
925
961
  },
926
962
  className: "text-text-tertiary text-xs self-center hover:text-text-primary transition-colors cursor-pointer",
927
963
  children: [
928
964
  "+",
929
- X.length - 6,
965
+ Y.length - 6,
930
966
  " more"
931
967
  ]
932
968
  })]
@@ -935,12 +971,12 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
935
971
  ]
936
972
  })
937
973
  }),
938
- A && (w || X.length > 0) && U.current && /* @__PURE__ */ h("div", {
939
- ref: je,
974
+ k && (C || Y.length > 0) && H.current && /* @__PURE__ */ h("div", {
975
+ ref: Ie,
940
976
  className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[100] w-[280px]",
941
977
  style: {
942
- top: U.current.getBoundingClientRect().bottom + 4,
943
- left: Math.min(U.current.getBoundingClientRect().left, window.innerWidth - 290)
978
+ top: H.current.getBoundingClientRect().bottom + 4,
979
+ left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
944
980
  },
945
981
  children: [
946
982
  /* @__PURE__ */ m("div", {
@@ -948,34 +984,34 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
948
984
  children: /* @__PURE__ */ h("div", {
949
985
  className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
950
986
  children: [
951
- /* @__PURE__ */ m(se, { className: "size-3.5 text-text-muted shrink-0" }),
987
+ /* @__PURE__ */ m(le, { className: "size-3.5 text-text-muted shrink-0" }),
952
988
  /* @__PURE__ */ m("input", {
953
989
  "aria-label": "Search sessions...",
954
- ref: Me,
990
+ ref: Le,
955
991
  type: "text",
956
- value: M,
957
- onChange: (e) => N(e.target.value),
992
+ value: j,
993
+ onChange: (e) => M(e.target.value),
958
994
  placeholder: "Search sessions...",
959
995
  className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
960
996
  }),
961
- M && /* @__PURE__ */ m("button", {
997
+ j && /* @__PURE__ */ m("button", {
962
998
  type: "button",
963
- onClick: () => N(""),
999
+ onClick: () => M(""),
964
1000
  className: "text-text-muted hover:text-text-primary shrink-0",
965
1001
  children: /* @__PURE__ */ m(p, { className: "size-3" })
966
1002
  })
967
1003
  ]
968
1004
  })
969
1005
  }),
970
- w && /* @__PURE__ */ h("button", {
1006
+ C && /* @__PURE__ */ h("button", {
971
1007
  type: "button",
972
1008
  onClick: () => {
973
- w(), j(!1), N("");
1009
+ C(), A(!1), M("");
974
1010
  },
975
1011
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left font-medium",
976
- children: [/* @__PURE__ */ m(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ m("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
1012
+ children: [/* @__PURE__ */ m(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ m("span", { children: D("vibecontrols.sessions.terminal.newSession", "New Session") })]
977
1013
  }),
978
- X.length > 0 && /* @__PURE__ */ h(de, { children: [
1014
+ Y.length > 0 && /* @__PURE__ */ h(pe, { children: [
979
1015
  /* @__PURE__ */ m("div", { className: "border-t border-border-subtle" }),
980
1016
  /* @__PURE__ */ m("div", {
981
1017
  className: "px-3 pt-2 pb-1",
@@ -983,17 +1019,17 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
983
1019
  className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
984
1020
  children: [
985
1021
  "Open existing (",
986
- X.length,
1022
+ Y.length,
987
1023
  ")"
988
1024
  ]
989
1025
  })
990
1026
  }),
991
1027
  /* @__PURE__ */ m("div", {
992
1028
  className: "max-h-48 overflow-y-auto pb-1",
993
- children: Ie.length > 0 ? Ie.map((e) => /* @__PURE__ */ h("button", {
1029
+ children: Ve.length > 0 ? Ve.map((e) => /* @__PURE__ */ h("button", {
994
1030
  type: "button",
995
1031
  onClick: () => {
996
- ye?.(e), j(!1), N("");
1032
+ xe?.(e), A(!1), M("");
997
1033
  },
998
1034
  className: "flex items-center gap-2 w-full px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
999
1035
  children: [
@@ -1011,7 +1047,7 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
1011
1047
  className: "px-3 py-2 text-xs text-text-muted",
1012
1048
  children: [
1013
1049
  "No sessions matching “",
1014
- M,
1050
+ j,
1015
1051
  "”"
1016
1052
  ]
1017
1053
  })
@@ -1019,35 +1055,35 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
1019
1055
  ] })
1020
1056
  ]
1021
1057
  }),
1022
- P.visible && $ && /* @__PURE__ */ h("div", {
1023
- ref: Ae,
1058
+ N.visible && $ && /* @__PURE__ */ h("div", {
1059
+ ref: Fe,
1024
1060
  className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[100] min-w-[180px] py-1",
1025
1061
  style: {
1026
- top: P.y,
1027
- left: P.x
1062
+ top: N.y,
1063
+ left: N.x
1028
1064
  },
1029
1065
  children: [
1030
1066
  b && /* @__PURE__ */ h("button", {
1031
1067
  type: "button",
1032
- onClick: () => He($.sessionId),
1068
+ onClick: () => Ke($.sessionId),
1033
1069
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1034
- children: [/* @__PURE__ */ m(ne, { className: "size-3.5" }), "Rename"]
1070
+ children: [/* @__PURE__ */ m(re, { className: "size-3.5" }), "Rename"]
1035
1071
  }),
1036
1072
  $.terminalUrl && /* @__PURE__ */ h("button", {
1037
1073
  type: "button",
1038
1074
  onClick: () => {
1039
- ge($.sessionId), F((e) => ({
1075
+ ve($.sessionId), P((e) => ({
1040
1076
  ...e,
1041
1077
  visible: !1
1042
1078
  }));
1043
1079
  },
1044
1080
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1045
- children: [/* @__PURE__ */ m(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
1081
+ children: [/* @__PURE__ */ m(s, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
1046
1082
  }),
1047
- $.terminalUrl && z[$.sessionId] === "error" && /* @__PURE__ */ h("button", {
1083
+ $.terminalUrl && R[$.sessionId] === "error" && /* @__PURE__ */ h("button", {
1048
1084
  type: "button",
1049
1085
  onClick: () => {
1050
- Z($.sessionId), F((e) => ({
1086
+ Z($.sessionId), P((e) => ({
1051
1087
  ...e,
1052
1088
  visible: !1
1053
1089
  }));
@@ -1055,10 +1091,10 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
1055
1091
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
1056
1092
  children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), "Reconnect"]
1057
1093
  }),
1058
- S && /* @__PURE__ */ h("button", {
1094
+ x && /* @__PURE__ */ h("button", {
1059
1095
  type: "button",
1060
1096
  onClick: () => {
1061
- S($.sessionId), F((e) => ({
1097
+ x($.sessionId), P((e) => ({
1062
1098
  ...e,
1063
1099
  visible: !1
1064
1100
  }));
@@ -1066,10 +1102,10 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
1066
1102
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1067
1103
  children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), "Restart Terminal"]
1068
1104
  }),
1069
- x && /* @__PURE__ */ h("button", {
1105
+ Se && /* @__PURE__ */ h("button", {
1070
1106
  type: "button",
1071
1107
  onClick: () => {
1072
- x($.sessionId), F((e) => ({
1108
+ Se($.sessionId), P((e) => ({
1073
1109
  ...e,
1074
1110
  visible: !1
1075
1111
  }));
@@ -1077,28 +1113,28 @@ function g({ tabs: g, activeTabId: pe, onTabSelect: me, onTabClose: he, onOpenEx
1077
1113
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1078
1114
  children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), "Stop Terminal"]
1079
1115
  }),
1080
- C && /* @__PURE__ */ h("button", {
1116
+ S && /* @__PURE__ */ h("button", {
1081
1117
  type: "button",
1082
1118
  onClick: () => {
1083
- C($.sessionId), F((e) => ({
1119
+ S($.sessionId), P((e) => ({
1084
1120
  ...e,
1085
1121
  visible: !1
1086
1122
  }));
1087
1123
  },
1088
1124
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
1089
- children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
1125
+ children: [/* @__PURE__ */ m(d, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
1090
1126
  }),
1091
1127
  /* @__PURE__ */ m("div", { className: "border-t border-border-subtle my-1" }),
1092
1128
  /* @__PURE__ */ h("button", {
1093
1129
  type: "button",
1094
1130
  onClick: () => {
1095
- he($.sessionId), F((e) => ({
1131
+ _e($.sessionId), P((e) => ({
1096
1132
  ...e,
1097
1133
  visible: !1
1098
1134
  }));
1099
1135
  },
1100
1136
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
1101
- children: [/* @__PURE__ */ m(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
1137
+ children: [/* @__PURE__ */ m(p, { className: "size-3.5" }), D("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
1102
1138
  })
1103
1139
  ]
1104
1140
  })