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