@burdenoff/microfe-vibecontrols 2026.514.1 → 2026.514.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { useAdoptAgentSessionMutation as e, useAgentSessionOrphansLazyQuery as t, useBulkRestartSessionsMutation as n, useBulkStopSessionsMutation as r, useBulkTerminateSessionsMutation as i, useCheckSessionHealthMutation as ee, useCreateSessionMutation as a, useListSessionsQuery as o, useRestartSessionMutation as te, useRestartSessionTerminalMutation as ne, useSessionStatusChangedSubscription as re, useStartSessionMutation as ie, useStartSessionTerminalMutation as ae, useStopSessionMutation as oe, useStopSessionTerminalMutation as se, useTerminateSessionMutation as ce, useUpdateSessionMutation as le, useVibecontrolsAgentHealthProbeStreamSubscription as ue, useVibecontrolsAgentHealthProbesQuery as de } from "../generated/wspace-operations.js";
1
+ import { useAdoptAgentSessionMutation as e, useAgentSessionOrphansLazyQuery as t, useBulkRestartSessionsMutation as n, useBulkStopSessionsMutation as r, useBulkTerminateSessionsMutation as i, useCheckSessionHealthMutation as a, useCreateSessionMutation as o, useExportSessionsMutation as s, useListSessionsQuery as ee, useRestartSessionMutation as te, useRestartSessionTerminalMutation as ne, useSessionStatusChangedSubscription as re, useStartSessionMutation as ie, useStartSessionTerminalMutation as ae, useStopSessionMutation as oe, useStopSessionTerminalMutation as se, useTerminateSessionMutation as ce, useUpdateSessionMutation as le, useVibecontrolsAgentHealthProbeStreamSubscription as ue, useVibecontrolsAgentHealthProbesQuery as de } from "../generated/wspace-operations.js";
2
2
  import { useVibeControls as fe, useVibeNavigate as pe } from "../providers/VibeControlsProvider.js";
3
3
  import { useVibeControlsStore as me } from "../store/vibeControlsStore.js";
4
4
  import he from "../hooks/useCachedInitialData.js";
@@ -6,33 +6,33 @@ import { PageHeader as ge } from "../components/shared/PageHeader.js";
6
6
  import { LoadingState as _e } from "../components/shared/LoadingState.js";
7
7
  import { ErrorState as ve } from "../components/shared/ErrorState.js";
8
8
  import { ConfirmDialog as ye } from "../components/shared/ConfirmDialog.js";
9
- import { getQuotaDialogContent as be, isQuotaExhaustedError as s } from "../utils/quotaUtils.js";
9
+ import { getQuotaDialogContent as be, isQuotaExhaustedError as c } from "../utils/quotaUtils.js";
10
10
  import { EmptyState as xe } from "../components/shared/EmptyState.js";
11
11
  import { SearchInput as Se } from "../components/shared/SearchInput.js";
12
- import { FilterDropdown as c } from "../components/shared/FilterDropdown.js";
12
+ import { FilterDropdown as l } from "../components/shared/FilterDropdown.js";
13
13
  import { AgentSetupBanner as Ce } from "../components/shared/AgentSetupBanner.js";
14
14
  import { GetHelpButton as we } from "../components/shared/GetHelpButton.js";
15
- import { SearchableSelect as Te } from "../components/shared/SearchableSelect.js";
16
- import Ee from "../components/shared/SessionNotificationBanner.js";
15
+ import { SearchableSelect as u } from "../components/shared/SearchableSelect.js";
16
+ import Te from "../components/shared/SessionNotificationBanner.js";
17
17
  import "../components/shared/index.js";
18
- import { VIBE_PERMISSIONS as l } from "../constants/permissions.js";
18
+ import { VIBE_PERMISSIONS as Ee } from "../constants/permissions.js";
19
19
  import { SessionCard as De } from "../components/sessions/SessionCard.js";
20
20
  import { SessionList as Oe } from "../components/sessions/SessionList.js";
21
21
  import { TerminalPanel as ke } from "../components/sessions/TerminalPanel.js";
22
22
  import { SessionShareDialog as Ae } from "../components/sessions/SessionShareDialog.js";
23
23
  import "../components/sessions/index.js";
24
- import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
24
+ import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
25
25
  import { useI18n as je } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
