@burdenoff/microfe-vibecontrols 2026.1023.6 → 2026.1023.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,59 +1,59 @@
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, useListAgentProfilesQuery as ee, useListSessionsQuery as te, useRestartSessionMutation as ne, useRestartSessionTerminalMutation as re, useSessionStatusChangedSubscription as ie, useStartSessionMutation as ae, useStartSessionTerminalMutation as oe, useStopSessionMutation as se, useStopSessionTerminalMutation as ce, useTerminateSessionMutation as le, useUpdateSessionMutation as ue, useVibecontrolsAgentHealthProbeStreamSubscription as de, useVibecontrolsAgentHealthProbesLazyQuery as fe } from "../generated/wspace-operations.js";
2
- import { ConfirmDialog as pe } from "../components/shared/ConfirmDialog.js";
3
- import { useVibeControlsDocsUrl as me } from "../components/shared/VibeControlsDocsLink.js";
4
- import { getQuotaDialogContent as he, isQuotaExhaustedError as c, markQuotaHandledLocally as l } from "../utils/quotaUtils.js";
5
- import { BILLING_PLANS_ROUTE as ge, useVibeControls as _e, useVibeNavigate as ve } from "../providers/VibeControlsProvider.js";
6
- import { useVibeControlsStore as ye } from "../store/vibeControlsStore.js";
7
- import be from "../hooks/useCachedInitialData.js";
8
- import { PageHeader as xe } from "../components/shared/PageHeader.js";
9
- import { LoadingState as Se } from "../components/shared/LoadingState.js";
10
- import { ErrorState as Ce } from "../components/shared/ErrorState.js";
11
- import { EntityTagPicker as we } from "../components/shared/EntityTagPicker.js";
12
- import { useDraftEntityTags as Te } from "../hooks/useDraftEntityTags.js";
13
- import { EmptyState as Ee } from "../components/shared/EmptyState.js";
14
- import { SearchInput as De } from "../components/shared/SearchInput.js";
15
- import { FilterDropdown as Oe } from "../components/shared/FilterDropdown.js";
16
- import { AgentSetupBanner as ke } from "../components/shared/AgentSetupBanner.js";
17
- import { GetHelpButton as Ae } from "../components/shared/GetHelpButton.js";
18
- import { SearchableSelect as je } from "../components/shared/SearchableSelect.js";
19
- import Me, { SessionConnectionStatus as Ne } from "../components/shared/SessionNotificationBanner.js";
20
- import { getAgentStatus as Pe } from "../components/agents/agentStatus.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 ee, useListAgentProfilesQuery as te, useListSessionsQuery as ne, useRestartSessionMutation as re, useRestartSessionTerminalMutation as ie, useSessionStatusChangedSubscription as ae, useStartSessionMutation as oe, useStartSessionTerminalMutation as se, useStopSessionMutation as ce, useStopSessionTerminalMutation as le, useTerminateSessionMutation as ue, useUpdateSessionMutation as de, useVibecontrolsAgentHealthProbeStreamSubscription as fe, useVibecontrolsAgentHealthProbesLazyQuery as pe } from "../generated/wspace-operations.js";
2
+ import { ConfirmDialog as me } from "../components/shared/ConfirmDialog.js";
3
+ import { VibeControlsDocsLink as he, useVibeControlsDocsUrl as ge } from "../components/shared/VibeControlsDocsLink.js";
4
+ import { getQuotaDialogContent as _e, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../utils/quotaUtils.js";
5
+ import { BILLING_PLANS_ROUTE as ve, useVibeControls as ye, useVibeNavigate as be } from "../providers/VibeControlsProvider.js";
6
+ import { useVibeControlsStore as xe } from "../store/vibeControlsStore.js";
7
+ import Se from "../hooks/useCachedInitialData.js";
8
+ import { PageHeader as Ce } from "../components/shared/PageHeader.js";
9
+ import { LoadingState as we } from "../components/shared/LoadingState.js";
10
+ import { ErrorState as Te } from "../components/shared/ErrorState.js";
11
+ import { EntityTagPicker as Ee } from "../components/shared/EntityTagPicker.js";
12
+ import { useDraftEntityTags as De } from "../hooks/useDraftEntityTags.js";
13
+ import { EmptyState as Oe } from "../components/shared/EmptyState.js";
14
+ import { SearchInput as ke } from "../components/shared/SearchInput.js";
15
+ import { FilterDropdown as Ae } from "../components/shared/FilterDropdown.js";
16
+ import { AgentSetupBanner as je } from "../components/shared/AgentSetupBanner.js";
17
+ import { GetHelpButton as Me } from "../components/shared/GetHelpButton.js";
18
+ import { SearchableSelect as Ne } from "../components/shared/SearchableSelect.js";
19
+ import Pe, { SessionConnectionStatus as Fe } from "../components/shared/SessionNotificationBanner.js";
20
+ import { getAgentStatus as Ie } from "../components/agents/agentStatus.js";
21
21
  import "../components/shared/index.js";
22
- import { notify as Fe } from "../lib/toast.js";
23
- import { VIBE_PERMISSIONS as Ie } from "../constants/permissions.js";
24
- import { EntityShareButton as Le } from "../components/sharing/EntityShareButton.js";
22
+ import { notify as Le } from "../lib/toast.js";
23
+ import { VIBE_PERMISSIONS as Re } from "../constants/permissions.js";
24
+ import { EntityShareButton as ze } from "../components/sharing/EntityShareButton.js";
25
25
  import "../components/sharing/index.js";
26
- import { CheckSessionHealthDialog as Re } from "../components/agents/CheckSessionHealthDialog.js";
27
- import { AgentInfoPopover as ze, TargetInfoPopover as Be } from "../components/sessions/EntityInfoPopover.js";
28
- import { SessionCard as Ve } from "../components/sessions/SessionCard.js";
29
- import { SessionList as He } from "../components/sessions/SessionList.js";
30
- import { TerminalPanel as Ue } from "../components/sessions/TerminalPanel.js";
31
- import { SessionShareDialog as We } from "../components/sessions/SessionShareDialog.js";
32
- import { SessionGroup as Ge } from "../components/sessions/SessionGroup.js";
33
- import { groupSessions as Ke } from "../components/sessions/groupSessions.js";
34
- import { buildSessionShortcuts as qe } from "../components/sessions/sessionShortcuts.js";
35
- import { ShortcutCheatsheet as Je } from "../components/sessions/ShortcutCheatsheet.js";
36
- import { SessionsCommandPalette as Ye } from "../components/sessions/SessionsCommandPalette.js";
37
- import { SessionInfoPanel as Xe } from "../components/sessions/SessionInfoPanel.js";
26
+ import { CheckSessionHealthDialog as Be } from "../components/agents/CheckSessionHealthDialog.js";
27
+ import { AgentInfoPopover as Ve, TargetInfoPopover as He } from "../components/sessions/EntityInfoPopover.js";
28
+ import { SessionCard as Ue } from "../components/sessions/SessionCard.js";
29
+ import { SessionList as We } from "../components/sessions/SessionList.js";
30
+ import { TerminalPanel as Ge } from "../components/sessions/TerminalPanel.js";
31
+ import { SessionShareDialog as Ke } from "../components/sessions/SessionShareDialog.js";
32
+ import { SessionGroup as qe } from "../components/sessions/SessionGroup.js";
33
+ import { groupSessions as Je } from "../components/sessions/groupSessions.js";
34
+ import { buildSessionShortcuts as Ye } from "../components/sessions/sessionShortcuts.js";
35
+ import { ShortcutCheatsheet as Xe } from "../components/sessions/ShortcutCheatsheet.js";
36
+ import { SessionsCommandPalette as Ze } from "../components/sessions/SessionsCommandPalette.js";
37
+ import { SessionInfoPanel as Qe } from "../components/sessions/SessionInfoPanel.js";
38
38
  import "../components/sessions/index.js";
39
- import { randomSessionName as Ze } from "../utils/randomSessionName.js";
40
- import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
41
- import { useI18n as Qe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
42
- import { Activity as $e, CheckSquare as et, ChevronDown as tt, Grid as nt, Info as rt, Keyboard as it, Layers as at, List as ot, Monitor as st, MonitorSmartphone as ct, Play as lt, Plus as ut, RefreshCw as dt, RotateCcw as ft, Server as pt, Share2 as mt, SlidersHorizontal as ht, Square as gt, Terminal as _t, Trash2 as vt, XSquare as yt } from "lucide-react";
43
- import { useSearchParams as bt } from "react-router";
44
- import { usePermissions as xt } from "@burdenoff/fe-libs/shared/providers/shell";
45
- import { AnimatePresence as St } from "framer-motion";
46
- import { Fragment as Ct, jsx as h, jsxs as g } from "react/jsx-runtime";
47
- import { useEventBus as wt } from "@burdenoff/fe-libs/shared/events";
48
- import { PagePurpose as Tt } from "@burdenoff/fe-libs/ui";
49
- import { AccessDenied as Et, PermissionButton as Dt } from "@burdenoff/fe-libs/shared/components";
50
- import { MotionItem as Ot, MotionList as kt, MotionPage as At } from "@burdenoff/fe-libs/shared/motion";
51
- import { useAssistantPageControls as jt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
52
- import { enumFilter as Mt, filtersOf as Nt, searchOf as Pt, tabsOf as Ft } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
53
- import { useSafeShellUi as It } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
54
- import { SaveToFilesButton as Lt } from "@burdenoff/fe-libs/storage";
39
+ import { randomSessionName as $e } from "../utils/randomSessionName.js";
40
+ import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
41
+ import { useI18n as et } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
42
+ import { Activity as tt, CheckSquare as nt, ChevronDown as rt, Grid as it, Info as at, Keyboard as ot, Layers as st, List as ct, Monitor as lt, MonitorSmartphone as ut, Play as dt, Plus as ft, RefreshCw as pt, RotateCcw as mt, Server as ht, Share2 as gt, SlidersHorizontal as _t, Square as vt, Terminal as yt, Trash2 as bt, XSquare as xt } from "lucide-react";
43
+ import { useSearchParams as St } from "react-router";
44
+ import { usePermissions as Ct } from "@burdenoff/fe-libs/shared/providers/shell";
45
+ import { AnimatePresence as wt } from "framer-motion";
46
+ import { Fragment as Tt, jsx as m, jsxs as h } from "react/jsx-runtime";
47
+ import { useEventBus as Et } from "@burdenoff/fe-libs/shared/events";
48
+ import { PagePurpose as Dt } from "@burdenoff/fe-libs/ui";
49
+ import { AccessDenied as Ot, PermissionButton as kt } from "@burdenoff/fe-libs/shared/components";
50
+ import { MotionItem as At, MotionList as jt, MotionPage as Mt } from "@burdenoff/fe-libs/shared/motion";
51
+ import { useAssistantPageControls as Nt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
52
+ import { enumFilter as Pt, filtersOf as Ft, searchOf as It, tabsOf as Lt } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
53
+ import { useSafeShellUi as Rt } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
54
+ import { SaveToFilesButton as zt } from "@burdenoff/fe-libs/storage";
55
55
  //#region src/pages/SessionsPage.tsx
56
- function Rt(e, t) {
56
+ function Bt(e, t) {
57
57
  if (!e) return null;
58
58
  try {
59
59
  let n = new URL(e);
@@ -70,7 +70,7 @@ function Rt(e, t) {
70
70
  return e;
71
71
  }
72
72
  }
73
- function zt(e, t, n, r) {
73
+ function Vt(e, t, n, r) {
74
74
  if (e !== "RUNNING") return e;
75
75
  if (r === !1) return "ERROR";
76
76
  if (!t) return e;
@@ -83,79 +83,79 @@ function zt(e, t, n, r) {
83
83
  }
84
84
  return e;
85
85
  }
86
- function Bt() {
87
- let { t: Bt } = Qe(), { onSessionStart: Vt, workspaceId: _ } = _e(), v = wt(), y = ve(), { hasPermission: Ht, isLoading: Ut, permissions: Wt } = xt(), [b, Gt] = bt(), Kt = me("sessions"), x = u((e, t, n) => {
88
- let r = Bt(e, n), i = r === e ? t : r;
86
+ function Ht() {
87
+ let { t: Ht } = et(), { onSessionStart: Ut, workspaceId: g } = ye(), _ = Et(), v = be(), { hasPermission: Wt, isLoading: Gt, permissions: Kt } = Ct(), [qt, Jt] = St(), Yt = ge("sessions"), y = l((e, t, n) => {
88
+ let r = Ht(e, n), i = r === e ? t : r;
89
89
  return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
90
- }, [Bt]), qt = f(() => [
90
+ }, [Ht]), Xt = d(() => [
91
91
  {
92
92
  value: "all",
93
- label: x("sessions.statusAll", "All Statuses")
93
+ label: y("sessions.statusAll", "All Statuses")
94
94
  },
95
95
  {
96
96
  value: "RUNNING",
97
- label: x("sessions.running", "Running")
97
+ label: y("sessions.running", "Running")
98
98
  },
99
99
  {
100
100
  value: "STOPPED",
101
- label: x("sessions.stopped", "Stopped")
101
+ label: y("sessions.stopped", "Stopped")
102
102
  },
103
103
  {
104
104
  value: "STARTING",
105
- label: x("sessions.starting", "Starting")
105
+ label: y("sessions.starting", "Starting")
106
106
  },
107
107
  {
108
108
  value: "ERROR",
109
- label: x("common.error", "Error")
109
+ label: y("common.error", "Error")
110
110
  }
111
- ], [x]), Jt = f(() => [
111
+ ], [y]), Zt = d(() => [
112
112
  {
113
113
  value: "all",
114
- label: x("sessions.typeAll", "All Types")
114
+ label: y("sessions.typeAll", "All Types")
115
115
  },
116
116
  {
117
117
  value: "TMUX",
118
- label: x("sessions.typeTmux", "Tmux")
118
+ label: y("sessions.typeTmux", "Tmux")
119
119
  },
120
120
  {
121
121
  value: "TERMINAL",
122
- label: x("sessions.typeTerminal", "Terminal")
122
+ label: y("sessions.typeTerminal", "Terminal")
123
123
  },
124
124
  {
125
125
  value: "SCRIPT",
126
- label: x("sessions.typeScript", "Script")
126
+ label: y("sessions.typeScript", "Script")
127
127
  },
128
128
  {
129
129
  value: "CUSTOM",
130
- label: x("sessions.typeCustom", "Custom")
130
+ label: y("sessions.typeCustom", "Custom")
131
131
  }
132
- ], [x]), Yt = Ht(Ie.SESSION_LIST), Xt = Ht(Ie.SESSION_CREATE), Zt = Ht(Ie.SESSION_UPDATE), [S, Qt] = m(""), [C, $t] = m("all"), [w, en] = m("all"), [T, tn] = m("all"), [E, nn] = m("all"), [D, rn] = m("all"), [O, k] = m("none"), [an, on] = m(() => /* @__PURE__ */ new Set()), [A, j] = m("terminal"), [sn, M] = m(!1), [cn, ln] = m(!1), un = p(null), [dn, N] = m(!1), [fn, P] = m(null), [pn, mn] = m(!1), [hn, F] = m(null), [I, L] = m(/* @__PURE__ */ new Set()), [gn, _n] = m(!1), [vn, yn] = m(!1), bn = p(null), xn = p(null), Sn = p(null), Cn = p(null), wn = p(null), Tn = p(null);
133
- d(() => {
134
- if (!cn) return;
132
+ ], [y]), Qt = Wt(Re.SESSION_LIST), $t = Wt(Re.SESSION_CREATE), en = Wt(Re.SESSION_UPDATE), [b, tn] = p(""), [x, nn] = p("all"), [S, rn] = p("all"), [C, an] = p("all"), [w, on] = p("all"), [T, sn] = p("all"), [E, D] = p("none"), [cn, ln] = p(() => /* @__PURE__ */ new Set()), [O, k] = p("terminal"), [un, A] = p(!1), [dn, fn] = p(!1), pn = f(null), [mn, j] = p(!1), [hn, M] = p(null), [gn, _n] = p(!1), [vn, N] = p(null), [P, F] = p(/* @__PURE__ */ new Set()), [yn, I] = p(!1), [bn, xn] = p(!1), Sn = f(null), Cn = f(null), wn = f(null), Tn = f(null), En = f(null), Dn = f(null);
133
+ u(() => {
134
+ if (!dn) return;
135
135
  let e = (e) => {
136
- un.current && !un.current.contains(e.target) && ln(!1);
136
+ pn.current && !pn.current.contains(e.target) && fn(!1);
137
137
  };
138
138
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
139
- }, [cn]);
140
- let [En, Dn] = m(""), [On, kn] = m(""), [An, jn] = m("default"), [R, Mn] = m("TMUX"), [Nn, Pn] = m(!1), { terminalTabs: Fn, activeTerminalTabId: In, sessionsViewMode: Ln, sessionsGroupBy: Rn, sessionsTargetFilter: zn, setTerminalTabs: Bn, setActiveTerminalTabId: Vn, setSessionsViewMode: Hn, setSessionsGroupBy: Un, setSessionsTargetFilter: Wn, sessionInfoPanelOpen: Gn, setSessionInfoPanelOpen: Kn, activeSessionId: z, lastUsedAgentId: qn, lastUsedVibeId: Jn, lastUsedSessionType: Yn, lastUsedProfile: Xn, setLastUsedSessionDefaults: Zn } = ye(), Qn = It(), $n = p(Qn);
141
- $n.current = Qn, d(() => {
139
+ }, [dn]);
140
+ let [On, kn] = p(""), [An, jn] = p(""), [Mn, Nn] = p("default"), [L, Pn] = p("TMUX"), [Fn, In] = p(!1), { terminalTabs: Ln, activeTerminalTabId: Rn, sessionsViewMode: zn, sessionsGroupBy: Bn, sessionsTargetFilter: Vn, setTerminalTabs: Hn, setActiveTerminalTabId: Un, setSessionsViewMode: Wn, setSessionsGroupBy: Gn, setSessionsTargetFilter: Kn, sessionInfoPanelOpen: qn, setSessionInfoPanelOpen: R, activeSessionId: z, lastUsedAgentId: Jn, lastUsedVibeId: B, lastUsedSessionType: Yn, lastUsedProfile: Xn, setLastUsedSessionDefaults: Zn } = xe(), Qn = Rt(), $n = f(Qn);
141
+ $n.current = Qn, u(() => {
142
142
  let e = $n.current;
143
- if (!e || A !== "terminal") return;
143
+ if (!e || O !== "terminal") return;
144
144
  let t = e.isBreadcrumbCollapsed, n = e.footerVisible;
145
145
  return e.setBreadcrumbCollapsed(!0), e.setFooterVisible(!1), () => {
146
146
  $n.current?.setBreadcrumbCollapsed(t), $n.current?.setFooterVisible(n);
147
147
  };
148
- }, [A]);
149
- let [B, V] = m([]), [H, U] = m(null), [er, W] = m(!1), [tr, nr] = m(!1), [rr, ir] = m(!1), [ar, or] = m(0), [sr, cr] = m(null), [lr, ur] = m(!1), [G, dr] = m(!1), fr = b.get("view"), pr = b.get("session"), mr = b.get("group"), hr = b.get("target"), [gr] = o({ refetchQueries: ["ListSessions"] }), { setDraftTagIds: _r, flushTags: vr } = Te("VIBECONTROLS_SESSION"), [yr, br] = m(!1), [xr, Sr] = m(""), [Cr, wr] = m(null), [Tr, Er] = m(null), [Dr, { data: Or, loading: kr }] = t({ fetchPolicy: "network-only" }), [Ar] = e({ refetchQueries: ["ListSessions"] }), [jr] = ae({ refetchQueries: ["ListSessions"] }), [Mr] = se({ refetchQueries: ["ListSessions"] }), [Nr] = ne({ refetchQueries: ["ListSessions"] }), [K] = oe({ refetchQueries: ["ListSessions"] }), [Pr] = ce({ refetchQueries: ["ListSessions"] }), [Fr] = re({ refetchQueries: ["ListSessions"] }), [Ir] = ue({ refetchQueries: ["ListSessions"] }), [Lr] = le({ refetchQueries: ["ListSessions"] }), [Rr] = a({ refetchQueries: ["ListSessions"] }), [zr] = r({ refetchQueries: ["ListSessions"] }), [Br] = n({ refetchQueries: ["ListSessions"] }), [Vr] = i({ refetchQueries: ["ListSessions"] }), [Hr] = s();
150
- d(() => {
151
- G || (fr === "terminal" || fr === "grid" || fr === "list" ? j(fr) : Ln && j(Ln), pr ? U(pr) : In && U(In), mr && [
148
+ }, [O]);
149
+ let [V, H] = p([]), [U, W] = p(null), [er, G] = p(!1), [tr, nr] = p(!1), [rr, ir] = p(!1), [ar, or] = p(0), [sr, cr] = p(null), [lr, ur] = p(!1), [K, dr] = p(!1), fr = qt.get("view"), pr = qt.get("session"), mr = qt.get("group"), hr = qt.get("target"), [gr] = o({ refetchQueries: ["ListSessions"] }), { setDraftTagIds: _r, flushTags: vr } = De("VIBECONTROLS_SESSION"), [yr, br] = p(!1), [xr, Sr] = p(""), [Cr, wr] = p(null), [Tr, Er] = p(null), [Dr, { data: Or, loading: kr }] = t({ fetchPolicy: "network-only" }), [Ar] = e({ refetchQueries: ["ListSessions"] }), [jr] = oe({ refetchQueries: ["ListSessions"] }), [Mr] = ce({ refetchQueries: ["ListSessions"] }), [Nr] = re({ refetchQueries: ["ListSessions"] }), [q] = se({ refetchQueries: ["ListSessions"] }), [Pr] = le({ refetchQueries: ["ListSessions"] }), [Fr] = ie({ refetchQueries: ["ListSessions"] }), [Ir] = de({ refetchQueries: ["ListSessions"] }), [Lr] = ue({ refetchQueries: ["ListSessions"] }), [Rr] = a({ refetchQueries: ["ListSessions"] }), [zr] = r({ refetchQueries: ["ListSessions"] }), [Br] = n({ refetchQueries: ["ListSessions"] }), [Vr] = i({ refetchQueries: ["ListSessions"] }), [Hr] = ee();
150
+ u(() => {
151
+ K || (fr === "terminal" || fr === "grid" || fr === "list" ? k(fr) : zn && k(zn), pr ? W(pr) : Rn && W(Rn), mr && [
152
152
  "none",
153
153
  "agent",
154
154
  "target",
155
155
  "vibe",
156
156
  "status",
157
157
  "type"
158
- ].includes(mr) ? k(mr) : Rn && k(Rn), hr ? rn(hr) : zn && rn(zn), Fn.length > 0 && V(Fn.map((e) => ({
158
+ ].includes(mr) ? D(mr) : Bn && D(Bn), hr ? sn(hr) : Vn && sn(Vn), Ln.length > 0 && H(Ln.map((e) => ({
159
159
  sessionId: e.sessionId,
160
160
  name: e.name,
161
161
  pinned: e.pinned,
@@ -164,172 +164,172 @@ function Bt() {
164
164
  error: null
165
165
  }))), dr(!0));
166
166
  }, [
167
- Fn,
168
- In,
169
167
  Ln,
170
168
  Rn,
171
169
  zn,
170
+ Bn,
171
+ Vn,
172
172
  pr,
173
173
  fr,
174
174
  mr,
175
175
  hr,
176
- G
176
+ K
177
177
  ]);
178
- let Ur = p(!1);
179
- d(() => {
180
- G && Bn(B.map((e) => ({
178
+ let Ur = f(!1);
179
+ u(() => {
180
+ K && Hn(V.map((e) => ({
181
181
  sessionId: e.sessionId,
182
182
  name: e.name,
183
183
  pinned: e.pinned
184
184
  })));
185
185
  }, [
186
- B,
187
- G,
188
- Bn
189
- ]), d(() => {
190
- G && Vn(H);
191
- }, [
192
- H,
193
- G,
194
- Vn
195
- ]), d(() => {
196
- G && Hn(A);
197
- }, [
198
- A,
199
- G,
186
+ V,
187
+ K,
200
188
  Hn
201
- ]), d(() => {
202
- G && Un(O);
189
+ ]), u(() => {
190
+ K && Un(U);
203
191
  }, [
204
- O,
205
- G,
192
+ U,
193
+ K,
206
194
  Un
207
- ]), d(() => {
208
- G && Wn(D);
195
+ ]), u(() => {
196
+ K && Wn(O);
209
197
  }, [
210
- D,
211
- G,
198
+ O,
199
+ K,
212
200
  Wn
213
- ]), d(() => {
214
- if (!G) return;
215
- let e = new URLSearchParams(b), t = !1, n = A === "terminal" ? null : A;
216
- n ? e.get("view") !== n && (e.set("view", n), t = !0) : e.has("view") && (e.delete("view"), t = !0), H ? e.get("session") !== H && (e.set("session", H), t = !0) : e.has("session") && (e.delete("session"), t = !0), O === "none" ? e.has("group") && (e.delete("group"), t = !0) : e.get("group") !== O && (e.set("group", O), t = !0), D === "all" ? e.has("target") && (e.delete("target"), t = !0) : e.get("target") !== D && (e.set("target", D), t = !0), t && Gt(e, { replace: !0 });
201
+ ]), u(() => {
202
+ K && Gn(E);
217
203
  }, [
218
- H,
219
- b,
220
- Gt,
221
- G,
222
- A,
204
+ E,
205
+ K,
206
+ Gn
207
+ ]), u(() => {
208
+ K && Kn(T);
209
+ }, [
210
+ T,
211
+ K,
212
+ Kn
213
+ ]), u(() => {
214
+ if (!K) return;
215
+ let e = new URLSearchParams(qt), t = !1, n = O === "terminal" ? null : O;
216
+ n ? e.get("view") !== n && (e.set("view", n), t = !0) : e.has("view") && (e.delete("view"), t = !0), U ? e.get("session") !== U && (e.set("session", U), t = !0) : e.has("session") && (e.delete("session"), t = !0), E === "none" ? e.has("group") && (e.delete("group"), t = !0) : e.get("group") !== E && (e.set("group", E), t = !0), T === "all" ? e.has("target") && (e.delete("target"), t = !0) : e.get("target") !== T && (e.set("target", T), t = !0), t && Jt(e, { replace: !0 });
217
+ }, [
218
+ U,
219
+ qt,
220
+ Jt,
221
+ K,
223
222
  O,
224
- D
223
+ E,
224
+ T
225
225
  ]);
226
- let Wr = p(null);
227
- ie({
228
- skip: !_,
229
- variables: { workspaceId: _ || "" }
226
+ let Wr = f(null);
227
+ ae({
228
+ skip: !g,
229
+ variables: { workspaceId: g || "" }
230
230
  });
231
- let [Gr, Kr] = m(!1), [qr, Jr] = m(!1), Yr = u(async () => {
231
+ let [Gr, Kr] = p(!1), [qr, Jr] = p(!1), Yr = l(async () => {
232
232
  Jr(!0);
233
233
  try {
234
234
  let e = await Rr(), t = e.data?.checkSessionHealth;
235
235
  if (e.error || !t) {
236
- Fe.error(e.error?.message || x("agentDetails.checkSessionHealthFailed", "Session health check failed"));
236
+ Le.error(e.error?.message || y("agentDetails.checkSessionHealthFailed", "Session health check failed"));
237
237
  return;
238
238
  }
239
239
  let n = {
240
240
  checked: t.checked,
241
241
  updated: t.updated
242
242
  };
243
- t.errors.length > 0 ? Fe.warning(x("agentDetails.checkSessionHealthPartial", "Checked {{checked}} sessions, {{updated}} marked stopped, but {{problems}} reported a problem", {
243
+ t.errors.length > 0 ? Le.warning(y("agentDetails.checkSessionHealthPartial", "Checked {{checked}} sessions, {{updated}} marked stopped, but {{problems}} reported a problem", {
244
244
  ...n,
245
245
  problems: t.errors.length
246
- }), t.errors.slice(0, 3).join("\n")) : Fe.success(x("agentDetails.checkSessionHealthDone", "Checked {{checked}} sessions, {{updated}} marked stopped", n));
246
+ }), t.errors.slice(0, 3).join("\n")) : Le.success(y("agentDetails.checkSessionHealthDone", "Checked {{checked}} sessions, {{updated}} marked stopped", n));
247
247
  } catch (e) {
248
- Fe.error(e instanceof Error ? e.message : x("agentDetails.checkSessionHealthFailed", "Session health check failed"));
248
+ Le.error(e instanceof Error ? e.message : y("agentDetails.checkSessionHealthFailed", "Session health check failed"));
249
249
  } finally {
250
250
  Jr(!1), Kr(!1);
251
251
  }
252
- }, [Rr, x]), { data: Xr, previousData: Zr, loading: Qr, error: $r, refetch: ei } = te({
252
+ }, [Rr, y]), { data: Xr, previousData: Zr, loading: Qr, error: $r, refetch: ei } = ne({
253
253
  variables: {
254
254
  filter: {
255
- status: C === "all" ? void 0 : C,
256
- type: w === "all" ? void 0 : w,
257
- vibeId: T !== "all" && T !== "none" ? T : void 0,
258
- agentId: E === "all" ? void 0 : E
255
+ status: x === "all" ? void 0 : x,
256
+ type: S === "all" ? void 0 : S,
257
+ vibeId: C !== "all" && C !== "none" ? C : void 0,
258
+ agentId: w === "all" ? void 0 : w
259
259
  },
260
260
  pagination: { limit: 50 }
261
261
  },
262
- fetchPolicy: C === "all" && w === "all" && T === "all" && E === "all" ? "cache-first" : "cache-and-network"
263
- }), ti = Xr ?? Zr, { agents: q, vibes: J } = be(), [ni, ri] = fe({
262
+ fetchPolicy: x === "all" && S === "all" && C === "all" && w === "all" ? "cache-first" : "cache-and-network"
263
+ }), ti = Xr ?? Zr, { agents: J, vibes: Y } = Se(), [ni, ri] = pe({
264
264
  fetchPolicy: "network-only",
265
265
  notifyOnNetworkStatusChange: !0
266
- }), { data: ii } = de(), ai = f(() => {
266
+ }), { data: ii } = fe(), ai = d(() => {
267
267
  let e = /* @__PURE__ */ new Map(), t = ii?.vibecontrolsAgentHealthProbeStream ?? ri.data?.vibecontrolsAgentHealthProbes ?? [];
268
268
  for (let n of t) e.set(n.agentId, {
269
269
  healthy: n.healthy,
270
270
  error: n.errorMessage ?? null
271
271
  });
272
272
  return e;
273
- }, [ri.data, ii]), oi = f(() => [
273
+ }, [ri.data, ii]), oi = d(() => [
274
274
  {
275
275
  value: "all",
276
- label: x("sessions.filterVibeAll", "All Vibes")
276
+ label: y("sessions.filterVibeAll", "All Vibes")
277
277
  },
278
278
  {
279
279
  value: "none",
280
- label: x("sessions.filterVibeNone", "No Vibe")
280
+ label: y("sessions.filterVibeNone", "No Vibe")
281
281
  },
282
- ...J.map((e) => ({
282
+ ...Y.map((e) => ({
283
283
  value: e.id,
284
284
  label: e.name
285
285
  }))
286
- ], [J, x]), si = f(() => [{
286
+ ], [Y, y]), si = d(() => [{
287
287
  value: "all",
288
- label: x("sessions.filterAgentAll", "All Agents")
289
- }, ...q.map((e) => ({
288
+ label: y("sessions.filterAgentAll", "All Agents")
289
+ }, ...J.map((e) => ({
290
290
  value: e.id,
291
- label: `${e.name} ${Pe(e) === "ACTIVE" ? "" : `(${x("sessions.offline", "Offline")})`}`
292
- }))], [q, x]), ci = f(() => [
291
+ label: `${e.name} ${Ie(e) === "ACTIVE" ? "" : `(${y("sessions.offline", "Offline")})`}`
292
+ }))], [J, y]), ci = d(() => [
293
293
  {
294
294
  value: "agent",
295
- label: x("sessions.groupBy.agent", "Agent")
295
+ label: y("sessions.groupBy.agent", "Agent")
296
296
  },
297
297
  {
298
298
  value: "target",
299
- label: x("sessions.groupBy.target", "Target")
299
+ label: y("sessions.groupBy.target", "Target")
300
300
  },
301
301
  {
302
302
  value: "vibe",
303
- label: x("sessions.groupBy.vibe", "Vibe")
303
+ label: y("sessions.groupBy.vibe", "Vibe")
304
304
  },
305
305
  {
306
306
  value: "status",
307
- label: x("sessions.groupBy.status", "Status")
307
+ label: y("sessions.groupBy.status", "Status")
308
308
  },
309
309
  {
310
310
  value: "type",
311
- label: x("sessions.groupBy.type", "Type")
311
+ label: y("sessions.groupBy.type", "Type")
312
312
  }
313
- ], [x]), li = f(() => [{
313
+ ], [y]), li = d(() => [{
314
314
  value: "",
315
- label: x("sessions.noVibe", "No vibe")
316
- }, ...J.map((e) => ({
315
+ label: y("sessions.noVibe", "No vibe")
316
+ }, ...Y.map((e) => ({
317
317
  value: e.id,
318
318
  label: e.name
319
- }))], [J, x]), ui = f(() => [{
319
+ }))], [Y, y]), ui = d(() => [{
320
320
  value: "",
321
- label: x("sessions.selectAgent", "Select an agent")
322
- }, ...q.map((e) => {
323
- let t = Pe(e) === "ACTIVE" ? x("sessions.active", "Active") : x("sessions.offline", "Offline");
321
+ label: y("sessions.selectAgent", "Select an agent")
322
+ }, ...J.map((e) => {
323
+ let t = Ie(e) === "ACTIVE" ? y("sessions.active", "Active") : y("sessions.offline", "Offline");
324
324
  return {
325
325
  value: e.id,
326
326
  label: `${e.name} (${t})`
327
327
  };
328
- })], [q, x]), { data: di } = ee({
329
- variables: { agentId: On },
330
- skip: !On,
328
+ })], [J, y]), { data: di } = te({
329
+ variables: { agentId: An },
330
+ skip: !An,
331
331
  fetchPolicy: "cache-and-network"
332
- }), fi = f(() => {
332
+ }), fi = d(() => {
333
333
  let e = (di?.vibecontrolsAgentProfiles ?? []).map((e) => ({
334
334
  value: e.name,
335
335
  label: e.status && e.status !== "ACTIVE" ? `${e.name} (${e.status})` : e.name
@@ -339,40 +339,40 @@ function Bt() {
339
339
  label: "default"
340
340
  }, ...e];
341
341
  }, [di]);
342
- d(() => {
343
- jn("default");
344
- }, [On]);
345
- let pi = f(() => [
342
+ u(() => {
343
+ Nn("default");
344
+ }, [An]);
345
+ let pi = d(() => [
346
346
  {
347
347
  value: "TMUX",
348
- label: x("sessions.typeTmuxLower", "tmux")
348
+ label: y("sessions.typeTmuxLower", "tmux")
349
349
  },
350
350
  {
351
351
  value: "WEZTERM",
352
- label: x("sessions.typeWezTerm", "WezTerm")
352
+ label: y("sessions.typeWezTerm", "WezTerm")
353
353
  },
354
354
  {
355
355
  value: "ZELLIJ",
356
- label: x("sessions.typeZellij", "Zellij")
356
+ label: y("sessions.typeZellij", "Zellij")
357
357
  },
358
358
  {
359
359
  value: "TERMINAL",
360
- label: x("sessions.typeTerminal", "Terminal")
360
+ label: y("sessions.typeTerminal", "Terminal")
361
361
  },
362
362
  {
363
363
  value: "SSH",
364
- label: x("sessions.typeSsh", "SSH")
364
+ label: y("sessions.typeSsh", "SSH")
365
365
  },
366
366
  {
367
367
  value: "SCRIPT",
368
- label: x("sessions.typeScript", "Script")
368
+ label: y("sessions.typeScript", "Script")
369
369
  },
370
370
  {
371
371
  value: "CUSTOM",
372
- label: x("sessions.typeCustom", "Custom")
372
+ label: y("sessions.typeCustom", "Custom")
373
373
  }
374
- ], [x]), Y = f(() => (ti?.sessions?.items ?? []).map((e) => {
375
- let t = Rt(e.ttydUrl || null, e.agent?.tunnelUrl || null);
374
+ ], [y]), X = d(() => (ti?.sessions?.items ?? []).map((e) => {
375
+ let t = Bt(e.ttydUrl || null, e.agent?.tunnelUrl || null);
376
376
  return {
377
377
  id: e.id,
378
378
  workspaceId: e.workspaceId,
@@ -381,7 +381,7 @@ function Bt() {
381
381
  profile: e.profile ?? "default",
382
382
  name: e.name,
383
383
  type: e.type,
384
- status: zt(e.status, e.ttydUrl || null, t, e.agent ? Pe(e.agent) === "ACTIVE" : void 0),
384
+ status: Vt(e.status, e.ttydUrl || null, t, e.agent ? Ie(e.agent) === "ACTIVE" : void 0),
385
385
  command: e.command || null,
386
386
  workingDirectory: e.workingDirectory || null,
387
387
  environmentVariables: e.environmentVariables || {},
@@ -418,104 +418,104 @@ function Bt() {
418
418
  } : null
419
419
  } : void 0
420
420
  };
421
- }), [ti?.sessions?.items]), mi = f(() => {
421
+ }), [ti?.sessions?.items]), mi = d(() => {
422
422
  let e = /* @__PURE__ */ new Map();
423
- for (let t of Y) {
423
+ for (let t of X) {
424
424
  let n = t.agent?.target;
425
425
  n && !e.has(n.id) && e.set(n.id, n.name);
426
426
  }
427
427
  return [{
428
428
  value: "all",
429
- label: x("sessions.filterTargetAll", "All Targets")
429
+ label: y("sessions.filterTargetAll", "All Targets")
430
430
  }, ...Array.from(e.entries()).map(([e, t]) => ({
431
431
  value: e,
432
432
  label: t
433
433
  }))];
434
- }, [Y, x]);
435
- jt(f(() => ({
436
- page: x("vibecontrols.assistant.page.sessions", "Sessions"),
437
- tabs: Ft({
434
+ }, [X, y]);
435
+ Nt(d(() => ({
436
+ page: y("vibecontrols.assistant.page.sessions", "Sessions"),
437
+ tabs: Lt({
438
438
  items: [
439
439
  {
440
440
  id: "terminal",
441
- label: x("sessions.terminalViewTitle", "Terminal view")
441
+ label: y("sessions.terminalViewTitle", "Terminal view")
442
442
  },
443
443
  {
444
444
  id: "grid",
445
- label: x("sessions.gridViewTitle", "Grid view")
445
+ label: y("sessions.gridViewTitle", "Grid view")
446
446
  },
447
447
  {
448
448
  id: "list",
449
- label: x("sessions.listViewTitle", "List view")
449
+ label: y("sessions.listViewTitle", "List view")
450
450
  }
451
451
  ],
452
- value: A,
453
- set: j
452
+ value: O,
453
+ set: k
454
454
  }),
455
- ...A === "terminal" ? {} : {
456
- filters: Nt([
457
- Mt({
455
+ ...O === "terminal" ? {} : {
456
+ filters: Ft([
457
+ Pt({
458
458
  id: "status",
459
- label: x("sessions.filterStatus", "Status"),
460
- options: qt,
459
+ label: y("sessions.filterStatus", "Status"),
460
+ options: Xt,
461
461
  neutral: "all",
462
- value: C,
463
- set: $t
462
+ value: x,
463
+ set: nn
464
464
  }),
465
- Mt({
465
+ Pt({
466
466
  id: "type",
467
- label: x("sessions.filterType", "Type"),
468
- options: Jt,
467
+ label: y("sessions.filterType", "Type"),
468
+ options: Zt,
469
469
  neutral: "all",
470
- value: w,
471
- set: en
470
+ value: S,
471
+ set: rn
472
472
  }),
473
- Mt({
473
+ Pt({
474
474
  id: "vibe",
475
- label: x("sessions.filterVibe", "Vibe"),
475
+ label: y("sessions.filterVibe", "Vibe"),
476
476
  options: oi,
477
477
  neutral: "all",
478
- value: T,
479
- set: tn
478
+ value: C,
479
+ set: an
480
480
  }),
481
- Mt({
481
+ Pt({
482
482
  id: "agent",
483
- label: x("sessions.filterAgent", "Agent"),
483
+ label: y("sessions.filterAgent", "Agent"),
484
484
  options: si,
485
485
  neutral: "all",
486
- value: E,
487
- set: nn
486
+ value: w,
487
+ set: on
488
488
  }),
489
- Mt({
489
+ Pt({
490
490
  id: "target",
491
- label: x("sessions.filterTarget", "Target"),
491
+ label: y("sessions.filterTarget", "Target"),
492
492
  options: mi,
493
493
  neutral: "all",
494
- value: D,
495
- set: rn
494
+ value: T,
495
+ set: sn
496
496
  })
497
497
  ]),
498
- search: Pt(Qt)
498
+ search: It(tn)
499
499
  }
500
500
  }), [
501
- x,
502
- A,
503
- qt,
504
- Jt,
501
+ y,
502
+ O,
503
+ Xt,
504
+ Zt,
505
505
  oi,
506
506
  si,
507
507
  mi,
508
+ x,
509
+ S,
508
510
  C,
509
511
  w,
510
- T,
511
- E,
512
- D
513
- ])), d(() => {
514
- Ur.current || Y.length === 0 || B.length === 0 || (Ur.current = !0, Promise.allSettled(B.map(async (e) => {
515
- let t = Y.find((t) => t.id === e.sessionId);
512
+ T
513
+ ])), u(() => {
514
+ Ur.current || X.length === 0 || V.length === 0 || (Ur.current = !0, Promise.allSettled(V.map(async (e) => {
515
+ let t = X.find((t) => t.id === e.sessionId);
516
516
  if (t) try {
517
- let n = await K({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = Rt(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
518
- V((n) => n.map((n) => n.sessionId === e.sessionId ? {
517
+ let n = await q({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = Bt(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
518
+ H((n) => n.map((n) => n.sessionId === e.sessionId ? {
519
519
  ...n,
520
520
  terminalUrl: i,
521
521
  agentId: t.agent?.id ?? n.agentId ?? null,
@@ -523,7 +523,7 @@ function Bt() {
523
523
  error: null
524
524
  } : n));
525
525
  } catch (n) {
526
- console.warn("[sessions] tab restore startSessionTerminal failed", n), V((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
526
+ console.warn("[sessions] tab restore startSessionTerminal failed", n), H((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
527
527
  ...n,
528
528
  terminalUrl: t.ttydUrl,
529
529
  agentId: t.agent?.id ?? n.agentId ?? null,
@@ -532,11 +532,11 @@ function Bt() {
532
532
  }
533
533
  })));
534
534
  }, [
535
- Y,
536
- B,
537
- K
538
- ]), d(() => {
539
- if (!G || !z) {
535
+ X,
536
+ V,
537
+ q
538
+ ]), u(() => {
539
+ if (!K || !z) {
540
540
  Wr.current = z;
541
541
  return;
542
542
  }
@@ -546,8 +546,8 @@ function Bt() {
546
546
  }
547
547
  if (Wr.current === z) return;
548
548
  Wr.current = z;
549
- let e = Y.find((e) => e.id === z);
550
- if (e) if (B.find((e) => e.sessionId === z)) U(z), ir(!1);
549
+ let e = X.find((e) => e.id === z);
550
+ if (e) if (V.find((e) => e.sessionId === z)) W(z), ir(!1);
551
551
  else {
552
552
  let t = e.ttydUrl || null, n = {
553
553
  sessionId: e.id,
@@ -558,17 +558,17 @@ function Bt() {
558
558
  loading: !t,
559
559
  error: null
560
560
  };
561
- V((e) => [...e, n]), U(z), ir(!1), t || K({ variables: { id: e.id } }).then((t) => {
561
+ H((e) => [...e, n]), W(z), ir(!1), t || q({ variables: { id: e.id } }).then((t) => {
562
562
  let n = t.data?.startSessionTerminal?.ttydUrl || null;
563
- V((t) => t.map((t) => t.sessionId === e.id ? {
563
+ H((t) => t.map((t) => t.sessionId === e.id ? {
564
564
  ...t,
565
565
  terminalUrl: n,
566
566
  loading: !1,
567
- error: n ? null : x("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
567
+ error: n ? null : y("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
568
568
  } : t));
569
569
  }).catch((t) => {
570
- let n = t instanceof Error ? t.message : x("sessions.failedStartTerminal", "Failed to start terminal");
571
- V((t) => t.map((t) => t.sessionId === e.id ? {
570
+ let n = t instanceof Error ? t.message : y("sessions.failedStartTerminal", "Failed to start terminal");
571
+ H((t) => t.map((t) => t.sessionId === e.id ? {
572
572
  ...t,
573
573
  loading: !1,
574
574
  error: n
@@ -577,125 +577,125 @@ function Bt() {
577
577
  }
578
578
  }, [
579
579
  z,
580
- Y,
581
- B,
582
- G,
583
- K
580
+ X,
581
+ V,
582
+ K,
583
+ q
584
584
  ]);
585
- let X = f(() => Y.filter((e) => {
586
- if (S) {
587
- let t = S.toLowerCase();
585
+ let Z = d(() => X.filter((e) => {
586
+ if (b) {
587
+ let t = b.toLowerCase();
588
588
  if (!(e.name.toLowerCase().includes(t) || e.command?.toLowerCase().includes(t) || e.workingDirectory?.toLowerCase().includes(t))) return !1;
589
589
  }
590
- return !(T === "none" && e.vibeId || D !== "all" && e.agent?.target?.id !== D);
590
+ return !(C === "none" && e.vibeId || T !== "all" && e.agent?.target?.id !== T);
591
591
  }), [
592
- Y,
593
- S,
594
- T,
595
- D
596
- ]), hi = f(() => Ke(X, O), [X, O]), gi = u((e) => {
597
- L((t) => {
592
+ X,
593
+ b,
594
+ C,
595
+ T
596
+ ]), hi = d(() => Je(Z, E), [Z, E]), gi = l((e) => {
597
+ F((t) => {
598
598
  let n = new Set(t);
599
599
  return n.has(e) ? n.delete(e) : n.add(e), n;
600
600
  });
601
- }, []), _i = u(() => {
602
- L(new Set(X.map((e) => e.id)));
603
- }, [X]), vi = u(() => {
604
- L(/* @__PURE__ */ new Set());
605
- }, []), yi = u((e) => {
606
- L((t) => {
601
+ }, []), _i = l(() => {
602
+ F(new Set(Z.map((e) => e.id)));
603
+ }, [Z]), vi = l(() => {
604
+ F(/* @__PURE__ */ new Set());
605
+ }, []), yi = l((e) => {
606
+ F((t) => {
607
607
  let n = new Set(t);
608
608
  return e.length > 0 && e.every((e) => n.has(e)) ? e.forEach((e) => n.delete(e)) : e.forEach((e) => n.add(e)), n;
609
609
  });
610
- }, []), bi = u((e) => {
611
- on((t) => {
610
+ }, []), bi = l((e) => {
611
+ ln((t) => {
612
612
  let n = new Set(t);
613
613
  return n.has(e) ? n.delete(e) : n.add(e), n;
614
614
  });
615
- }, []), xi = X.length > 0 && I.size === X.length, Si = I.size > 0, Ci = u(async () => {
616
- if (I.size !== 0) {
617
- _n(!0);
615
+ }, []), xi = Z.length > 0 && P.size === Z.length, Si = P.size > 0, Ci = l(async () => {
616
+ if (P.size !== 0) {
617
+ I(!0);
618
618
  try {
619
- let e = (await zr({ variables: { ids: Array.from(I) } })).data?.bulkStopSessions;
620
- F(`${x("sessions.stopped", "Stopped")} ${e?.succeeded ?? 0} ${x("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${x("sessions.failed", "failed")}` : ""}`), L(/* @__PURE__ */ new Set()), setTimeout(() => F(null), 3e3);
619
+ let e = (await zr({ variables: { ids: Array.from(P) } })).data?.bulkStopSessions;
620
+ N(`${y("sessions.stopped", "Stopped")} ${e?.succeeded ?? 0} ${y("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${y("sessions.failed", "failed")}` : ""}`), F(/* @__PURE__ */ new Set()), setTimeout(() => N(null), 3e3);
621
621
  } catch (e) {
622
- F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => F(null), 5e3);
622
+ N(`${y("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : y("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => N(null), 5e3);
623
623
  } finally {
624
- _n(!1);
624
+ I(!1);
625
625
  }
626
626
  }
627
627
  }, [
628
- I,
628
+ P,
629
629
  zr,
630
- x
631
- ]), wi = u(async () => {
632
- if (I.size !== 0) {
633
- _n(!0);
630
+ y
631
+ ]), wi = l(async () => {
632
+ if (P.size !== 0) {
633
+ I(!0);
634
634
  try {
635
- let e = (await Br({ variables: { ids: Array.from(I) } })).data?.bulkRestartSessions;
636
- F(`${x("sessions.restarted", "Restarted")} ${e?.succeeded ?? 0} ${x("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${x("sessions.failed", "failed")}` : ""}`), L(/* @__PURE__ */ new Set()), setTimeout(() => F(null), 3e3);
635
+ let e = (await Br({ variables: { ids: Array.from(P) } })).data?.bulkRestartSessions;
636
+ N(`${y("sessions.restarted", "Restarted")} ${e?.succeeded ?? 0} ${y("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${y("sessions.failed", "failed")}` : ""}`), F(/* @__PURE__ */ new Set()), setTimeout(() => N(null), 3e3);
637
637
  } catch (e) {
638
- F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => F(null), 5e3);
638
+ N(`${y("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : y("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => N(null), 5e3);
639
639
  } finally {
640
- _n(!1);
640
+ I(!1);
641
641
  }
642
642
  }
643
643
  }, [
644
- I,
644
+ P,
645
645
  Br,
646
- x
647
- ]), Ti = u(async () => {
648
- if (I.size !== 0 && confirm(`${x("sessions.confirmRemovePrefix", "Are you sure you want to remove")} ${I.size} ${x("nav.sessions", "session(s)")}? ${x("sessions.confirmRemoveSuffix", "This cannot be undone.")}`)) {
649
- _n(!0);
646
+ y
647
+ ]), Ti = l(async () => {
648
+ if (P.size !== 0 && confirm(`${y("sessions.confirmRemovePrefix", "Are you sure you want to remove")} ${P.size} ${y("nav.sessions", "session(s)")}? ${y("sessions.confirmRemoveSuffix", "This cannot be undone.")}`)) {
649
+ I(!0);
650
650
  try {
651
- let e = (await Vr({ variables: { ids: Array.from(I) } })).data?.bulkTerminateSessions;
652
- F(`${x("sessions.removed", "Removed")} ${e?.succeeded ?? 0} ${x("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${x("sessions.failed", "failed")}` : ""}`), L(/* @__PURE__ */ new Set()), setTimeout(() => F(null), 3e3);
651
+ let e = (await Vr({ variables: { ids: Array.from(P) } })).data?.bulkTerminateSessions;
652
+ N(`${y("sessions.removed", "Removed")} ${e?.succeeded ?? 0} ${y("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${y("sessions.failed", "failed")}` : ""}`), F(/* @__PURE__ */ new Set()), setTimeout(() => N(null), 3e3);
653
653
  } catch (e) {
654
- F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => F(null), 5e3);
654
+ N(`${y("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : y("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => N(null), 5e3);
655
655
  } finally {
656
- _n(!1);
656
+ I(!1);
657
657
  }
658
658
  }
659
659
  }, [
660
- I,
660
+ P,
661
661
  Vr,
662
- x
663
- ]), Ei = u(async (e = "CSV") => {
664
- yn(!0);
662
+ y
663
+ ]), Ei = l(async (e = "CSV") => {
664
+ xn(!0);
665
665
  try {
666
666
  let t = (await Hr({ variables: { input: {
667
667
  filter: {
668
- status: C === "all" ? void 0 : C,
669
- type: w === "all" ? void 0 : w,
670
- vibeId: T !== "all" && T !== "none" ? T : void 0,
671
- agentId: E === "all" ? void 0 : E
668
+ status: x === "all" ? void 0 : x,
669
+ type: S === "all" ? void 0 : S,
670
+ vibeId: C !== "all" && C !== "none" ? C : void 0,
671
+ agentId: w === "all" ? void 0 : w
672
672
  },
673
673
  format: e
674
674
  } } })).data?.exportSessions;
675
675
  if (!t) return;
676
676
  let n = e === "CSV" ? "text/csv" : "application/json", r = new Blob([t.data], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
677
- a.href = i, a.download = `sessions-export-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.${e.toLowerCase()}`, a.click(), URL.revokeObjectURL(i), F(x("sessions.exportSuccess", "Exported {{count}} sessions as {{format}}", {
677
+ a.href = i, a.download = `sessions-export-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.${e.toLowerCase()}`, a.click(), URL.revokeObjectURL(i), N(y("sessions.exportSuccess", "Exported {{count}} sessions as {{format}}", {
678
678
  count: t.count,
679
679
  format: e
680
- })), setTimeout(() => F(null), 3e3);
680
+ })), setTimeout(() => N(null), 3e3);
681
681
  } catch (e) {
682
- F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedExport", "Failed to export sessions")}`), setTimeout(() => F(null), 5e3);
682
+ N(`${y("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : y("sessions.failedExport", "Failed to export sessions")}`), setTimeout(() => N(null), 5e3);
683
683
  } finally {
684
- yn(!1);
684
+ xn(!1);
685
685
  }
686
686
  }, [
687
687
  Hr,
688
+ x,
689
+ S,
688
690
  C,
689
691
  w,
690
- T,
691
- E,
692
- x
692
+ y
693
693
  ]), Di = (e) => {
694
- y(`/sessions/${e.id}`);
694
+ v(`/sessions/${e.id}`);
695
695
  }, Oi = () => {
696
- P(null), M(!0), v.emitCustom("vibecontrols.session.create_clicked", { workspaceId: _ ?? void 0 });
696
+ M(null), A(!0), _.emitCustom("vibecontrols.session.create_clicked", { workspaceId: g ?? void 0 });
697
697
  }, ki = async (e) => {
698
- mn(!0), P(null);
698
+ _n(!0), M(null);
699
699
  try {
700
700
  let t = await gr({ variables: { input: {
701
701
  name: e.name,
@@ -707,17 +707,17 @@ function Bt() {
707
707
  autoStart: e.autoStart,
708
708
  externalSessionName: e.externalSessionName
709
709
  } } });
710
- if (t.error && c(t.error)) {
711
- M(!1), l(), N(!0), v.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: _ ?? void 0 });
710
+ if (t.error && s(t.error)) {
711
+ A(!1), c(), j(!0), _.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: g ?? void 0 });
712
712
  return;
713
713
  }
714
714
  if (t.error) {
715
- P(t.error.message || x("sessions.failedCreate", "Failed to create session"));
715
+ M(t.error.message || y("sessions.failedCreate", "Failed to create session"));
716
716
  return;
717
717
  }
718
718
  let n = t.data?.createSession?.id;
719
719
  if (!n) {
720
- P(x("sessions.failedCreate", "Failed to create session"));
720
+ M(y("sessions.failedCreate", "Failed to create session"));
721
721
  return;
722
722
  }
723
723
  if (Zn({
@@ -725,12 +725,12 @@ function Bt() {
725
725
  vibeId: e.vibeId || null,
726
726
  sessionType: e.type,
727
727
  profile: e.profile?.trim() || "default"
728
- }), M(!1), F(x("sessions.createdSuccess", "Session created successfully")), v.emitCustom("vibecontrols.session.created", {
729
- workspaceId: _ ?? void 0,
728
+ }), A(!1), N(y("sessions.createdSuccess", "Session created successfully")), _.emitCustom("vibecontrols.session.created", {
729
+ workspaceId: g ?? void 0,
730
730
  sessionId: n
731
- }), e.fromModal && await vr(n), setTimeout(() => F(null), 3e3), t.data?.createSession) {
732
- let e = t.data.createSession, n = e.agentId ? q.find((t) => t.id === e.agentId) : null;
733
- Z({
731
+ }), e.fromModal && await vr(n), setTimeout(() => N(null), 3e3), t.data?.createSession) {
732
+ let e = t.data.createSession, n = e.agentId ? J.find((t) => t.id === e.agentId) : null;
733
+ Q({
734
734
  id: e.id,
735
735
  workspaceId: e.workspaceId,
736
736
  vibeId: e.vibeId || null,
@@ -761,64 +761,64 @@ function Bt() {
761
761
  });
762
762
  }
763
763
  } catch (e) {
764
- if (c(e)) {
765
- M(!1), l(), N(!0), v.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: _ ?? void 0 });
764
+ if (s(e)) {
765
+ A(!1), c(), j(!0), _.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: g ?? void 0 });
766
766
  return;
767
767
  }
768
- P(e instanceof Error ? e.message : x("sessions.failedCreate", "Failed to create session"));
768
+ M(e instanceof Error ? e.message : y("sessions.failedCreate", "Failed to create session"));
769
769
  } finally {
770
- mn(!1);
770
+ _n(!1);
771
771
  }
772
772
  }, Ai = async () => {
773
- let e = Sn.current?.value?.trim(), t = En, n = On, r = R, i = Cn.current?.value?.trim(), a = wn.current?.checked ?? !1;
773
+ let e = wn.current?.value?.trim(), t = On, n = An, r = L, i = Tn.current?.value?.trim(), a = En.current?.checked ?? !1;
774
774
  if (!e) {
775
- P(x("sessions.nameRequired", "Name is required"));
775
+ M(y("sessions.nameRequired", "Name is required"));
776
776
  return;
777
777
  }
778
- let o = J.find((e) => e.id === t)?.agents ?? [], s = null;
779
- if (n && (!t || o.some((e) => e.id === n)) ? s = n : o.length === 1 && (s = o[0]?.id ?? null), !s) {
780
- P(t && o.length === 0 ? x("sessions.noAgentAttached", "This vibe has no agents attached. Attach one from the Vibe → Agents tab before creating sessions.") : t && o.length > 1 ? x("sessions.pickAgentFromVibe", "This vibe has multiple agents attached. Pick one before creating the session.") : x("sessions.agentRequired", "Please select an agent for this session."));
778
+ let o = Y.find((e) => e.id === t)?.agents ?? [], ee = null;
779
+ if (n && (!t || o.some((e) => e.id === n)) ? ee = n : o.length === 1 && (ee = o[0]?.id ?? null), !ee) {
780
+ M(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."));
781
781
  return;
782
782
  }
783
- let ee = ai.get(s);
784
- if (ee && !ee.healthy) {
785
- P(x("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (ee.error ? ` (${ee.error})` : ""));
783
+ let te = ai.get(ee);
784
+ if (te && !te.healthy) {
785
+ M(y("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (te.error ? ` (${te.error})` : ""));
786
786
  return;
787
787
  }
788
- let te = Tn.current?.value?.trim() || void 0;
788
+ let ne = Dn.current?.value?.trim() || void 0;
789
789
  await ki({
790
790
  name: e,
791
791
  type: r || "TMUX",
792
792
  command: i || void 0,
793
793
  vibeId: t || void 0,
794
- agentId: s,
795
- profile: An?.trim() || "default",
794
+ agentId: ee,
795
+ profile: Mn?.trim() || "default",
796
796
  autoStart: a,
797
- externalSessionName: te,
797
+ externalSessionName: ne,
798
798
  fromModal: !0
799
799
  });
800
800
  }, ji = () => {
801
- P(null);
801
+ M(null);
802
802
  let e = (e) => {
803
803
  let t = ai.get(e);
804
804
  return !t || t.healthy;
805
- }, t = qn && q.some((e) => e.id === qn) ? qn : null, n = null;
805
+ }, t = Jn && J.some((e) => e.id === Jn) ? Jn : null, n = null;
806
806
  if (t && e(t)) n = t;
807
807
  else {
808
- let t = q.filter((t) => e(t.id));
808
+ let t = J.filter((t) => e(t.id));
809
809
  n = (t.find((e) => e.isActive) ?? t[0])?.id ?? null;
810
810
  }
811
811
  if (!n) {
812
- t && kn(t), Jn && J.some((e) => e.id === Jn) && Dn(Jn), Mn(Yn || "TMUX"), jn(Xn || "default"), M(!0), v.emitCustom("vibecontrols.session.create_clicked", { workspaceId: _ ?? void 0 });
812
+ t && jn(t), B && Y.some((e) => e.id === B) && kn(B), Pn(Yn || "TMUX"), Nn(Xn || "default"), A(!0), _.emitCustom("vibecontrols.session.create_clicked", { workspaceId: g ?? void 0 });
813
813
  return;
814
814
  }
815
815
  let r;
816
- if (Jn) {
817
- let e = J.find((e) => e.id === Jn);
818
- e && (e.agents ?? []).some((e) => e.id === n) && (r = Jn);
816
+ if (B) {
817
+ let e = Y.find((e) => e.id === B);
818
+ e && (e.agents ?? []).some((e) => e.id === n) && (r = B);
819
819
  }
820
820
  ki({
821
- name: Ze(),
821
+ name: $e(),
822
822
  type: Yn || "TMUX",
823
823
  vibeId: r,
824
824
  agentId: n,
@@ -828,18 +828,18 @@ function Bt() {
828
828
  });
829
829
  }, Mi = async (e) => {
830
830
  try {
831
- await jr({ variables: { id: e.id } }), Vt?.({
831
+ await jr({ variables: { id: e.id } }), Ut?.({
832
832
  id: e.id,
833
833
  name: e.name,
834
834
  type: e.type,
835
835
  status: "RUNNING"
836
- }), v.emitCustom("vibecontrols.session.started", {
837
- workspaceId: _ ?? void 0,
836
+ }), _.emitCustom("vibecontrols.session.started", {
837
+ workspaceId: g ?? void 0,
838
838
  sessionId: e.id
839
839
  });
840
840
  } catch (e) {
841
- if (c(e)) {
842
- l(), N(!0), v.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: _ ?? void 0 });
841
+ if (s(e)) {
842
+ c(), j(!0), _.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: g ?? void 0 });
843
843
  return;
844
844
  }
845
845
  console.error("Failed to start session:", e);
@@ -854,8 +854,8 @@ function Bt() {
854
854
  try {
855
855
  await Nr({ variables: { id: e.id } });
856
856
  } catch (e) {
857
- if (c(e)) {
858
- l(), N(!0);
857
+ if (s(e)) {
858
+ c(), j(!0);
859
859
  return;
860
860
  }
861
861
  console.error("Failed to restart session:", e);
@@ -866,11 +866,11 @@ function Bt() {
866
866
  } catch (e) {
867
867
  console.error("Failed to terminate session:", e);
868
868
  }
869
- }, Ii = u((e) => e.ttydUrl || null, []), Li = u((e) => {
869
+ }, Ii = l((e) => e.ttydUrl || null, []), Li = l((e) => {
870
870
  cr(e);
871
- }, []), Z = u(async (e) => {
872
- if (B.find((t) => t.sessionId === e.id)?.terminalUrl) {
873
- U(e.id), ir(!1);
871
+ }, []), Q = l(async (e) => {
872
+ if (V.find((t) => t.sessionId === e.id)?.terminalUrl) {
873
+ W(e.id), ir(!1);
874
874
  return;
875
875
  }
876
876
  let t = Ii(e);
@@ -884,7 +884,7 @@ function Bt() {
884
884
  loading: !1,
885
885
  error: null
886
886
  };
887
- V((t) => [...t.filter((t) => t.sessionId !== e.id), n]), U(e.id), ir(!1);
887
+ H((t) => [...t.filter((t) => t.sessionId !== e.id), n]), W(e.id), ir(!1);
888
888
  return;
889
889
  }
890
890
  let n = {
@@ -895,194 +895,194 @@ function Bt() {
895
895
  loading: !0,
896
896
  error: null
897
897
  };
898
- V((t) => [...t.filter((t) => t.sessionId !== e.id), n]), U(e.id), ir(!1);
898
+ H((t) => [...t.filter((t) => t.sessionId !== e.id), n]), W(e.id), ir(!1);
899
899
  try {
900
- let t = await K({ variables: { id: e.id } });
901
- if (t.error && c(t.error)) {
902
- let t = B.filter((t) => t.sessionId !== e.id);
903
- V(t), H === e.id && U(t.length > 0 ? t[t.length - 1].sessionId : null), l(), N(!0);
900
+ let t = await q({ variables: { id: e.id } });
901
+ if (t.error && s(t.error)) {
902
+ let t = V.filter((t) => t.sessionId !== e.id);
903
+ H(t), U === e.id && W(t.length > 0 ? t[t.length - 1].sessionId : null), c(), j(!0);
904
904
  return;
905
905
  }
906
906
  if (t.error) {
907
- let n = t.error.message || x("sessions.failedStartTerminal", "Failed to start terminal");
908
- V((t) => t.map((t) => t.sessionId === e.id ? {
907
+ let n = t.error.message || y("sessions.failedStartTerminal", "Failed to start terminal");
908
+ H((t) => t.map((t) => t.sessionId === e.id ? {
909
909
  ...t,
910
910
  loading: !1,
911
911
  error: n
912
912
  } : t));
913
913
  return;
914
914
  }
915
- let n = Rt(t.data?.startSessionTerminal?.ttydUrl || null, Y.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
916
- V((t) => t.map((t) => t.sessionId === e.id ? {
915
+ let n = Bt(t.data?.startSessionTerminal?.ttydUrl || null, X.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
916
+ H((t) => t.map((t) => t.sessionId === e.id ? {
917
917
  ...t,
918
918
  terminalUrl: n,
919
919
  loading: !1,
920
- error: n ? null : x("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
920
+ error: n ? null : y("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
921
921
  } : t));
922
922
  } catch (t) {
923
- if (c(t)) {
924
- let t = B.filter((t) => t.sessionId !== e.id);
925
- V(t), H === e.id && U(t.length > 0 ? t[t.length - 1].sessionId : null), l(), N(!0);
923
+ if (s(t)) {
924
+ let t = V.filter((t) => t.sessionId !== e.id);
925
+ H(t), U === e.id && W(t.length > 0 ? t[t.length - 1].sessionId : null), c(), j(!0);
926
926
  return;
927
927
  }
928
- let n = t instanceof Error ? t.message : x("sessions.failedStartTerminal", "Failed to start terminal");
929
- V((t) => t.map((t) => t.sessionId === e.id ? {
928
+ let n = t instanceof Error ? t.message : y("sessions.failedStartTerminal", "Failed to start terminal");
929
+ H((t) => t.map((t) => t.sessionId === e.id ? {
930
930
  ...t,
931
931
  loading: !1,
932
932
  error: n
933
933
  } : t));
934
934
  }
935
935
  }, [
936
- H,
937
- B,
936
+ U,
937
+ V,
938
938
  Ii,
939
- K
939
+ q
940
940
  ]);
941
- d(() => {
942
- if (!G || !H || B.some((e) => e.sessionId === H)) return;
943
- let e = Y.find((e) => e.id === H);
944
- e && Z(e);
941
+ u(() => {
942
+ if (!K || !U || V.some((e) => e.sessionId === U)) return;
943
+ let e = X.find((e) => e.id === U);
944
+ e && Q(e);
945
945
  }, [
946
- H,
947
- Z,
948
- Y,
949
- B,
950
- G
946
+ U,
947
+ Q,
948
+ X,
949
+ V,
950
+ K
951
951
  ]);
952
- let Ri = u((e) => {
953
- V((t) => t.filter((t) => t.sessionId !== e)), H === e && U(() => {
954
- let t = B.filter((t) => t.sessionId !== e);
952
+ let Ri = l((e) => {
953
+ H((t) => t.filter((t) => t.sessionId !== e)), U === e && W(() => {
954
+ let t = V.filter((t) => t.sessionId !== e);
955
955
  return t.length > 0 ? t[t.length - 1].sessionId : null;
956
956
  });
957
- }, [H, B]), zi = u((e) => {
958
- let t = B.find((t) => t.sessionId === e);
959
- t?.terminalUrl && (v.emitCustom("vibecontrols.session.terminal_opened_in_browser", {
960
- workspaceId: _ ?? void 0,
957
+ }, [U, V]), zi = l((e) => {
958
+ let t = V.find((t) => t.sessionId === e);
959
+ t?.terminalUrl && (_.emitCustom("vibecontrols.session.terminal_opened_in_browser", {
960
+ workspaceId: g ?? void 0,
961
961
  sessionId: e
962
962
  }), window.open(t.terminalUrl, "_blank"));
963
963
  }, [
964
- B,
965
- _,
966
- v
967
- ]), Bi = u(async (e, t) => {
964
+ V,
965
+ g,
966
+ _
967
+ ]), Bi = l(async (e, t) => {
968
968
  try {
969
969
  await Ir({ variables: {
970
970
  id: e,
971
971
  input: { name: t }
972
- } }), V((n) => n.map((n) => n.sessionId === e ? {
972
+ } }), H((n) => n.map((n) => n.sessionId === e ? {
973
973
  ...n,
974
974
  name: t
975
975
  } : n));
976
976
  } catch (e) {
977
977
  console.error("Failed to rename session:", e);
978
978
  }
979
- }, [Ir]), Vi = u(async (e) => {
979
+ }, [Ir]), Vi = l(async (e) => {
980
980
  try {
981
- await Pr({ variables: { id: e } }), V((t) => t.map((t) => t.sessionId === e ? {
981
+ await Pr({ variables: { id: e } }), H((t) => t.map((t) => t.sessionId === e ? {
982
982
  ...t,
983
983
  terminalUrl: null,
984
- error: x("sessions.terminalStopped", "Terminal stopped")
984
+ error: y("sessions.terminalStopped", "Terminal stopped")
985
985
  } : t));
986
986
  } catch (e) {
987
987
  console.error("Failed to stop terminal:", e);
988
988
  }
989
- }, [Pr]), Hi = u(async (e) => {
990
- let t = B.find((t) => t.sessionId === e) || null;
989
+ }, [Pr]), Hi = l(async (e) => {
990
+ let t = V.find((t) => t.sessionId === e) || null;
991
991
  try {
992
- V((t) => t.map((t) => t.sessionId === e ? {
992
+ H((t) => t.map((t) => t.sessionId === e ? {
993
993
  ...t,
994
994
  loading: !0,
995
995
  error: null,
996
996
  terminalUrl: null
997
997
  } : t));
998
998
  let n = await Fr({ variables: { id: e } });
999
- if (n.error && c(n.error)) {
1000
- V((n) => n.map((n) => n.sessionId === e ? {
999
+ if (n.error && s(n.error)) {
1000
+ H((n) => n.map((n) => n.sessionId === e ? {
1001
1001
  ...n,
1002
1002
  loading: !1,
1003
1003
  error: null,
1004
1004
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
1005
- } : n)), l(), N(!0);
1005
+ } : n)), c(), j(!0);
1006
1006
  return;
1007
1007
  }
1008
1008
  let r = n.data?.restartSessionTerminal?.ttydUrl || null;
1009
- V((t) => t.map((t) => t.sessionId === e ? {
1009
+ H((t) => t.map((t) => t.sessionId === e ? {
1010
1010
  ...t,
1011
1011
  terminalUrl: r,
1012
1012
  loading: !1,
1013
- error: r ? null : x("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
1013
+ error: r ? null : y("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
1014
1014
  } : t));
1015
1015
  } catch (n) {
1016
- if (c(n)) {
1017
- V((n) => n.map((n) => n.sessionId === e ? {
1016
+ if (s(n)) {
1017
+ H((n) => n.map((n) => n.sessionId === e ? {
1018
1018
  ...n,
1019
1019
  loading: !1,
1020
1020
  error: null,
1021
1021
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
1022
- } : n)), l(), N(!0);
1022
+ } : n)), c(), j(!0);
1023
1023
  return;
1024
1024
  }
1025
- let r = n instanceof Error ? n.message : x("sessions.failedRestartTerminal", "Failed to restart terminal");
1026
- V((t) => t.map((t) => t.sessionId === e ? {
1025
+ let r = n instanceof Error ? n.message : y("sessions.failedRestartTerminal", "Failed to restart terminal");
1026
+ H((t) => t.map((t) => t.sessionId === e ? {
1027
1027
  ...t,
1028
1028
  loading: !1,
1029
1029
  error: r
1030
1030
  } : t));
1031
1031
  }
1032
- }, [Fr, B]), Ui = u(async (e) => {
1033
- let t = Y.find((t) => t.id === e);
1032
+ }, [Fr, V]), Ui = l(async (e) => {
1033
+ let t = X.find((t) => t.id === e);
1034
1034
  try {
1035
- let n = await K({ variables: { id: e } });
1035
+ let n = await q({ variables: { id: e } });
1036
1036
  if (n.error) return;
1037
- let r = Rt(n.data?.startSessionTerminal?.ttydUrl || null, t?.agent?.tunnelUrl ?? null);
1038
- r && V((t) => t.map((t) => t.sessionId === e ? {
1037
+ let r = Bt(n.data?.startSessionTerminal?.ttydUrl || null, t?.agent?.tunnelUrl ?? null);
1038
+ r && H((t) => t.map((t) => t.sessionId === e ? {
1039
1039
  ...t,
1040
1040
  terminalUrl: r,
1041
1041
  loading: !1,
1042
1042
  error: null
1043
1043
  } : t));
1044
1044
  } catch {}
1045
- }, [Y, K]), Wi = u((e) => {
1046
- V((t) => {
1045
+ }, [X, q]), Wi = l((e) => {
1046
+ H((t) => {
1047
1047
  let n = new Map(t.map((e) => [e.sessionId, e])), r = e.map((e) => n.get(e)).filter((e) => !!e);
1048
1048
  for (let n of t) e.includes(n.sessionId) || r.push(n);
1049
1049
  return r;
1050
1050
  });
1051
- }, []), Gi = u((e) => {
1052
- V((t) => t.map((t) => t.sessionId === e ? {
1051
+ }, []), Gi = l((e) => {
1052
+ H((t) => t.map((t) => t.sessionId === e ? {
1053
1053
  ...t,
1054
1054
  pinned: !t.pinned
1055
1055
  } : t));
1056
- }, []), Ki = u((e) => {
1057
- U(e), Kn(!0);
1058
- }, [Kn]), qi = u((e) => {
1059
- let t = Y.find((t) => t.id === e);
1060
- t?.agent?.id && y(`/agents/${t.agent.id}`);
1061
- }, [Y, y]), Ji = u((e) => {
1062
- let t = Y.find((t) => t.id === e);
1063
- t?.agent?.target?.id && y(`/targets/${t.agent.target.id}`);
1064
- }, [Y, y]), Yi = u((e) => {
1065
- let t = Y.find((t) => t.id === e);
1056
+ }, []), Ki = l((e) => {
1057
+ W(e), R(!0);
1058
+ }, [R]), qi = l((e) => {
1059
+ let t = X.find((t) => t.id === e);
1060
+ t?.agent?.id && v(`/agents/${t.agent.id}`);
1061
+ }, [X, v]), Ji = l((e) => {
1062
+ let t = X.find((t) => t.id === e);
1063
+ t?.agent?.target?.id && v(`/targets/${t.agent.target.id}`);
1064
+ }, [X, v]), Yi = l((e) => {
1065
+ let t = X.find((t) => t.id === e);
1066
1066
  t && cr(t);
1067
- }, [Y]), Q = u(() => {
1067
+ }, [X]), Xi = l(() => {
1068
1068
  ur((e) => !e);
1069
- }, []), $ = f(() => Y.find((e) => e.id === H) ?? null, [Y, H]), Xi = u(() => {
1070
- bn.current?.querySelector("input")?.focus();
1071
- }, []), Zi = u(() => {
1072
- j((e) => e === "terminal" ? "grid" : e === "grid" ? "list" : "terminal");
1073
- }, []), Qi = u(() => {
1074
- $?.agent?.id && y(`/agents/${$.agent.id}`);
1075
- }, [$, y]), $i = u(() => {
1076
- $?.agent?.target?.id && y(`/targets/${$.agent.target.id}`);
1077
- }, [$, y]), ea = u(() => {
1078
- H && Ui(H);
1079
- }, [H, Ui]), ta = u(() => {
1080
- H && Ri(H);
1081
- }, [H, Ri]), na = u(() => {
1082
- H && or((e) => e + 1);
1083
- }, [H]), ra = u(() => {
1084
- H && zi(H);
1085
- }, [H, zi]), ia = u((e) => {
1069
+ }, []), $ = d(() => X.find((e) => e.id === U) ?? null, [X, U]), Zi = l(() => {
1070
+ Sn.current?.querySelector("input")?.focus();
1071
+ }, []), Qi = l(() => {
1072
+ k((e) => e === "terminal" ? "grid" : e === "grid" ? "list" : "terminal");
1073
+ }, []), $i = l(() => {
1074
+ $?.agent?.id && v(`/agents/${$.agent.id}`);
1075
+ }, [$, v]), ea = l(() => {
1076
+ $?.agent?.target?.id && v(`/targets/${$.agent.target.id}`);
1077
+ }, [$, v]), ta = l(() => {
1078
+ U && Ui(U);
1079
+ }, [U, Ui]), na = l(() => {
1080
+ U && Ri(U);
1081
+ }, [U, Ri]), ra = l(() => {
1082
+ U && or((e) => e + 1);
1083
+ }, [U]), ia = l(() => {
1084
+ U && zi(U);
1085
+ }, [U, zi]), aa = l((e) => {
1086
1086
  let t = [], n = (e) => {
1087
1087
  e && t.push({
1088
1088
  el: e,
@@ -1090,578 +1090,582 @@ function Bt() {
1090
1090
  left: e.scrollLeft
1091
1091
  });
1092
1092
  };
1093
- n(xn.current), n(document.querySelector("[data-shell-scroll-container]")), n(document.scrollingElement), e(), requestAnimationFrame(() => {
1093
+ n(Cn.current), n(document.querySelector("[data-shell-scroll-container]")), n(document.scrollingElement), e(), requestAnimationFrame(() => {
1094
1094
  t.forEach(({ el: e, top: t, left: n }) => {
1095
1095
  e.scrollTop = t, e.scrollLeft = n;
1096
1096
  });
1097
1097
  });
1098
- }, []), aa = u((e) => {
1099
- ia(() => U(e));
1100
- }, [ia]), oa = p(ji);
1101
- oa.current = ji;
1102
- let sa = u(() => {
1098
+ }, []), oa = l((e) => {
1099
+ aa(() => W(e));
1100
+ }, [aa]), sa = f(ji);
1101
+ sa.current = ji;
1102
+ let ca = l(() => {
1103
1103
  nr(!0);
1104
- }, []), ca = u(() => {
1105
- Kn(!Gn);
1106
- }, [Gn, Kn]), la = f(() => qe({
1107
- newSession: () => oa.current(),
1108
- newSessionWithOptions: () => M(!0),
1109
- renameActiveTab: na,
1110
- openActiveInNewTab: ra,
1111
- closeActiveTab: ta,
1112
- openPalette: sa,
1113
- openCheatsheet: () => W(!0),
1114
- focusSearch: Xi,
1115
- cycleView: Zi,
1116
- groupByNone: () => k("none"),
1117
- groupByAgent: () => k("agent"),
1118
- groupByTarget: () => k("target"),
1119
- groupByVibe: () => k("vibe"),
1120
- groupByStatus: () => k("status"),
1121
- reconnectActive: ea,
1122
- toggleFullscreen: Q,
1123
- toggleInfoPanel: ca,
1124
- openActiveAgent: Qi,
1125
- openActiveTarget: $i
1126
- }, x), [
1127
- na,
1104
+ }, []), la = l(() => {
1105
+ R(!qn);
1106
+ }, [qn, R]), ua = d(() => Ye({
1107
+ newSession: () => sa.current(),
1108
+ newSessionWithOptions: () => A(!0),
1109
+ renameActiveTab: ra,
1110
+ openActiveInNewTab: ia,
1111
+ closeActiveTab: na,
1112
+ openPalette: ca,
1113
+ openCheatsheet: () => G(!0),
1114
+ focusSearch: Zi,
1115
+ cycleView: Qi,
1116
+ groupByNone: () => D("none"),
1117
+ groupByAgent: () => D("agent"),
1118
+ groupByTarget: () => D("target"),
1119
+ groupByVibe: () => D("vibe"),
1120
+ groupByStatus: () => D("status"),
1121
+ reconnectActive: ta,
1122
+ toggleFullscreen: Xi,
1123
+ toggleInfoPanel: la,
1124
+ openActiveAgent: $i,
1125
+ openActiveTarget: ea
1126
+ }, y), [
1128
1127
  ra,
1129
- ta,
1130
- sa,
1131
- Xi,
1132
- Zi,
1133
- ea,
1134
- Q,
1128
+ ia,
1129
+ na,
1135
1130
  ca,
1131
+ Zi,
1136
1132
  Qi,
1133
+ ta,
1134
+ Xi,
1135
+ la,
1137
1136
  $i,
1138
- x
1139
- ]), ua = p(null);
1140
- d(() => {
1137
+ ea,
1138
+ y
1139
+ ]), da = f(null);
1140
+ u(() => {
1141
1141
  let e = (e) => {
1142
1142
  let t = e.target, n = t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable, r = e.metaKey || e.ctrlKey;
1143
1143
  if (r && ["k", "p"].includes(e.key.toLowerCase())) {
1144
- e.preventDefault(), sa();
1144
+ e.preventDefault(), ca();
1145
1145
  return;
1146
1146
  }
1147
1147
  if (n) return;
1148
- let i = Date.now(), a = ua.current;
1149
- if (a && a.key === "g" && i - a.at < 1e3) switch (ua.current = null, e.key) {
1148
+ let i = Date.now(), a = da.current;
1149
+ if (a && a.key === "g" && i - a.at < 1e3) switch (da.current = null, e.key) {
1150
1150
  case "a":
1151
- e.preventDefault(), k("agent");
1151
+ e.preventDefault(), D("agent");
1152
1152
  return;
1153
1153
  case "t":
1154
- e.preventDefault(), k("target");
1154
+ e.preventDefault(), D("target");
1155
1155
  return;
1156
1156
  case "v":
1157
- e.preventDefault(), k("vibe");
1157
+ e.preventDefault(), D("vibe");
1158
1158
  return;
1159
1159
  case "s":
1160
- e.preventDefault(), k("status");
1160
+ e.preventDefault(), D("status");
1161
1161
  return;
1162
1162
  case "0":
1163
- e.preventDefault(), k("none");
1163
+ e.preventDefault(), D("none");
1164
1164
  return;
1165
1165
  case "A":
1166
- e.preventDefault(), Qi();
1166
+ e.preventDefault(), $i();
1167
1167
  return;
1168
1168
  case "T":
1169
- e.preventDefault(), $i();
1169
+ e.preventDefault(), ea();
1170
1170
  return;
1171
1171
  default: break;
1172
1172
  }
1173
1173
  if (!r && !e.altKey && e.key === "g") {
1174
- ua.current = {
1174
+ da.current = {
1175
1175
  key: "g",
1176
1176
  at: i
1177
1177
  };
1178
1178
  return;
1179
1179
  }
1180
1180
  if (r && e.shiftKey && e.key.toLowerCase() === "t") {
1181
- e.preventDefault(), M(!0);
1181
+ e.preventDefault(), A(!0);
1182
1182
  return;
1183
1183
  }
1184
1184
  if (r && !e.shiftKey && e.key.toLowerCase() === "t") {
1185
- e.preventDefault(), oa.current();
1185
+ e.preventDefault(), sa.current();
1186
1186
  return;
1187
1187
  }
1188
- if (r && !e.shiftKey && e.key.toLowerCase() === "o" && H) {
1189
- e.preventDefault(), ra();
1188
+ if (r && !e.shiftKey && e.key.toLowerCase() === "o" && U) {
1189
+ e.preventDefault(), ia();
1190
1190
  return;
1191
1191
  }
1192
- if (r && e.key.toLowerCase() === "w" && H) {
1193
- e.preventDefault(), ta();
1192
+ if (r && e.key.toLowerCase() === "w" && U) {
1193
+ e.preventDefault(), na();
1194
1194
  return;
1195
1195
  }
1196
1196
  let o = (e) => {
1197
- if (B.length < 2) return;
1198
- let t = B.findIndex((e) => e.sessionId === H);
1199
- U(B[((t < 0 ? 0 : t) + e + B.length) % B.length].sessionId);
1197
+ if (V.length < 2) return;
1198
+ let t = V.findIndex((e) => e.sessionId === U);
1199
+ W(V[((t < 0 ? 0 : t) + e + V.length) % V.length].sessionId);
1200
1200
  };
1201
- if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && B.length > 1) {
1201
+ if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && V.length > 1) {
1202
1202
  e.preventDefault(), o(1);
1203
1203
  return;
1204
1204
  }
1205
- if (e.ctrlKey && e.key === "Tab" && e.shiftKey && B.length > 1) {
1205
+ if (e.ctrlKey && e.key === "Tab" && e.shiftKey && V.length > 1) {
1206
1206
  e.preventDefault(), o(-1);
1207
1207
  return;
1208
1208
  }
1209
- if (r && e.shiftKey && e.code === "BracketRight" && B.length > 1) {
1209
+ if (r && e.shiftKey && e.code === "BracketRight" && V.length > 1) {
1210
1210
  e.preventDefault(), o(1);
1211
1211
  return;
1212
1212
  }
1213
- if (r && e.shiftKey && e.code === "BracketLeft" && B.length > 1) {
1213
+ if (r && e.shiftKey && e.code === "BracketLeft" && V.length > 1) {
1214
1214
  e.preventDefault(), o(-1);
1215
1215
  return;
1216
1216
  }
1217
- if (r && /^[1-9]$/.test(e.key) && B.length > 0) {
1217
+ if (r && /^[1-9]$/.test(e.key) && V.length > 0) {
1218
1218
  let t = Number(e.key) - 1;
1219
- t < B.length && (e.preventDefault(), U(B[t].sessionId));
1219
+ t < V.length && (e.preventDefault(), W(V[t].sessionId));
1220
1220
  return;
1221
1221
  }
1222
- if (r && e.key.toLowerCase() === "r" && H) {
1223
- e.preventDefault(), ea();
1222
+ if (r && e.key.toLowerCase() === "r" && U) {
1223
+ e.preventDefault(), ta();
1224
1224
  return;
1225
1225
  }
1226
1226
  if (r && e.key === "\\") {
1227
- e.preventDefault(), Zi();
1227
+ e.preventDefault(), Qi();
1228
1228
  return;
1229
1229
  }
1230
1230
  if (!r) {
1231
1231
  if (e.key === "/") {
1232
- e.preventDefault(), Xi();
1232
+ e.preventDefault(), Zi();
1233
1233
  return;
1234
1234
  }
1235
1235
  if (e.key === "f") {
1236
- e.preventDefault(), Q();
1236
+ e.preventDefault(), Xi();
1237
1237
  return;
1238
1238
  }
1239
1239
  if (e.key === "i") {
1240
- e.preventDefault(), ca();
1240
+ e.preventDefault(), la();
1241
1241
  return;
1242
1242
  }
1243
- if (e.key === "F2" && H) {
1244
- e.preventDefault(), na();
1243
+ if (e.key === "F2" && U) {
1244
+ e.preventDefault(), ra();
1245
1245
  return;
1246
1246
  }
1247
1247
  if (e.key === "?") {
1248
- e.preventDefault(), W(!0);
1248
+ e.preventDefault(), G(!0);
1249
1249
  return;
1250
1250
  }
1251
1251
  }
1252
1252
  };
1253
1253
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1254
1254
  }, [
1255
- H,
1256
- B,
1257
- ta,
1255
+ U,
1256
+ V,
1258
1257
  na,
1259
1258
  ra,
1260
- ea,
1261
- Zi,
1262
- Xi,
1263
- sa,
1259
+ ia,
1260
+ ta,
1264
1261
  Qi,
1265
- $i,
1262
+ Zi,
1266
1263
  ca,
1267
- Q
1264
+ $i,
1265
+ ea,
1266
+ la,
1267
+ Xi
1268
1268
  ]);
1269
- let da = f(() => {
1270
- let e = x("sessions.palette.groupActions", "Actions"), t = x("sessions.palette.groupView", "View"), n = x("sessions.palette.groupNav", "Navigation"), r = x("sessions.palette.groupSessions", "Sessions"), i = [
1269
+ let fa = d(() => {
1270
+ let e = y("sessions.palette.groupActions", "Actions"), t = y("sessions.palette.groupView", "View"), n = y("sessions.palette.groupNav", "Navigation"), r = y("sessions.palette.groupSessions", "Sessions"), i = [
1271
1271
  {
1272
1272
  id: "new-session",
1273
- label: x("sessions.palette.newSessionQuick", "New terminal (quick)"),
1273
+ label: y("sessions.palette.newSessionQuick", "New terminal (quick)"),
1274
1274
  group: e,
1275
- icon: /* @__PURE__ */ h(ut, { className: "size-4" }),
1275
+ icon: /* @__PURE__ */ m(ft, { className: "size-4" }),
1276
1276
  shortcut: "⌘/Ctrl T",
1277
- run: () => oa.current()
1277
+ run: () => sa.current()
1278
1278
  },
1279
1279
  {
1280
1280
  id: "new-session-options",
1281
- label: x("sessions.newSessionWithOptions", "New session with options…"),
1281
+ label: y("sessions.newSessionWithOptions", "New session with options…"),
1282
1282
  group: e,
1283
- icon: /* @__PURE__ */ h(ht, { className: "size-4" }),
1283
+ icon: /* @__PURE__ */ m(_t, { className: "size-4" }),
1284
1284
  shortcut: "⌘/Ctrl ⇧ T",
1285
- run: () => M(!0)
1285
+ run: () => A(!0)
1286
1286
  },
1287
- ...H ? [{
1287
+ ...U ? [{
1288
1288
  id: "rename-tab",
1289
- label: x("sessions.sc.renameTab", "Rename active tab"),
1289
+ label: y("sessions.sc.renameTab", "Rename active tab"),
1290
1290
  group: e,
1291
- icon: /* @__PURE__ */ h(it, { className: "size-4" }),
1291
+ icon: /* @__PURE__ */ m(ot, { className: "size-4" }),
1292
1292
  shortcut: "F2",
1293
- run: na
1293
+ run: ra
1294
1294
  }, {
1295
1295
  id: "open-tab-new",
1296
- label: x("sessions.sc.openTabNew", "Open active tab in new browser tab"),
1296
+ label: y("sessions.sc.openTabNew", "Open active tab in new browser tab"),
1297
1297
  group: e,
1298
- icon: /* @__PURE__ */ h(mt, { className: "size-4" }),
1298
+ icon: /* @__PURE__ */ m(gt, { className: "size-4" }),
1299
1299
  shortcut: "⌘/Ctrl O",
1300
- run: ra
1300
+ run: ia
1301
1301
  }] : [],
1302
1302
  {
1303
1303
  id: "reconnect",
1304
- label: x("sessions.palette.reconnect", "Reconnect active terminal"),
1304
+ label: y("sessions.palette.reconnect", "Reconnect active terminal"),
1305
1305
  group: e,
1306
- icon: /* @__PURE__ */ h(ft, { className: "size-4" }),
1307
- run: ea
1306
+ icon: /* @__PURE__ */ m(mt, { className: "size-4" }),
1307
+ run: ta
1308
1308
  },
1309
1309
  {
1310
1310
  id: "refresh",
1311
- label: x("common.refresh", "Refresh"),
1311
+ label: y("common.refresh", "Refresh"),
1312
1312
  group: e,
1313
- icon: /* @__PURE__ */ h(dt, { className: "size-4" }),
1313
+ icon: /* @__PURE__ */ m(pt, { className: "size-4" }),
1314
1314
  run: () => void ei()
1315
1315
  },
1316
1316
  ...$ ? [{
1317
1317
  id: "share-active",
1318
- label: x("sessions.palette.shareActive", "Share / offer active session"),
1318
+ label: y("sessions.palette.shareActive", "Share / offer active session"),
1319
1319
  group: e,
1320
- icon: /* @__PURE__ */ h(mt, { className: "size-4" }),
1320
+ icon: /* @__PURE__ */ m(gt, { className: "size-4" }),
1321
1321
  run: () => cr($)
1322
1322
  }] : [],
1323
1323
  {
1324
1324
  id: "view-terminal",
1325
- label: x("sessions.palette.viewTerminal", "Switch to terminal view"),
1325
+ label: y("sessions.palette.viewTerminal", "Switch to terminal view"),
1326
1326
  group: t,
1327
- icon: /* @__PURE__ */ h(st, { className: "size-4" }),
1328
- run: () => j("terminal")
1327
+ icon: /* @__PURE__ */ m(lt, { className: "size-4" }),
1328
+ run: () => k("terminal")
1329
1329
  },
1330
1330
  {
1331
1331
  id: "view-grid",
1332
- label: x("sessions.palette.viewGrid", "Switch to grid view"),
1332
+ label: y("sessions.palette.viewGrid", "Switch to grid view"),
1333
1333
  group: t,
1334
- icon: /* @__PURE__ */ h(nt, { className: "size-4" }),
1335
- run: () => j("grid")
1334
+ icon: /* @__PURE__ */ m(it, { className: "size-4" }),
1335
+ run: () => k("grid")
1336
1336
  },
1337
1337
  {
1338
1338
  id: "view-list",
1339
- label: x("sessions.palette.viewList", "Switch to list view"),
1339
+ label: y("sessions.palette.viewList", "Switch to list view"),
1340
1340
  group: t,
1341
- icon: /* @__PURE__ */ h(ot, { className: "size-4" }),
1342
- run: () => j("list")
1341
+ icon: /* @__PURE__ */ m(ct, { className: "size-4" }),
1342
+ run: () => k("list")
1343
1343
  },
1344
1344
  {
1345
1345
  id: "group-agent",
1346
- label: x("sessions.palette.groupByAgent", "Group by agent"),
1346
+ label: y("sessions.palette.groupByAgent", "Group by agent"),
1347
1347
  group: t,
1348
- icon: /* @__PURE__ */ h(pt, { className: "size-4" }),
1349
- run: () => k("agent")
1348
+ icon: /* @__PURE__ */ m(ht, { className: "size-4" }),
1349
+ run: () => D("agent")
1350
1350
  },
1351
1351
  {
1352
1352
  id: "group-target",
1353
- label: x("sessions.palette.groupByTarget", "Group by target"),
1353
+ label: y("sessions.palette.groupByTarget", "Group by target"),
1354
1354
  group: t,
1355
- icon: /* @__PURE__ */ h(ct, { className: "size-4" }),
1356
- run: () => k("target")
1355
+ icon: /* @__PURE__ */ m(ut, { className: "size-4" }),
1356
+ run: () => D("target")
1357
1357
  },
1358
1358
  {
1359
1359
  id: "group-vibe",
1360
- label: x("sessions.palette.groupByVibe", "Group by vibe"),
1360
+ label: y("sessions.palette.groupByVibe", "Group by vibe"),
1361
1361
  group: t,
1362
- icon: /* @__PURE__ */ h(at, { className: "size-4" }),
1363
- run: () => k("vibe")
1362
+ icon: /* @__PURE__ */ m(st, { className: "size-4" }),
1363
+ run: () => D("vibe")
1364
1364
  },
1365
1365
  {
1366
1366
  id: "group-none",
1367
- label: x("sessions.palette.groupClear", "Clear grouping"),
1367
+ label: y("sessions.palette.groupClear", "Clear grouping"),
1368
1368
  group: t,
1369
- icon: /* @__PURE__ */ h(at, { className: "size-4" }),
1370
- run: () => k("none")
1369
+ icon: /* @__PURE__ */ m(st, { className: "size-4" }),
1370
+ run: () => D("none")
1371
1371
  },
1372
1372
  {
1373
1373
  id: "toggle-info",
1374
- label: x("sessions.palette.toggleInfo", "Toggle session info panel"),
1374
+ label: y("sessions.palette.toggleInfo", "Toggle session info panel"),
1375
1375
  group: t,
1376
- icon: /* @__PURE__ */ h(rt, { className: "size-4" }),
1377
- run: ca
1376
+ icon: /* @__PURE__ */ m(at, { className: "size-4" }),
1377
+ run: la
1378
1378
  },
1379
1379
  {
1380
1380
  id: "shortcuts",
1381
- label: x("sessions.palette.shortcuts", "Keyboard shortcuts"),
1381
+ label: y("sessions.palette.shortcuts", "Keyboard shortcuts"),
1382
1382
  group: t,
1383
- icon: /* @__PURE__ */ h(it, { className: "size-4" }),
1384
- run: () => W(!0)
1383
+ icon: /* @__PURE__ */ m(ot, { className: "size-4" }),
1384
+ run: () => G(!0)
1385
1385
  },
1386
1386
  ...$?.agent ? [{
1387
1387
  id: "goto-agent",
1388
- label: x("sessions.palette.gotoAgent", "Open active session's agent"),
1388
+ label: y("sessions.palette.gotoAgent", "Open active session's agent"),
1389
1389
  group: n,
1390
- icon: /* @__PURE__ */ h(pt, { className: "size-4" }),
1391
- run: Qi
1390
+ icon: /* @__PURE__ */ m(ht, { className: "size-4" }),
1391
+ run: $i
1392
1392
  }] : [],
1393
1393
  ...$?.agent?.target ? [{
1394
1394
  id: "goto-target",
1395
- label: x("sessions.palette.gotoTarget", "Open active session's target"),
1395
+ label: y("sessions.palette.gotoTarget", "Open active session's target"),
1396
1396
  group: n,
1397
- icon: /* @__PURE__ */ h(ct, { className: "size-4" }),
1398
- run: $i
1397
+ icon: /* @__PURE__ */ m(ut, { className: "size-4" }),
1398
+ run: ea
1399
1399
  }] : []
1400
1400
  ];
1401
- for (let e of X.slice(0, 30)) i.push({
1401
+ for (let e of Z.slice(0, 30)) i.push({
1402
1402
  id: `open-${e.id}`,
1403
1403
  label: e.name,
1404
1404
  group: r,
1405
- icon: /* @__PURE__ */ h(_t, { className: "size-4" }),
1405
+ icon: /* @__PURE__ */ m(yt, { className: "size-4" }),
1406
1406
  keywords: `${e.status} ${e.agent?.name ?? ""} ${e.agent?.target?.name ?? ""}`,
1407
- run: () => void Z(e)
1407
+ run: () => void Q(e)
1408
1408
  });
1409
1409
  return i;
1410
1410
  }, [
1411
- x,
1411
+ y,
1412
1412
  $,
1413
- H,
1414
- na,
1413
+ U,
1415
1414
  ra,
1416
- X,
1417
- ea,
1415
+ ia,
1416
+ Z,
1417
+ ta,
1418
1418
  ei,
1419
- ca,
1420
- Qi,
1419
+ la,
1421
1420
  $i,
1422
- Z
1423
- ]), fa = {
1424
- total: Y.length,
1425
- running: Y.filter((e) => e.status === "RUNNING").length,
1426
- stopped: Y.filter((e) => e.status === "STOPPED").length
1421
+ ea,
1422
+ Q
1423
+ ]), pa = {
1424
+ total: X.length,
1425
+ running: X.filter((e) => e.status === "RUNNING").length,
1426
+ stopped: X.filter((e) => e.status === "STOPPED").length
1427
1427
  };
1428
- if (Ut) return /* @__PURE__ */ h(At, {
1428
+ if (Gt) return /* @__PURE__ */ m(Mt, {
1429
1429
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
1430
- children: /* @__PURE__ */ h(Se, { message: x("sessions.loadingPermissions", "Loading permissions...") })
1430
+ children: /* @__PURE__ */ m(we, { message: y("sessions.loadingPermissions", "Loading permissions...") })
1431
1431
  });
1432
- if (Wt && Wt.permissionStrings?.length > 0 && !Yt) return /* @__PURE__ */ h(At, {
1432
+ if (Kt && Kt.permissionStrings?.length > 0 && !Qt) return /* @__PURE__ */ m(Mt, {
1433
1433
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
1434
- children: /* @__PURE__ */ h(Et, {
1435
- title: x("common.accessDeniedTitle", "Access Denied"),
1436
- description: x("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
1437
- details: x("sessions.requiredPermission", "Required permission: session:list")
1434
+ children: /* @__PURE__ */ m(Ot, {
1435
+ title: y("common.accessDeniedTitle", "Access Denied"),
1436
+ description: y("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
1437
+ details: y("sessions.requiredPermission", "Required permission: session:list")
1438
1438
  })
1439
1439
  });
1440
- if (Qr && !Zr && Y.length === 0) return /* @__PURE__ */ h(At, {
1440
+ if (Qr && !Zr && X.length === 0) return /* @__PURE__ */ m(Mt, {
1441
1441
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
1442
- children: /* @__PURE__ */ h(Se, { message: x("sessions.loading", "Loading sessions...") })
1442
+ children: /* @__PURE__ */ m(we, { message: y("sessions.loading", "Loading sessions...") })
1443
1443
  });
1444
- if ($r && Y.length === 0) return /* @__PURE__ */ h(At, {
1444
+ if ($r && X.length === 0) return /* @__PURE__ */ m(Mt, {
1445
1445
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
1446
- children: /* @__PURE__ */ h(Ce, {
1447
- title: x("sessions.failedLoad", "Failed to load sessions"),
1446
+ children: /* @__PURE__ */ m(Te, {
1447
+ title: y("sessions.failedLoad", "Failed to load sessions"),
1448
1448
  message: $r.message,
1449
1449
  onRetry: () => ei()
1450
1450
  })
1451
1451
  });
1452
- let pa = () => !Si || A === "terminal" ? null : /* @__PURE__ */ g("div", {
1452
+ let ma = () => !Si || O === "terminal" ? null : /* @__PURE__ */ h("div", {
1453
1453
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2.5 bg-[var(--color-accent-soft)] border border-border-subtle rounded-card",
1454
- children: [/* @__PURE__ */ h("span", {
1454
+ children: [/* @__PURE__ */ m("span", {
1455
1455
  className: "text-sm font-medium text-text-primary",
1456
- children: x(I.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", I.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: I.size })
1457
- }), /* @__PURE__ */ g("div", {
1456
+ children: y(P.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", P.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: P.size })
1457
+ }), /* @__PURE__ */ h("div", {
1458
1458
  className: "flex items-center gap-1.5 sm:ml-auto flex-wrap",
1459
1459
  children: [
1460
- /* @__PURE__ */ g("button", {
1460
+ /* @__PURE__ */ h("button", {
1461
1461
  type: "button",
1462
1462
  onClick: Ci,
1463
- disabled: gn,
1463
+ disabled: yn,
1464
1464
  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-subtle rounded-button hover:bg-bg-sunken hover:border-border-strong transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
1465
1465
  children: [
1466
- /* @__PURE__ */ h(gt, { className: "size-3" }),
1466
+ /* @__PURE__ */ m(vt, { className: "size-3" }),
1467
1467
  " ",
1468
- x("sessions.stop", "Stop")
1468
+ y("sessions.stop", "Stop")
1469
1469
  ]
1470
1470
  }),
1471
- /* @__PURE__ */ g("button", {
1471
+ /* @__PURE__ */ h("button", {
1472
1472
  type: "button",
1473
1473
  onClick: wi,
1474
- disabled: gn,
1474
+ disabled: yn,
1475
1475
  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-subtle rounded-button hover:bg-bg-sunken hover:border-border-strong transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
1476
1476
  children: [
1477
- /* @__PURE__ */ h(ft, { className: "size-3" }),
1477
+ /* @__PURE__ */ m(mt, { className: "size-3" }),
1478
1478
  " ",
1479
- x("sessions.restart", "Restart")
1479
+ y("sessions.restart", "Restart")
1480
1480
  ]
1481
1481
  }),
1482
- /* @__PURE__ */ g("button", {
1482
+ /* @__PURE__ */ h("button", {
1483
1483
  type: "button",
1484
1484
  onClick: Ti,
1485
- disabled: gn,
1485
+ disabled: yn,
1486
1486
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg-subtle border border-status-error-border rounded-button hover:bg-status-error-bg-subtle/80 transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
1487
1487
  children: [
1488
- /* @__PURE__ */ h(vt, { className: "size-3" }),
1488
+ /* @__PURE__ */ m(bt, { className: "size-3" }),
1489
1489
  " ",
1490
- x("sessions.remove", "Remove")
1490
+ y("sessions.remove", "Remove")
1491
1491
  ]
1492
1492
  }),
1493
- /* @__PURE__ */ g("button", {
1493
+ /* @__PURE__ */ h("button", {
1494
1494
  type: "button",
1495
1495
  onClick: vi,
1496
1496
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
1497
1497
  children: [
1498
- /* @__PURE__ */ h(yt, { className: "size-3" }),
1498
+ /* @__PURE__ */ m(xt, { className: "size-3" }),
1499
1499
  " ",
1500
- x("sessions.deselect", "Deselect")
1500
+ y("sessions.deselect", "Deselect")
1501
1501
  ]
1502
1502
  })
1503
1503
  ]
1504
1504
  })]
1505
- }), ma = /* @__PURE__ */ g("div", {
1505
+ }), ha = /* @__PURE__ */ h("div", {
1506
1506
  className: "flex items-center gap-0.5 rounded-button bg-bg-sunken p-0.5 flex-shrink-0 border border-border-subtle",
1507
1507
  children: [
1508
- /* @__PURE__ */ h("button", {
1508
+ /* @__PURE__ */ m("button", {
1509
1509
  type: "button",
1510
- onClick: () => j("terminal"),
1511
- className: `p-1.5 rounded ${A === "terminal" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1512
- title: x("sessions.terminalViewTitle", "Terminal view"),
1513
- "aria-label": x("sessions.terminalViewTitle", "Terminal view"),
1514
- children: /* @__PURE__ */ h(st, { className: "size-4 text-text-secondary" })
1510
+ onClick: () => k("terminal"),
1511
+ className: `p-1.5 rounded ${O === "terminal" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1512
+ title: y("sessions.terminalViewTitle", "Terminal view"),
1513
+ "aria-label": y("sessions.terminalViewTitle", "Terminal view"),
1514
+ children: /* @__PURE__ */ m(lt, { className: "size-4 text-text-secondary" })
1515
1515
  }),
1516
- /* @__PURE__ */ h("button", {
1516
+ /* @__PURE__ */ m("button", {
1517
1517
  type: "button",
1518
- onClick: () => j("grid"),
1519
- className: `p-1.5 rounded ${A === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1520
- title: x("sessions.gridViewTitle", "Grid view"),
1521
- "aria-label": x("sessions.gridViewTitle", "Grid view"),
1522
- children: /* @__PURE__ */ h(nt, { className: "size-4 text-text-secondary" })
1518
+ onClick: () => k("grid"),
1519
+ className: `p-1.5 rounded ${O === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1520
+ title: y("sessions.gridViewTitle", "Grid view"),
1521
+ "aria-label": y("sessions.gridViewTitle", "Grid view"),
1522
+ children: /* @__PURE__ */ m(it, { className: "size-4 text-text-secondary" })
1523
1523
  }),
1524
- /* @__PURE__ */ h("button", {
1524
+ /* @__PURE__ */ m("button", {
1525
1525
  type: "button",
1526
- onClick: () => j("list"),
1527
- className: `p-1.5 rounded ${A === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1528
- title: x("sessions.listViewTitle", "List view"),
1529
- "aria-label": x("sessions.listViewTitle", "List view"),
1530
- children: /* @__PURE__ */ h(ot, { className: "size-4 text-text-secondary" })
1526
+ onClick: () => k("list"),
1527
+ className: `p-1.5 rounded ${O === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
1528
+ title: y("sessions.listViewTitle", "List view"),
1529
+ "aria-label": y("sessions.listViewTitle", "List view"),
1530
+ children: /* @__PURE__ */ m(ct, { className: "size-4 text-text-secondary" })
1531
1531
  })
1532
1532
  ]
1533
- }), ha = /* @__PURE__ */ h("p", {
1533
+ }), ga = /* @__PURE__ */ m("p", {
1534
1534
  className: "text-xs text-text-muted",
1535
1535
  "data-testid": "sessions-staleness-note",
1536
- children: x("sessions.statusNotRechecked", "Session statuses are not re-checked automatically. A session whose agent has gone away can still show as running until you use Check session health.")
1537
- }), ga = /* @__PURE__ */ g(Ct, { children: [
1538
- /* @__PURE__ */ h(Re, {
1536
+ children: y("sessions.statusNotRechecked", "Session statuses are not re-checked automatically. A session whose agent has gone away can still show as running until you use Check session health.")
1537
+ }), _a = /* @__PURE__ */ h(Tt, { children: [
1538
+ /* @__PURE__ */ m(Be, {
1539
1539
  isOpen: Gr,
1540
1540
  onClose: () => {
1541
1541
  qr || Kr(!1);
1542
1542
  },
1543
1543
  onConfirm: () => void Yr(),
1544
1544
  isLoading: qr,
1545
- message: x("sessions.checkHealthMessage", "This checks every running session in the whole workspace, across all agents. Any session whose agent reports it dead or cannot be reached is marked stopped.")
1545
+ message: y("sessions.checkHealthMessage", "This checks every running session in the whole workspace, across all agents. Any session whose agent reports it dead or cannot be reached is marked stopped.")
1546
1546
  }),
1547
- sn && ba(),
1548
- ya(),
1549
- sr && /* @__PURE__ */ h(We, {
1547
+ un && xa(),
1548
+ ba(),
1549
+ sr && /* @__PURE__ */ m(Ke, {
1550
1550
  session: sr,
1551
1551
  isOpen: !!sr,
1552
1552
  onClose: () => cr(null)
1553
1553
  }),
1554
- /* @__PURE__ */ h(pe, {
1555
- isOpen: dn,
1556
- onClose: () => N(!1),
1554
+ /* @__PURE__ */ m(me, {
1555
+ isOpen: mn,
1556
+ onClose: () => j(!1),
1557
1557
  onConfirm: () => {
1558
- N(!1), y(ge);
1558
+ j(!1), v(ve);
1559
1559
  },
1560
- title: he("session").title,
1561
- message: he("session").message,
1560
+ title: _e("session").title,
1561
+ message: _e("session").message,
1562
1562
  confirmLabel: "View Billing",
1563
1563
  cancelLabel: "Dismiss",
1564
1564
  variant: "warning"
1565
1565
  }),
1566
- /* @__PURE__ */ h(Je, {
1566
+ /* @__PURE__ */ m(Xe, {
1567
1567
  isOpen: er,
1568
- onClose: () => W(!1),
1569
- shortcuts: la
1568
+ onClose: () => G(!1),
1569
+ shortcuts: ua
1570
1570
  }),
1571
- /* @__PURE__ */ h(Ye, {
1571
+ /* @__PURE__ */ m(Ze, {
1572
1572
  open: tr,
1573
1573
  onOpenChange: nr,
1574
- commands: da
1574
+ commands: fa
1575
1575
  }),
1576
- /* @__PURE__ */ h(Xe, {
1577
- open: Gn,
1578
- onOpenChange: Kn,
1576
+ /* @__PURE__ */ m(Qe, {
1577
+ open: qn,
1578
+ onOpenChange: R,
1579
1579
  session: $
1580
1580
  })
1581
1581
  ] });
1582
- if (A === "terminal") return /* @__PURE__ */ g(At, {
1582
+ if (O === "terminal") return /* @__PURE__ */ h(Mt, {
1583
1583
  className: "flex flex-col bg-bg-surface min-h-0 flex-1",
1584
1584
  children: [
1585
- /* @__PURE__ */ g("div", {
1585
+ /* @__PURE__ */ h("div", {
1586
1586
  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",
1587
- children: [/* @__PURE__ */ g("div", {
1587
+ children: [/* @__PURE__ */ h("div", {
1588
1588
  className: "flex flex-wrap items-center gap-3",
1589
1589
  children: [
1590
- /* @__PURE__ */ h("h1", {
1590
+ /* @__PURE__ */ m("h1", {
1591
1591
  className: "text-sm font-semibold text-text-primary",
1592
- children: x("nav.sessions", "Sessions")
1592
+ children: y("nav.sessions", "Sessions")
1593
1593
  }),
1594
- /* @__PURE__ */ h("span", {
1594
+ /* @__PURE__ */ m("span", {
1595
1595
  className: "text-xs text-text-muted",
1596
- children: x("sessions.runningSummary", "{{running}} running / {{total}} total", {
1597
- running: fa.running,
1598
- total: fa.total
1596
+ children: y("sessions.runningSummary", "{{running}} running / {{total}} total", {
1597
+ running: pa.running,
1598
+ total: pa.total
1599
1599
  })
1600
1600
  }),
1601
- /* @__PURE__ */ h(Ne, {})
1601
+ /* @__PURE__ */ m(Fe, {}),
1602
+ /* @__PURE__ */ m(he, {
1603
+ topic: "sessions",
1604
+ className: "text-xs"
1605
+ })
1602
1606
  ]
1603
- }), /* @__PURE__ */ g("div", {
1607
+ }), /* @__PURE__ */ h("div", {
1604
1608
  className: "flex w-full flex-wrap items-center gap-2 sm:w-auto sm:justify-end",
1605
1609
  children: [
1606
- /* @__PURE__ */ h("button", {
1610
+ /* @__PURE__ */ m("button", {
1607
1611
  type: "button",
1608
1612
  onClick: () => Kr(!0),
1609
1613
  disabled: qr,
1610
1614
  "aria-busy": qr,
1611
1615
  "data-testid": "check-session-health-btn",
1612
1616
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors disabled:opacity-50",
1613
- title: x("sessions.checkHealth", "Check session health"),
1614
- "aria-label": x("sessions.checkHealth", "Check session health"),
1615
- children: /* @__PURE__ */ h($e, { className: "size-3.5" })
1617
+ title: y("sessions.checkHealth", "Check session health"),
1618
+ "aria-label": y("sessions.checkHealth", "Check session health"),
1619
+ children: /* @__PURE__ */ m(tt, { className: "size-3.5" })
1616
1620
  }),
1617
- /* @__PURE__ */ h("button", {
1621
+ /* @__PURE__ */ m("button", {
1618
1622
  type: "button",
1619
1623
  onClick: () => {
1620
1624
  ei(), ni();
1621
1625
  },
1622
1626
  disabled: Qr,
1623
1627
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors disabled:opacity-50",
1624
- title: x("common.refresh", "Refresh"),
1625
- children: /* @__PURE__ */ h(dt, { className: `size-3.5 ${Qr ? "animate-spin" : ""}` })
1628
+ title: y("common.refresh", "Refresh"),
1629
+ children: /* @__PURE__ */ m(pt, { className: `size-3.5 ${Qr ? "animate-spin" : ""}` })
1626
1630
  }),
1627
- /* @__PURE__ */ h("button", {
1631
+ /* @__PURE__ */ m("button", {
1628
1632
  type: "button",
1629
- onClick: () => W(!0),
1633
+ onClick: () => G(!0),
1630
1634
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors",
1631
- title: x("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1632
- "aria-label": x("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1635
+ title: y("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1636
+ "aria-label": y("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1633
1637
  "data-testid": "sessions-shortcuts-button",
1634
- children: /* @__PURE__ */ h(it, { className: "size-3.5" })
1638
+ children: /* @__PURE__ */ m(ot, { className: "size-3.5" })
1635
1639
  }),
1636
- ma
1640
+ ha
1637
1641
  ]
1638
1642
  })]
1639
1643
  }),
1640
- /* @__PURE__ */ h("div", {
1644
+ /* @__PURE__ */ m("div", {
1641
1645
  className: "px-4 pt-2",
1642
- children: ha
1646
+ children: ga
1643
1647
  }),
1644
- /* @__PURE__ */ h("div", {
1648
+ /* @__PURE__ */ m("div", {
1645
1649
  className: "px-4 pt-3 empty:hidden empty:p-0",
1646
- children: /* @__PURE__ */ h(Me, {
1650
+ children: /* @__PURE__ */ m(Pe, {
1647
1651
  compact: !0,
1648
1652
  maxVisible: 3
1649
1653
  })
1650
1654
  }),
1651
- /* @__PURE__ */ h(Ue, {
1652
- tabs: B,
1653
- activeTabId: H,
1654
- onTabSelect: U,
1655
+ /* @__PURE__ */ m(Ge, {
1656
+ tabs: V,
1657
+ activeTabId: U,
1658
+ onTabSelect: W,
1655
1659
  onTabClose: Ri,
1656
1660
  onOpenExternal: zi,
1657
1661
  collapsed: !1,
1658
- sessions: X,
1659
- onOpenTerminal: Z,
1660
- onRetryTerminal: Z,
1662
+ sessions: Z,
1663
+ onOpenTerminal: Q,
1664
+ onRetryTerminal: Q,
1661
1665
  onRenameSession: Bi,
1662
1666
  onStopTerminal: Vi,
1663
1667
  onStopSession: (e) => {
1664
- let t = Y.find((t) => t.id === e);
1668
+ let t = X.find((t) => t.id === e);
1665
1669
  t && Ni(t);
1666
1670
  },
1667
1671
  onRestartTerminal: Hi,
@@ -1671,161 +1675,161 @@ function Bt() {
1671
1675
  onShowSessionInfo: Ki,
1672
1676
  onViewAgent: qi,
1673
1677
  onViewTarget: Ji,
1674
- onShareSession: Zt ? Yi : void 0,
1678
+ onShareSession: en ? Yi : void 0,
1675
1679
  onCreateSession: Oi,
1676
- onQuickCreate: Xt ? ji : void 0,
1680
+ onQuickCreate: $t ? ji : void 0,
1677
1681
  renameActiveTabNonce: ar,
1678
1682
  fullScreen: !0,
1679
1683
  isImmersiveFullscreen: lr,
1680
- onToggleImmersiveFullscreen: Q,
1684
+ onToggleImmersiveFullscreen: Xi,
1681
1685
  contextSwitcher: void 0
1682
1686
  }),
1683
- /* @__PURE__ */ g("div", {
1687
+ /* @__PURE__ */ h("div", {
1684
1688
  className: "flex items-center justify-between gap-3 px-4 py-1.5 border-t border-border-default bg-bg-sunken text-[11px] text-text-tertiary",
1685
- children: [/* @__PURE__ */ g("div", {
1689
+ children: [/* @__PURE__ */ h("div", {
1686
1690
  className: "flex items-center gap-3",
1687
1691
  children: [
1688
- /* @__PURE__ */ g("span", {
1692
+ /* @__PURE__ */ h("span", {
1689
1693
  className: "inline-flex items-center gap-1.5",
1690
- children: [/* @__PURE__ */ h("span", {
1694
+ children: [/* @__PURE__ */ m("span", {
1691
1695
  className: "size-1.5 rounded-full bg-status-success-bg",
1692
1696
  "aria-hidden": !0
1693
- }), x("sessions.statusOnline", "Online")]
1697
+ }), y("sessions.statusOnline", "Online")]
1694
1698
  }),
1695
- /* @__PURE__ */ g("span", { children: [
1696
- B.length,
1699
+ /* @__PURE__ */ h("span", { children: [
1700
+ V.length,
1697
1701
  " ",
1698
- B.length === 1 ? "tab" : "tabs"
1702
+ V.length === 1 ? "tab" : "tabs"
1699
1703
  ] }),
1700
- H && /* @__PURE__ */ h("span", {
1704
+ U && /* @__PURE__ */ m("span", {
1701
1705
  className: "truncate max-w-[28ch]",
1702
- children: B.find((e) => e.sessionId === H)?.name
1706
+ children: V.find((e) => e.sessionId === U)?.name
1703
1707
  }),
1704
- $?.agent && /* @__PURE__ */ g("span", {
1708
+ $?.agent && /* @__PURE__ */ h("span", {
1705
1709
  className: "hidden md:inline-flex items-center gap-1",
1706
1710
  children: [
1707
- /* @__PURE__ */ h("span", {
1711
+ /* @__PURE__ */ m("span", {
1708
1712
  className: "text-text-muted",
1709
1713
  children: "·"
1710
1714
  }),
1711
- /* @__PURE__ */ h(ze, { agent: $.agent }),
1712
- $.agent.target && /* @__PURE__ */ h(Be, { target: $.agent.target })
1715
+ /* @__PURE__ */ m(Ve, { agent: $.agent }),
1716
+ $.agent.target && /* @__PURE__ */ m(He, { target: $.agent.target })
1713
1717
  ]
1714
1718
  })
1715
1719
  ]
1716
- }), /* @__PURE__ */ g("div", {
1720
+ }), /* @__PURE__ */ h("div", {
1717
1721
  className: "hidden sm:flex items-center gap-3",
1718
1722
  children: [
1719
- /* @__PURE__ */ g("button", {
1723
+ /* @__PURE__ */ h("button", {
1720
1724
  type: "button",
1721
- onClick: () => Kn(!Gn),
1725
+ onClick: () => R(!qn),
1722
1726
  className: "inline-flex items-center gap-1 hover:text-text-secondary transition-colors",
1723
- title: x("sessions.infoPanelHint", "Session info (i)"),
1724
- children: [/* @__PURE__ */ h(rt, { className: "size-3" }), x("sessions.infoPanelLabel", "Info")]
1727
+ title: y("sessions.infoPanelHint", "Session info (i)"),
1728
+ children: [/* @__PURE__ */ m(at, { className: "size-3" }), y("sessions.infoPanelLabel", "Info")]
1725
1729
  }),
1726
- $ && /* @__PURE__ */ h(Le, {
1730
+ $ && /* @__PURE__ */ m(ze, {
1727
1731
  entity: "session",
1728
1732
  resource: {
1729
1733
  id: $.id,
1730
1734
  name: $.name,
1731
1735
  vibeId: $.vibeId ?? null
1732
1736
  },
1733
- label: x("sessions.shareOfferLabel", "Share"),
1737
+ label: y("sessions.shareOfferLabel", "Share"),
1734
1738
  variant: "button"
1735
1739
  }),
1736
- /* @__PURE__ */ g("button", {
1740
+ /* @__PURE__ */ h("button", {
1737
1741
  type: "button",
1738
- onClick: () => W(!0),
1742
+ onClick: () => G(!0),
1739
1743
  className: "inline-flex items-center gap-1 hover:text-text-secondary transition-colors",
1740
- children: [/* @__PURE__ */ h(it, { className: "size-3" }), x("sessions.shortcutsHint", "Press ? for shortcuts")]
1744
+ children: [/* @__PURE__ */ m(ot, { className: "size-3" }), y("sessions.shortcutsHint", "Press ? for shortcuts")]
1741
1745
  }),
1742
- /* @__PURE__ */ h("button", {
1746
+ /* @__PURE__ */ m("button", {
1743
1747
  type: "button",
1744
- onClick: sa,
1748
+ onClick: ca,
1745
1749
  className: "hover:text-text-secondary transition-colors",
1746
- children: x("sessions.paletteHint", "⌘/Ctrl K · Command palette")
1750
+ children: y("sessions.paletteHint", "⌘/Ctrl K · Command palette")
1747
1751
  })
1748
1752
  ]
1749
1753
  })]
1750
1754
  }),
1751
- hn && /* @__PURE__ */ h("div", {
1755
+ vn && /* @__PURE__ */ m("div", {
1752
1756
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg-subtle text-status-success-text border border-status-success-border rounded-card shadow-elevation-3 text-sm",
1753
- children: hn
1757
+ children: vn
1754
1758
  }),
1755
- ga
1759
+ _a
1756
1760
  ]
1757
1761
  });
1758
- let _a = (e) => /* @__PURE__ */ h(kt, {
1762
+ let va = (e) => /* @__PURE__ */ m(jt, {
1759
1763
  stagger: .04,
1760
1764
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
1761
- children: e.map((e) => /* @__PURE__ */ h(Ot, { children: /* @__PURE__ */ h(Ve, {
1765
+ children: e.map((e) => /* @__PURE__ */ m(At, { children: /* @__PURE__ */ m(Ue, {
1762
1766
  session: e,
1763
1767
  onOpen: Di,
1764
1768
  onStart: Mi,
1765
1769
  onStop: Ni,
1766
1770
  onRestart: Pi,
1767
- onOpenTerminal: Z,
1768
- onShare: Zt ? Li : void 0,
1769
- selected: I.has(e.id),
1771
+ onOpenTerminal: Q,
1772
+ onShare: en ? Li : void 0,
1773
+ selected: P.has(e.id),
1770
1774
  onToggleSelect: () => gi(e.id)
1771
1775
  }) }, e.id))
1772
- }), va = (e, t) => /* @__PURE__ */ h(He, {
1776
+ }), ya = (e, t) => /* @__PURE__ */ m(We, {
1773
1777
  sessions: e,
1774
1778
  onOpen: Di,
1775
1779
  onStart: Mi,
1776
1780
  onStop: Ni,
1777
1781
  onRestart: Pi,
1778
1782
  onTerminate: Fi,
1779
- onOpenTerminal: Z,
1780
- onShare: Zt ? Li : void 0,
1781
- selectedIds: I,
1783
+ onOpenTerminal: Q,
1784
+ onShare: en ? Li : void 0,
1785
+ selectedIds: P,
1782
1786
  onToggleSelect: gi,
1783
1787
  onSelectAll: _i,
1784
1788
  onDeselectAll: vi,
1785
1789
  hideHeaderSelectAll: t
1786
1790
  });
1787
- return /* @__PURE__ */ g(At, {
1791
+ return /* @__PURE__ */ h(Mt, {
1788
1792
  className: "flex flex-col bg-bg-surface min-h-0 flex-1",
1789
1793
  children: [
1790
- /* @__PURE__ */ g("div", {
1791
- ref: xn,
1794
+ /* @__PURE__ */ h("div", {
1795
+ ref: Cn,
1792
1796
  className: "flex-1 overflow-y-auto space-y-6 p-4 sm:p-6",
1793
1797
  children: [
1794
- /* @__PURE__ */ h(xe, {
1795
- title: x("nav.sessions", "Sessions"),
1796
- description: x("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
1797
- running: fa.running,
1798
- total: fa.total
1798
+ /* @__PURE__ */ m(Ce, {
1799
+ title: y("nav.sessions", "Sessions"),
1800
+ description: y("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
1801
+ running: pa.running,
1802
+ total: pa.total
1799
1803
  }),
1800
- actions: /* @__PURE__ */ g("div", {
1804
+ actions: /* @__PURE__ */ h("div", {
1801
1805
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
1802
1806
  children: [
1803
- /* @__PURE__ */ h("div", {
1807
+ /* @__PURE__ */ m("div", {
1804
1808
  className: "flex items-center self-center",
1805
- children: /* @__PURE__ */ h(Ne, {})
1809
+ children: /* @__PURE__ */ m(Fe, {})
1806
1810
  }),
1807
- /* @__PURE__ */ h("button", {
1811
+ /* @__PURE__ */ m("button", {
1808
1812
  type: "button",
1809
1813
  onClick: () => Kr(!0),
1810
1814
  disabled: qr,
1811
1815
  "aria-busy": qr,
1812
1816
  "data-testid": "check-session-health-btn",
1813
1817
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
1814
- title: x("sessions.checkHealth", "Check session health"),
1815
- "aria-label": x("sessions.checkHealth", "Check session health"),
1816
- children: /* @__PURE__ */ h($e, { className: "size-4" })
1818
+ title: y("sessions.checkHealth", "Check session health"),
1819
+ "aria-label": y("sessions.checkHealth", "Check session health"),
1820
+ children: /* @__PURE__ */ m(tt, { className: "size-4" })
1817
1821
  }),
1818
- /* @__PURE__ */ h("button", {
1822
+ /* @__PURE__ */ m("button", {
1819
1823
  type: "button",
1820
1824
  onClick: () => ei(),
1821
1825
  disabled: Qr,
1822
1826
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
1823
- title: x("sessions.refreshTitle", "Refresh sessions"),
1824
- children: /* @__PURE__ */ h(dt, { className: `size-4 ${Qr ? "animate-spin" : ""}` })
1827
+ title: y("sessions.refreshTitle", "Refresh sessions"),
1828
+ children: /* @__PURE__ */ m(pt, { className: `size-4 ${Qr ? "animate-spin" : ""}` })
1825
1829
  }),
1826
- /* @__PURE__ */ h(Lt, {
1827
- label: x("sessions.export", "Export"),
1828
- disabled: vn,
1830
+ /* @__PURE__ */ m(zt, {
1831
+ label: y("sessions.export", "Export"),
1832
+ disabled: bn,
1829
1833
  testId: "sessions-export",
1830
1834
  defaultFolderPath: "/Vibecontrols/Sessions",
1831
1835
  source: {
@@ -1835,10 +1839,10 @@ function Bt() {
1835
1839
  getBlob: async () => {
1836
1840
  let e = (await Hr({ variables: { input: {
1837
1841
  filter: {
1838
- status: C === "all" ? void 0 : C,
1839
- type: w === "all" ? void 0 : w,
1840
- vibeId: T !== "all" && T !== "none" ? T : void 0,
1841
- agentId: E === "all" ? void 0 : E
1842
+ status: x === "all" ? void 0 : x,
1843
+ type: S === "all" ? void 0 : S,
1844
+ vibeId: C !== "all" && C !== "none" ? C : void 0,
1845
+ agentId: w === "all" ? void 0 : w
1842
1846
  },
1843
1847
  format: "CSV"
1844
1848
  } } })).data?.exportSessions;
@@ -1847,278 +1851,278 @@ function Bt() {
1847
1851
  },
1848
1852
  onDownload: () => Ei("CSV")
1849
1853
  }),
1850
- /* @__PURE__ */ h(Dt, {
1851
- permission: Ie.SESSION_CREATE,
1852
- children: /* @__PURE__ */ g("button", {
1854
+ /* @__PURE__ */ m(kt, {
1855
+ permission: Re.SESSION_CREATE,
1856
+ children: /* @__PURE__ */ h("button", {
1853
1857
  type: "button",
1854
1858
  onClick: () => br(!0),
1855
1859
  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",
1856
1860
  "data-testid": "sessions-reconnect-button",
1857
- title: x("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
1858
- children: [/* @__PURE__ */ h(dt, { className: "size-4" }), x("sessions.reconnect", "Reconnect")]
1861
+ title: y("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
1862
+ children: [/* @__PURE__ */ m(pt, { className: "size-4" }), y("sessions.reconnect", "Reconnect")]
1859
1863
  })
1860
1864
  }),
1861
- /* @__PURE__ */ h(Dt, {
1862
- permission: Ie.SESSION_CREATE,
1863
- children: /* @__PURE__ */ g("div", {
1865
+ /* @__PURE__ */ m(kt, {
1866
+ permission: Re.SESSION_CREATE,
1867
+ children: /* @__PURE__ */ h("div", {
1864
1868
  className: "relative flex items-stretch",
1865
- ref: un,
1869
+ ref: pn,
1866
1870
  children: [
1867
- /* @__PURE__ */ g("button", {
1871
+ /* @__PURE__ */ h("button", {
1868
1872
  type: "button",
1869
1873
  onClick: ji,
1870
1874
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-l-md hover:bg-action-primary-bg-hover transition-colors",
1871
- title: x("sessions.quickNewSessionHint", "New terminal (⌘/Ctrl+T)"),
1875
+ title: y("sessions.quickNewSessionHint", "New terminal (⌘/Ctrl+T)"),
1872
1876
  "data-testid": "sessions-new-session",
1873
- children: [/* @__PURE__ */ h(ut, { className: "size-4" }), x("sessions.newSession", "New Session")]
1877
+ children: [/* @__PURE__ */ m(ft, { className: "size-4" }), y("sessions.newSession", "New Session")]
1874
1878
  }),
1875
- /* @__PURE__ */ h("button", {
1879
+ /* @__PURE__ */ m("button", {
1876
1880
  type: "button",
1877
- onClick: () => ln((e) => !e),
1881
+ onClick: () => fn((e) => !e),
1878
1882
  className: "flex items-center px-2 bg-action-primary-bg text-action-primary-text rounded-r-md border-l border-action-primary-text/20 hover:bg-action-primary-bg-hover transition-colors",
1879
1883
  "aria-haspopup": "menu",
1880
- "aria-expanded": cn,
1881
- title: x("sessions.newSessionOptions", "New session options"),
1884
+ "aria-expanded": dn,
1885
+ title: y("sessions.newSessionOptions", "New session options"),
1882
1886
  "data-testid": "sessions-new-session-menu",
1883
- children: /* @__PURE__ */ h(tt, { className: "size-4" })
1887
+ children: /* @__PURE__ */ m(rt, { className: "size-4" })
1884
1888
  }),
1885
- cn && /* @__PURE__ */ g("div", {
1889
+ dn && /* @__PURE__ */ h("div", {
1886
1890
  role: "menu",
1887
1891
  className: "absolute right-0 top-full mt-1 z-50 w-64 bg-bg-elevated border border-border-default rounded-md shadow-xl py-1",
1888
- children: [/* @__PURE__ */ g("button", {
1892
+ children: [/* @__PURE__ */ h("button", {
1889
1893
  type: "button",
1890
1894
  role: "menuitem",
1891
1895
  onClick: () => {
1892
- ln(!1), Oi();
1896
+ fn(!1), Oi();
1893
1897
  },
1894
1898
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
1895
- children: [/* @__PURE__ */ h(ht, { className: "size-3.5 text-text-secondary" }), x("sessions.newSessionWithOptions", "New session with options…")]
1896
- }), /* @__PURE__ */ g("button", {
1899
+ children: [/* @__PURE__ */ m(_t, { className: "size-3.5 text-text-secondary" }), y("sessions.newSessionWithOptions", "New session with options…")]
1900
+ }), /* @__PURE__ */ h("button", {
1897
1901
  type: "button",
1898
1902
  role: "menuitem",
1899
1903
  onClick: () => {
1900
- ln(!1), br(!0);
1904
+ fn(!1), br(!0);
1901
1905
  },
1902
1906
  className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
1903
- children: [/* @__PURE__ */ h(dt, { className: "size-3.5 text-text-secondary" }), x("sessions.reconnectExisting", "Reconnect existing session…")]
1907
+ children: [/* @__PURE__ */ m(pt, { className: "size-3.5 text-text-secondary" }), y("sessions.reconnectExisting", "Reconnect existing session…")]
1904
1908
  })]
1905
1909
  })
1906
1910
  ]
1907
1911
  })
1908
1912
  }),
1909
- /* @__PURE__ */ h("button", {
1913
+ /* @__PURE__ */ m("button", {
1910
1914
  type: "button",
1911
- onClick: () => W(!0),
1915
+ onClick: () => G(!0),
1912
1916
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
1913
- title: x("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1914
- "aria-label": x("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1917
+ title: y("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1918
+ "aria-label": y("sessions.keyboardShortcuts", "Keyboard shortcuts (?)"),
1915
1919
  "data-testid": "sessions-shortcuts-button",
1916
- children: /* @__PURE__ */ h(it, { className: "size-4" })
1920
+ children: /* @__PURE__ */ m(ot, { className: "size-4" })
1917
1921
  }),
1918
- ma
1922
+ ha
1919
1923
  ]
1920
1924
  })
1921
1925
  }),
1922
- /* @__PURE__ */ h(Tt, {
1923
- icon: /* @__PURE__ */ h(_t, { className: "size-4" }),
1924
- learnMoreHref: Kt,
1925
- learnMoreLabel: x("vibecontrols.docs.learnMore", "Learn more"),
1926
- children: x("sessions.purpose", "Sessions are the live terminals and tasks running on your agents. Open a session to get a real shell (or an AI task) executing on your own machine through a vibe — watch its output stream in, share a read-only link, or review the logs afterwards. This page lists every session across your vibes so you can jump back into work or see what is still running.")
1926
+ /* @__PURE__ */ m(Dt, {
1927
+ icon: /* @__PURE__ */ m(yt, { className: "size-4" }),
1928
+ learnMoreHref: Yt,
1929
+ learnMoreLabel: y("vibecontrols.docs.learnMore", "Learn more"),
1930
+ children: y("sessions.purpose", "Sessions are the live terminals and tasks running on your agents. Open a session to get a real shell (or an AI task) executing on your own machine through a vibe — watch its output stream in, share a read-only link, or review the logs afterwards. This page lists every session across your vibes so you can jump back into work or see what is still running.")
1927
1931
  }),
1928
- ha,
1929
- /* @__PURE__ */ h(Me, {
1932
+ ga,
1933
+ /* @__PURE__ */ m(Pe, {
1930
1934
  compact: !0,
1931
1935
  maxVisible: 3
1932
1936
  }),
1933
- /* @__PURE__ */ g("div", {
1937
+ /* @__PURE__ */ h("div", {
1934
1938
  "data-tour": "sessions-filters",
1935
1939
  className: "space-y-3",
1936
- children: [/* @__PURE__ */ h("div", {
1937
- ref: bn,
1940
+ children: [/* @__PURE__ */ m("div", {
1941
+ ref: Sn,
1938
1942
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
1939
- children: /* @__PURE__ */ h(De, {
1940
- value: S,
1941
- onChange: Qt,
1942
- placeholder: x("sessions.searchPlaceholder", "Search sessions..."),
1943
+ children: /* @__PURE__ */ m(ke, {
1944
+ value: b,
1945
+ onChange: tn,
1946
+ placeholder: y("sessions.searchPlaceholder", "Search sessions..."),
1943
1947
  className: "flex-1 sm:w-64 sm:flex-none"
1944
1948
  })
1945
- }), /* @__PURE__ */ g("div", {
1949
+ }), /* @__PURE__ */ h("div", {
1946
1950
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
1947
1951
  children: [
1948
- /* @__PURE__ */ h(Oe, {
1949
- label: x("sessions.filterStatus", "Status"),
1950
- value: C,
1951
- options: qt,
1952
- onChange: $t
1952
+ /* @__PURE__ */ m(Ae, {
1953
+ label: y("sessions.filterStatus", "Status"),
1954
+ value: x,
1955
+ options: Xt,
1956
+ onChange: nn
1953
1957
  }),
1954
- /* @__PURE__ */ h(Oe, {
1955
- label: x("sessions.filterType", "Type"),
1956
- value: w,
1957
- options: Jt,
1958
- onChange: en
1958
+ /* @__PURE__ */ m(Ae, {
1959
+ label: y("sessions.filterType", "Type"),
1960
+ value: S,
1961
+ options: Zt,
1962
+ onChange: rn
1959
1963
  }),
1960
- /* @__PURE__ */ h(Oe, {
1961
- label: x("sessions.filterVibe", "Vibe"),
1962
- value: T,
1964
+ /* @__PURE__ */ m(Ae, {
1965
+ label: y("sessions.filterVibe", "Vibe"),
1966
+ value: C,
1963
1967
  options: oi,
1964
- onChange: tn
1968
+ onChange: an
1965
1969
  }),
1966
- /* @__PURE__ */ h(Oe, {
1967
- label: x("sessions.filterAgent", "Agent"),
1968
- value: E,
1970
+ /* @__PURE__ */ m(Ae, {
1971
+ label: y("sessions.filterAgent", "Agent"),
1972
+ value: w,
1969
1973
  options: si,
1970
- onChange: nn
1974
+ onChange: on
1971
1975
  }),
1972
- /* @__PURE__ */ h(Oe, {
1973
- label: x("sessions.filterTarget", "Target"),
1974
- value: D,
1976
+ /* @__PURE__ */ m(Ae, {
1977
+ label: y("sessions.filterTarget", "Target"),
1978
+ value: T,
1975
1979
  options: mi,
1976
- onChange: rn,
1977
- icon: /* @__PURE__ */ h(ct, { className: "size-3.5 text-text-secondary" })
1980
+ onChange: sn,
1981
+ icon: /* @__PURE__ */ m(ut, { className: "size-3.5 text-text-secondary" })
1978
1982
  }),
1979
- /* @__PURE__ */ h("div", {
1983
+ /* @__PURE__ */ m("div", {
1980
1984
  className: "sm:ml-auto",
1981
- children: /* @__PURE__ */ h(Oe, {
1982
- label: x("sessions.groupByLabel", "Group"),
1983
- value: O,
1985
+ children: /* @__PURE__ */ m(Ae, {
1986
+ label: y("sessions.groupByLabel", "Group"),
1987
+ value: E,
1984
1988
  options: ci,
1985
- onChange: (e) => k(e),
1989
+ onChange: (e) => D(e),
1986
1990
  allValue: "none",
1987
- allLabel: x("sessions.groupBy.none", "No grouping"),
1988
- icon: /* @__PURE__ */ h(at, { className: "size-3.5 text-text-secondary" })
1991
+ allLabel: y("sessions.groupBy.none", "No grouping"),
1992
+ icon: /* @__PURE__ */ m(st, { className: "size-3.5 text-text-secondary" })
1989
1993
  })
1990
1994
  })
1991
1995
  ]
1992
1996
  })]
1993
1997
  }),
1994
- /* @__PURE__ */ g("div", {
1998
+ /* @__PURE__ */ h("div", {
1995
1999
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-wrap",
1996
2000
  children: [
1997
- /* @__PURE__ */ g("button", {
2001
+ /* @__PURE__ */ h("button", {
1998
2002
  type: "button",
1999
- onClick: () => $t("RUNNING"),
2000
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${C === "RUNNING" ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
2003
+ onClick: () => nn("RUNNING"),
2004
+ 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"}`,
2001
2005
  children: [
2002
- /* @__PURE__ */ h(lt, { className: "size-3" }),
2006
+ /* @__PURE__ */ m(dt, { className: "size-3" }),
2003
2007
  " ",
2004
- x("sessions.running", "Running"),
2008
+ y("sessions.running", "Running"),
2005
2009
  " (",
2006
- fa.running,
2010
+ pa.running,
2007
2011
  ")"
2008
2012
  ]
2009
2013
  }),
2010
- /* @__PURE__ */ g("button", {
2014
+ /* @__PURE__ */ h("button", {
2011
2015
  type: "button",
2012
- onClick: () => $t("STOPPED"),
2013
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${C === "STOPPED" ? "bg-bg-sunken text-text-secondary" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
2016
+ onClick: () => nn("STOPPED"),
2017
+ 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"}`,
2014
2018
  children: [
2015
- /* @__PURE__ */ h(gt, { className: "size-3" }),
2019
+ /* @__PURE__ */ m(vt, { className: "size-3" }),
2016
2020
  " ",
2017
- x("sessions.stoppedState", "Stopped"),
2021
+ y("sessions.stoppedState", "Stopped"),
2018
2022
  " (",
2019
- fa.stopped,
2023
+ pa.stopped,
2020
2024
  ")"
2021
2025
  ]
2022
2026
  }),
2023
- /* @__PURE__ */ h("div", {
2027
+ /* @__PURE__ */ m("div", {
2024
2028
  className: "sm:ml-auto flex items-center gap-2",
2025
- children: X.length > 0 && /* @__PURE__ */ g("button", {
2029
+ children: Z.length > 0 && /* @__PURE__ */ h("button", {
2026
2030
  type: "button",
2027
2031
  onClick: xi ? vi : _i,
2028
2032
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
2029
- children: [/* @__PURE__ */ h(et, { className: "size-3.5" }), xi ? x("sessions.deselectAll", "Deselect All") : x("sessions.selectAll", "Select All")]
2033
+ children: [/* @__PURE__ */ m(nt, { className: "size-3.5" }), xi ? y("sessions.deselectAll", "Deselect All") : y("sessions.selectAll", "Select All")]
2030
2034
  })
2031
2035
  })
2032
2036
  ]
2033
2037
  }),
2034
- pa(),
2035
- S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? /* @__PURE__ */ g("p", {
2038
+ ma(),
2039
+ b || x !== "all" || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? /* @__PURE__ */ h("p", {
2036
2040
  className: "text-sm text-text-secondary",
2037
2041
  children: [
2038
- x("sessions.showing", "Showing"),
2042
+ y("sessions.showing", "Showing"),
2039
2043
  " ",
2040
- X.length,
2044
+ Z.length,
2041
2045
  " ",
2042
- x("sessions.of", "of"),
2046
+ y("sessions.of", "of"),
2043
2047
  " ",
2044
- Y.length,
2048
+ X.length,
2045
2049
  " ",
2046
- x("nav.sessions", "sessions"),
2047
- Qr && /* @__PURE__ */ g("span", {
2050
+ y("nav.sessions", "sessions"),
2051
+ Qr && /* @__PURE__ */ h("span", {
2048
2052
  className: "ml-2 text-text-muted",
2049
2053
  children: [
2050
2054
  "(",
2051
- x("sessions.refreshing", "refreshing..."),
2055
+ y("sessions.refreshing", "refreshing..."),
2052
2056
  ")"
2053
2057
  ]
2054
2058
  })
2055
2059
  ]
2056
2060
  }) : null,
2057
- /* @__PURE__ */ h(St, {
2061
+ /* @__PURE__ */ m(wt, {
2058
2062
  mode: "wait",
2059
- children: X.length > 0 ? O === "none" ? A === "grid" ? /* @__PURE__ */ h("div", { children: _a(X) }, "grid-view") : /* @__PURE__ */ h(Ot, { children: va(X, !1) }, "list-view") : /* @__PURE__ */ h("div", {
2063
+ children: Z.length > 0 ? E === "none" ? O === "grid" ? /* @__PURE__ */ m("div", { children: va(Z) }, "grid-view") : /* @__PURE__ */ m(At, { children: ya(Z, !1) }, "list-view") : /* @__PURE__ */ m("div", {
2060
2064
  className: "space-y-3",
2061
2065
  "data-testid": "sessions-grouped",
2062
2066
  children: hi.map((e) => {
2063
- let t = e.sessions.map((e) => e.id), n = t.length > 0 && t.every((e) => I.has(e)), r = t.some((e) => I.has(e));
2064
- return /* @__PURE__ */ h(Ge, {
2067
+ let t = e.sessions.map((e) => e.id), n = t.length > 0 && t.every((e) => P.has(e)), r = t.some((e) => P.has(e));
2068
+ return /* @__PURE__ */ m(qe, {
2065
2069
  label: e.label,
2066
2070
  count: e.sessions.length,
2067
- collapsed: an.has(e.key),
2071
+ collapsed: cn.has(e.key),
2068
2072
  onToggleCollapse: () => bi(e.key),
2069
2073
  allSelected: n,
2070
2074
  someSelected: r,
2071
2075
  onToggleSelectGroup: () => yi(t),
2072
- children: A === "grid" ? _a(e.sessions) : va(e.sessions, !0)
2076
+ children: O === "grid" ? va(e.sessions) : ya(e.sessions, !0)
2073
2077
  }, e.key);
2074
2078
  })
2075
- }, "grouped-view") : /* @__PURE__ */ g("div", {
2079
+ }, "grouped-view") : /* @__PURE__ */ h("div", {
2076
2080
  className: "space-y-4",
2077
- children: [/* @__PURE__ */ h(ke, {
2081
+ children: [/* @__PURE__ */ m(je, {
2078
2082
  variant: "compact",
2079
2083
  dismissKey: "vibecontrols-sessions-setup-banner"
2080
- }), /* @__PURE__ */ h(Ee, {
2081
- icon: /* @__PURE__ */ h(_t, { className: "size-8 text-text-secondary" }),
2082
- illustration: S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? "empty-search" : "empty-sessions",
2083
- title: S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? x("sessions.emptyFound", "No sessions found") : x("sessions.emptyConfigured", "No sessions configured"),
2084
- description: S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? x("sessions.emptyAdjustSearch", "Try adjusting your search or filters") : x("sessions.emptyDescription", "Sessions require an active agent. Install the CLI agent first, then start a session."),
2085
- action: !S && C === "all" && w === "all" && T === "all" && E === "all" && D === "all" ? /* @__PURE__ */ g("div", {
2084
+ }), /* @__PURE__ */ m(Oe, {
2085
+ icon: /* @__PURE__ */ m(yt, { className: "size-8 text-text-secondary" }),
2086
+ illustration: b || x !== "all" || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? "empty-search" : "empty-sessions",
2087
+ title: b || x !== "all" || S !== "all" || C !== "all" || w !== "all" || T !== "all" ? y("sessions.emptyFound", "No sessions found") : y("sessions.emptyConfigured", "No sessions configured"),
2088
+ description: b || x !== "all" || S !== "all" || C !== "all" || w !== "all" || T !== "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."),
2089
+ action: !b && x === "all" && S === "all" && C === "all" && w === "all" && T === "all" ? /* @__PURE__ */ h("div", {
2086
2090
  className: "flex items-center gap-2",
2087
- children: [Xt && /* @__PURE__ */ g("button", {
2091
+ children: [$t && /* @__PURE__ */ h("button", {
2088
2092
  type: "button",
2089
2093
  onClick: ji,
2090
2094
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
2091
2095
  children: [
2092
- /* @__PURE__ */ h(ut, { className: "size-4" }),
2096
+ /* @__PURE__ */ m(ft, { className: "size-4" }),
2093
2097
  " ",
2094
- x("sessions.newSession", "New Session")
2098
+ y("sessions.newSession", "New Session")
2095
2099
  ]
2096
- }), /* @__PURE__ */ h(Ae, { prompt: "What is a Session in VibeControls and how do I start one?" })]
2100
+ }), /* @__PURE__ */ m(Me, { prompt: "What is a Session in VibeControls and how do I start one?" })]
2097
2101
  }) : void 0
2098
2102
  })]
2099
2103
  })
2100
2104
  }),
2101
- hn && /* @__PURE__ */ h("div", {
2105
+ vn && /* @__PURE__ */ m("div", {
2102
2106
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg-subtle text-status-success-text border border-status-success-border rounded-card shadow-elevation-3 text-sm",
2103
- children: hn
2107
+ children: vn
2104
2108
  })
2105
2109
  ]
2106
2110
  }),
2107
- B.length > 0 && /* @__PURE__ */ h(Ue, {
2108
- tabs: B,
2109
- activeTabId: H,
2110
- onTabSelect: aa,
2111
+ V.length > 0 && /* @__PURE__ */ m(Ge, {
2112
+ tabs: V,
2113
+ activeTabId: U,
2114
+ onTabSelect: oa,
2111
2115
  onTabClose: Ri,
2112
2116
  onOpenExternal: zi,
2113
2117
  onToggleCollapse: () => ir((e) => !e),
2114
2118
  collapsed: rr,
2115
- sessions: X,
2116
- onOpenTerminal: Z,
2117
- onRetryTerminal: Z,
2119
+ sessions: Z,
2120
+ onOpenTerminal: Q,
2121
+ onRetryTerminal: Q,
2118
2122
  onRenameSession: Bi,
2119
2123
  onStopTerminal: Vi,
2120
2124
  onStopSession: (e) => {
2121
- let t = Y.find((t) => t.id === e);
2125
+ let t = X.find((t) => t.id === e);
2122
2126
  t && Ni(t);
2123
2127
  },
2124
2128
  onRestartTerminal: Hi,
@@ -2128,74 +2132,74 @@ function Bt() {
2128
2132
  onShowSessionInfo: Ki,
2129
2133
  onViewAgent: qi,
2130
2134
  onViewTarget: Ji,
2131
- onShareSession: Zt ? Yi : void 0,
2132
- onCreateSession: Xt ? Oi : void 0,
2133
- onQuickCreate: Xt ? ji : void 0,
2135
+ onShareSession: en ? Yi : void 0,
2136
+ onCreateSession: $t ? Oi : void 0,
2137
+ onQuickCreate: $t ? ji : void 0,
2134
2138
  renameActiveTabNonce: ar,
2135
2139
  heightClass: "h-[280px] sm:h-[380px]",
2136
2140
  isImmersiveFullscreen: lr,
2137
- onToggleImmersiveFullscreen: Q,
2141
+ onToggleImmersiveFullscreen: Xi,
2138
2142
  contextSwitcher: void 0
2139
2143
  }),
2140
- ga
2144
+ _a
2141
2145
  ]
2142
2146
  });
2143
- function ya() {
2147
+ function ba() {
2144
2148
  if (!yr) return null;
2145
2149
  let e = Or?.agentSessionOrphans ?? [];
2146
- return /* @__PURE__ */ h("div", {
2150
+ return /* @__PURE__ */ m("div", {
2147
2151
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
2148
2152
  "data-testid": "sessions-reconnect-modal",
2149
- children: /* @__PURE__ */ g("div", {
2153
+ children: /* @__PURE__ */ h("div", {
2150
2154
  className: "bg-bg-surface rounded-card border border-border-subtle shadow-[var(--shadow-elevation-4)] p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto",
2151
2155
  children: [
2152
- /* @__PURE__ */ h("h2", {
2156
+ /* @__PURE__ */ m("h2", {
2153
2157
  className: "text-lg font-semibold text-text-primary mb-1",
2154
- children: x("sessions.reconnectTitle", "Reconnect orphan sessions")
2158
+ children: y("sessions.reconnectTitle", "Reconnect orphan sessions")
2155
2159
  }),
2156
- /* @__PURE__ */ h("p", {
2160
+ /* @__PURE__ */ m("p", {
2157
2161
  className: "text-sm text-text-secondary mb-4",
2158
- children: x("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.")
2162
+ 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.")
2159
2163
  }),
2160
- /* @__PURE__ */ g("div", {
2164
+ /* @__PURE__ */ h("div", {
2161
2165
  className: "space-y-4",
2162
2166
  children: [
2163
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
2167
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
2164
2168
  className: "block text-sm font-medium text-text-primary mb-1",
2165
- children: x("sessions.agent", "Agent")
2166
- }), /* @__PURE__ */ h(je, {
2169
+ children: y("sessions.agent", "Agent")
2170
+ }), /* @__PURE__ */ m(Ne, {
2167
2171
  options: ui,
2168
2172
  value: xr,
2169
2173
  onChange: (e) => {
2170
2174
  Sr(e), wr(null), e && Dr({ variables: { agentId: e } });
2171
2175
  },
2172
- placeholder: x("sessions.selectAgent", "Select an agent"),
2173
- searchPlaceholder: x("sessions.searchAgents", "Search agents..."),
2176
+ placeholder: y("sessions.selectAgent", "Select an agent"),
2177
+ searchPlaceholder: y("sessions.searchAgents", "Search agents..."),
2174
2178
  clearable: !0
2175
2179
  })] }),
2176
- Cr && /* @__PURE__ */ h("div", {
2180
+ Cr && /* @__PURE__ */ m("div", {
2177
2181
  className: "p-3 bg-status-error-bg-subtle text-status-error-text border border-status-error-border text-sm rounded-card",
2178
2182
  "data-testid": "sessions-reconnect-error",
2179
2183
  children: Cr
2180
2184
  }),
2181
- xr && /* @__PURE__ */ h("div", {
2185
+ xr && /* @__PURE__ */ m("div", {
2182
2186
  "data-testid": "sessions-reconnect-list",
2183
2187
  className: "space-y-2",
2184
- children: kr ? /* @__PURE__ */ h("div", {
2188
+ children: kr ? /* @__PURE__ */ m("div", {
2185
2189
  className: "text-sm text-text-secondary",
2186
- children: x("sessions.scanningHost", "Scanning host...")
2187
- }) : e.length === 0 ? /* @__PURE__ */ h("div", {
2190
+ children: y("sessions.scanningHost", "Scanning host...")
2191
+ }) : e.length === 0 ? /* @__PURE__ */ m("div", {
2188
2192
  className: "text-sm text-text-secondary",
2189
- children: x("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
2190
- }) : e.map((e) => /* @__PURE__ */ g("div", {
2193
+ children: y("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
2194
+ }) : e.map((e) => /* @__PURE__ */ h("div", {
2191
2195
  className: "flex items-center justify-between gap-3 p-3 border border-border-default rounded-md bg-bg-sunken/40",
2192
2196
  "data-testid": "sessions-reconnect-row",
2193
- children: [/* @__PURE__ */ g("div", {
2197
+ children: [/* @__PURE__ */ h("div", {
2194
2198
  className: "min-w-0 flex-1",
2195
- children: [/* @__PURE__ */ h("div", {
2199
+ children: [/* @__PURE__ */ m("div", {
2196
2200
  className: "font-mono text-sm text-text-primary break-all",
2197
2201
  children: e.externalName
2198
- }), /* @__PURE__ */ g("div", {
2202
+ }), /* @__PURE__ */ h("div", {
2199
2203
  className: "text-xs text-text-tertiary mt-0.5",
2200
2204
  children: [
2201
2205
  e.provider,
@@ -2207,7 +2211,7 @@ function Bt() {
2207
2211
  e.createdAt ? ` · created ${e.createdAt}` : ""
2208
2212
  ]
2209
2213
  })]
2210
- }), /* @__PURE__ */ h("button", {
2214
+ }), /* @__PURE__ */ m("button", {
2211
2215
  type: "button",
2212
2216
  disabled: Tr === e.externalName,
2213
2217
  onClick: async () => {
@@ -2226,201 +2230,201 @@ function Bt() {
2226
2230
  },
2227
2231
  className: "shrink-0 px-3 py-1.5 text-xs bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
2228
2232
  "data-testid": `sessions-reconnect-adopt-${e.externalName}`,
2229
- children: Tr === e.externalName ? x("sessions.adopting", "Adopting…") : x("sessions.adopt", "Adopt")
2233
+ children: Tr === e.externalName ? y("sessions.adopting", "Adopting…") : y("sessions.adopt", "Adopt")
2230
2234
  })]
2231
2235
  }, e.externalName))
2232
2236
  })
2233
2237
  ]
2234
2238
  }),
2235
- /* @__PURE__ */ h("div", {
2239
+ /* @__PURE__ */ m("div", {
2236
2240
  className: "flex justify-end gap-3 mt-6",
2237
- children: /* @__PURE__ */ h("button", {
2241
+ children: /* @__PURE__ */ m("button", {
2238
2242
  type: "button",
2239
2243
  onClick: () => {
2240
2244
  br(!1), wr(null);
2241
2245
  },
2242
2246
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
2243
- children: x("common.close", "Close")
2247
+ children: y("common.close", "Close")
2244
2248
  })
2245
2249
  })
2246
2250
  ]
2247
2251
  })
2248
2252
  });
2249
2253
  }
2250
- function ba() {
2251
- return /* @__PURE__ */ h("div", {
2254
+ function xa() {
2255
+ return /* @__PURE__ */ m("div", {
2252
2256
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
2253
- children: /* @__PURE__ */ g("div", {
2257
+ children: /* @__PURE__ */ h("div", {
2254
2258
  className: "bg-bg-surface rounded-card border border-border-subtle shadow-[var(--shadow-elevation-4)] p-6 w-full max-w-lg",
2255
2259
  children: [
2256
- /* @__PURE__ */ h("h2", {
2260
+ /* @__PURE__ */ m("h2", {
2257
2261
  className: "text-lg font-semibold text-text-primary mb-4",
2258
- children: x("sessions.newSession", "New Session")
2262
+ children: y("sessions.newSession", "New Session")
2259
2263
  }),
2260
- /* @__PURE__ */ g("div", {
2264
+ /* @__PURE__ */ h("div", {
2261
2265
  className: "space-y-4",
2262
2266
  children: [
2263
- fn && /* @__PURE__ */ h("div", {
2267
+ hn && /* @__PURE__ */ m("div", {
2264
2268
  className: "p-3 bg-status-error-bg-subtle text-status-error-text border border-status-error-border text-sm rounded-card",
2265
- children: fn
2269
+ children: hn
2266
2270
  }),
2267
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
2271
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
2268
2272
  className: "block text-sm font-medium text-text-primary mb-1",
2269
- children: x("sessions.name", "Name")
2270
- }), /* @__PURE__ */ h("input", {
2273
+ children: y("sessions.name", "Name")
2274
+ }), /* @__PURE__ */ m("input", {
2271
2275
  "aria-label": "control",
2272
- ref: Sn,
2276
+ ref: wn,
2273
2277
  type: "text",
2274
- placeholder: x("sessions.namePlaceholder", "dev-server"),
2278
+ placeholder: y("sessions.namePlaceholder", "dev-server"),
2275
2279
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
2276
2280
  })] }),
2277
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
2281
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
2278
2282
  className: "block text-sm font-medium text-text-primary mb-1",
2279
- children: x("sessions.filterVibe", "Vibe")
2280
- }), /* @__PURE__ */ h(je, {
2283
+ children: y("sessions.filterVibe", "Vibe")
2284
+ }), /* @__PURE__ */ m(Ne, {
2281
2285
  options: li,
2282
- value: En,
2283
- onChange: Dn,
2284
- placeholder: x("sessions.noVibe", "No vibe"),
2285
- searchPlaceholder: x("sessions.searchVibes", "Search vibes..."),
2286
+ value: On,
2287
+ onChange: kn,
2288
+ placeholder: y("sessions.noVibe", "No vibe"),
2289
+ searchPlaceholder: y("sessions.searchVibes", "Search vibes..."),
2286
2290
  clearable: !0
2287
2291
  })] }),
2288
- /* @__PURE__ */ g("div", { children: [
2289
- /* @__PURE__ */ h("label", {
2292
+ /* @__PURE__ */ h("div", { children: [
2293
+ /* @__PURE__ */ m("label", {
2290
2294
  className: "block text-sm font-medium text-text-primary mb-1",
2291
- children: x("sessions.filterAgent", "Agent")
2295
+ children: y("sessions.filterAgent", "Agent")
2292
2296
  }),
2293
- /* @__PURE__ */ h(je, {
2297
+ /* @__PURE__ */ m(Ne, {
2294
2298
  options: ui,
2295
- value: On,
2296
- onChange: kn,
2297
- placeholder: x("sessions.selectAgent", "Select an agent"),
2298
- searchPlaceholder: x("sessions.searchAgents", "Search agents..."),
2299
+ value: An,
2300
+ onChange: jn,
2301
+ placeholder: y("sessions.selectAgent", "Select an agent"),
2302
+ searchPlaceholder: y("sessions.searchAgents", "Search agents..."),
2299
2303
  clearable: !0
2300
2304
  }),
2301
- /* @__PURE__ */ h("p", {
2305
+ /* @__PURE__ */ m("p", {
2302
2306
  className: "text-xs text-text-muted mt-1",
2303
- children: x("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
2307
+ children: y("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
2304
2308
  })
2305
2309
  ] }),
2306
- /* @__PURE__ */ g("div", { children: [
2307
- /* @__PURE__ */ h("label", {
2310
+ /* @__PURE__ */ h("div", { children: [
2311
+ /* @__PURE__ */ m("label", {
2308
2312
  className: "block text-sm font-medium text-text-primary mb-1",
2309
- children: x("sessions.profile", "Profile")
2313
+ children: y("sessions.profile", "Profile")
2310
2314
  }),
2311
- /* @__PURE__ */ h(je, {
2315
+ /* @__PURE__ */ m(Ne, {
2312
2316
  options: fi,
2313
- value: An,
2314
- onChange: jn,
2315
- placeholder: x("sessions.selectProfile", "default"),
2316
- searchPlaceholder: x("sessions.searchProfiles", "Search profiles...")
2317
+ value: Mn,
2318
+ onChange: Nn,
2319
+ placeholder: y("sessions.selectProfile", "default"),
2320
+ searchPlaceholder: y("sessions.searchProfiles", "Search profiles...")
2317
2321
  }),
2318
- /* @__PURE__ */ h("p", {
2322
+ /* @__PURE__ */ m("p", {
2319
2323
  className: "text-xs text-text-muted mt-1",
2320
- children: x("sessions.profileHint", "Which agent profile this session targets. Defaults to \"default\" — change only if the agent runs multiple isolated profiles.")
2324
+ children: y("sessions.profileHint", "Which agent profile this session targets. Defaults to \"default\" — change only if the agent runs multiple isolated profiles.")
2321
2325
  })
2322
2326
  ] }),
2323
- /* @__PURE__ */ g("div", { children: [
2324
- /* @__PURE__ */ h("label", {
2327
+ /* @__PURE__ */ h("div", { children: [
2328
+ /* @__PURE__ */ m("label", {
2325
2329
  className: "block text-sm font-medium text-text-primary mb-1",
2326
- children: x("sessions.filterType", "Type")
2330
+ children: y("sessions.filterType", "Type")
2327
2331
  }),
2328
- /* @__PURE__ */ h(je, {
2332
+ /* @__PURE__ */ m(Ne, {
2329
2333
  options: pi,
2330
- value: R,
2331
- onChange: Mn,
2332
- placeholder: x("sessions.selectType", "Select type"),
2333
- searchPlaceholder: x("sessions.searchTypes", "Search types...")
2334
+ value: L,
2335
+ onChange: Pn,
2336
+ placeholder: y("sessions.selectType", "Select type"),
2337
+ searchPlaceholder: y("sessions.searchTypes", "Search types...")
2334
2338
  }),
2335
- R === "TERMINAL" && /* @__PURE__ */ h("p", {
2339
+ L === "TERMINAL" && /* @__PURE__ */ m("p", {
2336
2340
  className: "mt-1 text-xs text-text-muted",
2337
- children: x("sessions.terminalTypeHint", "Plain terminal — a shell over ttyd with no tmux/wezterm/zellij multiplexer and no persisted session. Native drag-to-select copy/paste.")
2341
+ children: y("sessions.terminalTypeHint", "Plain terminal — a shell over ttyd with no tmux/wezterm/zellij multiplexer and no persisted session. Native drag-to-select copy/paste.")
2338
2342
  })
2339
2343
  ] }),
2340
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
2344
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
2341
2345
  className: "block text-sm font-medium text-text-primary mb-1",
2342
- children: x("sessions.command", "Command")
2343
- }), /* @__PURE__ */ h("input", {
2346
+ children: y("sessions.command", "Command")
2347
+ }), /* @__PURE__ */ m("input", {
2344
2348
  "aria-label": "control",
2345
- ref: Cn,
2349
+ ref: Tn,
2346
2350
  type: "text",
2347
- placeholder: x("sessions.commandPlaceholder", "bun run dev"),
2351
+ placeholder: y("sessions.commandPlaceholder", "bun run dev"),
2348
2352
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
2349
2353
  })] }),
2350
- /* @__PURE__ */ g("div", {
2354
+ /* @__PURE__ */ h("div", {
2351
2355
  className: "flex items-center gap-2",
2352
- children: [/* @__PURE__ */ h("input", {
2356
+ children: [/* @__PURE__ */ m("input", {
2353
2357
  "aria-label": "autoStart",
2354
- ref: wn,
2358
+ ref: En,
2355
2359
  type: "checkbox",
2356
2360
  id: "autoStart",
2357
2361
  className: "size-4 rounded border-border-default"
2358
- }), /* @__PURE__ */ h("label", {
2362
+ }), /* @__PURE__ */ m("label", {
2359
2363
  htmlFor: "autoStart",
2360
2364
  className: "text-sm text-text-primary",
2361
- children: x("sessions.autoStartWithVibe", "Auto-start with vibe")
2365
+ children: y("sessions.autoStartWithVibe", "Auto-start with vibe")
2362
2366
  })]
2363
2367
  }),
2364
- (R === "TMUX" || R === "WEZTERM" || R === "ZELLIJ") && /* @__PURE__ */ g("div", {
2368
+ (L === "TMUX" || L === "WEZTERM" || L === "ZELLIJ") && /* @__PURE__ */ h("div", {
2365
2369
  className: "rounded-md border border-border-default bg-bg-sunken/40",
2366
2370
  "data-testid": "sessions-create-advanced",
2367
- children: [/* @__PURE__ */ g("button", {
2371
+ children: [/* @__PURE__ */ h("button", {
2368
2372
  type: "button",
2369
- onClick: () => Pn((e) => !e),
2373
+ onClick: () => In((e) => !e),
2370
2374
  className: "w-full flex items-center justify-between px-3 py-2 text-sm font-medium text-text-primary",
2371
- "aria-expanded": Nn,
2372
- children: [/* @__PURE__ */ h("span", { children: x("sessions.advanced", "Advanced options") }), /* @__PURE__ */ h("span", {
2375
+ "aria-expanded": Fn,
2376
+ children: [/* @__PURE__ */ m("span", { children: y("sessions.advanced", "Advanced options") }), /* @__PURE__ */ m("span", {
2373
2377
  className: "text-text-tertiary text-xs",
2374
- children: Nn ? "▾" : "▸"
2378
+ children: Fn ? "▾" : "▸"
2375
2379
  })]
2376
- }), Nn && /* @__PURE__ */ g("div", {
2380
+ }), Fn && /* @__PURE__ */ h("div", {
2377
2381
  className: "px-3 pb-3 space-y-2",
2378
2382
  children: [
2379
- /* @__PURE__ */ h("label", {
2383
+ /* @__PURE__ */ m("label", {
2380
2384
  className: "block text-xs font-medium text-text-secondary",
2381
- children: x("sessions.attachExistingLabel", "Attach to existing session (optional)")
2385
+ children: y("sessions.attachExistingLabel", "Attach to existing session (optional)")
2382
2386
  }),
2383
- /* @__PURE__ */ h("input", {
2387
+ /* @__PURE__ */ m("input", {
2384
2388
  "aria-label": "control",
2385
- ref: Tn,
2389
+ ref: Dn,
2386
2390
  type: "text",
2387
2391
  "data-testid": "sessions-create-external-name",
2388
- placeholder: R === "WEZTERM" ? "e.g. vibe-051c9c62 (existing wezterm workspace)" : R === "ZELLIJ" ? "e.g. vibe-051c9c62 (existing zellij session)" : "e.g. vibe-051c9c62 (existing tmux session)",
2392
+ placeholder: L === "WEZTERM" ? "e.g. vibe-051c9c62 (existing wezterm workspace)" : L === "ZELLIJ" ? "e.g. vibe-051c9c62 (existing zellij session)" : "e.g. vibe-051c9c62 (existing tmux session)",
2389
2393
  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"
2390
2394
  }),
2391
- /* @__PURE__ */ h("p", {
2395
+ /* @__PURE__ */ m("p", {
2392
2396
  className: "text-xs text-text-tertiary",
2393
- children: x("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
2397
+ children: y("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
2394
2398
  })
2395
2399
  ]
2396
2400
  })]
2397
2401
  })
2398
2402
  ]
2399
2403
  }),
2400
- /* @__PURE__ */ g("div", {
2404
+ /* @__PURE__ */ h("div", {
2401
2405
  className: "border-t border-border-default pt-4",
2402
- children: [/* @__PURE__ */ h("h3", {
2406
+ children: [/* @__PURE__ */ m("h3", {
2403
2407
  className: "text-sm font-medium text-text-secondary mb-2",
2404
- children: x("sessions.tags", "Tags")
2405
- }), /* @__PURE__ */ h(we, {
2408
+ children: y("sessions.tags", "Tags")
2409
+ }), /* @__PURE__ */ m(Ee, {
2406
2410
  entityType: "VIBECONTROLS_SESSION",
2407
2411
  onDraftChange: _r
2408
2412
  })]
2409
2413
  }),
2410
- /* @__PURE__ */ g("div", {
2414
+ /* @__PURE__ */ h("div", {
2411
2415
  className: "flex justify-end gap-3 mt-6",
2412
- children: [/* @__PURE__ */ h("button", {
2416
+ children: [/* @__PURE__ */ m("button", {
2413
2417
  type: "button",
2414
- onClick: () => M(!1),
2415
- disabled: pn,
2418
+ onClick: () => A(!1),
2419
+ disabled: gn,
2416
2420
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
2417
- children: x("common.cancel", "Cancel")
2418
- }), /* @__PURE__ */ h("button", {
2421
+ children: y("common.cancel", "Cancel")
2422
+ }), /* @__PURE__ */ m("button", {
2419
2423
  type: "button",
2420
2424
  onClick: Ai,
2421
- disabled: pn,
2425
+ disabled: gn,
2422
2426
  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",
2423
- children: pn ? x("sessions.creating", "Creating...") : x("sessions.createSession", "Create Session")
2427
+ children: gn ? y("sessions.creating", "Creating...") : y("sessions.createSession", "Create Session")
2424
2428
  })]
2425
2429
  })
2426
2430
  ]
@@ -2429,4 +2433,4 @@ function Bt() {
2429
2433
  }
2430
2434
  }
2431
2435
  //#endregion
2432
- export { Bt as SessionsPage };
2436
+ export { Ht as SessionsPage };