@burdenoff/microfe-vibecontrols 2026.601.8 → 2026.601.10

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.
@@ -2,28 +2,28 @@ import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { ConnectionLogPanel as t } from "../agents/ConnectionLogPanel.js";
3
3
  import { TerminalIframe as n } from "./TerminalIframe.js";
4
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, MonitorSmartphone as l, Pin as ce, PinOff as le, Plus as u, RotateCcw as d, ScrollText as f, Search as ue, Shrink as de, Square as p, Terminal as m, Wifi as fe, WifiOff as pe, X as h } from "lucide-react";
6
- import { Fragment as me, jsx as g, jsxs as _ } from "react/jsx-runtime";
7
- import { createPortal as he } from "react-dom";
5
+ import { AlertCircle as ee, ChevronDown as te, ChevronUp as ne, Edit3 as re, Expand as ie, ExternalLink as s, GripVertical as ae, Info as oe, Loader2 as c, Maximize2 as se, Minimize2 as ce, MonitorSmartphone as le, Pin as ue, PinOff as de, Plus as l, RotateCcw as u, ScrollText as d, Search as fe, Server as pe, Share2 as me, Shrink as he, Square as f, Terminal as p, Wifi as ge, WifiOff as _e, X as m } from "lucide-react";
6
+ import { Fragment as ve, jsx as h, jsxs as g } from "react/jsx-runtime";
7
+ import { createPortal as ye } from "react-dom";
8
8
  //#region src/components/sessions/TerminalPanel.tsx