26
- import { Activity as Me, CheckSquare as Ne, Grid as Pe, List as Fe, Monitor as Ie, Play as Le, Plus as Re, RefreshCw as ze, RotateCcw as Be, Square as Ve, Terminal as He, Trash2 as Ue, XSquare as We } from "lucide-react";
27
- import { useSearchParams as Ge } from "react-router-dom";
28
- import { usePermissions as Ke } from "@burdenoff/fe-libs/shared/providers/shell";
29
- import { AnimatePresence as qe } from "framer-motion";
30
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
31
- import { MotionItem as Je, MotionList as Ye, MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
32
- import { AccessDenied as Xe, PermissionButton as Ze } from "@burdenoff/fe-libs/shared/components";
26
+ import { Activity as Me, CheckSquare as Ne, Download as Pe, Grid as Fe, List as Ie, Monitor as Le, Play as Re, Plus as ze, RefreshCw as Be, RotateCcw as Ve, Square as He, Terminal as Ue, Trash2 as We, XSquare as Ge } from "lucide-react";
27
+ import { useSearchParams as Ke } from "react-router-dom";
28
+ import { usePermissions as qe } from "@burdenoff/fe-libs/shared/providers/shell";
29
+ import { AnimatePresence as Je } from "framer-motion";
30
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
31
+ import { MotionItem as Ye, MotionList as Xe, MotionPage as v } from "@burdenoff/fe-libs/shared/motion";
32
+ import { AccessDenied as Ze, PermissionButton as Qe } from "@burdenoff/fe-libs/shared/components";
33
33
  //#region src/pages/SessionsPage.tsx
34
- var Qe = 3e5;
35
- function $e(e, t) {
34
+ var $e = 3e5;
35
+ function et(e, t) {
36
36
  if (!e) return null;
37
37
  try {
38
38
  let n = new URL(e);
@@ -49,7 +49,7 @@ function $e(e, t) {
49
49
  return e;
50
50
  }
51
51
  }
52
- function et(e, t, n, r) {
52
+ function tt(e, t, n, r) {
53
53
  if (e !== "RUNNING") return e;
54
54
  if (r === !1) return "ERROR";
55
55
  if (!t) return e;
@@ -62,220 +62,220 @@ function et(e, t, n, r) {
62
62
  }
63
63
  return e;
64
64
  }
65
- function tt() {
66
- let { t: tt } = je(), { onSessionStart: nt, workspaceId: rt } = fe(), it = pe(), { hasPermission: at, isLoading: ot, permissions: st } = Ke(), [ct, lt] = Ge(), v = u((e, t, n) => {
67
- let r = tt(e, n), i = r === e ? t : r;
65
+ function nt() {
66
+ let { t: nt } = je(), { onSessionStart: rt, workspaceId: it } = fe(), at = pe(), { hasPermission: ot, isLoading: st, permissions: ct } = qe(), [y, lt] = Ke(), b = d((e, t, n) => {
67
+ let r = nt(e, n), i = r === e ? t : r;
68
68
  return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
69
- }, [tt]), ut = f(() => [
69
+ }, [nt]), ut = p(() => [
70
70
  {
71
71
  value: "all",
72
- label: v("sessions.statusAll", "All Statuses")
72
+ label: b("sessions.statusAll", "All Statuses")
73
73
  },
74
74
  {
75
75
  value: "RUNNING",
76
- label: v("sessions.running", "Running")
76
+ label: b("sessions.running", "Running")
77
77
  },
78
78
  {
79
79
  value: "STOPPED",
80
- label: v("sessions.stopped", "Stopped")
80
+ label: b("sessions.stopped", "Stopped")
81
81
  },
82
82
  {
83
83
  value: "STARTING",
84
- label: v("sessions.starting", "Starting")
84
+ label: b("sessions.starting", "Starting")
85
85
  },
86
86
  {
87
87
  value: "ERROR",
88
- label: v("common.error", "Error")
88
+ label: b("common.error", "Error")
89
89
  }
90
- ], [v]), dt = f(() => [
90
+ ], [b]), dt = p(() => [
91
91
  {
92
92
  value: "all",
93
- label: v("sessions.typeAll", "All Types")
93
+ label: b("sessions.typeAll", "All Types")
94
94
  },
95
95
  {
96
96
  value: "TMUX",
97
- label: v("sessions.typeTmux", "Tmux")
97
+ label: b("sessions.typeTmux", "Tmux")
98
98
  },
99
99
  {
100
100
  value: "TERMINAL",
101
- label: v("sessions.typeTerminal", "Terminal")
101
+ label: b("sessions.typeTerminal", "Terminal")
102
102
  },
103
103
  {
104
104
  value: "SCRIPT",
105
- label: v("sessions.typeScript", "Script")
105
+ label: b("sessions.typeScript", "Script")
106
106
  },
107
107
  {
108
108
  value: "CUSTOM",
109
- label: v("sessions.typeCustom", "Custom")
109
+ label: b("sessions.typeCustom", "Custom")
110
110
  }
111
- ], [v]), ft = at(l.SESSION_LIST), pt = at(l.SESSION_CREATE), [y, mt] = m(""), [b, ht] = m("all"), [x, gt] = m("all"), [S, _t] = m("all"), [C, vt] = m("all"), [w, T] = m("terminal"), [yt, E] = m(!1), [bt, D] = m(!1), [xt, O] = m(null), [St, Ct] = m(!1), [k, A] = m(null), [j, M] = m(/* @__PURE__ */ new Set()), [wt, N] = m(!1), Tt = p(null), Et = p(null), Dt = p(null), Ot = p(null), [kt, At] = m(""), [jt, Mt] = m(""), [P, Nt] = m("TMUX"), [Pt, Ft] = m(!1), { terminalTabs: It, activeTerminalTabId: Lt, sessionsViewMode: Rt, setTerminalTabs: zt, setActiveTerminalTabId: Bt, setSessionsViewMode: Vt, activeSessionId: F } = me(), [I, L] = m([]), [R, z] = m(null), [Ht, B] = m(!1), [Ut, Wt] = m(null), [Gt, Kt] = m(!1), [V, qt] = m(!1), H = ct.get("view"), Jt = ct.get("session"), [Yt] = a({ refetchQueries: ["ListSessions"] }), [Xt, Zt] = m(!1), [U, Qt] = m(""), [$t, W] = m(null), [en, tn] = m(null), [nn, { data: rn, loading: an }] = t({ fetchPolicy: "network-only" }), [on] = e({ refetchQueries: ["ListSessions"] }), [sn] = ie({ refetchQueries: ["ListSessions"] }), [cn] = oe({ refetchQueries: ["ListSessions"] }), [ln] = te({ refetchQueries: ["ListSessions"] }), [G] = ae({ refetchQueries: ["ListSessions"] }), [un] = se({ refetchQueries: ["ListSessions"] }), [dn] = ne({ refetchQueries: ["ListSessions"] }), [fn] = le({ refetchQueries: ["ListSessions"] }), [pn] = ce({ refetchQueries: ["ListSessions"] }), [mn] = ee({ refetchQueries: ["ListSessions"] }), [hn] = r({ refetchQueries: ["ListSessions"] }), [gn] = n({ refetchQueries: ["ListSessions"] }), [_n] = i({ refetchQueries: ["ListSessions"] });
112
- d(() => {
113
- V || (H === "terminal" || H === "grid" || H === "list" ? T(H) : Rt && T(Rt), Jt ? z(Jt) : Lt && z(Lt), It.length > 0 && L(It.map((e) => ({
111
+ ], [b]), ft = ot(Ee.SESSION_LIST), pt = ot(Ee.SESSION_CREATE), [x, mt] = h(""), [S, ht] = h("all"), [C, gt] = h("all"), [w, _t] = h("all"), [T, vt] = h("all"), [E, D] = h("terminal"), [yt, O] = h(!1), [bt, k] = h(!1), [xt, A] = h(null), [St, Ct] = h(!1), [j, M] = h(null), [N, P] = h(/* @__PURE__ */ new Set()), [wt, F] = h(!1), [Tt, Et] = h(!1), Dt = m(null), Ot = m(null), kt = m(null), At = m(null), [jt, Mt] = h(""), [Nt, Pt] = h(""), [I, Ft] = h("TMUX"), [It, Lt] = h(!1), { terminalTabs: Rt, activeTerminalTabId: zt, sessionsViewMode: Bt, setTerminalTabs: Vt, setActiveTerminalTabId: Ht, setSessionsViewMode: Ut, activeSessionId: L } = me(), [R, z] = h([]), [B, V] = h(null), [Wt, H] = h(!1), [Gt, Kt] = h(null), [qt, Jt] = h(!1), [U, Yt] = h(!1), W = y.get("view"), Xt = y.get("session"), [Zt] = o({ refetchQueries: ["ListSessions"] }), [Qt, $t] = h(!1), [en, tn] = h(""), [nn, rn] = h(null), [an, on] = h(null), [sn, { data: cn, loading: ln }] = t({ fetchPolicy: "network-only" }), [un] = e({ refetchQueries: ["ListSessions"] }), [dn] = ie({ refetchQueries: ["ListSessions"] }), [fn] = oe({ refetchQueries: ["ListSessions"] }), [pn] = te({ refetchQueries: ["ListSessions"] }), [G] = ae({ refetchQueries: ["ListSessions"] }), [mn] = se({ refetchQueries: ["ListSessions"] }), [hn] = ne({ refetchQueries: ["ListSessions"] }), [gn] = le({ refetchQueries: ["ListSessions"] }), [_n] = ce({ refetchQueries: ["ListSessions"] }), [vn] = a({ refetchQueries: ["ListSessions"] }), [yn] = r({ refetchQueries: ["ListSessions"] }), [bn] = n({ refetchQueries: ["ListSessions"] }), [xn] = i({ refetchQueries: ["ListSessions"] }), [Sn] = s();
112
+ f(() => {
113
+ U || (W === "terminal" || W === "grid" || W === "list" ? D(W) : Bt && D(Bt), Xt ? V(Xt) : zt && V(zt), Rt.length > 0 && z(Rt.map((e) => ({
114
114
  sessionId: e.sessionId,
115
115
  name: e.name,
116
116
  terminalUrl: null,
117
117
  loading: !1,
118
118
  error: null
119
- }))), qt(!0));
119
+ }))), Yt(!0));
120
120
  }, [
121
- It,
122
- Lt,
123
121
  Rt,
124
- Jt,
125
- H,
126
- V
122
+ zt,
123
+ Bt,
124
+ Xt,
125
+ W,
126
+ U
127
127
  ]);
128
- let vn = p(!1);
129
- d(() => {
130
- V && zt(I.map((e) => ({
128
+ let Cn = m(!1);
129
+ f(() => {
130
+ U && Vt(R.map((e) => ({
131
131
  sessionId: e.sessionId,
132
132
  name: e.name
133
133
  })));
134
- }, [
135
- I,
136
- V,
137
- zt
138
- ]), d(() => {
139
- V && Bt(R);
140
134
  }, [
141
135
  R,
142
- V,
143
- Bt
144
- ]), d(() => {
145
- V && Vt(w);
146
- }, [
147
- w,
148
- V,
136
+ U,
149
137
  Vt
150
- ]), d(() => {
151
- if (!V) return;
152
- let e = new URLSearchParams(ct), t = !1, n = w === "terminal" ? null : w;
153
- n ? e.get("view") !== n && (e.set("view", n), t = !0) : e.has("view") && (e.delete("view"), t = !0), R ? e.get("session") !== R && (e.set("session", R), t = !0) : e.has("session") && (e.delete("session"), t = !0), t && lt(e, { replace: !0 });
138
+ ]), f(() => {
139
+ U && Ht(B);
154
140
  }, [
155
- R,
156
- ct,
141
+ B,
142
+ U,
143
+ Ht
144
+ ]), f(() => {
145
+ U && Ut(E);
146
+ }, [
147
+ E,
148
+ U,
149
+ Ut
150
+ ]), f(() => {
151
+ if (!U) return;
152
+ let e = new URLSearchParams(y), t = !1, n = E === "terminal" ? null : E;
153
+ n ? e.get("view") !== n && (e.set("view", n), t = !0) : e.has("view") && (e.delete("view"), t = !0), B ? e.get("session") !== B && (e.set("session", B), t = !0) : e.has("session") && (e.delete("session"), t = !0), t && lt(e, { replace: !0 });
154
+ }, [
155
+ B,
156
+ y,
157
157
  lt,
158
- V,
159
- w
158
+ U,
159
+ E
160
160
  ]);
161
- let K = p(null);
161
+ let K = m(null);
162
162
  re({
163
- skip: !rt,
164
- variables: { workspaceId: rt || "" }
165
- }), d(() => {
163
+ skip: !it,
164
+ variables: { workspaceId: it || "" }
165
+ }), f(() => {
166
166
  let e = setInterval(() => {
167
- mn().catch(() => {});
168
- }, Qe);
167
+ vn().catch(() => {});
168
+ }, $e);
169
169
  return () => clearInterval(e);
170
- }, [mn]), d(() => {
170
+ }, [vn]), f(() => {
171
171
  let e = (e) => {
172
172
  let t = e.target;
173
173
  if (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable) return;
174
174
  let n = e.metaKey || e.ctrlKey;
175
175
  if (n && e.key === "t") {
176
- e.preventDefault(), E(!0);
176
+ e.preventDefault(), O(!0);
177
177
  return;
178
178
  }
179
- if (n && e.key === "w" && R) {
179
+ if (n && e.key === "w" && B) {
180
180
  e.preventDefault();
181
- let t = R;
182
- L((e) => e.filter((e) => e.sessionId !== t)), z(() => {
183
- let e = I.filter((e) => e.sessionId !== t);
181
+ let t = B;
182
+ z((e) => e.filter((e) => e.sessionId !== t)), V(() => {
183
+ let e = R.filter((e) => e.sessionId !== t);
184
184
  return e.length > 0 ? e[e.length - 1].sessionId : null;
185
185
  });
186
186
  return;
187
187
  }
188
- if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && I.length > 1) {
189
- e.preventDefault(), z(I[(I.findIndex((e) => e.sessionId === R) + 1) % I.length].sessionId);
188
+ if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && R.length > 1) {
189
+ e.preventDefault(), V(R[(R.findIndex((e) => e.sessionId === B) + 1) % R.length].sessionId);
190
190
  return;
191
191
  }
192
- if (e.ctrlKey && e.key === "Tab" && e.shiftKey && I.length > 1) {
193
- e.preventDefault(), z(I[(I.findIndex((e) => e.sessionId === R) - 1 + I.length) % I.length].sessionId);
192
+ if (e.ctrlKey && e.key === "Tab" && e.shiftKey && R.length > 1) {
193
+ e.preventDefault(), V(R[(R.findIndex((e) => e.sessionId === B) - 1 + R.length) % R.length].sessionId);
194
194
  return;
195
195
  }
196
196
  };
197
197
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
198
- }, [R, I]);
199
- let { data: yn, previousData: bn, loading: q, error: xn, refetch: J } = o({
198
+ }, [B, R]);
199
+ let { data: wn, previousData: Tn, loading: q, error: En, refetch: J } = ee({
200
200
  variables: {
201
201
  filter: {
202
- status: b === "all" ? void 0 : b,
203
- type: x === "all" ? void 0 : x,
204
- vibeId: S !== "all" && S !== "none" ? S : void 0,
205
- agentId: C === "all" ? void 0 : C
202
+ status: S === "all" ? void 0 : S,
203
+ type: C === "all" ? void 0 : C,
204
+ vibeId: w !== "all" && w !== "none" ? w : void 0,
205
+ agentId: T === "all" ? void 0 : T
206
206
  },
207
207
  pagination: { limit: 50 }
208
208
  },
209
209
  fetchPolicy: "cache-first"
210
- }), Sn = yn ?? bn, { agents: Cn, vibes: Y } = he(), wn = de({ fetchPolicy: "cache-and-network" }), { data: Tn } = ue(), En = f(() => {
211
- let e = /* @__PURE__ */ new Map(), t = Tn?.vibecontrolsAgentHealthProbeStream ?? wn.data?.vibecontrolsAgentHealthProbes ?? [];
210
+ }), Dn = wn ?? Tn, { agents: On, vibes: Y } = he(), kn = de({ fetchPolicy: "cache-and-network" }), { data: An } = ue(), jn = p(() => {
211
+ let e = /* @__PURE__ */ new Map(), t = An?.vibecontrolsAgentHealthProbeStream ?? kn.data?.vibecontrolsAgentHealthProbes ?? [];
212
212
  for (let n of t) e.set(n.agentId, {
213
213
  healthy: n.healthy,
214
214
  error: n.errorMessage ?? null
215
215
  });
216
216
  return e;
217
- }, [wn.data, Tn]), Dn = f(() => [
217
+ }, [kn.data, An]), Mn = p(() => [
218
218
  {
219
219
  value: "all",
220
- label: v("sessions.filterVibeAll", "All Vibes")
220
+ label: b("sessions.filterVibeAll", "All Vibes")
221
221
  },
222
222
  {
223
223
  value: "none",
224
- label: v("sessions.filterVibeNone", "No Vibe")
224
+ label: b("sessions.filterVibeNone", "No Vibe")
225
225
  },
226
226
  ...Y.map((e) => ({
227
227
  value: e.id,
228
228
  label: e.name
229
229
  }))
230
- ], [Y, v]), On = f(() => [{
230
+ ], [Y, b]), Nn = p(() => [{
231
231
  value: "all",
232
- label: v("sessions.filterAgentAll", "All Agents")
233
- }, ...Cn.map((e) => ({
232
+ label: b("sessions.filterAgentAll", "All Agents")
233
+ }, ...On.map((e) => ({
234
234
  value: e.id,
235
- label: `${e.name} ${e.isActive ? "" : `(${v("sessions.offline", "Offline")})`}`
236
- }))], [Cn, v]), kn = f(() => [{
235
+ label: `${e.name} ${e.isActive ? "" : `(${b("sessions.offline", "Offline")})`}`
236
+ }))], [On, b]), Pn = p(() => [{
237
237
  value: "",
238
- label: v("sessions.noVibe", "No vibe")
238
+ label: b("sessions.noVibe", "No vibe")
239
239
  }, ...Y.map((e) => ({
240
240
  value: e.id,
241
241
  label: e.name
242
- }))], [Y, v]), An = f(() => [{
242
+ }))], [Y, b]), Fn = p(() => [{
243
243
  value: "",
244
- label: v("sessions.selectAgent", "Select an agent")
245
- }, ...Cn.map((e) => ({
244
+ label: b("sessions.selectAgent", "Select an agent")
245
+ }, ...On.map((e) => ({
246
246
  value: e.id,
247
- label: `${e.name} ${e.isActive ? `(${v("sessions.active", "Active")})` : `(${v("sessions.offline", "Offline")})`}`
248
- }))], [Cn, v]), jn = f(() => [
247
+ label: `${e.name} ${e.isActive ? `(${b("sessions.active", "Active")})` : `(${b("sessions.offline", "Offline")})`}`
248
+ }))], [On, b]), In = p(() => [
249
249
  {
250
250
  value: "TMUX",
251
- label: v("sessions.typeTmuxLower", "tmux")
251
+ label: b("sessions.typeTmuxLower", "tmux")
252
252
  },
253
253
  {
254
254
  value: "WEZTERM",
255
- label: v("sessions.typeWezTerm", "WezTerm")
255
+ label: b("sessions.typeWezTerm", "WezTerm")
256
256
  },
257
257
  {
258
258
  value: "ZELLIJ",
259
- label: v("sessions.typeZellij", "Zellij")
259
+ label: b("sessions.typeZellij", "Zellij")
260
260
  },
261
261
  {
262
262
  value: "TERMINAL",
263
- label: v("sessions.typeTerminal", "Terminal")
263
+ label: b("sessions.typeTerminal", "Terminal")
264
264
  },
265
265
  {
266
266
  value: "SSH",
267
- label: v("sessions.typeSsh", "SSH")
267
+ label: b("sessions.typeSsh", "SSH")
268
268
  },
269
269
  {
270
270
  value: "SCRIPT",
271
- label: v("sessions.typeScript", "Script")
271
+ label: b("sessions.typeScript", "Script")
272
272
  },
273
273
  {
274
274
  value: "CUSTOM",
275
- label: v("sessions.typeCustom", "Custom")
275
+ label: b("sessions.typeCustom", "Custom")
276
276
  }
277
- ], [v]), X = f(() => (Sn?.sessions?.items ?? []).map((e) => {
278
- let t = $e(e.ttydUrl || null, e.agent?.tunnelUrl || null);
277
+ ], [b]), X = p(() => (Dn?.sessions?.items ?? []).map((e) => {
278
+ let t = et(e.ttydUrl || null, e.agent?.tunnelUrl || null);
279
279
  return {
280
280
  id: e.id,
281
281
  workspaceId: e.workspaceId,
@@ -283,7 +283,7 @@ function tt() {
283
283
  agentId: e.agentId || null,
284
284
  name: e.name,
285
285
  type: e.type,
286
- status: et(e.status, e.ttydUrl || null, t, e.agent?.isActive),
286
+ status: tt(e.status, e.ttydUrl || null, t, e.agent?.isActive),
287
287
  command: e.command || null,
288
288
  workingDirectory: e.workingDirectory || null,
289
289
  environmentVariables: e.environmentVariables || {},
@@ -308,20 +308,20 @@ function tt() {
308
308
  isActive: e.agent.isActive
309
309
  } : void 0
310
310
  };
311
- }), [Sn?.sessions?.items]);
312
- d(() => {
313
- vn.current || X.length === 0 || I.length === 0 || (vn.current = !0, Promise.allSettled(I.map(async (e) => {
311
+ }), [Dn?.sessions?.items]);
312
+ f(() => {
313
+ Cn.current || X.length === 0 || R.length === 0 || (Cn.current = !0, Promise.allSettled(R.map(async (e) => {
314
314
  let t = X.find((t) => t.id === e.sessionId);
315
315
  if (t) try {
316
- let n = await G({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = $e(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
317
- L((t) => t.map((t) => t.sessionId === e.sessionId ? {
316
+ let n = await G({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = et(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
317
+ z((t) => t.map((t) => t.sessionId === e.sessionId ? {
318
318
  ...t,
319
319
  terminalUrl: i,
320
320
  loading: !1,
321
321
  error: null
322
322
  } : t));
323
323
  } catch (n) {
324
- console.warn("[sessions] tab restore startSessionTerminal failed", n), L((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
324
+ console.warn("[sessions] tab restore startSessionTerminal failed", n), z((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
325
325
  ...n,
326
326
  terminalUrl: t.ttydUrl,
327
327
  loading: !1
@@ -330,21 +330,21 @@ function tt() {
330
330
  })));
331
331
  }, [
332
332
  X,
333
- I,
333
+ R,
334
334
  G
335
- ]), d(() => {
336
- if (!V || !F) {
337
- K.current = F;
335
+ ]), f(() => {
336
+ if (!U || !L) {
337
+ K.current = L;
338
338
  return;
339
339
  }
340
- if (K.current === null && F) {
341
- K.current = F;
340
+ if (K.current === null && L) {
341
+ K.current = L;
342
342
  return;
343
343
  }
344
- if (K.current === F) return;
345
- K.current = F;
346
- let e = X.find((e) => e.id === F);
347
- if (e) if (I.find((e) => e.sessionId === F)) z(F), B(!1);
344
+ if (K.current === L) return;
345
+ K.current = L;
346
+ let e = X.find((e) => e.id === L);
347
+ if (e) if (R.find((e) => e.sessionId === L)) V(L), H(!1);
348
348
  else {
349
349
  let t = e.ttydUrl || null, n = {
350
350
  sessionId: e.id,
@@ -353,17 +353,17 @@ function tt() {
353
353
  loading: !t,
354
354
  error: null
355
355
  };
356
- L((e) => [...e, n]), z(F), B(!1), t || G({ variables: { id: e.id } }).then((t) => {
356
+ z((e) => [...e, n]), V(L), H(!1), t || G({ variables: { id: e.id } }).then((t) => {
357
357
  let n = t.data?.startSessionTerminal?.ttydUrl || null;
358
- L((t) => t.map((t) => t.sessionId === e.id ? {
358
+ z((t) => t.map((t) => t.sessionId === e.id ? {
359
359
  ...t,
360
360
  terminalUrl: n,
361
361
  loading: !1,
362
- error: n ? null : v("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
362
+ error: n ? null : b("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
363
363
  } : t));
364
364
  }).catch((t) => {
365
- let n = t instanceof Error ? t.message : v("sessions.failedStartTerminal", "Failed to start terminal");
366
- L((t) => t.map((t) => t.sessionId === e.id ? {
365
+ let n = t instanceof Error ? t.message : b("sessions.failedStartTerminal", "Failed to start terminal");
366
+ z((t) => t.map((t) => t.sessionId === e.id ? {
367
367
  ...t,
368
368
  loading: !1,
369
369
  error: n
@@ -371,186 +371,216 @@ function tt() {
371
371
  });
372
372
  }
373
373
  }, [
374
- F,
374
+ L,
375
375
  X,
376
- I,
377
- V,
376
+ R,
377
+ U,
378
378
  G
379
379
  ]);
380
- let Z = f(() => X.filter((e) => {
381
- if (y) {
382
- let t = y.toLowerCase();
380
+ let Z = p(() => X.filter((e) => {
381
+ if (x) {
382
+ let t = x.toLowerCase();
383
383
  if (!(e.name.toLowerCase().includes(t) || e.command?.toLowerCase().includes(t) || e.workingDirectory?.toLowerCase().includes(t))) return !1;
384
384
  }
385
- return !(S === "none" && e.vibeId);
385
+ return !(w === "none" && e.vibeId);
386
386
  }), [
387
387
  X,
388
- y,
389
- S
390
- ]), Mn = u((e) => {
391
- M((t) => {
388
+ x,
389
+ w
390
+ ]), Ln = d((e) => {
391
+ P((t) => {
392
392
  let n = new Set(t);
393
393
  return n.has(e) ? n.delete(e) : n.add(e), n;
394
394
  });
395
- }, []), Nn = u(() => {
396
- M(new Set(Z.map((e) => e.id)));
397
- }, [Z]), Pn = u(() => {
398
- M(/* @__PURE__ */ new Set());
399
- }, []), Fn = Z.length > 0 && j.size === Z.length, In = j.size > 0, Ln = u(async () => {
400
- if (j.size !== 0) {
401
- N(!0);
395
+ }, []), Rn = d(() => {
396
+ P(new Set(Z.map((e) => e.id)));
397
+ }, [Z]), zn = d(() => {
398
+ P(/* @__PURE__ */ new Set());
399
+ }, []), Bn = Z.length > 0 && N.size === Z.length, Vn = N.size > 0, Hn = d(async () => {
400
+ if (N.size !== 0) {
401
+ F(!0);
402
402
  try {
403
- let e = (await hn({ variables: { ids: Array.from(j) } })).data?.bulkStopSessions;
404
- A(`${v("sessions.stopped", "Stopped")} ${e?.succeeded ?? 0} ${v("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${v("sessions.failed", "failed")}` : ""}`), M(/* @__PURE__ */ new Set()), setTimeout(() => A(null), 3e3);
403
+ let e = (await yn({ variables: { ids: Array.from(N) } })).data?.bulkStopSessions;
404
+ M(`${b("sessions.stopped", "Stopped")} ${e?.succeeded ?? 0} ${b("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${b("sessions.failed", "failed")}` : ""}`), P(/* @__PURE__ */ new Set()), setTimeout(() => M(null), 3e3);
405
405
  } catch (e) {
406
- A(`${v("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : v("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => A(null), 5e3);
406
+ M(`${b("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : b("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => M(null), 5e3);
407
407
  } finally {
408
- N(!1);
408
+ F(!1);
409
409
  }
410
410
  }
411
411
  }, [
412
- j,
413
- hn,
414
- v
415
- ]), Rn = u(async () => {
416
- if (j.size !== 0) {
417
- N(!0);
412
+ N,
413
+ yn,
414
+ b
415
+ ]), Un = d(async () => {
416
+ if (N.size !== 0) {
417
+ F(!0);
418
418
  try {
419
- let e = (await gn({ variables: { ids: Array.from(j) } })).data?.bulkRestartSessions;
420
- A(`${v("sessions.restarted", "Restarted")} ${e?.succeeded ?? 0} ${v("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${v("sessions.failed", "failed")}` : ""}`), M(/* @__PURE__ */ new Set()), setTimeout(() => A(null), 3e3);
419
+ let e = (await bn({ variables: { ids: Array.from(N) } })).data?.bulkRestartSessions;
420
+ M(`${b("sessions.restarted", "Restarted")} ${e?.succeeded ?? 0} ${b("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${b("sessions.failed", "failed")}` : ""}`), P(/* @__PURE__ */ new Set()), setTimeout(() => M(null), 3e3);
421
421
  } catch (e) {
422
- A(`${v("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : v("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => A(null), 5e3);
422
+ M(`${b("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : b("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => M(null), 5e3);
423
423
  } finally {
424
- N(!1);
424
+ F(!1);
425
425
  }
426
426
  }
427
427
  }, [
428
- j,
429
- gn,
430
- v
431
- ]), zn = u(async () => {
432
- if (j.size !== 0 && confirm(`${v("sessions.confirmRemovePrefix", "Are you sure you want to remove")} ${j.size} ${v("nav.sessions", "session(s)")}? ${v("sessions.confirmRemoveSuffix", "This cannot be undone.")}`)) {
433
- N(!0);
428
+ N,
429
+ bn,
430
+ b
431
+ ]), Wn = d(async () => {
432
+ if (N.size !== 0 && confirm(`${b("sessions.confirmRemovePrefix", "Are you sure you want to remove")} ${N.size} ${b("nav.sessions", "session(s)")}? ${b("sessions.confirmRemoveSuffix", "This cannot be undone.")}`)) {
433
+ F(!0);
434
434
  try {
435
- let e = (await _n({ variables: { ids: Array.from(j) } })).data?.bulkTerminateSessions;
436
- A(`${v("sessions.removed", "Removed")} ${e?.succeeded ?? 0} ${v("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${v("sessions.failed", "failed")}` : ""}`), M(/* @__PURE__ */ new Set()), setTimeout(() => A(null), 3e3);
435
+ let e = (await xn({ variables: { ids: Array.from(N) } })).data?.bulkTerminateSessions;
436
+ M(`${b("sessions.removed", "Removed")} ${e?.succeeded ?? 0} ${b("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${b("sessions.failed", "failed")}` : ""}`), P(/* @__PURE__ */ new Set()), setTimeout(() => M(null), 3e3);
437
437
  } catch (e) {
438
- A(`${v("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : v("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => A(null), 5e3);
438
+ M(`${b("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : b("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => M(null), 5e3);
439
439
  } finally {
440
- N(!1);
440
+ F(!1);
441
441
  }
442
442
  }
443
443
  }, [
444
- j,
445
- _n,
446
- v
447
- ]), Bn = (e) => {
448
- it(`/sessions/${e.id}`);
449
- }, Vn = () => {
450
- O(null), E(!0);
451
- }, Hn = async () => {
452
- let e = Tt.current?.value?.trim(), t = kt, n = jt, r = P, i = Et.current?.value?.trim(), ee = Dt.current?.checked ?? !1;
444
+ N,
445
+ xn,
446
+ b
447
+ ]), Gn = d(async (e = "CSV") => {
448
+ Et(!0);
449
+ try {
450
+ let t = (await Sn({ variables: { input: {
451
+ filter: {
452
+ status: S === "all" ? void 0 : S,
453
+ type: C === "all" ? void 0 : C,
454
+ vibeId: w !== "all" && w !== "none" ? w : void 0,
455
+ agentId: T === "all" ? void 0 : T
456
+ },
457
+ format: e
458
+ } } })).data?.exportSessions;
459
+ if (!t) return;
460
+ let n = e === "CSV" ? "text/csv" : "application/json", r = new Blob([t.data], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
461
+ a.href = i, a.download = `sessions-export-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.${e.toLowerCase()}`, a.click(), URL.revokeObjectURL(i), M(b("sessions.exportSuccess", "Exported {{count}} sessions as {{format}}", {
462
+ count: t.count,
463
+ format: e
464
+ })), setTimeout(() => M(null), 3e3);
465
+ } catch (e) {
466
+ M(`${b("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : b("sessions.failedExport", "Failed to export sessions")}`), setTimeout(() => M(null), 5e3);
467
+ } finally {
468
+ Et(!1);
469
+ }
470
+ }, [
471
+ Sn,
472
+ S,
473
+ C,
474
+ w,
475
+ T,
476
+ b
477
+ ]), Kn = (e) => {
478
+ at(`/sessions/${e.id}`);
479
+ }, qn = () => {
480
+ A(null), O(!0);
481
+ }, Jn = async () => {
482
+ let e = Dt.current?.value?.trim(), t = jt, n = Nt, r = I, i = Ot.current?.value?.trim(), a = kt.current?.checked ?? !1;
453
483
  if (!e) {
454
- O(v("sessions.nameRequired", "Name is required"));
484
+ A(b("sessions.nameRequired", "Name is required"));
455
485
  return;
456
486
  }
457
- let a = Y.find((e) => e.id === t)?.agentId || n;
458
- if (!a) {
459
- O(v("sessions.agentRequired", "Please select an agent for this session."));
487
+ let o = Y.find((e) => e.id === t)?.agentId || n;
488
+ if (!o) {
489
+ A(b("sessions.agentRequired", "Please select an agent for this session."));
460
490
  return;
461
491
  }
462
- let o = En.get(a);
463
- if (o && !o.healthy) {
464
- O(v("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (o.error ? ` (${o.error})` : ""));
492
+ let s = jn.get(o);
493
+ if (s && !s.healthy) {
494
+ A(b("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (s.error ? ` (${s.error})` : ""));
465
495
  return;
466
496
  }
467
- Ct(!0), O(null);
497
+ Ct(!0), A(null);
468
498
  try {
469
- let n = Ot.current?.value?.trim() || void 0, o = await Yt({ variables: { input: {
499
+ let n = At.current?.value?.trim() || void 0, s = await Zt({ variables: { input: {
470
500
  name: e,
471
501
  type: r || "TMUX",
472
502
  command: i || void 0,
473
503
  vibeId: t || void 0,
474
- agentId: a,
475
- autoStart: ee,
504
+ agentId: o,
505
+ autoStart: a,
476
506
  externalSessionName: n
477
507
  } } });
478
- E(!1), A(v("sessions.createdSuccess", "Session created successfully")), setTimeout(() => A(null), 3e3), w === "terminal" && o.data?.createSession && Q({
479
- id: o.data.createSession.id,
480
- workspaceId: o.data.createSession.workspaceId,
481
- vibeId: o.data.createSession.vibeId || null,
482
- agentId: o.data.createSession.agentId || null,
483
- name: o.data.createSession.name,
484
- type: o.data.createSession.type,
485
- status: o.data.createSession.status,
486
- command: o.data.createSession.command || null,
487
- workingDirectory: o.data.createSession.workingDirectory || null,
488
- environmentVariables: o.data.createSession.environmentVariables || {},
489
- autoStart: o.data.createSession.autoStart,
490
- providerSessionName: o.data.createSession.providerSessionName || void 0,
491
- providerWindowName: o.data.createSession.providerWindowId || void 0,
492
- pid: o.data.createSession.pid || null,
493
- exitCode: o.data.createSession.exitCode || null,
494
- lastOutput: o.data.createSession.lastOutput || null,
495
- ttydUrl: o.data.createSession.ttydUrl || null,
496
- metadata: o.data.createSession.metadata || {},
497
- createdAt: o.data.createSession.createdAt,
498
- updatedAt: o.data.createSession.updatedAt
508
+ O(!1), M(b("sessions.createdSuccess", "Session created successfully")), setTimeout(() => M(null), 3e3), E === "terminal" && s.data?.createSession && Q({
509
+ id: s.data.createSession.id,
510
+ workspaceId: s.data.createSession.workspaceId,
511
+ vibeId: s.data.createSession.vibeId || null,
512
+ agentId: s.data.createSession.agentId || null,
513
+ name: s.data.createSession.name,
514
+ type: s.data.createSession.type,
515
+ status: s.data.createSession.status,
516
+ command: s.data.createSession.command || null,
517
+ workingDirectory: s.data.createSession.workingDirectory || null,
518
+ environmentVariables: s.data.createSession.environmentVariables || {},
519
+ autoStart: s.data.createSession.autoStart,
520
+ providerSessionName: s.data.createSession.providerSessionName || void 0,
521
+ providerWindowName: s.data.createSession.providerWindowId || void 0,
522
+ pid: s.data.createSession.pid || null,
523
+ exitCode: s.data.createSession.exitCode || null,
524
+ lastOutput: s.data.createSession.lastOutput || null,
525
+ ttydUrl: s.data.createSession.ttydUrl || null,
526
+ metadata: s.data.createSession.metadata || {},
527
+ createdAt: s.data.createSession.createdAt,
528
+ updatedAt: s.data.createSession.updatedAt
499
529
  });
500
530
  } catch (e) {
501
- if (s(e)) {
502
- E(!1), D(!0);
531
+ if (c(e)) {
532
+ O(!1), k(!0);
503
533
  return;
504
534
  }
505
- O(e instanceof Error ? e.message : v("sessions.failedCreate", "Failed to create session"));
535
+ A(e instanceof Error ? e.message : b("sessions.failedCreate", "Failed to create session"));
506
536
  } finally {
507
537
  Ct(!1);
508
538
  }
509
- }, Un = async (e) => {
539
+ }, Yn = async (e) => {
510
540
  try {
511
- await sn({ variables: { id: e.id } }), nt?.({
541
+ await dn({ variables: { id: e.id } }), rt?.({
512
542
  id: e.id,
513
543
  name: e.name,
514
544
  type: e.type,
515
545
  status: "RUNNING"
516
546
  });
517
547
  } catch (e) {
518
- if (s(e)) {
519
- D(!0);
548
+ if (c(e)) {
549
+ k(!0);
520
550
  return;
521
551
  }
522
552
  console.error("Failed to start session:", e);
523
553
  }
524
- }, Wn = async (e) => {
554
+ }, Xn = async (e) => {
525
555
  try {
526
- await cn({ variables: { id: e.id } });
556
+ await fn({ variables: { id: e.id } });
527
557
  } catch (e) {
528
558
  console.error("Failed to stop session:", e);
529
559
  }
530
- }, Gn = async (e) => {
560
+ }, Zn = async (e) => {
531
561
  try {
532
- await ln({ variables: { id: e.id } });
562
+ await pn({ variables: { id: e.id } });
533
563
  } catch (e) {
534
- if (s(e)) {
535
- D(!0);
564
+ if (c(e)) {
565
+ k(!0);
536
566
  return;
537
567
  }
538
568
  console.error("Failed to restart session:", e);
539
569
  }
540
- }, Kn = async (e) => {
570
+ }, Qn = async (e) => {
541
571
  try {
542
- await pn({ variables: { id: e.id } });
572
+ await _n({ variables: { id: e.id } });
543
573
  } catch (e) {
544
574
  console.error("Failed to terminate session:", e);
545
575
  }
546
- }, qn = u((e) => e.ttydUrl || null, []), Jn = u((e) => {
547
- Wt(e);
548
- }, []), Q = u(async (e) => {
549
- if (I.find((t) => t.sessionId === e.id)?.terminalUrl) {
550
- z(e.id), B(!1);
576
+ }, $n = d((e) => e.ttydUrl || null, []), er = d((e) => {
577
+ Kt(e);
578
+ }, []), Q = d(async (e) => {
579
+ if (R.find((t) => t.sessionId === e.id)?.terminalUrl) {
580
+ V(e.id), H(!1);
551
581
  return;
552
582
  }
553
- let t = qn(e);
583
+ let t = $n(e);
554
584
  if (t) {
555
585
  let n = {
556
586
  sessionId: e.id,
@@ -559,7 +589,7 @@ function tt() {
559
589
  loading: !1,
560
590
  error: null
561
591
  };
562
- L((t) => [...t.filter((t) => t.sessionId !== e.id), n]), z(e.id), B(!1);
592
+ z((t) => [...t.filter((t) => t.sessionId !== e.id), n]), V(e.id), H(!1);
563
593
  return;
564
594
  }
565
595
  let n = {
@@ -569,560 +599,568 @@ function tt() {
569
599
  loading: !0,
570
600
  error: null
571
601
  };
572
- L((t) => [...t.filter((t) => t.sessionId !== e.id), n]), z(e.id), B(!1);
602
+ z((t) => [...t.filter((t) => t.sessionId !== e.id), n]), V(e.id), H(!1);
573
603
  try {
574
604
  let t = await G({ variables: { id: e.id } });
575
- if (t.error && s(t.error)) {
576
- let t = I.filter((t) => t.sessionId !== e.id);
577
- L(t), R === e.id && z(t.length > 0 ? t[t.length - 1].sessionId : null), D(!0);
605
+ if (t.error && c(t.error)) {
606
+ let t = R.filter((t) => t.sessionId !== e.id);
607
+ z(t), B === e.id && V(t.length > 0 ? t[t.length - 1].sessionId : null), k(!0);
578
608
  return;
579
609
  }
580
- let n = $e(t.data?.startSessionTerminal?.ttydUrl || null, X.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
581
- L((t) => t.map((t) => t.sessionId === e.id ? {
610
+ let n = et(t.data?.startSessionTerminal?.ttydUrl || null, X.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
611
+ z((t) => t.map((t) => t.sessionId === e.id ? {
582
612
  ...t,
583
613
  terminalUrl: n,
584
614
  loading: !1,
585
- error: n ? null : v("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
615
+ error: n ? null : b("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
586
616
  } : t));
587
617
  } catch (t) {
588
- if (s(t)) {
589
- let t = I.filter((t) => t.sessionId !== e.id);
590
- L(t), R === e.id && z(t.length > 0 ? t[t.length - 1].sessionId : null), D(!0);
618
+ if (c(t)) {
619
+ let t = R.filter((t) => t.sessionId !== e.id);
620
+ z(t), B === e.id && V(t.length > 0 ? t[t.length - 1].sessionId : null), k(!0);
591
621
  return;
592
622
  }
593
- let n = t instanceof Error ? t.message : v("sessions.failedStartTerminal", "Failed to start terminal");
594
- L((t) => t.map((t) => t.sessionId === e.id ? {
623
+ let n = t instanceof Error ? t.message : b("sessions.failedStartTerminal", "Failed to start terminal");
624
+ z((t) => t.map((t) => t.sessionId === e.id ? {
595
625
  ...t,
596
626
  loading: !1,
597
627
  error: n
598
628
  } : t));
599
629
  }
600
630
  }, [
631
+ B,
601
632
  R,
602
- I,
603
- qn,
633
+ $n,
604
634
  G
605
635
  ]);
606
- d(() => {
607
- if (!V || !R || I.some((e) => e.sessionId === R)) return;
608
- let e = X.find((e) => e.id === R);
636
+ f(() => {
637
+ if (!U || !B || R.some((e) => e.sessionId === B)) return;
638
+ let e = X.find((e) => e.id === B);
609
639
  e && Q(e);
610
640
  }, [
611
- R,
641
+ B,
612
642
  Q,
613
643
  X,
614
- I,
615
- V
644
+ R,
645
+ U
616
646
  ]);
617
- let Yn = u((e) => {
618
- L((t) => t.filter((t) => t.sessionId !== e)), R === e && z(() => {
619
- let t = I.filter((t) => t.sessionId !== e);
647
+ let tr = d((e) => {
648
+ z((t) => t.filter((t) => t.sessionId !== e)), B === e && V(() => {
649
+ let t = R.filter((t) => t.sessionId !== e);
620
650
  return t.length > 0 ? t[t.length - 1].sessionId : null;
621
651
  });
622
- }, [R, I]), Xn = u((e) => {
623
- let t = I.find((t) => t.sessionId === e);
652
+ }, [B, R]), nr = d((e) => {
653
+ let t = R.find((t) => t.sessionId === e);
624
654
  t?.terminalUrl && window.open(t.terminalUrl, "_blank");
625
- }, [I]), Zn = u(async (e, t) => {
655
+ }, [R]), rr = d(async (e, t) => {
626
656
  try {
627
- await fn({ variables: {
657
+ await gn({ variables: {
628
658
  id: e,
629
659
  input: { name: t }
630
- } }), L((n) => n.map((n) => n.sessionId === e ? {
660
+ } }), z((n) => n.map((n) => n.sessionId === e ? {
631
661
  ...n,
632
662
  name: t
633
663
  } : n));
634
664
  } catch (e) {
635
665
  console.error("Failed to rename session:", e);
636
666
  }
637
- }, [fn]), Qn = u(async (e) => {
667
+ }, [gn]), ir = d(async (e) => {
638
668
  try {
639
- await un({ variables: { id: e } }), L((t) => t.map((t) => t.sessionId === e ? {
669
+ await mn({ variables: { id: e } }), z((t) => t.map((t) => t.sessionId === e ? {
640
670
  ...t,
641
671
  terminalUrl: null,
642
- error: v("sessions.terminalStopped", "Terminal stopped")
672
+ error: b("sessions.terminalStopped", "Terminal stopped")
643
673
  } : t));
644
674
  } catch (e) {
645
675
  console.error("Failed to stop terminal:", e);
646
676
  }
647
- }, [un]), $n = u(async (e) => {
648
- let t = I.find((t) => t.sessionId === e) || null;
677
+ }, [mn]), ar = d(async (e) => {
678
+ let t = R.find((t) => t.sessionId === e) || null;
649
679
  try {
650
- L((t) => t.map((t) => t.sessionId === e ? {
680
+ z((t) => t.map((t) => t.sessionId === e ? {
651
681
  ...t,
652
682
  loading: !0,
653
683
  error: null,
654
684
  terminalUrl: null
655
685
  } : t));
656
- let n = await dn({ variables: { id: e } });
657
- if (n.error && s(n.error)) {
658
- L((n) => n.map((n) => n.sessionId === e ? {
686
+ let n = await hn({ variables: { id: e } });
687
+ if (n.error && c(n.error)) {
688
+ z((n) => n.map((n) => n.sessionId === e ? {
659
689
  ...n,
660
690
  loading: !1,
661
691
  error: null,
662
692
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
663
- } : n)), D(!0);
693
+ } : n)), k(!0);
664
694
  return;
665
695
  }
666
696
  let r = n.data?.restartSessionTerminal?.ttydUrl || null;
667
- L((t) => t.map((t) => t.sessionId === e ? {
697
+ z((t) => t.map((t) => t.sessionId === e ? {
668
698
  ...t,
669
699
  terminalUrl: r,
670
700
  loading: !1,
671
- error: r ? null : v("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
701
+ error: r ? null : b("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
672
702
  } : t));
673
703
  } catch (n) {
674
- if (s(n)) {
675
- L((n) => n.map((n) => n.sessionId === e ? {
704
+ if (c(n)) {
705
+ z((n) => n.map((n) => n.sessionId === e ? {
676
706
  ...n,
677
707
  loading: !1,
678
708
  error: null,
679
709
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
680
- } : n)), D(!0);
710
+ } : n)), k(!0);
681
711
  return;
682
712
  }
683
- let r = n instanceof Error ? n.message : v("sessions.failedRestartTerminal", "Failed to restart terminal");
684
- L((t) => t.map((t) => t.sessionId === e ? {
713
+ let r = n instanceof Error ? n.message : b("sessions.failedRestartTerminal", "Failed to restart terminal");
714
+ z((t) => t.map((t) => t.sessionId === e ? {
685
715
  ...t,
686
716
  loading: !1,
687
717
  error: r
688
718
  } : t));
689
719
  }
690
- }, [dn, I]), er = u(() => {
691
- Kt((e) => !e);
720
+ }, [hn, R]), or = d(() => {
721
+ Jt((e) => !e);
692
722
  }, []), $ = {
693
723
  total: X.length,
694
724
  running: X.filter((e) => e.status === "RUNNING").length,
695
725
  stopped: X.filter((e) => e.status === "STOPPED").length
696
726
  };
697
- if (!ot && st && st.permissionStrings?.length > 0 && !ft) return /* @__PURE__ */ h(_, {
727
+ if (!st && ct && ct.permissionStrings?.length > 0 && !ft) return /* @__PURE__ */ g(v, {
698
728
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
699
- children: /* @__PURE__ */ h(Xe, {
700
- title: v("common.accessDeniedTitle", "Access Denied"),
701
- description: v("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
702
- details: v("sessions.requiredPermission", "Required permission: session:list")
729
+ children: /* @__PURE__ */ g(Ze, {
730
+ title: b("common.accessDeniedTitle", "Access Denied"),
731
+ description: b("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
732
+ details: b("sessions.requiredPermission", "Required permission: session:list")
703
733
  })
704
734
  });
705
- if (q && !bn && X.length === 0) return /* @__PURE__ */ h(_, {
735
+ if (q && !Tn && X.length === 0) return /* @__PURE__ */ g(v, {
706
736
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
707
- children: /* @__PURE__ */ h(_e, { message: v("sessions.loading", "Loading sessions...") })
737
+ children: /* @__PURE__ */ g(_e, { message: b("sessions.loading", "Loading sessions...") })
708
738
  });
709
- if (xn && X.length === 0) return /* @__PURE__ */ h(_, {
739
+ if (En && X.length === 0) return /* @__PURE__ */ g(v, {
710
740
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
711
- children: /* @__PURE__ */ h(ve, {
712
- title: v("sessions.failedLoad", "Failed to load sessions"),
713
- message: xn.message,
741
+ children: /* @__PURE__ */ g(ve, {
742
+ title: b("sessions.failedLoad", "Failed to load sessions"),
743
+ message: En.message,
714
744
  onRetry: () => J()
715
745
  })
716
746
  });
717
- let tr = () => !In || w === "terminal" ? null : /* @__PURE__ */ g("div", {
747
+ let sr = () => !Vn || E === "terminal" ? null : /* @__PURE__ */ _("div", {
718
748
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 bg-action-primary-bg/10 border border-action-primary-bg/20 rounded-lg",
719
- children: [/* @__PURE__ */ h("span", {
749
+ children: [/* @__PURE__ */ g("span", {
720
750
  className: "text-sm font-medium text-text-primary",
721
- children: v(j.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", j.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: j.size })
722
- }), /* @__PURE__ */ g("div", {
751
+ children: b(N.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", N.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: N.size })
752
+ }), /* @__PURE__ */ _("div", {
723
753
  className: "flex items-center gap-1.5 sm:ml-auto flex-wrap",
724
754
  children: [
725
- /* @__PURE__ */ g("button", {
726
- onClick: Ln,
755
+ /* @__PURE__ */ _("button", {
756
+ onClick: Hn,
727
757
  disabled: wt,
728
758
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
729
759
  children: [
730
- /* @__PURE__ */ h(Ve, { className: "w-3 h-3" }),
760
+ /* @__PURE__ */ g(He, { className: "w-3 h-3" }),
731
761
  " ",
732
- v("sessions.stop", "Stop")
762
+ b("sessions.stop", "Stop")
733
763
  ]
734
764
  }),
735
- /* @__PURE__ */ g("button", {
736
- onClick: Rn,
765
+ /* @__PURE__ */ _("button", {
766
+ onClick: Un,
737
767
  disabled: wt,
738
768
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
739
769
  children: [
740
- /* @__PURE__ */ h(Be, { className: "w-3 h-3" }),
770
+ /* @__PURE__ */ g(Ve, { className: "w-3 h-3" }),
741
771
  " ",
742
- v("sessions.restart", "Restart")
772
+ b("sessions.restart", "Restart")
743
773
  ]
744
774
  }),
745
- /* @__PURE__ */ g("button", {
746
- onClick: zn,
775
+ /* @__PURE__ */ _("button", {
776
+ onClick: Wn,
747
777
  disabled: wt,
748
778
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg border border-status-error-text/20 rounded-md hover:bg-status-error-bg/80 transition-colors disabled:opacity-50",
749
779
  children: [
750
- /* @__PURE__ */ h(Ue, { className: "w-3 h-3" }),
780
+ /* @__PURE__ */ g(We, { className: "w-3 h-3" }),
751
781
  " ",
752
- v("sessions.remove", "Remove")
782
+ b("sessions.remove", "Remove")
753
783
  ]
754
784
  }),
755
- /* @__PURE__ */ g("button", {
756
- onClick: Pn,
785
+ /* @__PURE__ */ _("button", {
786
+ onClick: zn,
757
787
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
758
788
  children: [
759
- /* @__PURE__ */ h(We, { className: "w-3 h-3" }),
789
+ /* @__PURE__ */ g(Ge, { className: "w-3 h-3" }),
760
790
  " ",
761
- v("sessions.deselect", "Deselect")
791
+ b("sessions.deselect", "Deselect")
762
792
  ]
763
793
  })
764
794
  ]
765
795
  })]
766
796
  });
767
- if (w === "terminal") return /* @__PURE__ */ g(_, {
797
+ if (E === "terminal") return /* @__PURE__ */ _(v, {
768
798
  className: "flex flex-col bg-bg-surface h-screen",
769
799
  children: [
770
- /* @__PURE__ */ g("div", {
800
+ /* @__PURE__ */ _("div", {
771
801
  className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 px-4 py-2 border-b border-border-default bg-bg-sunken",
772
- children: [/* @__PURE__ */ g("div", {
802
+ children: [/* @__PURE__ */ _("div", {
773
803
  className: "flex flex-wrap items-center gap-3",
774
- children: [/* @__PURE__ */ h("h1", {
804
+ children: [/* @__PURE__ */ g("h1", {
775
805
  className: "text-sm font-semibold text-text-primary",
776
- children: v("nav.sessions", "Sessions")
777
- }), /* @__PURE__ */ h("span", {
806
+ children: b("nav.sessions", "Sessions")
807
+ }), /* @__PURE__ */ g("span", {
778
808
  className: "text-xs text-text-muted",
779
- children: v("sessions.runningSummary", "{{running}} running / {{total}} total", {
809
+ children: b("sessions.runningSummary", "{{running}} running / {{total}} total", {
780
810
  running: $.running,
781
811
  total: $.total
782
812
  })
783
813
  })]
784
- }), /* @__PURE__ */ g("div", {
814
+ }), /* @__PURE__ */ _("div", {
785
815
  className: "flex w-full flex-wrap items-center gap-2 sm:w-auto sm:justify-end",
786
816
  children: [
787
- /* @__PURE__ */ h("button", {
788
- onClick: () => mn().then(() => J()),
817
+ /* @__PURE__ */ g("button", {
818
+ onClick: () => vn().then(() => J()),
789
819
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors",
790
- title: v("sessions.checkHealth", "Check session health"),
791
- children: /* @__PURE__ */ h(Me, { className: "w-3.5 h-3.5" })
820
+ title: b("sessions.checkHealth", "Check session health"),
821
+ children: /* @__PURE__ */ g(Me, { className: "w-3.5 h-3.5" })
792
822
  }),
793
- /* @__PURE__ */ h("button", {
823
+ /* @__PURE__ */ g("button", {
794
824
  onClick: () => J(),
795
825
  disabled: q,
796
826
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors disabled:opacity-50",
797
- title: v("common.refresh", "Refresh"),
798
- children: /* @__PURE__ */ h(ze, { className: `w-3.5 h-3.5 ${q ? "animate-spin" : ""}` })
827
+ title: b("common.refresh", "Refresh"),
828
+ children: /* @__PURE__ */ g(Be, { className: `w-3.5 h-3.5 ${q ? "animate-spin" : ""}` })
799
829
  }),
800
- /* @__PURE__ */ g("div", {
830
+ /* @__PURE__ */ _("div", {
801
831
  className: "flex items-center gap-0.5 rounded bg-bg-surface p-0.5",
802
832
  children: [
803
- /* @__PURE__ */ h("button", {
804
- onClick: () => T("terminal"),
833
+ /* @__PURE__ */ g("button", {
834
+ onClick: () => D("terminal"),
805
835
  className: "p-1.5 rounded bg-bg-sunken shadow-sm",
806
- title: v("sessions.terminalViewTitle", "Terminal view"),
807
- children: /* @__PURE__ */ h(Ie, { className: "w-3.5 h-3.5 text-text-secondary" })
836
+ title: b("sessions.terminalViewTitle", "Terminal view"),
837
+ children: /* @__PURE__ */ g(Le, { className: "w-3.5 h-3.5 text-text-secondary" })
808
838
  }),
809
- /* @__PURE__ */ h("button", {
810
- onClick: () => T("grid"),
839
+ /* @__PURE__ */ g("button", {
840
+ onClick: () => D("grid"),
811
841
  className: "p-1.5 rounded hover:bg-bg-sunken/50",
812
- title: v("sessions.gridViewTitle", "Grid view"),
813
- children: /* @__PURE__ */ h(Pe, { className: "w-3.5 h-3.5 text-text-secondary" })
842
+ title: b("sessions.gridViewTitle", "Grid view"),
843
+ children: /* @__PURE__ */ g(Fe, { className: "w-3.5 h-3.5 text-text-secondary" })
814
844
  }),
815
- /* @__PURE__ */ h("button", {
816
- onClick: () => T("list"),
845
+ /* @__PURE__ */ g("button", {
846
+ onClick: () => D("list"),
817
847
  className: "p-1.5 rounded hover:bg-bg-sunken/50",
818
- title: v("sessions.listViewTitle", "List view"),
819
- children: /* @__PURE__ */ h(Fe, { className: "w-3.5 h-3.5 text-text-secondary" })
848
+ title: b("sessions.listViewTitle", "List view"),
849
+ children: /* @__PURE__ */ g(Ie, { className: "w-3.5 h-3.5 text-text-secondary" })
820
850
  })
821
851
  ]
822
852
  })
823
853
  ]
824
854
  })]
825
855
  }),
826
- /* @__PURE__ */ h("div", {
856
+ /* @__PURE__ */ g("div", {
827
857
  className: "px-4 pt-3",
828
- children: /* @__PURE__ */ h(Ee, {
858
+ children: /* @__PURE__ */ g(Te, {
829
859
  showConnectionStatus: !0,
830
860
  maxVisible: 3
831
861
  })
832
862
  }),
833
- /* @__PURE__ */ h(ke, {
834
- tabs: I,
835
- activeTabId: R,
836
- onTabSelect: z,
837
- onTabClose: Yn,
838
- onOpenExternal: Xn,
863
+ /* @__PURE__ */ g(ke, {
864
+ tabs: R,
865
+ activeTabId: B,
866
+ onTabSelect: V,
867
+ onTabClose: tr,
868
+ onOpenExternal: nr,
839
869
  collapsed: !1,
840
870
  sessions: Z,
841
871
  onOpenTerminal: Q,
842
872
  onRetryTerminal: Q,
843
- onRenameSession: Zn,
844
- onStopTerminal: Qn,
845
- onRestartTerminal: $n,
846
- onCreateSession: Vn,
873
+ onRenameSession: rr,
874
+ onStopTerminal: ir,
875
+ onRestartTerminal: ar,
876
+ onCreateSession: qn,
847
877
  fullScreen: !0,
848
- isImmersiveFullscreen: Gt,
849
- onToggleImmersiveFullscreen: er,
878
+ isImmersiveFullscreen: qt,
879
+ onToggleImmersiveFullscreen: or,
850
880
  contextSwitcher: void 0
851
881
  }),
852
- k && /* @__PURE__ */ h("div", {
882
+ j && /* @__PURE__ */ g("div", {
853
883
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
854
- children: k
884
+ children: j
855
885
  }),
856
- yt && rr(),
857
- nr()
886
+ yt && lr(),
887
+ cr()
858
888
  ]
859
889
  });
860
- return /* @__PURE__ */ g(_, {
890
+ return /* @__PURE__ */ _(v, {
861
891
  className: "flex flex-col bg-bg-surface min-h-screen",
862
892
  children: [
863
- /* @__PURE__ */ g("div", {
893
+ /* @__PURE__ */ _("div", {
864
894
  className: "flex-1 overflow-y-auto space-y-6 p-4 sm:p-6",
865
895
  children: [
866
- /* @__PURE__ */ h(ge, {
867
- title: v("nav.sessions", "Sessions"),
868
- description: v("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
896
+ /* @__PURE__ */ g(ge, {
897
+ title: b("nav.sessions", "Sessions"),
898
+ description: b("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
869
899
  running: $.running,
870
900
  total: $.total
871
901
  }),
872
- actions: /* @__PURE__ */ g("div", {
902
+ actions: /* @__PURE__ */ _("div", {
873
903
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
874
904
  children: [
875
- /* @__PURE__ */ h("button", {
876
- onClick: () => mn().then(() => J()),
905
+ /* @__PURE__ */ g("button", {
906
+ onClick: () => vn().then(() => J()),
877
907
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
878
- title: v("sessions.checkHealth", "Check session health"),
879
- children: /* @__PURE__ */ h(Me, { className: "w-4 h-4" })
908
+ title: b("sessions.checkHealth", "Check session health"),
909
+ children: /* @__PURE__ */ g(Me, { className: "w-4 h-4" })
880
910
  }),
881
- /* @__PURE__ */ h("button", {
911
+ /* @__PURE__ */ g("button", {
882
912
  onClick: () => J(),
883
913
  disabled: q,
884
914
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
885
- title: v("sessions.refreshTitle", "Refresh sessions"),
886
- children: /* @__PURE__ */ h(ze, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
915
+ title: b("sessions.refreshTitle", "Refresh sessions"),
916
+ children: /* @__PURE__ */ g(Be, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
917
+ }),
918
+ /* @__PURE__ */ _("button", {
919
+ onClick: () => Gn("CSV"),
920
+ disabled: Tt,
921
+ className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
922
+ title: b("sessions.exportTitle", "Export sessions as CSV"),
923
+ "data-testid": "sessions-export-button",
924
+ children: [/* @__PURE__ */ g(Pe, { className: `w-4 h-4 ${Tt ? "animate-pulse" : ""}` }), b("sessions.export", "Export")]
887
925
  }),
888
- /* @__PURE__ */ h(Ze, {
889
- permission: l.SESSION_CREATE,
890
- children: /* @__PURE__ */ g("button", {
891
- onClick: () => Zt(!0),
926
+ /* @__PURE__ */ g(Qe, {
927
+ permission: Ee.SESSION_CREATE,
928
+ children: /* @__PURE__ */ _("button", {
929
+ onClick: () => $t(!0),
892
930
  className: "flex items-center gap-2 px-3 py-2 text-text-primary border border-border-default rounded-md hover:bg-bg-sunken transition-colors",
893
931
  "data-testid": "sessions-reconnect-button",
894
- title: v("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
895
- children: [/* @__PURE__ */ h(ze, { className: "w-4 h-4" }), v("sessions.reconnect", "Reconnect")]
932
+ title: b("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
933
+ children: [/* @__PURE__ */ g(Be, { className: "w-4 h-4" }), b("sessions.reconnect", "Reconnect")]
896
934
  })
897
935
  }),
898
- /* @__PURE__ */ h(Ze, {
899
- permission: l.SESSION_CREATE,
900
- children: /* @__PURE__ */ g("button", {
901
- onClick: Vn,
936
+ /* @__PURE__ */ g(Qe, {
937
+ permission: Ee.SESSION_CREATE,
938
+ children: /* @__PURE__ */ _("button", {
939
+ onClick: qn,
902
940
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
903
- children: [/* @__PURE__ */ h(Re, { className: "w-4 h-4" }), v("sessions.newSession", "New Session")]
941
+ children: [/* @__PURE__ */ g(ze, { className: "w-4 h-4" }), b("sessions.newSession", "New Session")]
904
942
  })
905
943
  })
906
944
  ]
907
945
  })
908
946
  }),
909
- /* @__PURE__ */ h(Ee, {
947
+ /* @__PURE__ */ g(Te, {
910
948
  showConnectionStatus: !0,
911
949
  maxVisible: 3
912
950
  }),
913
- /* @__PURE__ */ g("div", {
951
+ /* @__PURE__ */ _("div", {
914
952
  "data-tour": "sessions-filters",
915
953
  className: "space-y-3",
916
- children: [/* @__PURE__ */ g("div", {
954
+ children: [/* @__PURE__ */ _("div", {
917
955
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
918
- children: [/* @__PURE__ */ h(Se, {
919
- value: y,
956
+ children: [/* @__PURE__ */ g(Se, {
957
+ value: x,
920
958
  onChange: mt,
921
- placeholder: v("sessions.searchPlaceholder", "Search sessions..."),
959
+ placeholder: b("sessions.searchPlaceholder", "Search sessions..."),
922
960
  className: "flex-1 sm:w-64 sm:flex-none"
923
- }), /* @__PURE__ */ g("div", {
961
+ }), /* @__PURE__ */ _("div", {
924
962
  className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
925
963
  children: [
926
- /* @__PURE__ */ h("button", {
927
- onClick: () => T("terminal"),
964
+ /* @__PURE__ */ g("button", {
965
+ onClick: () => D("terminal"),
928
966
  className: "p-1.5 sm:p-2 rounded hover:bg-bg-surface/50",
929
- title: v("sessions.terminalViewTitle", "Terminal view"),
930
- children: /* @__PURE__ */ h(Ie, { className: "w-4 h-4 text-text-secondary" })
967
+ title: b("sessions.terminalViewTitle", "Terminal view"),
968
+ children: /* @__PURE__ */ g(Le, { className: "w-4 h-4 text-text-secondary" })
931
969
  }),
932
- /* @__PURE__ */ h("button", {
933
- onClick: () => T("grid"),
934
- className: `p-1.5 sm:p-2 rounded ${w === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
935
- title: v("sessions.gridViewTitle", "Grid view"),
936
- children: /* @__PURE__ */ h(Pe, { className: "w-4 h-4 text-text-secondary" })
970
+ /* @__PURE__ */ g("button", {
971
+ onClick: () => D("grid"),
972
+ className: `p-1.5 sm:p-2 rounded ${E === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
973
+ title: b("sessions.gridViewTitle", "Grid view"),
974
+ children: /* @__PURE__ */ g(Fe, { className: "w-4 h-4 text-text-secondary" })
937
975
  }),
938
- /* @__PURE__ */ h("button", {
939
- onClick: () => T("list"),
940
- className: `p-1.5 sm:p-2 rounded ${w === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
941
- title: v("sessions.listViewTitle", "List view"),
942
- children: /* @__PURE__ */ h(Fe, { className: "w-4 h-4 text-text-secondary" })
976
+ /* @__PURE__ */ g("button", {
977
+ onClick: () => D("list"),
978
+ className: `p-1.5 sm:p-2 rounded ${E === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
979
+ title: b("sessions.listViewTitle", "List view"),
980
+ children: /* @__PURE__ */ g(Ie, { className: "w-4 h-4 text-text-secondary" })
943
981
  })
944
982
  ]
945
983
  })]
946
- }), /* @__PURE__ */ g("div", {
984
+ }), /* @__PURE__ */ _("div", {
947
985
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
948
986
  children: [
949
- /* @__PURE__ */ h(c, {
950
- label: v("sessions.filterStatus", "Status"),
951
- value: b,
987
+ /* @__PURE__ */ g(l, {
988
+ label: b("sessions.filterStatus", "Status"),
989
+ value: S,
952
990
  options: ut,
953
991
  onChange: ht
954
992
  }),
955
- /* @__PURE__ */ h(c, {
956
- label: v("sessions.filterType", "Type"),
957
- value: x,
993
+ /* @__PURE__ */ g(l, {
994
+ label: b("sessions.filterType", "Type"),
995
+ value: C,
958
996
  options: dt,
959
997
  onChange: gt
960
998
  }),
961
- /* @__PURE__ */ h(c, {
962
- label: v("sessions.filterVibe", "Vibe"),
963
- value: S,
964
- options: Dn,
999
+ /* @__PURE__ */ g(l, {
1000
+ label: b("sessions.filterVibe", "Vibe"),
1001
+ value: w,
1002
+ options: Mn,
965
1003
  onChange: _t
966
1004
  }),
967
- /* @__PURE__ */ h(c, {
968
- label: v("sessions.filterAgent", "Agent"),
969
- value: C,
970
- options: On,
1005
+ /* @__PURE__ */ g(l, {
1006
+ label: b("sessions.filterAgent", "Agent"),
1007
+ value: T,
1008
+ options: Nn,
971
1009
  onChange: vt
972
1010
  })
973
1011
  ]
974
1012
  })]
975
1013
  }),
976
- /* @__PURE__ */ g("div", {
1014
+ /* @__PURE__ */ _("div", {
977
1015
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-wrap",
978
1016
  children: [
979
- /* @__PURE__ */ g("button", {
1017
+ /* @__PURE__ */ _("button", {
980
1018
  onClick: () => ht("RUNNING"),
981
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${b === "RUNNING" ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
1019
+ className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${S === "RUNNING" ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
982
1020
  children: [
983
- /* @__PURE__ */ h(Le, { className: "w-3 h-3" }),
1021
+ /* @__PURE__ */ g(Re, { className: "w-3 h-3" }),
984
1022
  " ",
985
- v("sessions.running", "Running"),
1023
+ b("sessions.running", "Running"),
986
1024
  " (",
987
1025
  $.running,
988
1026
  ")"
989
1027
  ]
990
1028
  }),
991
- /* @__PURE__ */ g("button", {
1029
+ /* @__PURE__ */ _("button", {
992
1030
  onClick: () => ht("STOPPED"),
993
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${b === "STOPPED" ? "bg-bg-sunken text-text-secondary" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
1031
+ className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${S === "STOPPED" ? "bg-bg-sunken text-text-secondary" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
994
1032
  children: [
995
- /* @__PURE__ */ h(Ve, { className: "w-3 h-3" }),
1033
+ /* @__PURE__ */ g(He, { className: "w-3 h-3" }),
996
1034
  " ",
997
- v("sessions.stoppedState", "Stopped"),
1035
+ b("sessions.stoppedState", "Stopped"),
998
1036
  " (",
999
1037
  $.stopped,
1000
1038
  ")"
1001
1039
  ]
1002
1040
  }),
1003
- /* @__PURE__ */ h("div", {
1041
+ /* @__PURE__ */ g("div", {
1004
1042
  className: "sm:ml-auto flex items-center gap-2",
1005
- children: Z.length > 0 && /* @__PURE__ */ g("button", {
1006
- onClick: Fn ? Pn : Nn,
1043
+ children: Z.length > 0 && /* @__PURE__ */ _("button", {
1044
+ onClick: Bn ? zn : Rn,
1007
1045
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
1008
- children: [/* @__PURE__ */ h(Ne, { className: "w-3.5 h-3.5" }), Fn ? v("sessions.deselectAll", "Deselect All") : v("sessions.selectAll", "Select All")]
1046
+ children: [/* @__PURE__ */ g(Ne, { className: "w-3.5 h-3.5" }), Bn ? b("sessions.deselectAll", "Deselect All") : b("sessions.selectAll", "Select All")]
1009
1047
  })
1010
1048
  })
1011
1049
  ]
1012
1050
  }),
1013
- tr(),
1014
- y || b !== "all" || x !== "all" || S !== "all" || C !== "all" ? /* @__PURE__ */ g("p", {
1051
+ sr(),
1052
+ x || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? /* @__PURE__ */ _("p", {
1015
1053
  className: "text-sm text-text-secondary",
1016
1054
  children: [
1017
- v("sessions.showing", "Showing"),
1055
+ b("sessions.showing", "Showing"),
1018
1056
  " ",
1019
1057
  Z.length,
1020
1058
  " ",
1021
- v("sessions.of", "of"),
1059
+ b("sessions.of", "of"),
1022
1060
  " ",
1023
1061
  X.length,
1024
1062
  " ",
1025
- v("nav.sessions", "sessions"),
1026
- q && /* @__PURE__ */ g("span", {
1063
+ b("nav.sessions", "sessions"),
1064
+ q && /* @__PURE__ */ _("span", {
1027
1065
  className: "ml-2 text-text-muted",
1028
1066
  children: [
1029
1067
  "(",
1030
- v("sessions.refreshing", "refreshing..."),
1068
+ b("sessions.refreshing", "refreshing..."),
1031
1069
  ")"
1032
1070
  ]
1033
1071
  })
1034
1072
  ]
1035
1073
  }) : null,
1036
- /* @__PURE__ */ h(qe, {
1074
+ /* @__PURE__ */ g(Je, {
1037
1075
  mode: "wait",
1038
- children: Z.length > 0 ? w === "grid" ? /* @__PURE__ */ h(Ye, {
1076
+ children: Z.length > 0 ? E === "grid" ? /* @__PURE__ */ g(Xe, {
1039
1077
  stagger: .04,
1040
1078
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
1041
- children: Z.map((e) => /* @__PURE__ */ h(Je, { children: /* @__PURE__ */ h(De, {
1079
+ children: Z.map((e) => /* @__PURE__ */ g(Ye, { children: /* @__PURE__ */ g(De, {
1042
1080
  session: e,
1043
- onOpen: Bn,
1044
- onStart: Un,
1045
- onStop: Wn,
1046
- onRestart: Gn,
1081
+ onOpen: Kn,
1082
+ onStart: Yn,
1083
+ onStop: Xn,
1084
+ onRestart: Zn,
1047
1085
  onOpenTerminal: Q,
1048
- onShare: Jn,
1049
- selected: j.has(e.id),
1050
- onToggleSelect: () => Mn(e.id)
1086
+ onShare: er,
1087
+ selected: N.has(e.id),
1088
+ onToggleSelect: () => Ln(e.id)
1051
1089
  }) }, e.id))
1052
- }, "grid-view") : /* @__PURE__ */ h(Je, { children: /* @__PURE__ */ h(Oe, {
1090
+ }, "grid-view") : /* @__PURE__ */ g(Ye, { children: /* @__PURE__ */ g(Oe, {
1053
1091
  sessions: Z,
1054
- onOpen: Bn,
1055
- onStart: Un,
1056
- onStop: Wn,
1057
- onRestart: Gn,
1058
- onTerminate: Kn,
1092
+ onOpen: Kn,
1093
+ onStart: Yn,
1094
+ onStop: Xn,
1095
+ onRestart: Zn,
1096
+ onTerminate: Qn,
1059
1097
  onOpenTerminal: Q,
1060
- onShare: Jn,
1061
- selectedIds: j,
1062
- onToggleSelect: Mn,
1063
- onSelectAll: Nn,
1064
- onDeselectAll: Pn
1065
- }) }, "list-view") : /* @__PURE__ */ g("div", {
1098
+ onShare: er,
1099
+ selectedIds: N,
1100
+ onToggleSelect: Ln,
1101
+ onSelectAll: Rn,
1102
+ onDeselectAll: zn
1103
+ }) }, "list-view") : /* @__PURE__ */ _("div", {
1066
1104
  className: "space-y-4",
1067
- children: [/* @__PURE__ */ h(Ce, {
1105
+ children: [/* @__PURE__ */ g(Ce, {
1068
1106
  variant: "compact",
1069
1107
  dismissKey: "vibecontrols-sessions-setup-banner"
1070
- }), /* @__PURE__ */ h(xe, {
1071
- icon: /* @__PURE__ */ h(He, { className: "w-8 h-8 text-text-secondary" }),
1072
- title: y || b !== "all" || x !== "all" || S !== "all" || C !== "all" ? v("sessions.emptyFound", "No sessions found") : v("sessions.emptyConfigured", "No sessions configured"),
1073
- description: y || b !== "all" || x !== "all" || S !== "all" || C !== "all" ? v("sessions.emptyAdjustSearch", "Try adjusting your search or filters") : v("sessions.emptyDescription", "Sessions require an active agent. Install the CLI agent first, then start a session."),
1074
- action: !y && b === "all" && x === "all" && S === "all" && C === "all" ? /* @__PURE__ */ g("div", {
1108
+ }), /* @__PURE__ */ g(xe, {
1109
+ icon: /* @__PURE__ */ g(Ue, { className: "w-8 h-8 text-text-secondary" }),
1110
+ title: x || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? b("sessions.emptyFound", "No sessions found") : b("sessions.emptyConfigured", "No sessions configured"),
1111
+ description: x || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? b("sessions.emptyAdjustSearch", "Try adjusting your search or filters") : b("sessions.emptyDescription", "Sessions require an active agent. Install the CLI agent first, then start a session."),
1112
+ action: !x && S === "all" && C === "all" && w === "all" && T === "all" ? /* @__PURE__ */ _("div", {
1075
1113
  className: "flex items-center gap-2",
1076
- children: [pt && /* @__PURE__ */ g("button", {
1077
- onClick: Vn,
1114
+ children: [pt && /* @__PURE__ */ _("button", {
1115
+ onClick: qn,
1078
1116
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
1079
1117
  children: [
1080
- /* @__PURE__ */ h(Re, { className: "w-4 h-4" }),
1118
+ /* @__PURE__ */ g(ze, { className: "w-4 h-4" }),
1081
1119
  " ",
1082
- v("sessions.newSession", "New Session")
1120
+ b("sessions.newSession", "New Session")
1083
1121
  ]
1084
- }), /* @__PURE__ */ h(we, { prompt: "What is a Session in VibeControls and how do I start one?" })]
1122
+ }), /* @__PURE__ */ g(we, { prompt: "What is a Session in VibeControls and how do I start one?" })]
1085
1123
  }) : void 0
1086
1124
  })]
1087
1125
  })
1088
1126
  }),
1089
- k && /* @__PURE__ */ h("div", {
1127
+ j && /* @__PURE__ */ g("div", {
1090
1128
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
1091
- children: k
1129
+ children: j
1092
1130
  })
1093
1131
  ]
1094
1132
  }),
1095
- I.length > 0 && /* @__PURE__ */ h(ke, {
1096
- tabs: I,
1097
- activeTabId: R,
1098
- onTabSelect: z,
1099
- onTabClose: Yn,
1100
- onOpenExternal: Xn,
1101
- onToggleCollapse: () => B((e) => !e),
1102
- collapsed: Ht,
1133
+ R.length > 0 && /* @__PURE__ */ g(ke, {
1134
+ tabs: R,
1135
+ activeTabId: B,
1136
+ onTabSelect: V,
1137
+ onTabClose: tr,
1138
+ onOpenExternal: nr,
1139
+ onToggleCollapse: () => H((e) => !e),
1140
+ collapsed: Wt,
1103
1141
  sessions: Z,
1104
1142
  onOpenTerminal: Q,
1105
1143
  onRetryTerminal: Q,
1106
- onRenameSession: Zn,
1107
- onStopTerminal: Qn,
1108
- onRestartTerminal: $n,
1144
+ onRenameSession: rr,
1145
+ onStopTerminal: ir,
1146
+ onRestartTerminal: ar,
1109
1147
  heightClass: "h-[280px] sm:h-[380px]",
1110
- isImmersiveFullscreen: Gt,
1111
- onToggleImmersiveFullscreen: er,
1148
+ isImmersiveFullscreen: qt,
1149
+ onToggleImmersiveFullscreen: or,
1112
1150
  contextSwitcher: void 0
1113
1151
  }),
1114
- yt && rr(),
1115
- nr(),
1116
- Ut && /* @__PURE__ */ h(Ae, {
1117
- session: Ut,
1118
- isOpen: !!Ut,
1119
- onClose: () => Wt(null)
1152
+ yt && lr(),
1153
+ cr(),
1154
+ Gt && /* @__PURE__ */ g(Ae, {
1155
+ session: Gt,
1156
+ isOpen: !!Gt,
1157
+ onClose: () => Kt(null)
1120
1158
  }),
1121
- /* @__PURE__ */ h(ye, {
1159
+ /* @__PURE__ */ g(ye, {
1122
1160
  isOpen: bt,
1123
- onClose: () => D(!1),
1161
+ onClose: () => k(!1),
1124
1162
  onConfirm: () => {
1125
- D(!1), it("/billing");
1163
+ k(!1), at("/billing");
1126
1164
  },
1127
1165
  title: be("session").title,
1128
1166
  message: be("session").message,
@@ -1132,62 +1170,62 @@ function tt() {
1132
1170
  })
1133
1171
  ]
1134
1172
  });
1135
- function nr() {
1136
- if (!Xt) return null;
1137
- let e = rn?.agentSessionOrphans ?? [];
1138
- return /* @__PURE__ */ h("div", {
1173
+ function cr() {
1174
+ if (!Qt) return null;
1175
+ let e = cn?.agentSessionOrphans ?? [];
1176
+ return /* @__PURE__ */ g("div", {
1139
1177
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
1140
1178
  "data-testid": "sessions-reconnect-modal",
1141
- children: /* @__PURE__ */ g("div", {
1179
+ children: /* @__PURE__ */ _("div", {
1142
1180
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto",
1143
1181
  children: [
1144
- /* @__PURE__ */ h("h2", {
1182
+ /* @__PURE__ */ g("h2", {
1145
1183
  className: "text-lg font-semibold text-text-primary mb-1",
1146
- children: v("sessions.reconnectTitle", "Reconnect orphan sessions")
1184
+ children: b("sessions.reconnectTitle", "Reconnect orphan sessions")
1147
1185
  }),
1148
- /* @__PURE__ */ h("p", {
1186
+ /* @__PURE__ */ g("p", {
1149
1187
  className: "text-sm text-text-secondary mb-4",
1150
- children: v("sessions.reconnectDesc", "Pick an agent to scan its host for tmux / wezterm / zellij sessions named vibe-* that are not currently tracked. Adopt one to start a web terminal and bring it back into the UI.")
1188
+ children: b("sessions.reconnectDesc", "Pick an agent to scan its host for tmux / wezterm / zellij sessions named vibe-* that are not currently tracked. Adopt one to start a web terminal and bring it back into the UI.")
1151
1189
  }),
1152
- /* @__PURE__ */ g("div", {
1190
+ /* @__PURE__ */ _("div", {
1153
1191
  className: "space-y-4",
1154
1192
  children: [
1155
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1193
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1156
1194
  className: "block text-sm font-medium text-text-primary mb-1",
1157
- children: v("sessions.agent", "Agent")
1158
- }), /* @__PURE__ */ h(Te, {
1159
- options: An,
1160
- value: U,
1195
+ children: b("sessions.agent", "Agent")
1196
+ }), /* @__PURE__ */ g(u, {
1197
+ options: Fn,
1198
+ value: en,
1161
1199
  onChange: (e) => {
1162
- Qt(e), W(null), e && nn({ variables: { agentId: e } });
1200
+ tn(e), rn(null), e && sn({ variables: { agentId: e } });
1163
1201
  },
1164
- placeholder: v("sessions.selectAgent", "Select an agent"),
1165
- searchPlaceholder: v("sessions.searchAgents", "Search agents..."),
1202
+ placeholder: b("sessions.selectAgent", "Select an agent"),
1203
+ searchPlaceholder: b("sessions.searchAgents", "Search agents..."),
1166
1204
  clearable: !0
1167
1205
  })] }),
1168
- $t && /* @__PURE__ */ h("div", {
1206
+ nn && /* @__PURE__ */ g("div", {
1169
1207
  className: "p-3 bg-status-error-bg text-status-error-text text-sm rounded-md",
1170
1208
  "data-testid": "sessions-reconnect-error",
1171
- children: $t
1209
+ children: nn
1172
1210
  }),
1173
- U && /* @__PURE__ */ h("div", {
1211
+ en && /* @__PURE__ */ g("div", {
1174
1212
  "data-testid": "sessions-reconnect-list",
1175
1213
  className: "space-y-2",
1176
- children: an ? /* @__PURE__ */ h("div", {
1214
+ children: ln ? /* @__PURE__ */ g("div", {
1177
1215
  className: "text-sm text-text-secondary",
1178
- children: v("sessions.scanningHost", "Scanning host...")
1179
- }) : e.length === 0 ? /* @__PURE__ */ h("div", {
1216
+ children: b("sessions.scanningHost", "Scanning host...")
1217
+ }) : e.length === 0 ? /* @__PURE__ */ g("div", {
1180
1218
  className: "text-sm text-text-secondary",
1181
- children: v("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
1182
- }) : e.map((e) => /* @__PURE__ */ g("div", {
1219
+ children: b("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
1220
+ }) : e.map((e) => /* @__PURE__ */ _("div", {
1183
1221
  className: "flex items-center justify-between gap-3 p-3 border border-border-default rounded-md bg-bg-sunken/40",
1184
1222
  "data-testid": "sessions-reconnect-row",
1185
- children: [/* @__PURE__ */ g("div", {
1223
+ children: [/* @__PURE__ */ _("div", {
1186
1224
  className: "min-w-0 flex-1",
1187
- children: [/* @__PURE__ */ h("div", {
1225
+ children: [/* @__PURE__ */ g("div", {
1188
1226
  className: "font-mono text-sm text-text-primary break-all",
1189
1227
  children: e.externalName
1190
- }), /* @__PURE__ */ g("div", {
1228
+ }), /* @__PURE__ */ _("div", {
1191
1229
  className: "text-xs text-text-tertiary mt-0.5",
1192
1230
  children: [
1193
1231
  e.provider,
@@ -1199,179 +1237,179 @@ function tt() {
1199
1237
  e.createdAt ? ` · created ${e.createdAt}` : ""
1200
1238
  ]
1201
1239
  })]
1202
- }), /* @__PURE__ */ h("button", {
1240
+ }), /* @__PURE__ */ g("button", {
1203
1241
  type: "button",
1204
- disabled: en === e.externalName,
1242
+ disabled: an === e.externalName,
1205
1243
  onClick: async () => {
1206
- tn(e.externalName), W(null);
1244
+ on(e.externalName), rn(null);
1207
1245
  try {
1208
- await on({ variables: {
1209
- agentId: U,
1246
+ await un({ variables: {
1247
+ agentId: en,
1210
1248
  externalName: e.externalName,
1211
1249
  name: e.externalName
1212
- } }), await nn({ variables: { agentId: U } });
1250
+ } }), await sn({ variables: { agentId: en } });
1213
1251
  } catch (e) {
1214
- W(e instanceof Error ? e.message : String(e));
1252
+ rn(e instanceof Error ? e.message : String(e));
1215
1253
  } finally {
1216
- tn(null);
1254
+ on(null);
1217
1255
  }
1218
1256
  },
1219
1257
  className: "shrink-0 px-3 py-1.5 text-xs bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
1220
1258
  "data-testid": `sessions-reconnect-adopt-${e.externalName}`,
1221
- children: en === e.externalName ? v("sessions.adopting", "Adopting…") : v("sessions.adopt", "Adopt")
1259
+ children: an === e.externalName ? b("sessions.adopting", "Adopting…") : b("sessions.adopt", "Adopt")
1222
1260
  })]
1223
1261
  }, e.externalName))
1224
1262
  })
1225
1263
  ]
1226
1264
  }),
1227
- /* @__PURE__ */ h("div", {
1265
+ /* @__PURE__ */ g("div", {
1228
1266
  className: "flex justify-end gap-3 mt-6",
1229
- children: /* @__PURE__ */ h("button", {
1267
+ children: /* @__PURE__ */ g("button", {
1230
1268
  onClick: () => {
1231
- Zt(!1), W(null);
1269
+ $t(!1), rn(null);
1232
1270
  },
1233
1271
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
1234
- children: v("common.close", "Close")
1272
+ children: b("common.close", "Close")
1235
1273
  })
1236
1274
  })
1237
1275
  ]
1238
1276
  })
1239
1277
  });
1240
1278
  }
1241
- function rr() {
1242
- return /* @__PURE__ */ h("div", {
1279
+ function lr() {
1280
+ return /* @__PURE__ */ g("div", {
1243
1281
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
1244
- children: /* @__PURE__ */ g("div", {
1282
+ children: /* @__PURE__ */ _("div", {
1245
1283
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-lg",
1246
1284
  children: [
1247
- /* @__PURE__ */ h("h2", {
1285
+ /* @__PURE__ */ g("h2", {
1248
1286
  className: "text-lg font-semibold text-text-primary mb-4",
1249
- children: v("sessions.newSession", "New Session")
1287
+ children: b("sessions.newSession", "New Session")
1250
1288
  }),
1251
- /* @__PURE__ */ g("div", {
1289
+ /* @__PURE__ */ _("div", {
1252
1290
  className: "space-y-4",
1253
1291
  children: [
1254
- xt && /* @__PURE__ */ h("div", {
1292
+ xt && /* @__PURE__ */ g("div", {
1255
1293
  className: "p-3 bg-status-error-bg text-status-error-text text-sm rounded-md",
1256
1294
  children: xt
1257
1295
  }),
1258
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1296
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1259
1297
  className: "block text-sm font-medium text-text-primary mb-1",
1260
- children: v("sessions.name", "Name")
1261
- }), /* @__PURE__ */ h("input", {
1262
- ref: Tt,
1298
+ children: b("sessions.name", "Name")
1299
+ }), /* @__PURE__ */ g("input", {
1300
+ ref: Dt,
1263
1301
  type: "text",
1264
- placeholder: v("sessions.namePlaceholder", "dev-server"),
1302
+ placeholder: b("sessions.namePlaceholder", "dev-server"),
1265
1303
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
1266
1304
  })] }),
1267
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1305
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1268
1306
  className: "block text-sm font-medium text-text-primary mb-1",
1269
- children: v("sessions.filterVibe", "Vibe")
1270
- }), /* @__PURE__ */ h(Te, {
1271
- options: kn,
1272
- value: kt,
1273
- onChange: At,
1274
- placeholder: v("sessions.noVibe", "No vibe"),
1275
- searchPlaceholder: v("sessions.searchVibes", "Search vibes..."),
1307
+ children: b("sessions.filterVibe", "Vibe")
1308
+ }), /* @__PURE__ */ g(u, {
1309
+ options: Pn,
1310
+ value: jt,
1311
+ onChange: Mt,
1312
+ placeholder: b("sessions.noVibe", "No vibe"),
1313
+ searchPlaceholder: b("sessions.searchVibes", "Search vibes..."),
1276
1314
  clearable: !0
1277
1315
  })] }),
1278
- /* @__PURE__ */ g("div", { children: [
1279
- /* @__PURE__ */ h("label", {
1316
+ /* @__PURE__ */ _("div", { children: [
1317
+ /* @__PURE__ */ g("label", {
1280
1318
  className: "block text-sm font-medium text-text-primary mb-1",
1281
- children: v("sessions.filterAgent", "Agent")
1319
+ children: b("sessions.filterAgent", "Agent")
1282
1320
  }),
1283
- /* @__PURE__ */ h(Te, {
1284
- options: An,
1285
- value: jt,
1286
- onChange: Mt,
1287
- placeholder: v("sessions.selectAgent", "Select an agent"),
1288
- searchPlaceholder: v("sessions.searchAgents", "Search agents..."),
1321
+ /* @__PURE__ */ g(u, {
1322
+ options: Fn,
1323
+ value: Nt,
1324
+ onChange: Pt,
1325
+ placeholder: b("sessions.selectAgent", "Select an agent"),
1326
+ searchPlaceholder: b("sessions.searchAgents", "Search agents..."),
1289
1327
  clearable: !0
1290
1328
  }),
1291
- /* @__PURE__ */ h("p", {
1329
+ /* @__PURE__ */ g("p", {
1292
1330
  className: "text-xs text-text-muted mt-1",
1293
- children: v("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
1331
+ children: b("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
1294
1332
  })
1295
1333
  ] }),
1296
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1334
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1297
1335
  className: "block text-sm font-medium text-text-primary mb-1",
1298
- children: v("sessions.filterType", "Type")
1299
- }), /* @__PURE__ */ h(Te, {
1300
- options: jn,
1301
- value: P,
1302
- onChange: Nt,
1303
- placeholder: v("sessions.selectType", "Select type"),
1304
- searchPlaceholder: v("sessions.searchTypes", "Search types...")
1336
+ children: b("sessions.filterType", "Type")
1337
+ }), /* @__PURE__ */ g(u, {
1338
+ options: In,
1339
+ value: I,
1340
+ onChange: Ft,
1341
+ placeholder: b("sessions.selectType", "Select type"),
1342
+ searchPlaceholder: b("sessions.searchTypes", "Search types...")
1305
1343
  })] }),
1306
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1344
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1307
1345
  className: "block text-sm font-medium text-text-primary mb-1",
1308
- children: v("sessions.command", "Command")
1309
- }), /* @__PURE__ */ h("input", {
1310
- ref: Et,
1346
+ children: b("sessions.command", "Command")
1347
+ }), /* @__PURE__ */ g("input", {
1348
+ ref: Ot,
1311
1349
  type: "text",
1312
- placeholder: v("sessions.commandPlaceholder", "bun run dev"),
1350
+ placeholder: b("sessions.commandPlaceholder", "bun run dev"),
1313
1351
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
1314
1352
  })] }),
1315
- /* @__PURE__ */ g("div", {
1353
+ /* @__PURE__ */ _("div", {
1316
1354
  className: "flex items-center gap-2",
1317
- children: [/* @__PURE__ */ h("input", {
1318
- ref: Dt,
1355
+ children: [/* @__PURE__ */ g("input", {
1356
+ ref: kt,
1319
1357
  type: "checkbox",
1320
1358
  id: "autoStart",
1321
1359
  className: "w-4 h-4 rounded border-border-default"
1322
- }), /* @__PURE__ */ h("label", {
1360
+ }), /* @__PURE__ */ g("label", {
1323
1361
  htmlFor: "autoStart",
1324
1362
  className: "text-sm text-text-primary",
1325
- children: v("sessions.autoStartWithVibe", "Auto-start with vibe")
1363
+ children: b("sessions.autoStartWithVibe", "Auto-start with vibe")
1326
1364
  })]
1327
1365
  }),
1328
- (P === "TMUX" || P === "WEZTERM" || P === "ZELLIJ") && /* @__PURE__ */ g("div", {
1366
+ (I === "TMUX" || I === "WEZTERM" || I === "ZELLIJ") && /* @__PURE__ */ _("div", {
1329
1367
  className: "rounded-md border border-border-default bg-bg-sunken/40",
1330
1368
  "data-testid": "sessions-create-advanced",
1331
- children: [/* @__PURE__ */ g("button", {
1369
+ children: [/* @__PURE__ */ _("button", {
1332
1370
  type: "button",
1333
- onClick: () => Ft((e) => !e),
1371
+ onClick: () => Lt((e) => !e),
1334
1372
  className: "w-full flex items-center justify-between px-3 py-2 text-sm font-medium text-text-primary",
1335
- "aria-expanded": Pt,
1336
- children: [/* @__PURE__ */ h("span", { children: v("sessions.advanced", "Advanced options") }), /* @__PURE__ */ h("span", {
1373
+ "aria-expanded": It,
1374
+ children: [/* @__PURE__ */ g("span", { children: b("sessions.advanced", "Advanced options") }), /* @__PURE__ */ g("span", {
1337
1375
  className: "text-text-tertiary text-xs",
1338
- children: Pt ? "▾" : "▸"
1376
+ children: It ? "▾" : "▸"
1339
1377
  })]
1340
- }), Pt && /* @__PURE__ */ g("div", {
1378
+ }), It && /* @__PURE__ */ _("div", {
1341
1379
  className: "px-3 pb-3 space-y-2",
1342
1380
  children: [
1343
- /* @__PURE__ */ h("label", {
1381
+ /* @__PURE__ */ g("label", {
1344
1382
  className: "block text-xs font-medium text-text-secondary",
1345
- children: v("sessions.attachExistingLabel", "Attach to existing session (optional)")
1383
+ children: b("sessions.attachExistingLabel", "Attach to existing session (optional)")
1346
1384
  }),
1347
- /* @__PURE__ */ h("input", {
1348
- ref: Ot,
1385
+ /* @__PURE__ */ g("input", {
1386
+ ref: At,
1349
1387
  type: "text",
1350
1388
  "data-testid": "sessions-create-external-name",
1351
- placeholder: P === "WEZTERM" ? "e.g. vibe-051c9c62 (existing wezterm workspace)" : P === "ZELLIJ" ? "e.g. vibe-051c9c62 (existing zellij session)" : "e.g. vibe-051c9c62 (existing tmux session)",
1389
+ placeholder: I === "WEZTERM" ? "e.g. vibe-051c9c62 (existing wezterm workspace)" : I === "ZELLIJ" ? "e.g. vibe-051c9c62 (existing zellij session)" : "e.g. vibe-051c9c62 (existing tmux session)",
1352
1390
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder font-mono"
1353
1391
  }),
1354
- /* @__PURE__ */ h("p", {
1392
+ /* @__PURE__ */ g("p", {
1355
1393
  className: "text-xs text-text-tertiary",
1356
- children: v("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
1394
+ children: b("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
1357
1395
  })
1358
1396
  ]
1359
1397
  })]
1360
1398
  })
1361
1399
  ]
1362
1400
  }),
1363
- /* @__PURE__ */ g("div", {
1401
+ /* @__PURE__ */ _("div", {
1364
1402
  className: "flex justify-end gap-3 mt-6",
1365
- children: [/* @__PURE__ */ h("button", {
1366
- onClick: () => E(!1),
1403
+ children: [/* @__PURE__ */ g("button", {
1404
+ onClick: () => O(!1),
1367
1405
  disabled: St,
1368
1406
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
1369
- children: v("common.cancel", "Cancel")
1370
- }), /* @__PURE__ */ h("button", {
1371
- onClick: Hn,
1407
+ children: b("common.cancel", "Cancel")
1408
+ }), /* @__PURE__ */ g("button", {
1409
+ onClick: Jn,
1372
1410
  disabled: St,
1373
1411
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
1374
- children: St ? v("sessions.creating", "Creating...") : v("sessions.createSession", "Create Session")
1412
+ children: St ? b("sessions.creating", "Creating...") : b("sessions.createSession", "Create Session")
1375
1413
  })]
1376
1414
  })
1377
1415
  ]
@@ -1380,6 +1418,6 @@ function tt() {
1380
1418
  }
1381
1419
  }
1382
1420
  //#endregion
1383
- export { tt as SessionsPage };
1421
+ export { nt as SessionsPage };
1384
1422
 
1385
1423
  //# sourceMappingURL=SessionsPage.js.map