9
- function ge({ tab: e, index: t, isActive: n, isDragging: r, statusIndicator: i, isRenaming: a, renameValue: o, renameInputRef: ee, onRenameChange: te, onRenameBlur: ne, onRenameKeyDown: re, onSelect: ie, onClose: s, onContextMenu: ae, onDoubleClick: c, onDragStart: oe, onDragOver: se, onDrop: le, onDragEnd: u, closeLabel: d }) {
10
- let f = [
9
+ function be({ tab: e, index: t, isActive: n, isDragging: r, statusIndicator: i, isRenaming: a, renameValue: o, renameInputRef: ee, onRenameChange: te, onRenameBlur: ne, onRenameKeyDown: re, onSelect: ie, onClose: s, onContextMenu: ae, onDoubleClick: oe, onDragStart: c, onDragOver: se, onDrop: ce, onDragEnd: de, closeLabel: l }) {
10
+ let u = [
11
11
  e.name,
12
12
  e.agentName ? `agent: ${e.agentName}` : null,
13
13
  e.targetName ? `target: ${e.targetName}${e.targetType ? ` (${e.targetType})` : ""}` : null
14
14
  ].filter(Boolean).join("\n");
15
- return /* @__PURE__ */ _("div", {
15
+ return /* @__PURE__ */ g("div", {
16
16
  role: "button",
17
17
  tabIndex: 0,
18
18
  draggable: !a,
19
- title: f,
19
+ title: u,
20
20
  onKeyDown: (e) => {
21
21
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ie());
22
22
  },
23
- onDragStart: oe,
23
+ onDragStart: c,
24
24
  onDragOver: se,
25
- onDrop: le,
26
- onDragEnd: u,
25
+ onDrop: ce,
26
+ onDragEnd: de,
27
27
  "data-testid": "terminal-tab",
28
28
  "data-session-id": e.sessionId,
29
29
  "data-tab-index": t,
@@ -33,14 +33,14 @@ function ge({ tab: e, index: t, isActive: n, isDragging: r, statusIndicator: i,
33
33
  e.button === 1 && (e.preventDefault(), s());
34
34
  },
35
35
  onContextMenu: ae,
36
- onDoubleClick: c,
36
+ onDoubleClick: oe,
37
37
  children: [
38
- e.pinned && /* @__PURE__ */ g(ce, {
38
+ e.pinned && /* @__PURE__ */ h(ue, {
39
39
  className: "size-2.5 text-action-primary-text shrink-0",
40
40
  "aria-hidden": !0
41
41
  }),
42
42
  i,
43
- a ? /* @__PURE__ */ g("input", {
43
+ a ? /* @__PURE__ */ h("input", {
44
44
  "aria-label": "control",
45
45
  ref: ee,
46
46
  value: o,
@@ -49,39 +49,39 @@ function ge({ tab: e, index: t, isActive: n, isDragging: r, statusIndicator: i,
49
49
  onKeyDown: re,
50
50
  onClick: (e) => e.stopPropagation(),
51
51
  className: "bg-bg-sunken border border-border-strong rounded px-1 py-0 text-xs text-text-primary w-[100px] outline-none"
52
- }) : /* @__PURE__ */ g("span", {
52
+ }) : /* @__PURE__ */ h("span", {
53
53
  className: "truncate",
54
54
  children: e.name
55
55
  }),
56
- e.targetName && /* @__PURE__ */ g(l, {
56
+ e.targetName && /* @__PURE__ */ h(le, {
57
57
  className: "size-2.5 text-text-muted shrink-0 hidden sm:inline",
58
58
  "aria-hidden": !0
59
59
  }),
60
- /* @__PURE__ */ g("button", {
60
+ /* @__PURE__ */ h("button", {
61
61
  type: "button",
62
62
  onClick: (e) => {
63
63
  e.stopPropagation(), s();
64
64
  },
65
65
  className: `ml-auto hover:text-status-error-text transition-opacity shrink-0 ${e.pinned, "opacity-0 group-hover:opacity-100"}`,
66
- title: d,
67
- "aria-label": d,
68
- children: /* @__PURE__ */ g(h, { className: "size-3" })
66
+ title: l,
67
+ "aria-label": l,
68
+ children: /* @__PURE__ */ h(m, { className: "size-3" })
69
69
  })
70
70
  ]
71
71
  });
72
72
  }
73
- function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenExternal: be, onToggleCollapse: xe, collapsed: v = !1, heightClass: Se = "h-[420px]", sessions: y, onOpenTerminal: Ce, onRetryTerminal: b, onRenameSession: x, onStopTerminal: we, onRestartTerminal: Te, onReattachTerminal: Ee, onReorderTabs: De, onTogglePin: S, onStopSession: C, onCreateSession: w, fullScreen: T = !1, isImmersiveFullscreen: E = !1, onToggleImmersiveFullscreen: D, contextSwitcher: Oe }) {
74
- let O = e(), [k, ke] = o(!1), [Ae, je] = o(!1), [A, j] = o(!1), [M, N] = o(""), [P, F] = o({
73
+ function _({ tabs: _, activeTabId: xe, onTabSelect: Se, onTabClose: Ce, onOpenExternal: we, onToggleCollapse: Te, collapsed: v = !1, heightClass: Ee = "h-[420px]", sessions: y, onOpenTerminal: De, onRetryTerminal: b, onRenameSession: x, onStopTerminal: Oe, onRestartTerminal: ke, onReattachTerminal: Ae, onReorderTabs: je, onTogglePin: S, onShowSessionInfo: Me, onViewAgent: Ne, onViewTarget: Pe, onShareSession: Fe, onStopSession: C, onCreateSession: w, fullScreen: T = !1, isImmersiveFullscreen: E = !1, onToggleImmersiveFullscreen: D, contextSwitcher: Ie }) {
74
+ let O = e(), [k, Le] = o(!1), [Re, ze] = o(!1), [A, j] = o(!1), [M, N] = o(""), [P, F] = o({
75
75
  visible: !1,
76
76
  x: 0,
77
77
  y: 0,
78
78
  sessionId: null
79
- }), [I, Me] = o(null), [L, R] = o(""), [z, Ne] = o(() => /* @__PURE__ */ new Set()), [B, Pe] = o({}), [Fe, Ie] = o({}), [Le, Re] = o(null), ze = a(!1), Be = a(0), Ve = a(0), He = a(null), V = a(null), Ue = a(null), H = a(null), U = a(null), We = a(null), Ge = a({}), W = a({}), G = a({}), K = a({}), [Ke, qe] = o({}), Je = a({}), [q, Ye] = o(null), Xe = r((e) => {
80
- qe((t) => ({
79
+ }), [I, Be] = o(null), [L, R] = o(""), [z, Ve] = o(() => /* @__PURE__ */ new Set()), [B, He] = o({}), [Ue, We] = o({}), [Ge, Ke] = o(null), qe = a(!1), Je = a(0), Ye = a(0), Xe = a(null), V = a(null), Ze = a(null), H = a(null), Qe = a(null), $e = a(null), et = a({}), U = a({}), W = a({}), G = a({}), [tt, nt] = o({}), rt = a({}), [K, it] = o(null), at = r((e) => {
80
+ nt((t) => ({
81
81
  ...t,
82
82
  [e]: (t[e] ?? 0) + 1
83
83
  }));
84
- }, []), Ze = [...l].sort((e, t) => !!t.pinned - +!!e.pinned).map((e) => {
84
+ }, []), ot = [..._].sort((e, t) => !!t.pinned - +!!e.pinned).map((e) => {
85
85
  let t = y?.find((t) => t.id === e.sessionId);
86
86
  return {
87
87
  ...e,
@@ -89,9 +89,9 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
89
89
  targetName: e.targetName ?? t?.agent?.target?.name ?? null,
90
90
  targetType: e.targetType ?? t?.agent?.target?.type ?? null
91
91
  };
92
- }), J = l.find((e) => e.sessionId === _e) || l[0] || null, Qe = r((e) => {
92
+ }), q = _.find((e) => e.sessionId === xe) || _[0] || null, st = r((e) => {
93
93
  if (C) {
94
- Ne((t) => {
94
+ Ve((t) => {
95
95
  if (t.has(e)) return t;
96
96
  let n = new Set(t);
97
97
  return n.add(e), n;
@@ -99,14 +99,14 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
99
99
  try {
100
100
  C(e);
101
101
  } catch {
102
- Ne((t) => {
102
+ Ve((t) => {
103
103
  if (!t.has(e)) return t;
104
104
  let n = new Set(t);
105
105
  return n.delete(e), n;
106
106
  });
107
107
  }
108
108
  window.setTimeout(() => {
109
- Ne((t) => {
109
+ Ve((t) => {
110
110
  if (!t.has(e)) return t;
111
111
  let n = new Set(t);
112
112
  return n.delete(e), n;
@@ -119,19 +119,19 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
119
119
  let e = new Set(y.filter((e) => e.status === "STOPPED" || e.status === "TERMINATED" || e.status === "ERROR").map((e) => e.id)), t = !1, n = new Set(z);
120
120
  z.forEach((r) => {
121
121
  e.has(r) && (n.delete(r), t = !0);
122
- }), t && Ne(n);
122
+ }), t && Ve(n);
123
123
  }, [y, z]);
124
- let Y = r((e, t) => {
125
- Pe((n) => n[e] === t ? n : {
124
+ let J = r((e, t) => {
125
+ He((n) => n[e] === t ? n : {
126
126
  ...n,
127
127
  [e]: t
128
128
  });
129
- }, []), X = r((e, t) => {
130
- Ie((n) => n[e] === t ? n : {
129
+ }, []), Y = r((e, t) => {
130
+ We((n) => n[e] === t ? n : {
131
131
  ...n,
132
132
  [e]: t
133
133
  });
134
- }, []), $e = r((e) => {
134
+ }, []), X = r((e) => {
135
135
  if (!e) return null;
136
136
  try {
137
137
  let t = typeof window < "u" ? window.location.protocol : "https:", n = new URL(e).protocol;
@@ -139,134 +139,134 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
139
139
  } catch {
140
140
  return O("vibecontrols.sessions.terminal.invalidUrl", "The terminal URL is invalid. Restart the terminal to generate a new URL.");
141
141
  }
142
- }, [O]), et = r(() => {
143
- ke((e) => !e), Re(null);
144
- }, []), Z = (y ?? []).filter((e) => !l.some((t) => t.sessionId === e.id)), tt = M.trim() ? Z.filter((e) => e.name.toLowerCase().includes(M.trim().toLowerCase())) : Z, nt = r((e) => {
145
- K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), Y(e, "connected"), X(e, void 0);
146
- }, [X, Y]), rt = r((e) => {
147
- K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), Y(e, "error");
148
- }, [Y]);
149
- i(() => (l.forEach((e) => {
142
+ }, [O]), ct = r(() => {
143
+ Le((e) => !e), Ke(null);
144
+ }, []), Z = (y ?? []).filter((e) => !_.some((t) => t.sessionId === e.id)), lt = M.trim() ? Z.filter((e) => e.name.toLowerCase().includes(M.trim().toLowerCase())) : Z, ut = r((e) => {
145
+ G.current[e] && (clearTimeout(G.current[e]), delete G.current[e]), J(e, "connected"), Y(e, void 0);
146
+ }, [Y, J]), dt = r((e) => {
147
+ G.current[e] && (clearTimeout(G.current[e]), delete G.current[e]), J(e, "error");
148
+ }, [J]);
149
+ i(() => (_.forEach((e) => {
150
150
  if (!e.terminalUrl || e.loading || e.error) return;
151
- let t = $e(e.terminalUrl);
151
+ let t = X(e.terminalUrl);
152
152
  if (t) {
153
- Y(e.sessionId, "error"), X(e.sessionId, t);
153
+ J(e.sessionId, "error"), Y(e.sessionId, t);
154
154
  return;
155
155
  }
156
- B[e.sessionId] || Y(e.sessionId, "connecting"), B[e.sessionId] === "connecting" && !K.current[e.sessionId] && (K.current[e.sessionId] = setTimeout(() => {
157
- delete K.current[e.sessionId], Y(e.sessionId, "error"), X(e.sessionId, O("vibecontrols.sessions.terminal.connectionTimedOut", "Timed out waiting for the terminal to connect. Check the agent tunnel and retry."));
156
+ B[e.sessionId] || J(e.sessionId, "connecting"), B[e.sessionId] === "connecting" && !G.current[e.sessionId] && (G.current[e.sessionId] = setTimeout(() => {
157
+ delete G.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."));
158
158
  }, 12e3));
159
159
  }), () => {
160
- for (let e of Object.values(K.current)) clearTimeout(e);
161
- K.current = {};
160
+ for (let e of Object.values(G.current)) clearTimeout(e);
161
+ G.current = {};
162
162
  }), [
163
163
  B,
164
- $e,
165
164
  X,
166
165
  Y,
167
- l,
166
+ J,
167
+ _,
168
168
  O
169
169
  ]);
170
- let it = r((e) => {
171
- W.current[e] && (clearTimeout(W.current[e]), delete W.current[e]), delete G.current[e];
170
+ let ft = r((e) => {
171
+ U.current[e] && (clearTimeout(U.current[e]), delete U.current[e]), delete W.current[e];
172
172
  }, []), Q = r((e) => {
173
- it(e), Je.current[e] = 0, Ie((t) => ({
173
+ ft(e), rt.current[e] = 0, We((t) => ({
174
174
  ...t,
175
175
  [e]: void 0
176
- })), Pe((t) => ({
176
+ })), He((t) => ({
177
177
  ...t,
178
178
  [e]: "connecting"
179
- })), Xe(e), Ee?.(e);
179
+ })), at(e), Ae?.(e);
180
180
  }, [
181
- it,
182
- Xe,
183
- Ee
184
- ]), at = r((e, t) => {
185
- Ye(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", String(t));
186
- }, []), ot = r((e) => {
181
+ ft,
182
+ at,
183
+ Ae
184
+ ]), pt = r((e, t) => {
185
+ it(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", String(t));
186
+ }, []), mt = r((e) => {
187
187
  e.preventDefault(), e.dataTransfer.dropEffect = "move";
188
- }, []), st = r((e, t) => {
189
- if (e.preventDefault(), q === null || q === t || !De) {
190
- Ye(null);
188
+ }, []), ht = r((e, t) => {
189
+ if (e.preventDefault(), K === null || K === t || !je) {
190
+ it(null);
191
191
  return;
192
192
  }
193
- let n = [...Ze], [r] = n.splice(q, 1);
194
- n.splice(t, 0, r), De(n.map((e) => e.sessionId)), Ye(null);
193
+ let n = [...ot], [r] = n.splice(K, 1);
194
+ n.splice(t, 0, r), je(n.map((e) => e.sessionId)), it(null);
195
195
  }, [
196
- q,
197
- Ze,
198
- De
199
- ]), ct = r(() => Ye(null), []);
196
+ K,
197
+ ot,
198
+ je
199
+ ]), gt = r(() => it(null), []);
200
200
  i(() => {
201
- for (let e of l) {
201
+ for (let e of _) {
202
202
  let t = B[e.sessionId];
203
- if (t === "error" && e.terminalUrl && !e.error && !Fe[e.sessionId]) {
204
- if (W.current[e.sessionId]) continue;
205
- let t = G.current[e.sessionId] ?? 0;
203
+ if (t === "error" && e.terminalUrl && !e.error && !Ue[e.sessionId]) {
204
+ if (U.current[e.sessionId]) continue;
205
+ let t = W.current[e.sessionId] ?? 0;
206
206
  if (t >= 15) continue;
207
207
  let n = Math.min(2e3 * 2 ** t, 3e4);
208
- W.current[e.sessionId] = setTimeout(() => {
209
- delete W.current[e.sessionId], G.current[e.sessionId] = t + 1;
208
+ U.current[e.sessionId] = setTimeout(() => {
209
+ delete U.current[e.sessionId], W.current[e.sessionId] = t + 1;
210
210
  let n = e.terminalUrl, r = `${new URL(n).origin}/health`;
211
211
  fetch(r, { signal: AbortSignal.timeout(5e3) }).then((t) => {
212
- t.ok && (Pe((t) => ({
212
+ t.ok && (He((t) => ({
213
213
  ...t,
214
214
  [e.sessionId]: "connecting"
215
- })), Xe(e.sessionId));
215
+ })), at(e.sessionId));
216
216
  }).catch(() => {});
217
217
  }, n);
218
218
  }
219
- t === "connected" && it(e.sessionId);
219
+ t === "connected" && ft(e.sessionId);
220
220
  }
221
- let e = W.current;
221
+ let e = U.current;
222
222
  return () => {
223
223
  for (let t of Object.values(e)) clearTimeout(t);
224
224
  };
225
225
  }, [
226
- l,
227
- Fe,
226
+ _,
227
+ Ue,
228
228
  B,
229
- it,
230
- Xe
229
+ ft,
230
+ at
231
231
  ]), i(() => {
232
- if (!J || !J.terminalUrl || J.loading || J.error || B[J.sessionId] !== "connected") return;
232
+ if (!q || !q.terminalUrl || q.loading || q.error || B[q.sessionId] !== "connected") return;
233
233
  let e;
234
234
  try {
235
- e = new URL(J.terminalUrl).origin;
235
+ e = new URL(q.terminalUrl).origin;
236
236
  } catch {
237
237
  return;
238
238
  }
239
- let t = J.sessionId, n = setInterval(() => {
239
+ let t = q.sessionId, n = setInterval(() => {
240
240
  fetch(`${e}/health`, { signal: AbortSignal.timeout(5e3) }).then((e) => {
241
- if (e.ok) Je.current[t] = 0;
241
+ if (e.ok) rt.current[t] = 0;
242
242
  else throw Error("unhealthy");
243
243
  }).catch(() => {
244
- let e = (Je.current[t] ?? 0) + 1;
245
- Je.current[t] = e, e >= 2 && Y(t, "error");
244
+ let e = (rt.current[t] ?? 0) + 1;
245
+ rt.current[t] = e, e >= 2 && J(t, "error");
246
246
  });
247
247
  }, 2e4);
248
248
  return () => clearInterval(n);
249
249
  }, [
250
- J,
250
+ q,
251
251
  B,
252
- Y
252
+ J
253
253
  ]);
254
- let lt = r((e) => {
255
- T || k || (e.preventDefault(), ze.current = !0, Be.current = e.clientY, Ve.current = He.current?.offsetHeight || 420, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none");
254
+ let _t = r((e) => {
255
+ T || k || (e.preventDefault(), qe.current = !0, Je.current = e.clientY, Ye.current = Xe.current?.offsetHeight || 420, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none");
256
256
  }, [T, k]);
257
257
  i(() => {
258
258
  let e = (e) => {
259
- if (!ze.current) return;
260
- let t = Be.current - e.clientY;
261
- Re(Math.max(200, Math.min(Ve.current + t, window.innerHeight - 150)));
259
+ if (!qe.current) return;
260
+ let t = Je.current - e.clientY;
261
+ Ke(Math.max(200, Math.min(Ye.current + t, window.innerHeight - 150)));
262
262
  }, t = () => {
263
- ze.current && (ze.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
263
+ qe.current && (qe.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
264
264
  };
265
265
  return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), () => {
266
266
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
267
267
  };
268
268
  }, []);
269
- let ut = r((e, t) => {
269
+ let vt = r((e, t) => {
270
270
  e.preventDefault(), e.stopPropagation(), F({
271
271
  visible: !0,
272
272
  x: e.clientX,
@@ -276,7 +276,7 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
276
276
  }, []);
277
277
  i(() => {
278
278
  let e = (e) => {
279
- Ue.current && !Ue.current.contains(e.target) && F((e) => ({
279
+ Ze.current && !Ze.current.contains(e.target) && F((e) => ({
280
280
  ...e,
281
281
  visible: !1
282
282
  }));
@@ -285,11 +285,11 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
285
285
  }, [P.visible]), i(() => {
286
286
  let e = (e) => {
287
287
  let t = e.target;
288
- U.current && !U.current.contains(t) && H.current && !H.current.contains(t) && (j(!1), N(""));
288
+ Qe.current && !Qe.current.contains(t) && H.current && !H.current.contains(t) && (j(!1), N(""));
289
289
  };
290
290
  if (A) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
291
291
  }, [A]), i(() => {
292
- A && We.current && requestAnimationFrame(() => We.current?.focus());
292
+ A && $e.current && requestAnimationFrame(() => $e.current?.focus());
293
293
  }, [A]), i(() => {
294
294
  I && V.current && (V.current.focus(), V.current.select());
295
295
  }, [I]), i(() => {
@@ -299,110 +299,156 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
299
299
  };
300
300
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
301
301
  }, [E, D]);
302
- let dt = r((e) => {
303
- let t = l.find((t) => t.sessionId === e);
304
- t && (Me(e), R(t.name)), F((e) => ({
302
+ let yt = r((e) => {
303
+ let t = _.find((t) => t.sessionId === e);
304
+ t && (Be(e), R(t.name)), F((e) => ({
305
305
  ...e,
306
306
  visible: !1
307
307
  }));
308
- }, [l]), ft = r(() => {
308
+ }, [_]), bt = r(() => {
309
309
  if (I && L.trim() && x) {
310
- let e = l.find((e) => e.sessionId === I);
310
+ let e = _.find((e) => e.sessionId === I);
311
311
  e && L.trim() !== e.name && x(I, L.trim());
312
312
  }
313
- Me(null), R("");
313
+ Be(null), R("");
314
314
  }, [
315
315
  I,
316
316
  L,
317
317
  x,
318
- l
319
- ]), pt = r((e) => {
320
- e.key === "Enter" ? ft() : e.key === "Escape" && (Me(null), R(""));
321
- }, [ft]);
322
- if (l.length === 0 && !v && !T) return null;
323
- let mt = T ? "h-full" : k ? "h-[calc(100vh-120px)]" : Le ? void 0 : Se, ht = !T && !k && Le ? { height: `${Le}px` } : void 0, $ = P.sessionId ? l.find((e) => e.sessionId === P.sessionId) : null, gt = (e) => {
324
- if (e.loading) return /* @__PURE__ */ g(c, { className: "size-3 animate-spin shrink-0" });
325
- if (e.error) return /* @__PURE__ */ g(ee, { className: "size-3 text-status-error-text shrink-0" });
318
+ _
319
+ ]), xt = r((e) => {
320
+ e.key === "Enter" ? bt() : e.key === "Escape" && (Be(null), R(""));
321
+ }, [bt]);
322
+ if (_.length === 0 && !v && !T) return null;
323
+ let St = T ? "h-full" : k ? "h-[calc(100vh-120px)]" : Ge ? void 0 : Ee, Ct = !T && !k && Ge ? { height: `${Ge}px` } : void 0, $ = P.sessionId ? _.find((e) => e.sessionId === P.sessionId) : null, wt = P.sessionId ? y?.find((e) => e.id === P.sessionId) ?? null : null, Tt = (e) => /* @__PURE__ */ g(ve, { children: [
324
+ Me && /* @__PURE__ */ g("button", {
325
+ type: "button",
326
+ onClick: () => {
327
+ Me(e), F((e) => ({
328
+ ...e,
329
+ visible: !1
330
+ }));
331
+ },
332
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
333
+ children: [/* @__PURE__ */ h(oe, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.sessionInfo", "Session info")]
334
+ }),
335
+ Ne && wt?.agent && /* @__PURE__ */ g("button", {
336
+ type: "button",
337
+ onClick: () => {
338
+ Ne(e), F((e) => ({
339
+ ...e,
340
+ visible: !1
341
+ }));
342
+ },
343
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
344
+ children: [/* @__PURE__ */ h(pe, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.viewAgent", "View agent")]
345
+ }),
346
+ Pe && wt?.agent?.target && /* @__PURE__ */ g("button", {
347
+ type: "button",
348
+ onClick: () => {
349
+ Pe(e), F((e) => ({
350
+ ...e,
351
+ visible: !1
352
+ }));
353
+ },
354
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
355
+ children: [/* @__PURE__ */ h(le, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.viewTarget", "View target")]
356
+ }),
357
+ Fe && /* @__PURE__ */ g("button", {
358
+ type: "button",
359
+ onClick: () => {
360
+ Fe(e), F((e) => ({
361
+ ...e,
362
+ visible: !1
363
+ }));
364
+ },
365
+ className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
366
+ children: [/* @__PURE__ */ h(me, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.shareSession", "Share / offer session")]
367
+ }),
368
+ (Me || Ne || Pe || Fe) && /* @__PURE__ */ h("div", { className: "border-t border-border-subtle my-1" })
369
+ ] }), Et = (e) => {
370
+ if (e.loading) return /* @__PURE__ */ h(c, { className: "size-3 animate-spin shrink-0" });
371
+ if (e.error) return /* @__PURE__ */ h(ee, { className: "size-3 text-status-error-text shrink-0" });
326
372
  let t = B[e.sessionId];
327
- return t === "connected" ? /* @__PURE__ */ g(fe, { className: "size-3 text-status-success-text shrink-0" }) : t === "error" ? /* @__PURE__ */ g(pe, { className: "size-3 text-status-error-text shrink-0" }) : t === "connecting" ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin text-status-warning-text shrink-0" }) : /* @__PURE__ */ g(m, { className: "size-3 shrink-0" });
373
+ return t === "connected" ? /* @__PURE__ */ h(ge, { className: "size-3 text-status-success-text shrink-0" }) : t === "error" ? /* @__PURE__ */ h(_e, { className: "size-3 text-status-error-text shrink-0" }) : t === "connecting" ? /* @__PURE__ */ h(c, { className: "size-3 animate-spin text-status-warning-text shrink-0" }) : /* @__PURE__ */ h(p, { className: "size-3 shrink-0" });
328
374
  };
329
- return E ? E ? he(/* @__PURE__ */ _("div", {
375
+ return E ? E ? ye(/* @__PURE__ */ g("div", {
330
376
  className: "fixed inset-0 z-[9999] bg-bg-surface flex flex-col",
331
377
  children: [
332
- /* @__PURE__ */ _("div", {
378
+ /* @__PURE__ */ g("div", {
333
379
  className: "flex items-center justify-between px-3 py-2 bg-bg-sunken border-b border-border-default shrink-0",
334
- children: [/* @__PURE__ */ g("div", {
380
+ children: [/* @__PURE__ */ h("div", {
335
381
  className: "flex items-center gap-4",
336
- children: Oe
337
- }), /* @__PURE__ */ _("div", {
382
+ children: Ie
383
+ }), /* @__PURE__ */ g("div", {
338
384
  className: "flex items-center gap-2",
339
385
  children: [
340
- J?.terminalUrl && /* @__PURE__ */ g("button", {
386
+ q?.terminalUrl && /* @__PURE__ */ h("button", {
341
387
  type: "button",
342
- onClick: () => Q(J.sessionId),
343
- className: `p-1.5 transition-colors ${B[J.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
388
+ onClick: () => Q(q.sessionId),
389
+ className: `p-1.5 transition-colors ${B[q.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
344
390
  title: O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
345
391
  "aria-label": O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
346
392
  "data-testid": "terminal-reconnect",
347
- children: /* @__PURE__ */ g(d, { className: "size-4" })
393
+ children: /* @__PURE__ */ h(u, { className: "size-4" })
348
394
  }),
349
- J?.terminalUrl && /* @__PURE__ */ g("button", {
395
+ q?.terminalUrl && /* @__PURE__ */ h("button", {
350
396
  type: "button",
351
- onClick: () => J && be(J.sessionId),
397
+ onClick: () => q && we(q.sessionId),
352
398
  className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
353
399
  title: "Open in new tab",
354
- children: /* @__PURE__ */ g(s, { className: "size-4" })
400
+ children: /* @__PURE__ */ h(s, { className: "size-4" })
355
401
  }),
356
- J && C && /* @__PURE__ */ _("button", {
402
+ q && C && /* @__PURE__ */ g("button", {
357
403
  type: "button",
358
- onClick: () => Qe(J.sessionId),
359
- disabled: z.has(J.sessionId),
404
+ onClick: () => st(q.sessionId),
405
+ disabled: z.has(q.sessionId),
360
406
  className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all disabled:opacity-60 disabled:cursor-not-allowed",
361
407
  title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
362
408
  "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
363
- "aria-busy": z.has(J.sessionId),
364
- children: [z.has(J.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3.5 fill-current" }), /* @__PURE__ */ g("span", {
409
+ "aria-busy": z.has(q.sessionId),
410
+ children: [z.has(q.sessionId) ? /* @__PURE__ */ h(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5 fill-current" }), /* @__PURE__ */ h("span", {
365
411
  className: "text-xs font-medium",
366
- children: z.has(J.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
412
+ children: z.has(q.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
367
413
  })]
368
414
  }),
369
- /* @__PURE__ */ g("button", {
415
+ /* @__PURE__ */ h("button", {
370
416
  type: "button",
371
417
  onClick: D,
372
418
  className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
373
419
  title: "Exit fullscreen (ESC)",
374
- children: /* @__PURE__ */ g(de, { className: "size-4" })
420
+ children: /* @__PURE__ */ h(he, { className: "size-4" })
375
421
  })
376
422
  ]
377
423
  })]
378
424
  }),
379
- /* @__PURE__ */ _("div", {
425
+ /* @__PURE__ */ g("div", {
380
426
  className: "flex items-center bg-bg-sunken border-b border-border-default shrink-0",
381
- children: [/* @__PURE__ */ g("div", {
427
+ children: [/* @__PURE__ */ h("div", {
382
428
  className: "flex items-center overflow-x-auto flex-1 min-w-0",
383
- children: Ze.map((e, t) => /* @__PURE__ */ g(ge, {
429
+ children: ot.map((e, t) => /* @__PURE__ */ h(be, {
384
430
  tab: e,
385
431
  index: t,
386
- isActive: e.sessionId === J?.sessionId,
387
- isDragging: q === t,
388
- statusIndicator: gt(e),
432
+ isActive: e.sessionId === q?.sessionId,
433
+ isDragging: K === t,
434
+ statusIndicator: Et(e),
389
435
  isRenaming: I === e.sessionId,
390
436
  renameValue: L,
391
437
  renameInputRef: V,
392
438
  onRenameChange: R,
393
- onRenameBlur: ft,
394
- onRenameKeyDown: pt,
395
- onSelect: () => ve(e.sessionId),
396
- onClose: () => ye(e.sessionId),
397
- onContextMenu: (t) => ut(t, e.sessionId),
398
- onDoubleClick: () => dt(e.sessionId),
399
- onDragStart: (e) => at(e, t),
400
- onDragOver: ot,
401
- onDrop: (e) => st(e, t),
402
- onDragEnd: ct,
439
+ onRenameBlur: bt,
440
+ onRenameKeyDown: xt,
441
+ onSelect: () => Se(e.sessionId),
442
+ onClose: () => Ce(e.sessionId),
443
+ onContextMenu: (t) => vt(t, e.sessionId),
444
+ onDoubleClick: () => yt(e.sessionId),
445
+ onDragStart: (e) => pt(e, t),
446
+ onDragOver: mt,
447
+ onDrop: (e) => ht(e, t),
448
+ onDragEnd: gt,
403
449
  closeLabel: O("vibecontrols.sessions.terminal.closeTab", "Close terminal")
404
450
  }, e.sessionId))
405
- }), /* @__PURE__ */ g("button", {
451
+ }), /* @__PURE__ */ h("button", {
406
452
  type: "button",
407
453
  ref: H,
408
454
  onClick: () => {
@@ -410,19 +456,19 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
410
456
  },
411
457
  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",
412
458
  title: "New session or open existing",
413
- children: /* @__PURE__ */ g(u, { className: "size-3.5" })
459
+ children: /* @__PURE__ */ h(l, { className: "size-3.5" })
414
460
  })]
415
461
  }),
416
- /* @__PURE__ */ g("div", {
462
+ /* @__PURE__ */ h("div", {
417
463
  className: "flex-1 bg-bg-sunken text-text-primary relative overflow-hidden",
418
- children: J ? l.map((e) => {
419
- let t = B[e.sessionId], r = t === "connecting" || e.loading, i = $e(e.terminalUrl), a = i ?? Fe[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
420
- return /* @__PURE__ */ _("div", {
421
- className: `absolute inset-0 ${e.sessionId === J.sessionId ? "block" : "hidden"}`,
464
+ children: q ? _.map((e) => {
465
+ let t = B[e.sessionId], r = t === "connecting" || e.loading, i = X(e.terminalUrl), a = i ?? Ue[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
466
+ return /* @__PURE__ */ g("div", {
467
+ className: `absolute inset-0 ${e.sessionId === q.sessionId ? "block" : "hidden"}`,
422
468
  children: [
423
- o && e.terminalUrl && /* @__PURE__ */ g(n, {
469
+ o && e.terminalUrl && /* @__PURE__ */ h(n, {
424
470
  ref: (t) => {
425
- Ge.current[e.sessionId] = t;
471
+ et.current[e.sessionId] = t;
426
472
  },
427
473
  sessionId: e.sessionId,
428
474
  agentId: e.agentId ?? null,
@@ -431,55 +477,55 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
431
477
  title: `Terminal - ${e.name}`,
432
478
  className: "w-full h-full border-0",
433
479
  allow: "clipboard-read *; clipboard-write *",
434
- onLoad: () => nt(e.sessionId),
435
- onError: () => rt(e.sessionId)
436
- }, `tif-${e.sessionId}-${Ke[e.sessionId] ?? 0}`),
437
- o && r && /* @__PURE__ */ g("div", {
480
+ onLoad: () => ut(e.sessionId),
481
+ onError: () => dt(e.sessionId)
482
+ }, `tif-${e.sessionId}-${tt[e.sessionId] ?? 0}`),
483
+ o && r && /* @__PURE__ */ h("div", {
438
484
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
439
- children: /* @__PURE__ */ _("div", {
485
+ children: /* @__PURE__ */ g("div", {
440
486
  className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
441
- children: [/* @__PURE__ */ g(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
487
+ children: [/* @__PURE__ */ h(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
442
488
  className: "text-text-primary text-sm font-medium",
443
489
  children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
444
- }), /* @__PURE__ */ g("p", {
490
+ }), /* @__PURE__ */ h("p", {
445
491
  className: "text-text-secondary text-xs",
446
492
  children: e.loading ? O("vibecontrols.sessions.terminal.settingUpWebTerminal", "Setting up session + web terminal") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
447
493
  })] })]
448
494
  })
449
495
  }),
450
- te && !e.error && /* @__PURE__ */ g("div", {
496
+ te && !e.error && /* @__PURE__ */ h("div", {
451
497
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center z-10",
452
- children: /* @__PURE__ */ _("div", {
498
+ children: /* @__PURE__ */ g("div", {
453
499
  className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
454
500
  children: [
455
- /* @__PURE__ */ g(pe, { className: "size-6 text-status-error-text" }),
456
- /* @__PURE__ */ _("div", {
501
+ /* @__PURE__ */ h(_e, { className: "size-6 text-status-error-text" }),
502
+ /* @__PURE__ */ g("div", {
457
503
  className: "text-center",
458
- children: [/* @__PURE__ */ g("p", {
504
+ children: [/* @__PURE__ */ h("p", {
459
505
  className: "text-text-primary text-sm font-medium",
460
506
  children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
461
- }), /* @__PURE__ */ g("p", {
507
+ }), /* @__PURE__ */ h("p", {
462
508
  className: "text-text-secondary text-xs mt-1",
463
- children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
509
+ children: a || ((W.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
464
510
  })]
465
511
  }),
466
- !a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ g(c, { className: "size-4 text-text-tertiary animate-spin" }),
467
- /* @__PURE__ */ _("button", {
512
+ !a && (W.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ h(c, { className: "size-4 text-text-tertiary animate-spin" }),
513
+ /* @__PURE__ */ g("button", {
468
514
  type: "button",
469
515
  onClick: () => Q(e.sessionId),
470
516
  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",
471
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
517
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
472
518
  })
473
519
  ]
474
520
  })
475
521
  }),
476
- !e.terminalUrl && e.loading && /* @__PURE__ */ g("div", {
522
+ !e.terminalUrl && e.loading && /* @__PURE__ */ h("div", {
477
523
  className: "flex items-center justify-center h-full",
478
- children: /* @__PURE__ */ _("div", {
524
+ children: /* @__PURE__ */ g("div", {
479
525
  className: "text-center",
480
526
  children: [
481
- /* @__PURE__ */ g(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
482
- /* @__PURE__ */ _("p", {
527
+ /* @__PURE__ */ h(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
528
+ /* @__PURE__ */ g("p", {
483
529
  className: "text-text-tertiary text-sm",
484
530
  children: [
485
531
  "Starting terminal for ",
@@ -487,139 +533,139 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
487
533
  "..."
488
534
  ]
489
535
  }),
490
- /* @__PURE__ */ g("p", {
536
+ /* @__PURE__ */ h("p", {
491
537
  className: "text-text-secondary text-xs mt-1",
492
538
  children: "Setting up session + web terminal"
493
539
  })
494
540
  ]
495
541
  })
496
542
  }),
497
- e.error && /* @__PURE__ */ g("div", {
543
+ e.error && /* @__PURE__ */ h("div", {
498
544
  className: "flex items-center justify-center h-full",
499
- children: /* @__PURE__ */ _("div", {
545
+ children: /* @__PURE__ */ g("div", {
500
546
  className: "text-center max-w-md",
501
547
  children: [
502
- /* @__PURE__ */ g(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
503
- /* @__PURE__ */ g("p", {
548
+ /* @__PURE__ */ h(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
549
+ /* @__PURE__ */ h("p", {
504
550
  className: "text-status-error-text text-sm font-medium",
505
551
  children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
506
552
  }),
507
- /* @__PURE__ */ g("p", {
553
+ /* @__PURE__ */ h("p", {
508
554
  className: "text-text-tertiary text-xs mt-2",
509
555
  children: e.error
510
556
  }),
511
- /* @__PURE__ */ g("div", {
557
+ /* @__PURE__ */ h("div", {
512
558
  className: "flex items-center justify-center gap-3 mt-4",
513
- children: b && y && /* @__PURE__ */ _("button", {
559
+ children: b && y && /* @__PURE__ */ g("button", {
514
560
  type: "button",
515
561
  onClick: () => {
516
562
  let t = y.find((t) => t.id === e.sessionId);
517
563
  t && b(t);
518
564
  },
519
565
  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",
520
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
566
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
521
567
  })
522
568
  })
523
569
  ]
524
570
  })
525
571
  }),
526
- !e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ g("div", {
572
+ !e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ h("div", {
527
573
  className: "flex items-center justify-center h-full",
528
- children: /* @__PURE__ */ _("div", {
574
+ children: /* @__PURE__ */ g("div", {
529
575
  className: "text-center max-w-sm space-y-3",
530
576
  children: [
531
- /* @__PURE__ */ g(m, { className: "size-8 text-text-secondary mx-auto" }),
532
- /* @__PURE__ */ g("p", {
577
+ /* @__PURE__ */ h(p, { className: "size-8 text-text-secondary mx-auto" }),
578
+ /* @__PURE__ */ h("p", {
533
579
  className: "text-text-primary text-sm font-medium",
534
580
  children: O("vibecontrols.sessions.terminal.terminalNotStarted", "Terminal not started yet")
535
581
  }),
536
- /* @__PURE__ */ g("p", {
582
+ /* @__PURE__ */ h("p", {
537
583
  className: "text-text-secondary text-xs",
538
584
  children: O("vibecontrols.sessions.terminal.startTerminalHint", "Click below to start a ttyd terminal on the agent for this session.")
539
585
  }),
540
- b && y && /* @__PURE__ */ _("button", {
586
+ b && y && /* @__PURE__ */ g("button", {
541
587
  type: "button",
542
588
  onClick: () => {
543
589
  let t = y.find((t) => t.id === e.sessionId);
544
590
  t && b(t);
545
591
  },
546
592
  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",
547
- children: [/* @__PURE__ */ g(m, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.startTerminal", "Start terminal")]
593
+ children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.startTerminal", "Start terminal")]
548
594
  })
549
595
  ]
550
596
  })
551
597
  })
552
598
  ]
553
599
  }, e.sessionId);
554
- }) : /* @__PURE__ */ g("div", {
600
+ }) : /* @__PURE__ */ h("div", {
555
601
  className: "flex items-center justify-center h-full",
556
- children: /* @__PURE__ */ _("div", {
602
+ children: /* @__PURE__ */ g("div", {
557
603
  className: "text-center max-w-md",
558
604
  children: [
559
- /* @__PURE__ */ g(m, { className: "size-12 text-text-secondary mx-auto mb-4" }),
560
- /* @__PURE__ */ g("p", {
605
+ /* @__PURE__ */ h(p, { className: "size-12 text-text-secondary mx-auto mb-4" }),
606
+ /* @__PURE__ */ h("p", {
561
607
  className: "text-text-secondary text-base font-medium mb-2",
562
608
  children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
563
609
  }),
564
- /* @__PURE__ */ g("p", {
610
+ /* @__PURE__ */ h("p", {
565
611
  className: "text-text-secondary text-sm mb-4",
566
612
  children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
567
613
  }),
568
- w && /* @__PURE__ */ _("button", {
614
+ w && /* @__PURE__ */ g("button", {
569
615
  type: "button",
570
616
  onClick: w,
571
617
  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",
572
- children: [/* @__PURE__ */ g(u, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
618
+ children: [/* @__PURE__ */ h(l, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
573
619
  })
574
620
  ]
575
621
  })
576
622
  })
577
623
  }),
578
- A && (w || Z.length > 0) && H.current && /* @__PURE__ */ _("div", {
579
- ref: U,
624
+ A && (w || Z.length > 0) && H.current && /* @__PURE__ */ g("div", {
625
+ ref: Qe,
580
626
  className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[10000] w-[280px]",
581
627
  style: {
582
628
  top: H.current.getBoundingClientRect().bottom + 4,
583
629
  left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
584
630
  },
585
631
  children: [
586
- /* @__PURE__ */ g("div", {
632
+ /* @__PURE__ */ h("div", {
587
633
  className: "p-2 border-b border-border-subtle",
588
- children: /* @__PURE__ */ _("div", {
634
+ children: /* @__PURE__ */ g("div", {
589
635
  className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
590
636
  children: [
591
- /* @__PURE__ */ g(ue, { className: "size-3.5 text-text-muted shrink-0" }),
592
- /* @__PURE__ */ g("input", {
637
+ /* @__PURE__ */ h(fe, { className: "size-3.5 text-text-muted shrink-0" }),
638
+ /* @__PURE__ */ h("input", {
593
639
  "aria-label": "Search sessions...",
594
- ref: We,
640
+ ref: $e,
595
641
  type: "text",
596
642
  value: M,
597
643
  onChange: (e) => N(e.target.value),
598
644
  placeholder: "Search sessions...",
599
645
  className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
600
646
  }),
601
- M && /* @__PURE__ */ g("button", {
647
+ M && /* @__PURE__ */ h("button", {
602
648
  type: "button",
603
649
  onClick: () => N(""),
604
650
  className: "text-text-muted hover:text-text-primary shrink-0",
605
- children: /* @__PURE__ */ g(h, { className: "size-3" })
651
+ children: /* @__PURE__ */ h(m, { className: "size-3" })
606
652
  })
607
653
  ]
608
654
  })
609
655
  }),
610
- w && /* @__PURE__ */ _("button", {
656
+ w && /* @__PURE__ */ g("button", {
611
657
  type: "button",
612
658
  onClick: () => {
613
659
  w(), j(!1), N("");
614
660
  },
615
661
  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",
616
- children: [/* @__PURE__ */ g(u, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ g("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
662
+ children: [/* @__PURE__ */ h(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ h("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
617
663
  }),
618
- Z.length > 0 && /* @__PURE__ */ _(me, { children: [
619
- /* @__PURE__ */ g("div", { className: "border-t border-border-subtle" }),
620
- /* @__PURE__ */ g("div", {
664
+ Z.length > 0 && /* @__PURE__ */ g(ve, { children: [
665
+ /* @__PURE__ */ h("div", { className: "border-t border-border-subtle" }),
666
+ /* @__PURE__ */ h("div", {
621
667
  className: "px-3 pt-2 pb-1",
622
- children: /* @__PURE__ */ _("span", {
668
+ children: /* @__PURE__ */ g("span", {
623
669
  className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
624
670
  children: [
625
671
  "Open existing (",
@@ -628,26 +674,26 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
628
674
  ]
629
675
  })
630
676
  }),
631
- /* @__PURE__ */ g("div", {
677
+ /* @__PURE__ */ h("div", {
632
678
  className: "max-h-48 overflow-y-auto pb-1",
633
- children: tt.length > 0 ? tt.map((e) => /* @__PURE__ */ _("button", {
679
+ children: lt.length > 0 ? lt.map((e) => /* @__PURE__ */ g("button", {
634
680
  type: "button",
635
681
  onClick: () => {
636
- Ce?.(e), j(!1), N("");
682
+ De?.(e), j(!1), N("");
637
683
  },
638
684
  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",
639
685
  children: [
640
- /* @__PURE__ */ g(m, { className: "size-3.5 text-text-secondary shrink-0" }),
641
- /* @__PURE__ */ g("span", {
686
+ /* @__PURE__ */ h(p, { className: "size-3.5 text-text-secondary shrink-0" }),
687
+ /* @__PURE__ */ h("span", {
642
688
  className: "truncate",
643
689
  children: e.name
644
690
  }),
645
- /* @__PURE__ */ g("span", {
691
+ /* @__PURE__ */ h("span", {
646
692
  className: `ml-auto text-[10px] px-1.5 py-0.5 rounded shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text/10 text-status-success-text" : e.status === "STOPPED" || e.status === "TERMINATED" ? "bg-text-secondary/10 text-text-tertiary" : "bg-status-warning-text/10 text-status-warning-text"}`,
647
693
  children: e.status.toLowerCase()
648
694
  })
649
695
  ]
650
- }, e.id)) : /* @__PURE__ */ _("div", {
696
+ }, e.id)) : /* @__PURE__ */ g("div", {
651
697
  className: "px-3 py-2 text-xs text-text-muted",
652
698
  children: [
653
699
  "No sessions matching “",
@@ -659,32 +705,33 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
659
705
  ] })
660
706
  ]
661
707
  }),
662
- P.visible && $ && /* @__PURE__ */ _("div", {
663
- ref: Ue,
708
+ P.visible && $ && /* @__PURE__ */ g("div", {
709
+ ref: Ze,
664
710
  className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[10000] min-w-[180px] py-1",
665
711
  style: {
666
712
  top: P.y,
667
713
  left: P.x
668
714
  },
669
715
  children: [
670
- x && /* @__PURE__ */ _("button", {
716
+ x && /* @__PURE__ */ g("button", {
671
717
  type: "button",
672
- onClick: () => dt($.sessionId),
718
+ onClick: () => yt($.sessionId),
673
719
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
674
- children: [/* @__PURE__ */ g(re, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.rename", "Rename")]
720
+ children: [/* @__PURE__ */ h(re, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.rename", "Rename")]
675
721
  }),
676
- $.terminalUrl && /* @__PURE__ */ _("button", {
722
+ $.terminalUrl && /* @__PURE__ */ g("button", {
677
723
  type: "button",
678
724
  onClick: () => {
679
- be($.sessionId), F((e) => ({
725
+ we($.sessionId), F((e) => ({
680
726
  ...e,
681
727
  visible: !1
682
728
  }));
683
729
  },
684
730
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
685
- children: [/* @__PURE__ */ g(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
731
+ children: [/* @__PURE__ */ h(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
686
732
  }),
687
- S && /* @__PURE__ */ _("button", {
733
+ Tt($.sessionId),
734
+ S && /* @__PURE__ */ g("button", {
688
735
  type: "button",
689
736
  onClick: () => {
690
737
  S($.sessionId), F((e) => ({
@@ -693,9 +740,9 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
693
740
  }));
694
741
  },
695
742
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
696
- children: [$.pinned ? /* @__PURE__ */ g(le, { className: "size-3.5" }) : /* @__PURE__ */ g(ce, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
743
+ children: [$.pinned ? /* @__PURE__ */ h(de, { className: "size-3.5" }) : /* @__PURE__ */ h(ue, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
697
744
  }),
698
- $.terminalUrl && /* @__PURE__ */ _("button", {
745
+ $.terminalUrl && /* @__PURE__ */ g("button", {
699
746
  type: "button",
700
747
  onClick: () => {
701
748
  Q($.sessionId), F((e) => ({
@@ -704,31 +751,31 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
704
751
  }));
705
752
  },
706
753
  className: `flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-bg-sunken transition-colors ${B[$.sessionId] === "error" ? "text-status-warning-text" : "text-text-primary"}`,
707
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
754
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
708
755
  }),
709
- Te && /* @__PURE__ */ _("button", {
756
+ ke && /* @__PURE__ */ g("button", {
710
757
  type: "button",
711
758
  onClick: () => {
712
- Te($.sessionId), F((e) => ({
759
+ ke($.sessionId), F((e) => ({
713
760
  ...e,
714
761
  visible: !1
715
762
  }));
716
763
  },
717
764
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
718
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.restartTerminal", "Restart Terminal")]
765
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.restartTerminal", "Restart Terminal")]
719
766
  }),
720
- we && /* @__PURE__ */ _("button", {
767
+ Oe && /* @__PURE__ */ g("button", {
721
768
  type: "button",
722
769
  onClick: () => {
723
- we($.sessionId), F((e) => ({
770
+ Oe($.sessionId), F((e) => ({
724
771
  ...e,
725
772
  visible: !1
726
773
  }));
727
774
  },
728
775
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
729
- children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopTerminal", "Stop Terminal")]
776
+ children: [/* @__PURE__ */ h(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopTerminal", "Stop Terminal")]
730
777
  }),
731
- C && /* @__PURE__ */ _("button", {
778
+ C && /* @__PURE__ */ g("button", {
732
779
  type: "button",
733
780
  onClick: () => {
734
781
  C($.sessionId), F((e) => ({
@@ -737,73 +784,73 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
737
784
  }));
738
785
  },
739
786
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
740
- children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
787
+ children: [/* @__PURE__ */ h(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
741
788
  }),
742
- /* @__PURE__ */ g("div", { className: "border-t border-border-subtle my-1" }),
743
- /* @__PURE__ */ _("button", {
789
+ /* @__PURE__ */ h("div", { className: "border-t border-border-subtle my-1" }),
790
+ /* @__PURE__ */ g("button", {
744
791
  type: "button",
745
792
  onClick: () => {
746
- ye($.sessionId), F((e) => ({
793
+ Ce($.sessionId), F((e) => ({
747
794
  ...e,
748
795
  visible: !1
749
796
  }));
750
797
  },
751
798
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
752
- children: [/* @__PURE__ */ g(h, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
799
+ children: [/* @__PURE__ */ h(m, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
753
800
  })
754
801
  ]
755
802
  })
756
803
  ]
757
- }), document.body) : null : /* @__PURE__ */ _("div", {
758
- ref: He,
759
- className: `${T ? "flex flex-col h-full" : ""} border-t border-border-default bg-bg-surface ${v && l.length === 0 && !T ? "hidden" : ""}`,
804
+ }), document.body) : null : /* @__PURE__ */ g("div", {
805
+ ref: Xe,
806
+ className: `${T ? "flex flex-col h-full" : ""} border-t border-border-default bg-bg-surface ${v && _.length === 0 && !T ? "hidden" : ""}`,
760
807
  children: [
761
- !T && !v && l.length > 0 && /* @__PURE__ */ g("div", {
762
- onMouseDown: lt,
808
+ !T && !v && _.length > 0 && /* @__PURE__ */ h("div", {
809
+ onMouseDown: _t,
763
810
  className: "h-1 cursor-ns-resize hover:bg-action-primary-bg/30 transition-colors flex items-center justify-center group",
764
811
  title: "Drag to resize",
765
- children: /* @__PURE__ */ g(ae, { className: "w-4 h-3 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity rotate-90" })
812
+ children: /* @__PURE__ */ h(ae, { className: "w-4 h-3 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity rotate-90" })
766
813
  }),
767
- /* @__PURE__ */ _("div", {
814
+ /* @__PURE__ */ g("div", {
768
815
  className: "flex items-center bg-bg-sunken border-b border-border-default",
769
816
  children: [
770
- !T && /* @__PURE__ */ _("button", {
817
+ !T && /* @__PURE__ */ g("button", {
771
818
  type: "button",
772
- onClick: xe,
819
+ onClick: Te,
773
820
  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",
774
821
  title: v ? "Expand terminal" : "Collapse terminal",
775
822
  children: [
776
- /* @__PURE__ */ g(m, { className: "size-3.5" }),
823
+ /* @__PURE__ */ h(p, { className: "size-3.5" }),
777
824
  "Terminal",
778
- g(v ? ne : te, { className: "size-3" })
825
+ h(v ? ne : te, { className: "size-3" })
779
826
  ]
780
827
  }),
781
- (!v || T) && /* @__PURE__ */ g("div", {
828
+ (!v || T) && /* @__PURE__ */ h("div", {
782
829
  className: "flex items-center overflow-x-auto flex-1 min-w-0",
783
- children: Ze.map((e, t) => /* @__PURE__ */ g(ge, {
830
+ children: ot.map((e, t) => /* @__PURE__ */ h(be, {
784
831
  tab: e,
785
832
  index: t,
786
- isActive: e.sessionId === J?.sessionId,
787
- isDragging: q === t,
788
- statusIndicator: gt(e),
833
+ isActive: e.sessionId === q?.sessionId,
834
+ isDragging: K === t,
835
+ statusIndicator: Et(e),
789
836
  isRenaming: I === e.sessionId,
790
837
  renameValue: L,
791
838
  renameInputRef: V,
792
839
  onRenameChange: R,
793
- onRenameBlur: ft,
794
- onRenameKeyDown: pt,
795
- onSelect: () => ve(e.sessionId),
796
- onClose: () => ye(e.sessionId),
797
- onContextMenu: (t) => ut(t, e.sessionId),
798
- onDoubleClick: () => dt(e.sessionId),
799
- onDragStart: (e) => at(e, t),
800
- onDragOver: ot,
801
- onDrop: (e) => st(e, t),
802
- onDragEnd: ct,
840
+ onRenameBlur: bt,
841
+ onRenameKeyDown: xt,
842
+ onSelect: () => Se(e.sessionId),
843
+ onClose: () => Ce(e.sessionId),
844
+ onContextMenu: (t) => vt(t, e.sessionId),
845
+ onDoubleClick: () => yt(e.sessionId),
846
+ onDragStart: (e) => pt(e, t),
847
+ onDragOver: mt,
848
+ onDrop: (e) => ht(e, t),
849
+ onDragEnd: gt,
803
850
  closeLabel: O("vibecontrols.sessions.terminal.closeTab", "Close terminal")
804
851
  }, e.sessionId))
805
852
  }),
806
- (!v || T) && /* @__PURE__ */ g("button", {
853
+ (!v || T) && /* @__PURE__ */ h("button", {
807
854
  type: "button",
808
855
  ref: H,
809
856
  onClick: () => {
@@ -811,104 +858,104 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
811
858
  },
812
859
  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",
813
860
  title: "New session or open existing",
814
- children: /* @__PURE__ */ g(u, { className: "size-3.5" })
861
+ children: /* @__PURE__ */ h(l, { className: "size-3.5" })
815
862
  }),
816
- (!v || T) && l.length > 0 && /* @__PURE__ */ _("div", {
863
+ (!v || T) && _.length > 0 && /* @__PURE__ */ g("div", {
817
864
  className: "flex items-center gap-1 px-2 shrink-0",
818
865
  children: [
819
- J?.terminalUrl && /* @__PURE__ */ g("button", {
866
+ q?.terminalUrl && /* @__PURE__ */ h("button", {
820
867
  type: "button",
821
- onClick: () => Q(J.sessionId),
822
- className: `p-1 transition-colors ${B[J.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
868
+ onClick: () => Q(q.sessionId),
869
+ className: `p-1 transition-colors ${B[q.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
823
870
  title: O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
824
871
  "aria-label": O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
825
872
  "data-testid": "terminal-reconnect",
826
- children: /* @__PURE__ */ g(d, { className: "size-3.5" })
873
+ children: /* @__PURE__ */ h(u, { className: "size-3.5" })
827
874
  }),
828
- J?.terminalUrl && /* @__PURE__ */ g("button", {
875
+ q?.terminalUrl && /* @__PURE__ */ h("button", {
829
876
  type: "button",
830
- onClick: () => J && be(J.sessionId),
877
+ onClick: () => q && we(q.sessionId),
831
878
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
832
879
  title: "Open in new tab",
833
- children: /* @__PURE__ */ g(s, { className: "size-3.5" })
880
+ children: /* @__PURE__ */ h(s, { className: "size-3.5" })
834
881
  }),
835
- J && C && /* @__PURE__ */ _("button", {
882
+ q && C && /* @__PURE__ */ g("button", {
836
883
  type: "button",
837
- onClick: () => Qe(J.sessionId),
838
- disabled: z.has(J.sessionId),
884
+ onClick: () => st(q.sessionId),
885
+ disabled: z.has(q.sessionId),
839
886
  className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all disabled:opacity-60 disabled:cursor-not-allowed",
840
887
  title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
841
888
  "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
842
- "aria-busy": z.has(J.sessionId),
843
- children: [z.has(J.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3 fill-current" }), /* @__PURE__ */ g("span", {
889
+ "aria-busy": z.has(q.sessionId),
890
+ children: [z.has(q.sessionId) ? /* @__PURE__ */ h(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3 fill-current" }), /* @__PURE__ */ h("span", {
844
891
  className: "text-[11px] font-medium",
845
- children: z.has(J.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
892
+ children: z.has(q.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
846
893
  })]
847
894
  }),
848
- J && /* @__PURE__ */ g("button", {
895
+ q && /* @__PURE__ */ h("button", {
849
896
  type: "button",
850
- onClick: () => je((e) => !e),
851
- className: `p-1 transition-colors ${Ae ? "text-action-primary-text bg-action-primary-bg rounded" : "text-text-secondary hover:text-text-primary"}`,
897
+ onClick: () => ze((e) => !e),
898
+ className: `p-1 transition-colors ${Re ? "text-action-primary-text bg-action-primary-bg rounded" : "text-text-secondary hover:text-text-primary"}`,
852
899
  title: O("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
853
- children: /* @__PURE__ */ g(f, { className: "size-3.5" })
900
+ children: /* @__PURE__ */ h(d, { className: "size-3.5" })
854
901
  }),
855
- D && /* @__PURE__ */ g("button", {
902
+ D && /* @__PURE__ */ h("button", {
856
903
  type: "button",
857
904
  onClick: D,
858
905
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
859
906
  title: E ? "Exit fullscreen" : "Enter fullscreen",
860
- children: g(E ? de : ie, { className: "size-3.5" })
907
+ children: h(E ? he : ie, { className: "size-3.5" })
861
908
  }),
862
- !T && !E && /* @__PURE__ */ g("button", {
909
+ !T && !E && /* @__PURE__ */ h("button", {
863
910
  type: "button",
864
- onClick: et,
911
+ onClick: ct,
865
912
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
866
913
  title: k ? "Restore size" : "Maximize",
867
- children: g(k ? se : oe, { className: "size-3.5" })
914
+ children: h(k ? ce : se, { className: "size-3.5" })
868
915
  })
869
916
  ]
870
917
  })
871
918
  ]
872
919
  }),
873
- (!v || T) && J && /* @__PURE__ */ _("div", {
874
- className: `${mt || ""} bg-bg-sunken text-text-primary relative ${T ? "flex-1" : ""}`,
875
- style: ht,
876
- children: [Ae && J && /* @__PURE__ */ _("div", {
920
+ (!v || T) && q && /* @__PURE__ */ g("div", {
921
+ className: `${St || ""} bg-bg-sunken text-text-primary relative ${T ? "flex-1" : ""}`,
922
+ style: Ct,
923
+ children: [Re && q && /* @__PURE__ */ g("div", {
877
924
  className: "absolute inset-0 z-30 bg-bg-surface flex flex-col",
878
- children: [/* @__PURE__ */ _("div", {
925
+ children: [/* @__PURE__ */ g("div", {
879
926
  className: "flex items-center justify-between px-4 py-2 border-b border-border-default",
880
- children: [/* @__PURE__ */ _("div", {
927
+ children: [/* @__PURE__ */ g("div", {
881
928
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
882
929
  children: [
883
- /* @__PURE__ */ g(f, { className: "size-4" }),
930
+ /* @__PURE__ */ h(d, { className: "size-4" }),
884
931
  O("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
885
- /* @__PURE__ */ _("span", {
932
+ /* @__PURE__ */ g("span", {
886
933
  className: "text-text-tertiary font-normal",
887
- children: ["· ", J.name]
934
+ children: ["· ", q.name]
888
935
  })
889
936
  ]
890
- }), /* @__PURE__ */ g("button", {
937
+ }), /* @__PURE__ */ h("button", {
891
938
  type: "button",
892
- onClick: () => je(!1),
939
+ onClick: () => ze(!1),
893
940
  className: "p-1 text-text-secondary hover:text-text-primary",
894
941
  title: O("common.close", "Close"),
895
- children: /* @__PURE__ */ g(h, { className: "size-4" })
942
+ children: /* @__PURE__ */ h(m, { className: "size-4" })
896
943
  })]
897
- }), /* @__PURE__ */ g("div", {
944
+ }), /* @__PURE__ */ h("div", {
898
945
  className: "flex-1 overflow-hidden",
899
- children: /* @__PURE__ */ g(t, {
900
- sessionId: J.sessionId,
901
- sessionName: J.name
946
+ children: /* @__PURE__ */ h(t, {
947
+ sessionId: q.sessionId,
948
+ sessionName: q.name
902
949
  })
903
950
  })]
904
- }), l.map((e) => {
905
- let t = B[e.sessionId], r = t === "connecting" || e.loading, i = $e(e.terminalUrl), a = i ?? Fe[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
906
- return /* @__PURE__ */ _("div", {
907
- className: `absolute inset-0 ${e.sessionId === J.sessionId ? "block" : "hidden"}`,
951
+ }), _.map((e) => {
952
+ let t = B[e.sessionId], r = t === "connecting" || e.loading, i = X(e.terminalUrl), a = i ?? Ue[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
953
+ return /* @__PURE__ */ g("div", {
954
+ className: `absolute inset-0 ${e.sessionId === q.sessionId ? "block" : "hidden"}`,
908
955
  children: [
909
- o && e.terminalUrl && /* @__PURE__ */ g(n, {
956
+ o && e.terminalUrl && /* @__PURE__ */ h(n, {
910
957
  ref: (t) => {
911
- Ge.current[e.sessionId] = t;
958
+ et.current[e.sessionId] = t;
912
959
  },
913
960
  sessionId: e.sessionId,
914
961
  agentId: e.agentId ?? null,
@@ -917,62 +964,62 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
917
964
  title: `Terminal - ${e.name}`,
918
965
  className: "w-full h-full border-0",
919
966
  allow: "clipboard-read *; clipboard-write *",
920
- onLoad: () => nt(e.sessionId),
921
- onError: () => rt(e.sessionId)
922
- }, `tif-${e.sessionId}-${Ke[e.sessionId] ?? 0}`),
923
- o && r && /* @__PURE__ */ g("div", {
967
+ onLoad: () => ut(e.sessionId),
968
+ onError: () => dt(e.sessionId)
969
+ }, `tif-${e.sessionId}-${tt[e.sessionId] ?? 0}`),
970
+ o && r && /* @__PURE__ */ h("div", {
924
971
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
925
- children: /* @__PURE__ */ _("div", {
972
+ children: /* @__PURE__ */ g("div", {
926
973
  className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
927
- children: [/* @__PURE__ */ g(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
974
+ children: [/* @__PURE__ */ h(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
928
975
  className: "text-text-primary text-sm font-medium",
929
976
  children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
930
- }), /* @__PURE__ */ g("p", {
977
+ }), /* @__PURE__ */ h("p", {
931
978
  className: "text-text-secondary text-xs",
932
979
  children: e.loading ? O("vibecontrols.sessions.terminal.settingUpWebTerminal", "Setting up session + web terminal") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
933
980
  })] })]
934
981
  })
935
982
  }),
936
- te && !e.error && /* @__PURE__ */ g("div", {
983
+ te && !e.error && /* @__PURE__ */ h("div", {
937
984
  className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center z-10",
938
- children: /* @__PURE__ */ _("div", {
985
+ children: /* @__PURE__ */ g("div", {
939
986
  className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
940
987
  children: [
941
- /* @__PURE__ */ g(pe, { className: "size-6 text-status-error-text" }),
942
- /* @__PURE__ */ _("div", {
988
+ /* @__PURE__ */ h(_e, { className: "size-6 text-status-error-text" }),
989
+ /* @__PURE__ */ g("div", {
943
990
  className: "text-center",
944
- children: [/* @__PURE__ */ g("p", {
991
+ children: [/* @__PURE__ */ h("p", {
945
992
  className: "text-text-primary text-sm font-medium",
946
993
  children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
947
- }), /* @__PURE__ */ g("p", {
994
+ }), /* @__PURE__ */ h("p", {
948
995
  className: "text-text-secondary text-xs mt-1",
949
- children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
996
+ children: a || ((W.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
950
997
  })]
951
998
  }),
952
- !a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ g(c, { className: "size-4 text-text-tertiary animate-spin" }),
953
- /* @__PURE__ */ _("div", {
999
+ !a && (W.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ h(c, { className: "size-4 text-text-tertiary animate-spin" }),
1000
+ /* @__PURE__ */ g("div", {
954
1001
  className: "flex items-center justify-center gap-2 flex-wrap",
955
- children: [/* @__PURE__ */ _("button", {
1002
+ children: [/* @__PURE__ */ g("button", {
956
1003
  type: "button",
957
1004
  onClick: () => Q(e.sessionId),
958
1005
  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",
959
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
960
- }), /* @__PURE__ */ _("a", {
1006
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
1007
+ }), /* @__PURE__ */ g("a", {
961
1008
  href: `/vibecontrols/sessions/${e.sessionId}#connection-log`,
962
1009
  className: "px-4 py-2 text-action-primary-text bg-action-primary-bg text-sm rounded-md hover:bg-action-primary-bg-hover transition-colors inline-flex items-center gap-2",
963
- children: [/* @__PURE__ */ g(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
1010
+ children: [/* @__PURE__ */ h(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
964
1011
  })]
965
1012
  })
966
1013
  ]
967
1014
  })
968
1015
  }),
969
- !e.terminalUrl && e.loading && /* @__PURE__ */ g("div", {
1016
+ !e.terminalUrl && e.loading && /* @__PURE__ */ h("div", {
970
1017
  className: "flex items-center justify-center h-full",
971
- children: /* @__PURE__ */ _("div", {
1018
+ children: /* @__PURE__ */ g("div", {
972
1019
  className: "text-center",
973
1020
  children: [
974
- /* @__PURE__ */ g(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
975
- /* @__PURE__ */ _("p", {
1021
+ /* @__PURE__ */ h(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
1022
+ /* @__PURE__ */ g("p", {
976
1023
  className: "text-text-tertiary text-sm",
977
1024
  children: [
978
1025
  "Starting terminal for ",
@@ -980,61 +1027,61 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
980
1027
  "..."
981
1028
  ]
982
1029
  }),
983
- /* @__PURE__ */ g("p", {
1030
+ /* @__PURE__ */ h("p", {
984
1031
  className: "text-text-secondary text-xs mt-1",
985
1032
  children: "Setting up session + web terminal"
986
1033
  })
987
1034
  ]
988
1035
  })
989
1036
  }),
990
- e.error && /* @__PURE__ */ g("div", {
1037
+ e.error && /* @__PURE__ */ h("div", {
991
1038
  className: "flex items-center justify-center h-full",
992
- children: /* @__PURE__ */ _("div", {
1039
+ children: /* @__PURE__ */ g("div", {
993
1040
  className: "text-center max-w-md",
994
1041
  children: [
995
- /* @__PURE__ */ g(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
996
- /* @__PURE__ */ g("p", {
1042
+ /* @__PURE__ */ h(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
1043
+ /* @__PURE__ */ h("p", {
997
1044
  className: "text-status-error-text text-sm font-medium",
998
1045
  children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
999
1046
  }),
1000
- /* @__PURE__ */ g("p", {
1047
+ /* @__PURE__ */ h("p", {
1001
1048
  className: "text-text-tertiary text-xs mt-2",
1002
1049
  children: e.error
1003
1050
  }),
1004
- /* @__PURE__ */ g("p", {
1051
+ /* @__PURE__ */ h("p", {
1005
1052
  className: "text-text-secondary text-xs mt-3",
1006
1053
  children: O("vibecontrols.sessions.terminal.seeConnectionLogPrompt", "See the connection log for the step-by-step timeline of probe / start / mint / exchange events.")
1007
1054
  }),
1008
- /* @__PURE__ */ _("div", {
1055
+ /* @__PURE__ */ g("div", {
1009
1056
  className: "flex items-center justify-center gap-3 mt-4 flex-wrap",
1010
- children: [b && y && /* @__PURE__ */ _("button", {
1057
+ children: [b && y && /* @__PURE__ */ g("button", {
1011
1058
  type: "button",
1012
1059
  onClick: () => {
1013
1060
  let t = y.find((t) => t.id === e.sessionId);
1014
1061
  t && b(t);
1015
1062
  },
1016
1063
  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",
1017
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
1018
- }), /* @__PURE__ */ _("a", {
1064
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
1065
+ }), /* @__PURE__ */ g("a", {
1019
1066
  href: `/vibecontrols/sessions/${e.sessionId}#connection-log`,
1020
1067
  className: "px-4 py-2 text-action-primary-text bg-action-primary-bg text-sm rounded-md hover:bg-action-primary-bg-hover transition-colors inline-flex items-center gap-2",
1021
- children: [/* @__PURE__ */ g(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
1068
+ children: [/* @__PURE__ */ h(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
1022
1069
  })]
1023
1070
  })
1024
1071
  ]
1025
1072
  })
1026
1073
  }),
1027
- !e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ g("div", {
1074
+ !e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ h("div", {
1028
1075
  className: "flex items-center justify-center h-full",
1029
- children: /* @__PURE__ */ _("div", {
1076
+ children: /* @__PURE__ */ g("div", {
1030
1077
  className: "text-center",
1031
1078
  children: [
1032
- /* @__PURE__ */ g(m, { className: "size-8 text-text-secondary mx-auto mb-3" }),
1033
- /* @__PURE__ */ g("p", {
1079
+ /* @__PURE__ */ h(p, { className: "size-8 text-text-secondary mx-auto mb-3" }),
1080
+ /* @__PURE__ */ h("p", {
1034
1081
  className: "text-text-tertiary text-sm",
1035
1082
  children: O("vibecontrols.sessions.terminal.noTerminalUrl", "No terminal URL available")
1036
1083
  }),
1037
- /* @__PURE__ */ g("p", {
1084
+ /* @__PURE__ */ h("p", {
1038
1085
  className: "text-text-secondary text-xs mt-1",
1039
1086
  children: O("vibecontrols.sessions.terminal.agentNeedsTtyd", "The agent needs to start ttyd for this session")
1040
1087
  })
@@ -1045,67 +1092,67 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1045
1092
  }, e.sessionId);
1046
1093
  })]
1047
1094
  }),
1048
- (!v || T) && l.length === 0 && T && /* @__PURE__ */ g("div", {
1095
+ (!v || T) && _.length === 0 && T && /* @__PURE__ */ h("div", {
1049
1096
  className: "flex-1 bg-bg-sunken text-text-primary flex items-center justify-center",
1050
- children: /* @__PURE__ */ _("div", {
1097
+ children: /* @__PURE__ */ g("div", {
1051
1098
  className: "text-center max-w-md",
1052
1099
  children: [
1053
- /* @__PURE__ */ g(m, { className: "size-12 text-text-secondary mx-auto mb-4" }),
1054
- /* @__PURE__ */ g("p", {
1100
+ /* @__PURE__ */ h(p, { className: "size-12 text-text-secondary mx-auto mb-4" }),
1101
+ /* @__PURE__ */ h("p", {
1055
1102
  className: "text-text-secondary text-base font-medium mb-2",
1056
1103
  children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
1057
1104
  }),
1058
- /* @__PURE__ */ g("p", {
1105
+ /* @__PURE__ */ h("p", {
1059
1106
  className: "text-text-secondary text-sm mb-4",
1060
1107
  children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
1061
1108
  }),
1062
- /* @__PURE__ */ g("div", {
1109
+ /* @__PURE__ */ h("div", {
1063
1110
  className: "flex items-center justify-center gap-2 flex-wrap",
1064
- children: w && /* @__PURE__ */ _("button", {
1111
+ children: w && /* @__PURE__ */ g("button", {
1065
1112
  type: "button",
1066
1113
  onClick: w,
1067
1114
  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",
1068
- children: [/* @__PURE__ */ g(u, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
1115
+ children: [/* @__PURE__ */ h(l, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
1069
1116
  })
1070
1117
  }),
1071
- Z.length > 0 && /* @__PURE__ */ _("div", {
1118
+ Z.length > 0 && /* @__PURE__ */ g("div", {
1072
1119
  className: "mt-6",
1073
- children: [/* @__PURE__ */ g("p", {
1120
+ children: [/* @__PURE__ */ h("p", {
1074
1121
  className: "text-text-secondary text-xs uppercase tracking-wider mb-3",
1075
1122
  children: "Or open an existing session"
1076
- }), /* @__PURE__ */ _("div", {
1123
+ }), /* @__PURE__ */ g("div", {
1077
1124
  className: "flex flex-col items-stretch gap-2 max-w-md mx-auto",
1078
- children: [Z.slice(0, 6).map((e) => /* @__PURE__ */ _("div", {
1125
+ children: [Z.slice(0, 6).map((e) => /* @__PURE__ */ g("div", {
1079
1126
  className: "flex items-center gap-2 px-3 py-2 bg-bg-canvas text-text-secondary text-xs rounded-md border border-border-default",
1080
- children: [/* @__PURE__ */ _("button", {
1127
+ children: [/* @__PURE__ */ g("button", {
1081
1128
  type: "button",
1082
- onClick: () => Ce?.(e),
1129
+ onClick: () => De?.(e),
1083
1130
  className: "flex items-center gap-1.5 flex-1 min-w-0 text-left hover:text-text-primary transition-colors",
1084
1131
  title: `Open ${e.name}`,
1085
1132
  children: [
1086
- /* @__PURE__ */ g(m, { className: "size-3 shrink-0" }),
1087
- /* @__PURE__ */ g("span", {
1133
+ /* @__PURE__ */ h(p, { className: "size-3 shrink-0" }),
1134
+ /* @__PURE__ */ h("span", {
1088
1135
  className: "truncate",
1089
1136
  children: e.name
1090
1137
  }),
1091
- /* @__PURE__ */ g("span", {
1138
+ /* @__PURE__ */ h("span", {
1092
1139
  className: `size-1.5 rounded-full shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text" : "bg-text-secondary"}`,
1093
1140
  title: e.status
1094
1141
  })
1095
1142
  ]
1096
- }), C && e.status === "RUNNING" && /* @__PURE__ */ g("button", {
1143
+ }), C && e.status === "RUNNING" && /* @__PURE__ */ h("button", {
1097
1144
  type: "button",
1098
1145
  onClick: (t) => {
1099
- t.stopPropagation(), Qe(e.id);
1146
+ t.stopPropagation(), st(e.id);
1100
1147
  },
1101
1148
  disabled: z.has(e.id),
1102
1149
  className: "inline-flex items-center justify-center size-6 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all shrink-0 disabled:opacity-60 disabled:cursor-not-allowed",
1103
1150
  title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
1104
1151
  "aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
1105
1152
  "aria-busy": z.has(e.id),
1106
- children: z.has(e.id) ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3 fill-current" })
1153
+ children: z.has(e.id) ? /* @__PURE__ */ h(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3 fill-current" })
1107
1154
  })]
1108
- }, e.id)), Z.length > 6 && /* @__PURE__ */ _("button", {
1155
+ }, e.id)), Z.length > 6 && /* @__PURE__ */ g("button", {
1109
1156
  type: "button",
1110
1157
  onClick: () => {
1111
1158
  j(!0), N("");
@@ -1122,51 +1169,51 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1122
1169
  ]
1123
1170
  })
1124
1171
  }),
1125
- A && (w || Z.length > 0) && H.current && /* @__PURE__ */ _("div", {
1126
- ref: U,
1172
+ A && (w || Z.length > 0) && H.current && /* @__PURE__ */ g("div", {
1173
+ ref: Qe,
1127
1174
  className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[100] w-[280px]",
1128
1175
  style: {
1129
1176
  top: H.current.getBoundingClientRect().bottom + 4,
1130
1177
  left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
1131
1178
  },
1132
1179
  children: [
1133
- /* @__PURE__ */ g("div", {
1180
+ /* @__PURE__ */ h("div", {
1134
1181
  className: "p-2 border-b border-border-subtle",
1135
- children: /* @__PURE__ */ _("div", {
1182
+ children: /* @__PURE__ */ g("div", {
1136
1183
  className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
1137
1184
  children: [
1138
- /* @__PURE__ */ g(ue, { className: "size-3.5 text-text-muted shrink-0" }),
1139
- /* @__PURE__ */ g("input", {
1185
+ /* @__PURE__ */ h(fe, { className: "size-3.5 text-text-muted shrink-0" }),
1186
+ /* @__PURE__ */ h("input", {
1140
1187
  "aria-label": "Search sessions...",
1141
- ref: We,
1188
+ ref: $e,
1142
1189
  type: "text",
1143
1190
  value: M,
1144
1191
  onChange: (e) => N(e.target.value),
1145
1192
  placeholder: "Search sessions...",
1146
1193
  className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
1147
1194
  }),
1148
- M && /* @__PURE__ */ g("button", {
1195
+ M && /* @__PURE__ */ h("button", {
1149
1196
  type: "button",
1150
1197
  onClick: () => N(""),
1151
1198
  className: "text-text-muted hover:text-text-primary shrink-0",
1152
- children: /* @__PURE__ */ g(h, { className: "size-3" })
1199
+ children: /* @__PURE__ */ h(m, { className: "size-3" })
1153
1200
  })
1154
1201
  ]
1155
1202
  })
1156
1203
  }),
1157
- w && /* @__PURE__ */ _("button", {
1204
+ w && /* @__PURE__ */ g("button", {
1158
1205
  type: "button",
1159
1206
  onClick: () => {
1160
1207
  w(), j(!1), N("");
1161
1208
  },
1162
1209
  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",
1163
- children: [/* @__PURE__ */ g(u, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ g("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
1210
+ children: [/* @__PURE__ */ h(l, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ h("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
1164
1211
  }),
1165
- Z.length > 0 && /* @__PURE__ */ _(me, { children: [
1166
- /* @__PURE__ */ g("div", { className: "border-t border-border-subtle" }),
1167
- /* @__PURE__ */ g("div", {
1212
+ Z.length > 0 && /* @__PURE__ */ g(ve, { children: [
1213
+ /* @__PURE__ */ h("div", { className: "border-t border-border-subtle" }),
1214
+ /* @__PURE__ */ h("div", {
1168
1215
  className: "px-3 pt-2 pb-1",
1169
- children: /* @__PURE__ */ _("span", {
1216
+ children: /* @__PURE__ */ g("span", {
1170
1217
  className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
1171
1218
  children: [
1172
1219
  "Open existing (",
@@ -1175,26 +1222,26 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1175
1222
  ]
1176
1223
  })
1177
1224
  }),
1178
- /* @__PURE__ */ g("div", {
1225
+ /* @__PURE__ */ h("div", {
1179
1226
  className: "max-h-48 overflow-y-auto pb-1",
1180
- children: tt.length > 0 ? tt.map((e) => /* @__PURE__ */ _("button", {
1227
+ children: lt.length > 0 ? lt.map((e) => /* @__PURE__ */ g("button", {
1181
1228
  type: "button",
1182
1229
  onClick: () => {
1183
- Ce?.(e), j(!1), N("");
1230
+ De?.(e), j(!1), N("");
1184
1231
  },
1185
1232
  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",
1186
1233
  children: [
1187
- /* @__PURE__ */ g(m, { className: "size-3.5 text-text-secondary shrink-0" }),
1188
- /* @__PURE__ */ g("span", {
1234
+ /* @__PURE__ */ h(p, { className: "size-3.5 text-text-secondary shrink-0" }),
1235
+ /* @__PURE__ */ h("span", {
1189
1236
  className: "truncate",
1190
1237
  children: e.name
1191
1238
  }),
1192
- /* @__PURE__ */ g("span", {
1239
+ /* @__PURE__ */ h("span", {
1193
1240
  className: `ml-auto text-[10px] px-1.5 py-0.5 rounded shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text/10 text-status-success-text" : e.status === "STOPPED" || e.status === "TERMINATED" ? "bg-text-secondary/10 text-text-tertiary" : "bg-status-warning-text/10 text-status-warning-text"}`,
1194
1241
  children: e.status.toLowerCase()
1195
1242
  })
1196
1243
  ]
1197
- }, e.id)) : /* @__PURE__ */ _("div", {
1244
+ }, e.id)) : /* @__PURE__ */ g("div", {
1198
1245
  className: "px-3 py-2 text-xs text-text-muted",
1199
1246
  children: [
1200
1247
  "No sessions matching “",
@@ -1206,32 +1253,33 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1206
1253
  ] })
1207
1254
  ]
1208
1255
  }),
1209
- P.visible && $ && /* @__PURE__ */ _("div", {
1210
- ref: Ue,
1256
+ P.visible && $ && /* @__PURE__ */ g("div", {
1257
+ ref: Ze,
1211
1258
  className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[100] min-w-[180px] py-1",
1212
1259
  style: {
1213
1260
  top: P.y,
1214
1261
  left: P.x
1215
1262
  },
1216
1263
  children: [
1217
- x && /* @__PURE__ */ _("button", {
1264
+ x && /* @__PURE__ */ g("button", {
1218
1265
  type: "button",
1219
- onClick: () => dt($.sessionId),
1266
+ onClick: () => yt($.sessionId),
1220
1267
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1221
- children: [/* @__PURE__ */ g(re, { className: "size-3.5" }), "Rename"]
1268
+ children: [/* @__PURE__ */ h(re, { className: "size-3.5" }), "Rename"]
1222
1269
  }),
1223
- $.terminalUrl && /* @__PURE__ */ _("button", {
1270
+ $.terminalUrl && /* @__PURE__ */ g("button", {
1224
1271
  type: "button",
1225
1272
  onClick: () => {
1226
- be($.sessionId), F((e) => ({
1273
+ we($.sessionId), F((e) => ({
1227
1274
  ...e,
1228
1275
  visible: !1
1229
1276
  }));
1230
1277
  },
1231
1278
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1232
- children: [/* @__PURE__ */ g(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
1279
+ children: [/* @__PURE__ */ h(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
1233
1280
  }),
1234
- S && /* @__PURE__ */ _("button", {
1281
+ Tt($.sessionId),
1282
+ S && /* @__PURE__ */ g("button", {
1235
1283
  type: "button",
1236
1284
  onClick: () => {
1237
1285
  S($.sessionId), F((e) => ({
@@ -1240,9 +1288,9 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1240
1288
  }));
1241
1289
  },
1242
1290
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1243
- children: [$.pinned ? /* @__PURE__ */ g(le, { className: "size-3.5" }) : /* @__PURE__ */ g(ce, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
1291
+ children: [$.pinned ? /* @__PURE__ */ h(de, { className: "size-3.5" }) : /* @__PURE__ */ h(ue, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
1244
1292
  }),
1245
- $.terminalUrl && /* @__PURE__ */ _("button", {
1293
+ $.terminalUrl && /* @__PURE__ */ g("button", {
1246
1294
  type: "button",
1247
1295
  onClick: () => {
1248
1296
  Q($.sessionId), F((e) => ({
@@ -1251,34 +1299,34 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1251
1299
  }));
1252
1300
  },
1253
1301
  className: `flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-bg-sunken transition-colors ${B[$.sessionId] === "error" ? "text-status-warning-text" : "text-text-primary"}`,
1254
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
1302
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
1255
1303
  }),
1256
- Te && /* @__PURE__ */ _("button", {
1304
+ ke && /* @__PURE__ */ g("button", {
1257
1305
  type: "button",
1258
1306
  onClick: () => {
1259
- Te($.sessionId), F((e) => ({
1307
+ ke($.sessionId), F((e) => ({
1260
1308
  ...e,
1261
1309
  visible: !1
1262
1310
  }));
1263
1311
  },
1264
1312
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1265
- children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), "Restart Terminal"]
1313
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), "Restart Terminal"]
1266
1314
  }),
1267
- we && /* @__PURE__ */ _("button", {
1315
+ Oe && /* @__PURE__ */ g("button", {
1268
1316
  type: "button",
1269
1317
  onClick: () => {
1270
- we($.sessionId), F((e) => ({
1318
+ Oe($.sessionId), F((e) => ({
1271
1319
  ...e,
1272
1320
  visible: !1
1273
1321
  }));
1274
1322
  },
1275
1323
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
1276
- children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), "Stop Terminal"]
1324
+ children: [/* @__PURE__ */ h(f, { className: "size-3.5" }), "Stop Terminal"]
1277
1325
  }),
1278
- C && /* @__PURE__ */ _("button", {
1326
+ C && /* @__PURE__ */ g("button", {
1279
1327
  type: "button",
1280
1328
  onClick: () => {
1281
- Qe($.sessionId), F((e) => ({
1329
+ st($.sessionId), F((e) => ({
1282
1330
  ...e,
1283
1331
  visible: !1
1284
1332
  }));
@@ -1286,19 +1334,19 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1286
1334
  disabled: z.has($.sessionId),
1287
1335
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg/15 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
1288
1336
  "aria-busy": z.has($.sessionId),
1289
- children: [z.has($.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3.5 fill-current" }), z.has($.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
1337
+ children: [z.has($.sessionId) ? /* @__PURE__ */ h(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5 fill-current" }), z.has($.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
1290
1338
  }),
1291
- /* @__PURE__ */ g("div", { className: "border-t border-border-subtle my-1" }),
1292
- /* @__PURE__ */ _("button", {
1339
+ /* @__PURE__ */ h("div", { className: "border-t border-border-subtle my-1" }),
1340
+ /* @__PURE__ */ g("button", {
1293
1341
  type: "button",
1294
1342
  onClick: () => {
1295
- ye($.sessionId), F((e) => ({
1343
+ Ce($.sessionId), F((e) => ({
1296
1344
  ...e,
1297
1345
  visible: !1
1298
1346
  }));
1299
1347
  },
1300
1348
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
1301
- children: [/* @__PURE__ */ g(h, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
1349
+ children: [/* @__PURE__ */ h(m, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
1302
1350
  })
1303
1351
  ]
1304
1352
  })
@@ -1306,6 +1354,6 @@ function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenE
1306
1354
  });
1307
1355
  }
1308
1356
  //#endregion
1309
- export { _e as TerminalPanel };
1357
+ export { _ as TerminalPanel };
1310
1358
 
1311
1359
  //# sourceMappingURL=TerminalPanel.js.map