@burdenoff/microfe-vibecontrols 2026.602.2 → 2026.602.4

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.
Files changed (33) hide show
  1. package/dist/components/actions/ActionCard.js +87 -74
  2. package/dist/components/actions/ActionCard.js.map +1 -1
  3. package/dist/components/ai/InstructionFilesManager.js +149 -141
  4. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  5. package/dist/components/sessions/SessionShareDialog.js +24 -462
  6. package/dist/components/sessions/SessionShareDialog.js.map +1 -1
  7. package/dist/components/shared/EntityVibeLinkControl.js +204 -0
  8. package/dist/components/shared/EntityVibeLinkControl.js.map +1 -0
  9. package/dist/components/shared/index.js +1 -0
  10. package/dist/components/sharing/entityShareOps.js +106 -0
  11. package/dist/components/sharing/entityShareOps.js.map +1 -1
  12. package/dist/components/sharing/shareRegistry.js +3 -3
  13. package/dist/components/sharing/shareRegistry.js.map +1 -1
  14. package/dist/components/tunnels/TunnelCard.js +51 -43
  15. package/dist/components/tunnels/TunnelCard.js.map +1 -1
  16. package/dist/components/vibe/VibeLinkedEntitiesPanel.js +117 -89
  17. package/dist/components/vibe/VibeLinkedEntitiesPanel.js.map +1 -1
  18. package/dist/components/vibedeck/VibeDeckShareDialog.js +19 -335
  19. package/dist/components/vibedeck/VibeDeckShareDialog.js.map +1 -1
  20. package/dist/constants/permissions.js +1 -0
  21. package/dist/constants/permissions.js.map +1 -1
  22. package/dist/generated/wspace-operations.js +1618 -1593
  23. package/dist/generated/wspace-operations.js.map +1 -1
  24. package/dist/generated/wspace-types.js +10 -10
  25. package/dist/generated/wspace-types.js.map +1 -1
  26. package/dist/index.js +10 -10
  27. package/dist/pages/SessionsPage.js +1011 -1007
  28. package/dist/pages/SessionsPage.js.map +1 -1
  29. package/dist/pages/VibeDeckPage.js +218 -210
  30. package/dist/pages/VibeDeckPage.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/utils/shareUrl.js +0 -41
  33. package/dist/utils/shareUrl.js.map +0 -1
@@ -1,50 +1,52 @@
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 c, useListSessionsQuery as ee, useRestartSessionMutation as te, useRestartSessionTerminalMutation as ne, useSessionStatusChangedSubscription as re, useStartSessionMutation as ie, useStartSessionTerminalMutation as ae, useStopSessionMutation as oe, useStopSessionTerminalMutation as se, useTerminateSessionMutation as ce, useUpdateSessionMutation as le, useVibecontrolsAgentHealthProbeStreamSubscription as ue, useVibecontrolsAgentHealthProbesLazyQuery as de } from "../generated/wspace-operations.js";
2
- import { ConfirmDialog as fe } from "../components/shared/ConfirmDialog.js";
3
- import { getQuotaDialogContent as pe, isQuotaExhaustedError as l, markQuotaHandledLocally as u } from "../utils/quotaUtils.js";
4
- import { useVibeControls as me, useVibeNavigate as he } from "../providers/VibeControlsProvider.js";
5
- import { useVibeControlsStore as ge } from "../store/vibeControlsStore.js";
6
- import _e from "../hooks/useCachedInitialData.js";
7
- import { PageHeader as ve } from "../components/shared/PageHeader.js";
8
- import { LoadingState as ye } from "../components/shared/LoadingState.js";
9
- import { ErrorState as be } from "../components/shared/ErrorState.js";
10
- import { EntityTagPicker as xe } from "../components/shared/EntityTagPicker.js";
11
- import { useDraftEntityTags as Se } from "../hooks/useDraftEntityTags.js";
12
- import { EmptyState as Ce } from "../components/shared/EmptyState.js";
13
- import { SearchInput as we } from "../components/shared/SearchInput.js";
14
- import { FilterDropdown as Te } from "../components/shared/FilterDropdown.js";
15
- import { AgentSetupBanner as Ee } from "../components/shared/AgentSetupBanner.js";
16
- import { GetHelpButton as De } from "../components/shared/GetHelpButton.js";
17
- import { SearchableSelect as Oe } from "../components/shared/SearchableSelect.js";
18
- import ke from "../components/shared/SessionNotificationBanner.js";
19
- import { getAgentStatus as Ae } 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 s, 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 { getQuotaDialogContent as me, isQuotaExhaustedError as c, markQuotaHandledLocally as l } from "../utils/quotaUtils.js";
4
+ import { useVibeControls as he, useVibeNavigate as ge } from "../providers/VibeControlsProvider.js";
5
+ import { useVibeControlsStore as _e } from "../store/vibeControlsStore.js";
6
+ import ve from "../hooks/useCachedInitialData.js";
7
+ import { PageHeader as ye } from "../components/shared/PageHeader.js";
8
+ import { LoadingState as be } from "../components/shared/LoadingState.js";
9
+ import { ErrorState as xe } from "../components/shared/ErrorState.js";
10
+ import { EntityTagPicker as Se } from "../components/shared/EntityTagPicker.js";
11
+ import { useDraftEntityTags as Ce } from "../hooks/useDraftEntityTags.js";
12
+ import { EmptyState as we } from "../components/shared/EmptyState.js";
13
+ import { SearchInput as Te } from "../components/shared/SearchInput.js";
14
+ import { FilterDropdown as Ee } from "../components/shared/FilterDropdown.js";
15
+ import { AgentSetupBanner as De } from "../components/shared/AgentSetupBanner.js";
16
+ import { GetHelpButton as Oe } from "../components/shared/GetHelpButton.js";
17
+ import { SearchableSelect as ke } from "../components/shared/SearchableSelect.js";
18
+ import Ae from "../components/shared/SessionNotificationBanner.js";
19
+ import { getAgentStatus as je } from "../components/agents/agentStatus.js";
20
20
  import "../components/shared/index.js";
21
- import { VIBE_PERMISSIONS as je } from "../constants/permissions.js";
22
- import { AgentInfoPopover as Me, TargetInfoPopover as Ne } from "../components/sessions/EntityInfoPopover.js";
23
- import { SessionCard as Pe } from "../components/sessions/SessionCard.js";
24
- import { SessionList as Fe } from "../components/sessions/SessionList.js";
25
- import { TerminalPanel as Ie } from "../components/sessions/TerminalPanel.js";
26
- import { SessionShareDialog as Le } from "../components/sessions/SessionShareDialog.js";
27
- import { SessionGroup as Re } from "../components/sessions/SessionGroup.js";
28
- import { groupSessions as ze } from "../components/sessions/groupSessions.js";
29
- import { buildSessionShortcuts as Be } from "../components/sessions/sessionShortcuts.js";
30
- import { ShortcutCheatsheet as Ve } from "../components/sessions/ShortcutCheatsheet.js";
31
- import { SessionsCommandPalette as He } from "../components/sessions/SessionsCommandPalette.js";
32
- import { SessionInfoPanel as Ue } from "../components/sessions/SessionInfoPanel.js";
21
+ import { VIBE_PERMISSIONS as Me } from "../constants/permissions.js";
22
+ import { EntityShareButton as Ne } from "../components/sharing/EntityShareButton.js";
23
+ import "../components/sharing/index.js";
24
+ import { AgentInfoPopover as Pe, TargetInfoPopover as Fe } from "../components/sessions/EntityInfoPopover.js";
25
+ import { SessionCard as Ie } from "../components/sessions/SessionCard.js";
26
+ import { SessionList as Le } from "../components/sessions/SessionList.js";
27
+ import { TerminalPanel as Re } from "../components/sessions/TerminalPanel.js";
28
+ import { SessionShareDialog as ze } from "../components/sessions/SessionShareDialog.js";
29
+ import { SessionGroup as Be } from "../components/sessions/SessionGroup.js";
30
+ import { groupSessions as Ve } from "../components/sessions/groupSessions.js";
31
+ import { buildSessionShortcuts as He } from "../components/sessions/sessionShortcuts.js";
32
+ import { ShortcutCheatsheet as Ue } from "../components/sessions/ShortcutCheatsheet.js";
33
+ import { SessionsCommandPalette as We } from "../components/sessions/SessionsCommandPalette.js";
34
+ import { SessionInfoPanel as Ge } from "../components/sessions/SessionInfoPanel.js";
33
35
  import "../components/sessions/index.js";
34
- import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
35
- import { useI18n as We } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
36
- import { Activity as Ge, CheckSquare as Ke, Grid as qe, Info as Je, Keyboard as Ye, Layers as Xe, List as Ze, Monitor as Qe, MonitorSmartphone as $e, Play as et, Plus as tt, RefreshCw as nt, RotateCcw as rt, Server as it, Share2 as at, Square as ot, Terminal as st, Trash2 as ct, XSquare as lt } from "lucide-react";
37
- import { useSearchParams as ut } from "react-router-dom";
38
- import { usePermissions as dt } from "@burdenoff/fe-libs/shared/providers/shell";
39
- import { AnimatePresence as ft } from "framer-motion";
40
- import { Fragment as pt, jsx as g, jsxs as _ } from "react/jsx-runtime";
41
- import { useEventBus as mt } from "@burdenoff/fe-libs/shared/events";
42
- import { SaveToFilesButton as ht } from "@burdenoff/fe-libs/storage";
43
- import { AccessDenied as gt, PermissionButton as _t } from "@burdenoff/fe-libs/shared/components";
44
- import { MotionItem as vt, MotionList as yt, MotionPage as v } from "@burdenoff/fe-libs/shared/motion";
36
+ import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
37
+ import { useI18n as Ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
38
+ import { Activity as qe, CheckSquare as Je, Grid as Ye, Info as Xe, Keyboard as Ze, Layers as Qe, List as $e, Monitor as et, MonitorSmartphone as tt, Play as nt, Plus as rt, RefreshCw as it, RotateCcw as at, Server as ot, Share2 as st, Square as ct, Terminal as lt, Trash2 as ut, XSquare as dt } from "lucide-react";
39
+ import { useSearchParams as ft } from "react-router-dom";
40
+ import { usePermissions as pt } from "@burdenoff/fe-libs/shared/providers/shell";
41
+ import { AnimatePresence as mt } from "framer-motion";
42
+ import { Fragment as ht, jsx as h, jsxs as g } from "react/jsx-runtime";
43
+ import { useEventBus as gt } from "@burdenoff/fe-libs/shared/events";
44
+ import { SaveToFilesButton as _t } from "@burdenoff/fe-libs/storage";
45
+ import { AccessDenied as vt, PermissionButton as yt } from "@burdenoff/fe-libs/shared/components";
46
+ import { MotionItem as bt, MotionList as xt, MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
45
47
  //#region src/pages/SessionsPage.tsx
46
- var bt = 3e5;
47
- function xt(e, t) {
48
+ var St = 3e5;
49
+ function Ct(e, t) {
48
50
  if (!e) return null;
49
51
  try {
50
52
  let n = new URL(e);
@@ -61,7 +63,7 @@ function xt(e, t) {
61
63
  return e;
62
64
  }
63
65
  }
64
- function St(e, t, n, r) {
66
+ function wt(e, t, n, r) {
65
67
  if (e !== "RUNNING") return e;
66
68
  if (r === !1) return "ERROR";
67
69
  if (!t) return e;
@@ -74,221 +76,221 @@ function St(e, t, n, r) {
74
76
  }
75
77
  return e;
76
78
  }
77
- function Ct() {
78
- let { t: Ct } = We(), { onSessionStart: wt, workspaceId: y } = me(), b = mt(), x = he(), { hasPermission: Tt, isLoading: Et, permissions: Dt } = dt(), [S, Ot] = ut(), C = d((e, t, n) => {
79
- let r = Ct(e, n), i = r === e ? t : r;
79
+ function Tt() {
80
+ let { t: Tt } = Ke(), { onSessionStart: Et, workspaceId: v } = he(), y = gt(), b = ge(), { hasPermission: Dt, isLoading: Ot, permissions: kt } = pt(), [At, jt] = ft(), x = u((e, t, n) => {
81
+ let r = Tt(e, n), i = r === e ? t : r;
80
82
  return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
81
- }, [Ct]), kt = p(() => [
83
+ }, [Tt]), Mt = f(() => [
82
84
  {
83
85
  value: "all",
84
- label: C("sessions.statusAll", "All Statuses")
86
+ label: x("sessions.statusAll", "All Statuses")
85
87
  },
86
88
  {
87
89
  value: "RUNNING",
88
- label: C("sessions.running", "Running")
90
+ label: x("sessions.running", "Running")
89
91
  },
90
92
  {
91
93
  value: "STOPPED",
92
- label: C("sessions.stopped", "Stopped")
94
+ label: x("sessions.stopped", "Stopped")
93
95
  },
94
96
  {
95
97
  value: "STARTING",
96
- label: C("sessions.starting", "Starting")
98
+ label: x("sessions.starting", "Starting")
97
99
  },
98
100
  {
99
101
  value: "ERROR",
100
- label: C("common.error", "Error")
102
+ label: x("common.error", "Error")
101
103
  }
102
- ], [C]), At = p(() => [
104
+ ], [x]), Nt = f(() => [
103
105
  {
104
106
  value: "all",
105
- label: C("sessions.typeAll", "All Types")
107
+ label: x("sessions.typeAll", "All Types")
106
108
  },
107
109
  {
108
110
  value: "TMUX",
109
- label: C("sessions.typeTmux", "Tmux")
111
+ label: x("sessions.typeTmux", "Tmux")
110
112
  },
111
113
  {
112
114
  value: "TERMINAL",
113
- label: C("sessions.typeTerminal", "Terminal")
115
+ label: x("sessions.typeTerminal", "Terminal")
114
116
  },
115
117
  {
116
118
  value: "SCRIPT",
117
- label: C("sessions.typeScript", "Script")
119
+ label: x("sessions.typeScript", "Script")
118
120
  },
119
121
  {
120
122
  value: "CUSTOM",
121
- label: C("sessions.typeCustom", "Custom")
123
+ label: x("sessions.typeCustom", "Custom")
122
124
  }
123
- ], [C]), jt = Tt(je.SESSION_LIST), Mt = Tt(je.SESSION_CREATE), Nt = Tt(je.SESSION_UPDATE), [w, Pt] = h(""), [T, Ft] = h("all"), [E, It] = h("all"), [D, Lt] = h("all"), [O, Rt] = h("all"), [k, zt] = h("all"), [A, j] = h("none"), [Bt, Vt] = h(() => /* @__PURE__ */ new Set()), [M, N] = h("terminal"), [Ht, P] = h(!1), [Ut, F] = h(!1), [Wt, I] = h(null), [Gt, Kt] = h(!1), [qt, L] = h(null), [R, z] = h(/* @__PURE__ */ new Set()), [Jt, Yt] = h(!1), [Xt, Zt] = h(!1), Qt = m(null), $t = m(null), en = m(null), tn = m(null), nn = m(null), [rn, an] = h(""), [on, sn] = h(""), [cn, ln] = h("default"), [B, un] = h("TMUX"), [dn, fn] = h(!1), { terminalTabs: pn, activeTerminalTabId: mn, sessionsViewMode: hn, sessionsGroupBy: gn, sessionsTargetFilter: _n, setTerminalTabs: vn, setActiveTerminalTabId: yn, setSessionsViewMode: bn, setSessionsGroupBy: xn, setSessionsTargetFilter: Sn, sessionInfoPanelOpen: Cn, setSessionInfoPanelOpen: wn, activeSessionId: V } = ge(), [H, U] = h([]), [W, G] = h(null), [Tn, En] = h(!1), [Dn, On] = h(!1), [kn, K] = h(!1), [An, jn] = h(null), [Mn, Nn] = h(!1), [q, Pn] = h(!1), Fn = S.get("view"), In = S.get("session"), Ln = S.get("group"), Rn = S.get("target"), [zn] = o({ refetchQueries: ["ListSessions"] }), { setDraftTagIds: Bn, flushTags: Vn } = Se("VIBECONTROLS_SESSION"), [Hn, Un] = h(!1), [Wn, Gn] = h(""), [Kn, qn] = h(null), [Jn, Yn] = h(null), [Xn, { data: Zn, loading: Qn }] = t({ fetchPolicy: "network-only" }), [$n] = e({ refetchQueries: ["ListSessions"] }), [er] = ie({ refetchQueries: ["ListSessions"] }), [tr] = oe({ refetchQueries: ["ListSessions"] }), [nr] = te({ refetchQueries: ["ListSessions"] }), [J] = ae({ refetchQueries: ["ListSessions"] }), [rr] = se({ refetchQueries: ["ListSessions"] }), [ir] = ne({ refetchQueries: ["ListSessions"] }), [ar] = le({ refetchQueries: ["ListSessions"] }), [or] = ce({ refetchQueries: ["ListSessions"] }), [sr] = a({ refetchQueries: ["ListSessions"] }), [cr] = r({ refetchQueries: ["ListSessions"] }), [lr] = n({ refetchQueries: ["ListSessions"] }), [ur] = i({ refetchQueries: ["ListSessions"] }), [dr] = s();
124
- f(() => {
125
- q || (Fn === "terminal" || Fn === "grid" || Fn === "list" ? N(Fn) : hn && N(hn), In ? G(In) : mn && G(mn), Ln && [
125
+ ], [x]), Pt = Dt(Me.SESSION_LIST), Ft = Dt(Me.SESSION_CREATE), It = Dt(Me.SESSION_UPDATE), [S, Lt] = m(""), [C, Rt] = m("all"), [w, zt] = m("all"), [T, Bt] = m("all"), [E, Vt] = m("all"), [D, Ht] = m("all"), [O, k] = m("none"), [Ut, Wt] = m(() => /* @__PURE__ */ new Set()), [A, j] = m("terminal"), [Gt, M] = m(!1), [Kt, N] = m(!1), [qt, P] = m(null), [Jt, Yt] = m(!1), [Xt, F] = m(null), [I, L] = m(/* @__PURE__ */ new Set()), [Zt, Qt] = m(!1), [$t, en] = m(!1), tn = p(null), nn = p(null), rn = p(null), an = p(null), on = p(null), [sn, cn] = m(""), [ln, un] = m(""), [dn, fn] = m("default"), [R, pn] = m("TMUX"), [mn, hn] = m(!1), { terminalTabs: gn, activeTerminalTabId: _n, sessionsViewMode: vn, sessionsGroupBy: yn, sessionsTargetFilter: bn, setTerminalTabs: xn, setActiveTerminalTabId: Sn, setSessionsViewMode: Cn, setSessionsGroupBy: wn, setSessionsTargetFilter: Tn, sessionInfoPanelOpen: En, setSessionInfoPanelOpen: Dn, activeSessionId: z } = _e(), [B, V] = m([]), [H, U] = m(null), [On, kn] = m(!1), [An, jn] = m(!1), [Mn, W] = m(!1), [Nn, Pn] = m(null), [Fn, In] = m(!1), [G, Ln] = m(!1), Rn = At.get("view"), zn = At.get("session"), Bn = At.get("group"), Vn = At.get("target"), [Hn] = o({ refetchQueries: ["ListSessions"] }), { setDraftTagIds: Un, flushTags: Wn } = Ce("VIBECONTROLS_SESSION"), [Gn, Kn] = m(!1), [qn, Jn] = m(""), [Yn, Xn] = m(null), [Zn, Qn] = m(null), [$n, { data: er, loading: tr }] = t({ fetchPolicy: "network-only" }), [nr] = e({ refetchQueries: ["ListSessions"] }), [rr] = ae({ refetchQueries: ["ListSessions"] }), [ir] = se({ refetchQueries: ["ListSessions"] }), [ar] = ne({ refetchQueries: ["ListSessions"] }), [K] = oe({ refetchQueries: ["ListSessions"] }), [or] = ce({ refetchQueries: ["ListSessions"] }), [sr] = re({ refetchQueries: ["ListSessions"] }), [cr] = ue({ refetchQueries: ["ListSessions"] }), [lr] = le({ refetchQueries: ["ListSessions"] }), [ur] = a({ refetchQueries: ["ListSessions"] }), [dr] = r({ refetchQueries: ["ListSessions"] }), [fr] = n({ refetchQueries: ["ListSessions"] }), [pr] = i({ refetchQueries: ["ListSessions"] }), [mr] = ee();
126
+ d(() => {
127
+ G || (Rn === "terminal" || Rn === "grid" || Rn === "list" ? j(Rn) : vn && j(vn), zn ? U(zn) : _n && U(_n), Bn && [
126
128
  "none",
127
129
  "agent",
128
130
  "target",
129
131
  "vibe",
130
132
  "status",
131
133
  "type"
132
- ].includes(Ln) ? j(Ln) : gn && j(gn), Rn ? zt(Rn) : _n && zt(_n), pn.length > 0 && U(pn.map((e) => ({
134
+ ].includes(Bn) ? k(Bn) : yn && k(yn), Vn ? Ht(Vn) : bn && Ht(bn), gn.length > 0 && V(gn.map((e) => ({
133
135
  sessionId: e.sessionId,
134
136
  name: e.name,
135
137
  pinned: e.pinned,
136
138
  terminalUrl: null,
137
139
  loading: !1,
138
140
  error: null
139
- }))), Pn(!0));
141
+ }))), Ln(!0));
140
142
  }, [
141
- pn,
142
- mn,
143
- hn,
144
143
  gn,
145
144
  _n,
146
- In,
147
- Fn,
148
- Ln,
145
+ vn,
146
+ yn,
147
+ bn,
148
+ zn,
149
149
  Rn,
150
- q
150
+ Bn,
151
+ Vn,
152
+ G
151
153
  ]);
152
- let fr = m(!1);
153
- f(() => {
154
- q && vn(H.map((e) => ({
154
+ let hr = p(!1);
155
+ d(() => {
156
+ G && xn(B.map((e) => ({
155
157
  sessionId: e.sessionId,
156
158
  name: e.name,
157
159
  pinned: e.pinned
158
160
  })));
159
161
  }, [
160
- H,
161
- q,
162
- vn
163
- ]), f(() => {
164
- q && yn(W);
165
- }, [
166
- W,
167
- q,
168
- yn
169
- ]), f(() => {
170
- q && bn(M);
162
+ B,
163
+ G,
164
+ xn
165
+ ]), d(() => {
166
+ G && Sn(H);
171
167
  }, [
172
- M,
173
- q,
174
- bn
175
- ]), f(() => {
176
- q && xn(A);
168
+ H,
169
+ G,
170
+ Sn
171
+ ]), d(() => {
172
+ G && Cn(A);
177
173
  }, [
178
174
  A,
179
- q,
180
- xn
181
- ]), f(() => {
182
- q && Sn(k);
175
+ G,
176
+ Cn
177
+ ]), d(() => {
178
+ G && wn(O);
183
179
  }, [
184
- k,
185
- q,
186
- Sn
187
- ]), f(() => {
188
- if (!q) return;
189
- let e = new URLSearchParams(S), t = !1, n = M === "terminal" ? null : M;
190
- n ? e.get("view") !== n && (e.set("view", n), t = !0) : e.has("view") && (e.delete("view"), t = !0), W ? e.get("session") !== W && (e.set("session", W), t = !0) : e.has("session") && (e.delete("session"), t = !0), A === "none" ? e.has("group") && (e.delete("group"), t = !0) : e.get("group") !== A && (e.set("group", A), t = !0), k === "all" ? e.has("target") && (e.delete("target"), t = !0) : e.get("target") !== k && (e.set("target", k), t = !0), t && Ot(e, { replace: !0 });
180
+ O,
181
+ G,
182
+ wn
183
+ ]), d(() => {
184
+ G && Tn(D);
191
185
  }, [
192
- W,
193
- S,
194
- Ot,
195
- q,
196
- M,
186
+ D,
187
+ G,
188
+ Tn
189
+ ]), d(() => {
190
+ if (!G) return;
191
+ let e = new URLSearchParams(At), t = !1, n = A === "terminal" ? null : A;
192
+ 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 && jt(e, { replace: !0 });
193
+ }, [
194
+ H,
195
+ At,
196
+ jt,
197
+ G,
197
198
  A,
198
- k
199
+ O,
200
+ D
199
201
  ]);
200
- let pr = m(null);
201
- re({
202
- skip: !y,
203
- variables: { workspaceId: y || "" }
204
- }), f(() => {
202
+ let gr = p(null);
203
+ ie({
204
+ skip: !v,
205
+ variables: { workspaceId: v || "" }
206
+ }), d(() => {
205
207
  let e = setInterval(() => {
206
- sr().catch(() => {});
207
- }, bt);
208
+ ur().catch(() => {});
209
+ }, St);
208
210
  return () => clearInterval(e);
209
- }, [sr]);
210
- let { data: mr, previousData: hr, loading: gr, error: _r, refetch: Y } = ee({
211
+ }, [ur]);
212
+ let { data: _r, previousData: vr, loading: q, error: yr, refetch: J } = te({
211
213
  variables: {
212
214
  filter: {
213
- status: T === "all" ? void 0 : T,
214
- type: E === "all" ? void 0 : E,
215
- vibeId: D !== "all" && D !== "none" ? D : void 0,
216
- agentId: O === "all" ? void 0 : O
215
+ status: C === "all" ? void 0 : C,
216
+ type: w === "all" ? void 0 : w,
217
+ vibeId: T !== "all" && T !== "none" ? T : void 0,
218
+ agentId: E === "all" ? void 0 : E
217
219
  },
218
220
  pagination: { limit: 50 }
219
221
  },
220
- fetchPolicy: T === "all" && E === "all" && D === "all" && O === "all" ? "cache-first" : "cache-and-network"
221
- }), vr = mr ?? hr, { agents: yr, vibes: br } = _e(), [xr, Sr] = de({
222
+ fetchPolicy: C === "all" && w === "all" && T === "all" && E === "all" ? "cache-first" : "cache-and-network"
223
+ }), br = _r ?? vr, { agents: xr, vibes: Sr } = ve(), [Cr, wr] = fe({
222
224
  fetchPolicy: "network-only",
223
225
  notifyOnNetworkStatusChange: !0
224
- }), { data: Cr } = ue(), wr = p(() => {
225
- let e = /* @__PURE__ */ new Map(), t = Cr?.vibecontrolsAgentHealthProbeStream ?? Sr.data?.vibecontrolsAgentHealthProbes ?? [];
226
+ }), { data: Tr } = de(), Er = f(() => {
227
+ let e = /* @__PURE__ */ new Map(), t = Tr?.vibecontrolsAgentHealthProbeStream ?? wr.data?.vibecontrolsAgentHealthProbes ?? [];
226
228
  for (let n of t) e.set(n.agentId, {
227
229
  healthy: n.healthy,
228
230
  error: n.errorMessage ?? null
229
231
  });
230
232
  return e;
231
- }, [Sr.data, Cr]), Tr = p(() => [
233
+ }, [wr.data, Tr]), Dr = f(() => [
232
234
  {
233
235
  value: "all",
234
- label: C("sessions.filterVibeAll", "All Vibes")
236
+ label: x("sessions.filterVibeAll", "All Vibes")
235
237
  },
236
238
  {
237
239
  value: "none",
238
- label: C("sessions.filterVibeNone", "No Vibe")
240
+ label: x("sessions.filterVibeNone", "No Vibe")
239
241
  },
240
- ...br.map((e) => ({
242
+ ...Sr.map((e) => ({
241
243
  value: e.id,
242
244
  label: e.name
243
245
  }))
244
- ], [br, C]), Er = p(() => [{
246
+ ], [Sr, x]), Or = f(() => [{
245
247
  value: "all",
246
- label: C("sessions.filterAgentAll", "All Agents")
247
- }, ...yr.map((e) => ({
248
+ label: x("sessions.filterAgentAll", "All Agents")
249
+ }, ...xr.map((e) => ({
248
250
  value: e.id,
249
- label: `${e.name} ${Ae(e) === "ACTIVE" ? "" : `(${C("sessions.offline", "Offline")})`}`
250
- }))], [yr, C]), Dr = p(() => [
251
+ label: `${e.name} ${je(e) === "ACTIVE" ? "" : `(${x("sessions.offline", "Offline")})`}`
252
+ }))], [xr, x]), kr = f(() => [
251
253
  {
252
254
  value: "agent",
253
- label: C("sessions.groupBy.agent", "Agent")
255
+ label: x("sessions.groupBy.agent", "Agent")
254
256
  },
255
257
  {
256
258
  value: "target",
257
- label: C("sessions.groupBy.target", "Target")
259
+ label: x("sessions.groupBy.target", "Target")
258
260
  },
259
261
  {
260
262
  value: "vibe",
261
- label: C("sessions.groupBy.vibe", "Vibe")
263
+ label: x("sessions.groupBy.vibe", "Vibe")
262
264
  },
263
265
  {
264
266
  value: "status",
265
- label: C("sessions.groupBy.status", "Status")
267
+ label: x("sessions.groupBy.status", "Status")
266
268
  },
267
269
  {
268
270
  value: "type",
269
- label: C("sessions.groupBy.type", "Type")
271
+ label: x("sessions.groupBy.type", "Type")
270
272
  }
271
- ], [C]), Or = p(() => [{
273
+ ], [x]), Ar = f(() => [{
272
274
  value: "",
273
- label: C("sessions.noVibe", "No vibe")
274
- }, ...br.map((e) => ({
275
+ label: x("sessions.noVibe", "No vibe")
276
+ }, ...Sr.map((e) => ({
275
277
  value: e.id,
276
278
  label: e.name
277
- }))], [br, C]), kr = p(() => [{
279
+ }))], [Sr, x]), jr = f(() => [{
278
280
  value: "",
279
- label: C("sessions.selectAgent", "Select an agent")
280
- }, ...yr.map((e) => {
281
- let t = Ae(e) === "ACTIVE" ? C("sessions.active", "Active") : C("sessions.offline", "Offline");
281
+ label: x("sessions.selectAgent", "Select an agent")
282
+ }, ...xr.map((e) => {
283
+ let t = je(e) === "ACTIVE" ? x("sessions.active", "Active") : x("sessions.offline", "Offline");
282
284
  return {
283
285
  value: e.id,
284
286
  label: `${e.name} (${t})`
285
287
  };
286
- })], [yr, C]), { data: Ar } = c({
287
- variables: { agentId: on },
288
- skip: !on,
288
+ })], [xr, x]), { data: Mr } = s({
289
+ variables: { agentId: ln },
290
+ skip: !ln,
289
291
  fetchPolicy: "cache-and-network"
290
- }), jr = p(() => {
291
- let e = (Ar?.vibecontrolsAgentProfiles ?? []).map((e) => ({
292
+ }), Nr = f(() => {
293
+ let e = (Mr?.vibecontrolsAgentProfiles ?? []).map((e) => ({
292
294
  value: e.name,
293
295
  label: e.status && e.status !== "ACTIVE" ? `${e.name} (${e.status})` : e.name
294
296
  }));
@@ -296,41 +298,41 @@ function Ct() {
296
298
  value: "default",
297
299
  label: "default"
298
300
  }, ...e];
299
- }, [Ar]);
300
- f(() => {
301
- ln("default");
302
- }, [on]);
303
- let Mr = p(() => [
301
+ }, [Mr]);
302
+ d(() => {
303
+ fn("default");
304
+ }, [ln]);
305
+ let Pr = f(() => [
304
306
  {
305
307
  value: "TMUX",
306
- label: C("sessions.typeTmuxLower", "tmux")
308
+ label: x("sessions.typeTmuxLower", "tmux")
307
309
  },
308
310
  {
309
311
  value: "WEZTERM",
310
- label: C("sessions.typeWezTerm", "WezTerm")
312
+ label: x("sessions.typeWezTerm", "WezTerm")
311
313
  },
312
314
  {
313
315
  value: "ZELLIJ",
314
- label: C("sessions.typeZellij", "Zellij")
316
+ label: x("sessions.typeZellij", "Zellij")
315
317
  },
316
318
  {
317
319
  value: "TERMINAL",
318
- label: C("sessions.typeTerminal", "Terminal")
320
+ label: x("sessions.typeTerminal", "Terminal")
319
321
  },
320
322
  {
321
323
  value: "SSH",
322
- label: C("sessions.typeSsh", "SSH")
324
+ label: x("sessions.typeSsh", "SSH")
323
325
  },
324
326
  {
325
327
  value: "SCRIPT",
326
- label: C("sessions.typeScript", "Script")
328
+ label: x("sessions.typeScript", "Script")
327
329
  },
328
330
  {
329
331
  value: "CUSTOM",
330
- label: C("sessions.typeCustom", "Custom")
332
+ label: x("sessions.typeCustom", "Custom")
331
333
  }
332
- ], [C]), X = p(() => (vr?.sessions?.items ?? []).map((e) => {
333
- let t = xt(e.ttydUrl || null, e.agent?.tunnelUrl || null);
334
+ ], [x]), Y = f(() => (br?.sessions?.items ?? []).map((e) => {
335
+ let t = Ct(e.ttydUrl || null, e.agent?.tunnelUrl || null);
334
336
  return {
335
337
  id: e.id,
336
338
  workspaceId: e.workspaceId,
@@ -339,7 +341,7 @@ function Ct() {
339
341
  profile: e.profile ?? "default",
340
342
  name: e.name,
341
343
  type: e.type,
342
- status: St(e.status, e.ttydUrl || null, t, e.agent ? Ae(e.agent) === "ACTIVE" : void 0),
344
+ status: wt(e.status, e.ttydUrl || null, t, e.agent ? je(e.agent) === "ACTIVE" : void 0),
343
345
  command: e.command || null,
344
346
  workingDirectory: e.workingDirectory || null,
345
347
  environmentVariables: e.environmentVariables || {},
@@ -376,26 +378,26 @@ function Ct() {
376
378
  } : null
377
379
  } : void 0
378
380
  };
379
- }), [vr?.sessions?.items]), Nr = p(() => {
381
+ }), [br?.sessions?.items]), Fr = f(() => {
380
382
  let e = /* @__PURE__ */ new Map();
381
- for (let t of X) {
383
+ for (let t of Y) {
382
384
  let n = t.agent?.target;
383
385
  n && !e.has(n.id) && e.set(n.id, n.name);
384
386
  }
385
387
  return [{
386
388
  value: "all",
387
- label: C("sessions.filterTargetAll", "All Targets")
389
+ label: x("sessions.filterTargetAll", "All Targets")
388
390
  }, ...Array.from(e.entries()).map(([e, t]) => ({
389
391
  value: e,
390
392
  label: t
391
393
  }))];
392
- }, [X, C]);
393
- f(() => {
394
- fr.current || X.length === 0 || H.length === 0 || (fr.current = !0, Promise.allSettled(H.map(async (e) => {
395
- let t = X.find((t) => t.id === e.sessionId);
394
+ }, [Y, x]);
395
+ d(() => {
396
+ hr.current || Y.length === 0 || B.length === 0 || (hr.current = !0, Promise.allSettled(B.map(async (e) => {
397
+ let t = Y.find((t) => t.id === e.sessionId);
396
398
  if (t) try {
397
- let n = await J({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = xt(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
398
- U((n) => n.map((n) => n.sessionId === e.sessionId ? {
399
+ let n = await K({ variables: { id: e.sessionId } }), r = t.agent?.tunnelUrl ?? null, i = Ct(n.data?.startSessionTerminal?.ttydUrl ?? null, r);
400
+ V((n) => n.map((n) => n.sessionId === e.sessionId ? {
399
401
  ...n,
400
402
  terminalUrl: i,
401
403
  agentId: t.agent?.id ?? n.agentId ?? null,
@@ -403,7 +405,7 @@ function Ct() {
403
405
  error: null
404
406
  } : n));
405
407
  } catch (n) {
406
- console.warn("[sessions] tab restore startSessionTerminal failed", n), U((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
408
+ console.warn("[sessions] tab restore startSessionTerminal failed", n), V((n) => n.map((n) => n.sessionId === e.sessionId && t.ttydUrl ? {
407
409
  ...n,
408
410
  terminalUrl: t.ttydUrl,
409
411
  agentId: t.agent?.id ?? n.agentId ?? null,
@@ -412,22 +414,22 @@ function Ct() {
412
414
  }
413
415
  })));
414
416
  }, [
415
- X,
416
- H,
417
- J
418
- ]), f(() => {
419
- if (!q || !V) {
420
- pr.current = V;
417
+ Y,
418
+ B,
419
+ K
420
+ ]), d(() => {
421
+ if (!G || !z) {
422
+ gr.current = z;
421
423
  return;
422
424
  }
423
- if (pr.current === null && V) {
424
- pr.current = V;
425
+ if (gr.current === null && z) {
426
+ gr.current = z;
425
427
  return;
426
428
  }
427
- if (pr.current === V) return;
428
- pr.current = V;
429
- let e = X.find((e) => e.id === V);
430
- if (e) if (H.find((e) => e.sessionId === V)) G(V), K(!1);
429
+ if (gr.current === z) return;
430
+ gr.current = z;
431
+ let e = Y.find((e) => e.id === z);
432
+ if (e) if (B.find((e) => e.sessionId === z)) U(z), W(!1);
431
433
  else {
432
434
  let t = e.ttydUrl || null, n = {
433
435
  sessionId: e.id,
@@ -438,17 +440,17 @@ function Ct() {
438
440
  loading: !t,
439
441
  error: null
440
442
  };
441
- U((e) => [...e, n]), G(V), K(!1), t || J({ variables: { id: e.id } }).then((t) => {
443
+ V((e) => [...e, n]), U(z), W(!1), t || K({ variables: { id: e.id } }).then((t) => {
442
444
  let n = t.data?.startSessionTerminal?.ttydUrl || null;
443
- U((t) => t.map((t) => t.sessionId === e.id ? {
445
+ V((t) => t.map((t) => t.sessionId === e.id ? {
444
446
  ...t,
445
447
  terminalUrl: n,
446
448
  loading: !1,
447
- error: n ? null : C("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
449
+ error: n ? null : x("sessions.terminalStartedNoUrl", "Terminal started but no URL was returned. Try restarting.")
448
450
  } : t));
449
451
  }).catch((t) => {
450
- let n = t instanceof Error ? t.message : C("sessions.failedStartTerminal", "Failed to start terminal");
451
- U((t) => t.map((t) => t.sessionId === e.id ? {
452
+ let n = t instanceof Error ? t.message : x("sessions.failedStartTerminal", "Failed to start terminal");
453
+ V((t) => t.map((t) => t.sessionId === e.id ? {
452
454
  ...t,
453
455
  loading: !1,
454
456
  error: n
@@ -456,171 +458,171 @@ function Ct() {
456
458
  });
457
459
  }
458
460
  }, [
459
- V,
460
- X,
461
- H,
462
- q,
463
- J
461
+ z,
462
+ Y,
463
+ B,
464
+ G,
465
+ K
464
466
  ]);
465
- let Z = p(() => X.filter((e) => {
466
- if (w) {
467
- let t = w.toLowerCase();
467
+ let X = f(() => Y.filter((e) => {
468
+ if (S) {
469
+ let t = S.toLowerCase();
468
470
  if (!(e.name.toLowerCase().includes(t) || e.command?.toLowerCase().includes(t) || e.workingDirectory?.toLowerCase().includes(t))) return !1;
469
471
  }
470
- return !(D === "none" && e.vibeId || k !== "all" && e.agent?.target?.id !== k);
472
+ return !(T === "none" && e.vibeId || D !== "all" && e.agent?.target?.id !== D);
471
473
  }), [
472
- X,
473
- w,
474
- D,
475
- k
476
- ]), Pr = p(() => ze(Z, A), [Z, A]), Fr = d((e) => {
477
- z((t) => {
474
+ Y,
475
+ S,
476
+ T,
477
+ D
478
+ ]), Ir = f(() => Ve(X, O), [X, O]), Lr = u((e) => {
479
+ L((t) => {
478
480
  let n = new Set(t);
479
481
  return n.has(e) ? n.delete(e) : n.add(e), n;
480
482
  });
481
- }, []), Ir = d(() => {
482
- z(new Set(Z.map((e) => e.id)));
483
- }, [Z]), Lr = d(() => {
484
- z(/* @__PURE__ */ new Set());
485
- }, []), Rr = d((e) => {
486
- z((t) => {
483
+ }, []), Rr = u(() => {
484
+ L(new Set(X.map((e) => e.id)));
485
+ }, [X]), zr = u(() => {
486
+ L(/* @__PURE__ */ new Set());
487
+ }, []), Br = u((e) => {
488
+ L((t) => {
487
489
  let n = new Set(t);
488
490
  return e.length > 0 && e.every((e) => n.has(e)) ? e.forEach((e) => n.delete(e)) : e.forEach((e) => n.add(e)), n;
489
491
  });
490
- }, []), zr = d((e) => {
491
- Vt((t) => {
492
+ }, []), Vr = u((e) => {
493
+ Wt((t) => {
492
494
  let n = new Set(t);
493
495
  return n.has(e) ? n.delete(e) : n.add(e), n;
494
496
  });
495
- }, []), Br = Z.length > 0 && R.size === Z.length, Vr = R.size > 0, Hr = d(async () => {
496
- if (R.size !== 0) {
497
- Yt(!0);
497
+ }, []), Hr = X.length > 0 && I.size === X.length, Ur = I.size > 0, Wr = u(async () => {
498
+ if (I.size !== 0) {
499
+ Qt(!0);
498
500
  try {
499
- let e = (await cr({ variables: { ids: Array.from(R) } })).data?.bulkStopSessions;
500
- L(`${C("sessions.stopped", "Stopped")} ${e?.succeeded ?? 0} ${C("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${C("sessions.failed", "failed")}` : ""}`), z(/* @__PURE__ */ new Set()), setTimeout(() => L(null), 3e3);
501
+ let e = (await dr({ variables: { ids: Array.from(I) } })).data?.bulkStopSessions;
502
+ 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);
501
503
  } catch (e) {
502
- L(`${C("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : C("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => L(null), 5e3);
504
+ F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedStop", "Failed to stop sessions")}`), setTimeout(() => F(null), 5e3);
503
505
  } finally {
504
- Yt(!1);
506
+ Qt(!1);
505
507
  }
506
508
  }
507
509
  }, [
508
- R,
509
- cr,
510
- C
511
- ]), Ur = d(async () => {
512
- if (R.size !== 0) {
513
- Yt(!0);
510
+ I,
511
+ dr,
512
+ x
513
+ ]), Gr = u(async () => {
514
+ if (I.size !== 0) {
515
+ Qt(!0);
514
516
  try {
515
- let e = (await lr({ variables: { ids: Array.from(R) } })).data?.bulkRestartSessions;
516
- L(`${C("sessions.restarted", "Restarted")} ${e?.succeeded ?? 0} ${C("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${C("sessions.failed", "failed")}` : ""}`), z(/* @__PURE__ */ new Set()), setTimeout(() => L(null), 3e3);
517
+ let e = (await fr({ variables: { ids: Array.from(I) } })).data?.bulkRestartSessions;
518
+ 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);
517
519
  } catch (e) {
518
- L(`${C("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : C("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => L(null), 5e3);
520
+ F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedRestart", "Failed to restart sessions")}`), setTimeout(() => F(null), 5e3);
519
521
  } finally {
520
- Yt(!1);
522
+ Qt(!1);
521
523
  }
522
524
  }
523
525
  }, [
524
- R,
525
- lr,
526
- C
527
- ]), Wr = d(async () => {
528
- if (R.size !== 0 && confirm(`${C("sessions.confirmRemovePrefix", "Are you sure you want to remove")} ${R.size} ${C("nav.sessions", "session(s)")}? ${C("sessions.confirmRemoveSuffix", "This cannot be undone.")}`)) {
529
- Yt(!0);
526
+ I,
527
+ fr,
528
+ x
529
+ ]), Kr = u(async () => {
530
+ 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.")}`)) {
531
+ Qt(!0);
530
532
  try {
531
- let e = (await ur({ variables: { ids: Array.from(R) } })).data?.bulkTerminateSessions;
532
- L(`${C("sessions.removed", "Removed")} ${e?.succeeded ?? 0} ${C("nav.sessions", "sessions")}${e?.failed ? `, ${e.failed} ${C("sessions.failed", "failed")}` : ""}`), z(/* @__PURE__ */ new Set()), setTimeout(() => L(null), 3e3);
533
+ let e = (await pr({ variables: { ids: Array.from(I) } })).data?.bulkTerminateSessions;
534
+ 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);
533
535
  } catch (e) {
534
- L(`${C("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : C("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => L(null), 5e3);
536
+ F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedRemove", "Failed to remove sessions")}`), setTimeout(() => F(null), 5e3);
535
537
  } finally {
536
- Yt(!1);
538
+ Qt(!1);
537
539
  }
538
540
  }
539
541
  }, [
540
- R,
541
- ur,
542
- C
543
- ]), Gr = d(async (e = "CSV") => {
544
- Zt(!0);
542
+ I,
543
+ pr,
544
+ x
545
+ ]), qr = u(async (e = "CSV") => {
546
+ en(!0);
545
547
  try {
546
- let t = (await dr({ variables: { input: {
548
+ let t = (await mr({ variables: { input: {
547
549
  filter: {
548
- status: T === "all" ? void 0 : T,
549
- type: E === "all" ? void 0 : E,
550
- vibeId: D !== "all" && D !== "none" ? D : void 0,
551
- agentId: O === "all" ? void 0 : O
550
+ status: C === "all" ? void 0 : C,
551
+ type: w === "all" ? void 0 : w,
552
+ vibeId: T !== "all" && T !== "none" ? T : void 0,
553
+ agentId: E === "all" ? void 0 : E
552
554
  },
553
555
  format: e
554
556
  } } })).data?.exportSessions;
555
557
  if (!t) return;
556
558
  let n = e === "CSV" ? "text/csv" : "application/json", r = new Blob([t.data], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
557
- a.href = i, a.download = `sessions-export-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.${e.toLowerCase()}`, a.click(), URL.revokeObjectURL(i), L(C("sessions.exportSuccess", "Exported {{count}} sessions as {{format}}", {
559
+ 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}}", {
558
560
  count: t.count,
559
561
  format: e
560
- })), setTimeout(() => L(null), 3e3);
562
+ })), setTimeout(() => F(null), 3e3);
561
563
  } catch (e) {
562
- L(`${C("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : C("sessions.failedExport", "Failed to export sessions")}`), setTimeout(() => L(null), 5e3);
564
+ F(`${x("sessions.errorPrefix", "Error")}: ${e instanceof Error ? e.message : x("sessions.failedExport", "Failed to export sessions")}`), setTimeout(() => F(null), 5e3);
563
565
  } finally {
564
- Zt(!1);
566
+ en(!1);
565
567
  }
566
568
  }, [
567
- dr,
569
+ mr,
570
+ C,
571
+ w,
568
572
  T,
569
573
  E,
570
- D,
571
- O,
572
- C
573
- ]), Kr = (e) => {
574
- x(`/sessions/${e.id}`);
575
- }, qr = () => {
576
- I(null), P(!0), b.emitCustom("vibecontrols.session.create_clicked", { workspaceId: y ?? void 0 });
577
- }, Jr = async () => {
578
- let e = $t.current?.value?.trim(), t = rn, n = on, r = B, i = en.current?.value?.trim(), a = tn.current?.checked ?? !1;
574
+ x
575
+ ]), Jr = (e) => {
576
+ b(`/sessions/${e.id}`);
577
+ }, Yr = () => {
578
+ P(null), M(!0), y.emitCustom("vibecontrols.session.create_clicked", { workspaceId: v ?? void 0 });
579
+ }, Xr = async () => {
580
+ let e = nn.current?.value?.trim(), t = sn, n = ln, r = R, i = rn.current?.value?.trim(), a = an.current?.checked ?? !1;
579
581
  if (!e) {
580
- I(C("sessions.nameRequired", "Name is required"));
582
+ P(x("sessions.nameRequired", "Name is required"));
581
583
  return;
582
584
  }
583
- let o = br.find((e) => e.id === t)?.agents ?? [], s = null;
584
- if (n && (!t || o.some((e) => e.id === n)) ? s = n : o.length === 1 && (s = o[0]?.id ?? null), !s) {
585
- I(t && o.length === 0 ? C("sessions.noAgentAttached", "This vibe has no agents attached. Attach one from the Vibe → Agents tab before creating sessions.") : t && o.length > 1 ? C("sessions.pickAgentFromVibe", "This vibe has multiple agents attached. Pick one before creating the session.") : C("sessions.agentRequired", "Please select an agent for this session."));
585
+ let o = Sr.find((e) => e.id === t)?.agents ?? [], ee = null;
586
+ if (n && (!t || o.some((e) => e.id === n)) ? ee = n : o.length === 1 && (ee = o[0]?.id ?? null), !ee) {
587
+ 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."));
586
588
  return;
587
589
  }
588
- let c = wr.get(s);
589
- if (c && !c.healthy) {
590
- I(C("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (c.error ? ` (${c.error})` : ""));
590
+ let s = Er.get(ee);
591
+ if (s && !s.healthy) {
592
+ P(x("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (s.error ? ` (${s.error})` : ""));
591
593
  return;
592
594
  }
593
- Kt(!0), I(null);
595
+ Yt(!0), P(null);
594
596
  try {
595
- let n = nn.current?.value?.trim() || void 0, o = await zn({ variables: { input: {
597
+ let n = on.current?.value?.trim() || void 0, o = await Hn({ variables: { input: {
596
598
  name: e,
597
599
  type: r || "TMUX",
598
600
  command: i || void 0,
599
601
  vibeId: t || void 0,
600
- agentId: s,
601
- profile: cn?.trim() || "default",
602
+ agentId: ee,
603
+ profile: dn?.trim() || "default",
602
604
  autoStart: a,
603
605
  externalSessionName: n
604
606
  } } });
605
- if (o.error && l(o.error)) {
606
- P(!1), u(), F(!0), b.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: y ?? void 0 });
607
+ if (o.error && c(o.error)) {
608
+ M(!1), l(), N(!0), y.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: v ?? void 0 });
607
609
  return;
608
610
  }
609
611
  if (o.error) {
610
- I(o.error.message || C("sessions.failedCreate", "Failed to create session"));
612
+ P(o.error.message || x("sessions.failedCreate", "Failed to create session"));
611
613
  return;
612
614
  }
613
- let c = o.data?.createSession?.id;
614
- if (!c) {
615
- I(C("sessions.failedCreate", "Failed to create session"));
615
+ let s = o.data?.createSession?.id;
616
+ if (!s) {
617
+ P(x("sessions.failedCreate", "Failed to create session"));
616
618
  return;
617
619
  }
618
- if (P(!1), L(C("sessions.createdSuccess", "Session created successfully")), b.emitCustom("vibecontrols.session.created", {
619
- workspaceId: y ?? void 0,
620
- sessionId: c
621
- }), await Vn(c), setTimeout(() => L(null), 3e3), o.data?.createSession) {
622
- let e = o.data.createSession, t = e.agentId ? yr.find((t) => t.id === e.agentId) : null;
623
- Q({
620
+ if (M(!1), F(x("sessions.createdSuccess", "Session created successfully")), y.emitCustom("vibecontrols.session.created", {
621
+ workspaceId: v ?? void 0,
622
+ sessionId: s
623
+ }), await Wn(s), setTimeout(() => F(null), 3e3), o.data?.createSession) {
624
+ let e = o.data.createSession, t = e.agentId ? xr.find((t) => t.id === e.agentId) : null;
625
+ Z({
624
626
  id: e.id,
625
627
  workspaceId: e.workspaceId,
626
628
  vibeId: e.vibeId || null,
@@ -651,62 +653,62 @@ function Ct() {
651
653
  });
652
654
  }
653
655
  } catch (e) {
654
- if (l(e)) {
655
- P(!1), u(), F(!0), b.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: y ?? void 0 });
656
+ if (c(e)) {
657
+ M(!1), l(), N(!0), y.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: v ?? void 0 });
656
658
  return;
657
659
  }
658
- I(e instanceof Error ? e.message : C("sessions.failedCreate", "Failed to create session"));
660
+ P(e instanceof Error ? e.message : x("sessions.failedCreate", "Failed to create session"));
659
661
  } finally {
660
- Kt(!1);
662
+ Yt(!1);
661
663
  }
662
- }, Yr = async (e) => {
664
+ }, Zr = async (e) => {
663
665
  try {
664
- await er({ variables: { id: e.id } }), wt?.({
666
+ await rr({ variables: { id: e.id } }), Et?.({
665
667
  id: e.id,
666
668
  name: e.name,
667
669
  type: e.type,
668
670
  status: "RUNNING"
669
- }), b.emitCustom("vibecontrols.session.started", {
670
- workspaceId: y ?? void 0,
671
+ }), y.emitCustom("vibecontrols.session.started", {
672
+ workspaceId: v ?? void 0,
671
673
  sessionId: e.id
672
674
  });
673
675
  } catch (e) {
674
- if (l(e)) {
675
- u(), F(!0), b.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: y ?? void 0 });
676
+ if (c(e)) {
677
+ l(), N(!0), y.emitCustom("vibecontrols.quota.session_limit_hit", { workspaceId: v ?? void 0 });
676
678
  return;
677
679
  }
678
680
  console.error("Failed to start session:", e);
679
681
  }
680
- }, Xr = async (e) => {
682
+ }, Qr = async (e) => {
681
683
  try {
682
- await tr({ variables: { id: e.id } });
684
+ await ir({ variables: { id: e.id } });
683
685
  } catch (e) {
684
686
  console.error("Failed to stop session:", e);
685
687
  }
686
- }, Zr = async (e) => {
688
+ }, $r = async (e) => {
687
689
  try {
688
- await nr({ variables: { id: e.id } });
690
+ await ar({ variables: { id: e.id } });
689
691
  } catch (e) {
690
- if (l(e)) {
691
- u(), F(!0);
692
+ if (c(e)) {
693
+ l(), N(!0);
692
694
  return;
693
695
  }
694
696
  console.error("Failed to restart session:", e);
695
697
  }
696
- }, Qr = async (e) => {
698
+ }, ei = async (e) => {
697
699
  try {
698
- await or({ variables: { id: e.id } });
700
+ await lr({ variables: { id: e.id } });
699
701
  } catch (e) {
700
702
  console.error("Failed to terminate session:", e);
701
703
  }
702
- }, $r = d((e) => e.ttydUrl || null, []), ei = d((e) => {
703
- jn(e);
704
- }, []), Q = d(async (e) => {
705
- if (H.find((t) => t.sessionId === e.id)?.terminalUrl) {
706
- G(e.id), K(!1);
704
+ }, ti = u((e) => e.ttydUrl || null, []), ni = u((e) => {
705
+ Pn(e);
706
+ }, []), Z = u(async (e) => {
707
+ if (B.find((t) => t.sessionId === e.id)?.terminalUrl) {
708
+ U(e.id), W(!1);
707
709
  return;
708
710
  }
709
- let t = $r(e);
711
+ let t = ti(e);
710
712
  if (t) {
711
713
  let n = {
712
714
  sessionId: e.id,
@@ -717,7 +719,7 @@ function Ct() {
717
719
  loading: !1,
718
720
  error: null
719
721
  };
720
- U((t) => [...t.filter((t) => t.sessionId !== e.id), n]), G(e.id), K(!1);
722
+ V((t) => [...t.filter((t) => t.sessionId !== e.id), n]), U(e.id), W(!1);
721
723
  return;
722
724
  }
723
725
  let n = {
@@ -728,811 +730,813 @@ function Ct() {
728
730
  loading: !0,
729
731
  error: null
730
732
  };
731
- U((t) => [...t.filter((t) => t.sessionId !== e.id), n]), G(e.id), K(!1);
733
+ V((t) => [...t.filter((t) => t.sessionId !== e.id), n]), U(e.id), W(!1);
732
734
  try {
733
- let t = await J({ variables: { id: e.id } });
734
- if (t.error && l(t.error)) {
735
- let t = H.filter((t) => t.sessionId !== e.id);
736
- U(t), W === e.id && G(t.length > 0 ? t[t.length - 1].sessionId : null), u(), F(!0);
735
+ let t = await K({ variables: { id: e.id } });
736
+ if (t.error && c(t.error)) {
737
+ let t = B.filter((t) => t.sessionId !== e.id);
738
+ V(t), H === e.id && U(t.length > 0 ? t[t.length - 1].sessionId : null), l(), N(!0);
737
739
  return;
738
740
  }
739
741
  if (t.error) {
740
- let n = t.error.message || C("sessions.failedStartTerminal", "Failed to start terminal");
741
- U((t) => t.map((t) => t.sessionId === e.id ? {
742
+ let n = t.error.message || x("sessions.failedStartTerminal", "Failed to start terminal");
743
+ V((t) => t.map((t) => t.sessionId === e.id ? {
742
744
  ...t,
743
745
  loading: !1,
744
746
  error: n
745
747
  } : t));
746
748
  return;
747
749
  }
748
- let n = xt(t.data?.startSessionTerminal?.ttydUrl || null, X.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
749
- U((t) => t.map((t) => t.sessionId === e.id ? {
750
+ let n = Ct(t.data?.startSessionTerminal?.ttydUrl || null, Y.find((t) => t.id === e.id)?.agent?.tunnelUrl ?? null);
751
+ V((t) => t.map((t) => t.sessionId === e.id ? {
750
752
  ...t,
751
753
  terminalUrl: n,
752
754
  loading: !1,
753
- error: n ? null : C("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
755
+ error: n ? null : x("sessions.terminalStartedNoTunnelUrl", "Terminal started but no tunnel URL was returned. Try restarting.")
754
756
  } : t));
755
757
  } catch (t) {
756
- if (l(t)) {
757
- let t = H.filter((t) => t.sessionId !== e.id);
758
- U(t), W === e.id && G(t.length > 0 ? t[t.length - 1].sessionId : null), u(), F(!0);
758
+ if (c(t)) {
759
+ let t = B.filter((t) => t.sessionId !== e.id);
760
+ V(t), H === e.id && U(t.length > 0 ? t[t.length - 1].sessionId : null), l(), N(!0);
759
761
  return;
760
762
  }
761
- let n = t instanceof Error ? t.message : C("sessions.failedStartTerminal", "Failed to start terminal");
762
- U((t) => t.map((t) => t.sessionId === e.id ? {
763
+ let n = t instanceof Error ? t.message : x("sessions.failedStartTerminal", "Failed to start terminal");
764
+ V((t) => t.map((t) => t.sessionId === e.id ? {
763
765
  ...t,
764
766
  loading: !1,
765
767
  error: n
766
768
  } : t));
767
769
  }
768
770
  }, [
769
- W,
770
771
  H,
771
- $r,
772
- J
772
+ B,
773
+ ti,
774
+ K
773
775
  ]);
774
- f(() => {
775
- if (!q || !W || H.some((e) => e.sessionId === W)) return;
776
- let e = X.find((e) => e.id === W);
777
- e && Q(e);
776
+ d(() => {
777
+ if (!G || !H || B.some((e) => e.sessionId === H)) return;
778
+ let e = Y.find((e) => e.id === H);
779
+ e && Z(e);
778
780
  }, [
779
- W,
780
- Q,
781
- X,
782
781
  H,
783
- q
782
+ Z,
783
+ Y,
784
+ B,
785
+ G
784
786
  ]);
785
- let ti = d((e) => {
786
- U((t) => t.filter((t) => t.sessionId !== e)), W === e && G(() => {
787
- let t = H.filter((t) => t.sessionId !== e);
787
+ let ri = u((e) => {
788
+ V((t) => t.filter((t) => t.sessionId !== e)), H === e && U(() => {
789
+ let t = B.filter((t) => t.sessionId !== e);
788
790
  return t.length > 0 ? t[t.length - 1].sessionId : null;
789
791
  });
790
- }, [W, H]), ni = d((e) => {
791
- let t = H.find((t) => t.sessionId === e);
792
- t?.terminalUrl && (b.emitCustom("vibecontrols.session.terminal_opened_in_browser", {
793
- workspaceId: y ?? void 0,
792
+ }, [H, B]), ii = u((e) => {
793
+ let t = B.find((t) => t.sessionId === e);
794
+ t?.terminalUrl && (y.emitCustom("vibecontrols.session.terminal_opened_in_browser", {
795
+ workspaceId: v ?? void 0,
794
796
  sessionId: e
795
797
  }), window.open(t.terminalUrl, "_blank"));
796
798
  }, [
797
- H,
798
- y,
799
- b
800
- ]), ri = d(async (e, t) => {
799
+ B,
800
+ v,
801
+ y
802
+ ]), ai = u(async (e, t) => {
801
803
  try {
802
- await ar({ variables: {
804
+ await cr({ variables: {
803
805
  id: e,
804
806
  input: { name: t }
805
- } }), U((n) => n.map((n) => n.sessionId === e ? {
807
+ } }), V((n) => n.map((n) => n.sessionId === e ? {
806
808
  ...n,
807
809
  name: t
808
810
  } : n));
809
811
  } catch (e) {
810
812
  console.error("Failed to rename session:", e);
811
813
  }
812
- }, [ar]), ii = d(async (e) => {
814
+ }, [cr]), oi = u(async (e) => {
813
815
  try {
814
- await rr({ variables: { id: e } }), U((t) => t.map((t) => t.sessionId === e ? {
816
+ await or({ variables: { id: e } }), V((t) => t.map((t) => t.sessionId === e ? {
815
817
  ...t,
816
818
  terminalUrl: null,
817
- error: C("sessions.terminalStopped", "Terminal stopped")
819
+ error: x("sessions.terminalStopped", "Terminal stopped")
818
820
  } : t));
819
821
  } catch (e) {
820
822
  console.error("Failed to stop terminal:", e);
821
823
  }
822
- }, [rr]), ai = d(async (e) => {
823
- let t = H.find((t) => t.sessionId === e) || null;
824
+ }, [or]), si = u(async (e) => {
825
+ let t = B.find((t) => t.sessionId === e) || null;
824
826
  try {
825
- U((t) => t.map((t) => t.sessionId === e ? {
827
+ V((t) => t.map((t) => t.sessionId === e ? {
826
828
  ...t,
827
829
  loading: !0,
828
830
  error: null,
829
831
  terminalUrl: null
830
832
  } : t));
831
- let n = await ir({ variables: { id: e } });
832
- if (n.error && l(n.error)) {
833
- U((n) => n.map((n) => n.sessionId === e ? {
833
+ let n = await sr({ variables: { id: e } });
834
+ if (n.error && c(n.error)) {
835
+ V((n) => n.map((n) => n.sessionId === e ? {
834
836
  ...n,
835
837
  loading: !1,
836
838
  error: null,
837
839
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
838
- } : n)), u(), F(!0);
840
+ } : n)), l(), N(!0);
839
841
  return;
840
842
  }
841
843
  let r = n.data?.restartSessionTerminal?.ttydUrl || null;
842
- U((t) => t.map((t) => t.sessionId === e ? {
844
+ V((t) => t.map((t) => t.sessionId === e ? {
843
845
  ...t,
844
846
  terminalUrl: r,
845
847
  loading: !1,
846
- error: r ? null : C("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
848
+ error: r ? null : x("sessions.terminalRestartedNoUrl", "Terminal restarted but no URL returned.")
847
849
  } : t));
848
850
  } catch (n) {
849
- if (l(n)) {
850
- U((n) => n.map((n) => n.sessionId === e ? {
851
+ if (c(n)) {
852
+ V((n) => n.map((n) => n.sessionId === e ? {
851
853
  ...n,
852
854
  loading: !1,
853
855
  error: null,
854
856
  terminalUrl: t?.terminalUrl ?? n.terminalUrl
855
- } : n)), u(), F(!0);
857
+ } : n)), l(), N(!0);
856
858
  return;
857
859
  }
858
- let r = n instanceof Error ? n.message : C("sessions.failedRestartTerminal", "Failed to restart terminal");
859
- U((t) => t.map((t) => t.sessionId === e ? {
860
+ let r = n instanceof Error ? n.message : x("sessions.failedRestartTerminal", "Failed to restart terminal");
861
+ V((t) => t.map((t) => t.sessionId === e ? {
860
862
  ...t,
861
863
  loading: !1,
862
864
  error: r
863
865
  } : t));
864
866
  }
865
- }, [ir, H]), oi = d(async (e) => {
866
- let t = X.find((t) => t.id === e);
867
+ }, [sr, B]), ci = u(async (e) => {
868
+ let t = Y.find((t) => t.id === e);
867
869
  try {
868
- let n = await J({ variables: { id: e } });
870
+ let n = await K({ variables: { id: e } });
869
871
  if (n.error) return;
870
- let r = xt(n.data?.startSessionTerminal?.ttydUrl || null, t?.agent?.tunnelUrl ?? null);
871
- r && U((t) => t.map((t) => t.sessionId === e ? {
872
+ let r = Ct(n.data?.startSessionTerminal?.ttydUrl || null, t?.agent?.tunnelUrl ?? null);
873
+ r && V((t) => t.map((t) => t.sessionId === e ? {
872
874
  ...t,
873
875
  terminalUrl: r,
874
876
  loading: !1,
875
877
  error: null
876
878
  } : t));
877
879
  } catch {}
878
- }, [X, J]), si = d((e) => {
879
- U((t) => {
880
+ }, [Y, K]), li = u((e) => {
881
+ V((t) => {
880
882
  let n = new Map(t.map((e) => [e.sessionId, e])), r = e.map((e) => n.get(e)).filter((e) => !!e);
881
883
  for (let n of t) e.includes(n.sessionId) || r.push(n);
882
884
  return r;
883
885
  });
884
- }, []), ci = d((e) => {
885
- U((t) => t.map((t) => t.sessionId === e ? {
886
+ }, []), ui = u((e) => {
887
+ V((t) => t.map((t) => t.sessionId === e ? {
886
888
  ...t,
887
889
  pinned: !t.pinned
888
890
  } : t));
889
- }, []), li = d((e) => {
890
- G(e), wn(!0);
891
- }, [wn]), ui = d((e) => {
892
- let t = X.find((t) => t.id === e);
893
- t?.agent?.id && x(`/agents/${t.agent.id}`);
894
- }, [X, x]), di = d((e) => {
895
- let t = X.find((t) => t.id === e);
896
- t?.agent?.target?.id && x(`/targets/${t.agent.target.id}`);
897
- }, [X, x]), fi = d((e) => {
898
- let t = X.find((t) => t.id === e);
899
- t && jn(t);
900
- }, [X]), pi = d(() => {
901
- Nn((e) => !e);
902
- }, []), $ = p(() => X.find((e) => e.id === W) ?? null, [X, W]), mi = d(() => {
903
- Qt.current?.querySelector("input")?.focus();
904
- }, []), hi = d(() => {
905
- N((e) => e === "terminal" ? "grid" : e === "grid" ? "list" : "terminal");
906
- }, []), gi = d(() => {
907
- $?.agent?.id && x(`/agents/${$.agent.id}`);
908
- }, [$, x]), _i = d(() => {
909
- $?.agent?.target?.id && x(`/targets/${$.agent.target.id}`);
910
- }, [$, x]), vi = d(() => {
911
- W && oi(W);
912
- }, [W, oi]), yi = d(() => {
913
- W && ti(W);
914
- }, [W, ti]), bi = d(() => {
915
- On(!0);
916
- }, []), xi = d(() => {
917
- wn(!Cn);
918
- }, [Cn, wn]), Si = p(() => Be({
919
- newSession: () => P(!0),
920
- closeActiveTab: yi,
921
- openPalette: bi,
922
- openCheatsheet: () => En(!0),
923
- focusSearch: mi,
924
- cycleView: hi,
925
- groupByNone: () => j("none"),
926
- groupByAgent: () => j("agent"),
927
- groupByTarget: () => j("target"),
928
- groupByVibe: () => j("vibe"),
929
- groupByStatus: () => j("status"),
930
- reconnectActive: vi,
931
- toggleFullscreen: pi,
932
- toggleInfoPanel: xi,
933
- openActiveAgent: gi,
934
- openActiveTarget: _i
935
- }, C), [
936
- yi,
937
- bi,
938
- mi,
939
- hi,
940
- vi,
941
- pi,
891
+ }, []), di = u((e) => {
892
+ U(e), Dn(!0);
893
+ }, [Dn]), fi = u((e) => {
894
+ let t = Y.find((t) => t.id === e);
895
+ t?.agent?.id && b(`/agents/${t.agent.id}`);
896
+ }, [Y, b]), pi = u((e) => {
897
+ let t = Y.find((t) => t.id === e);
898
+ t?.agent?.target?.id && b(`/targets/${t.agent.target.id}`);
899
+ }, [Y, b]), mi = u((e) => {
900
+ let t = Y.find((t) => t.id === e);
901
+ t && Pn(t);
902
+ }, [Y]), hi = u(() => {
903
+ In((e) => !e);
904
+ }, []), Q = f(() => Y.find((e) => e.id === H) ?? null, [Y, H]), gi = u(() => {
905
+ tn.current?.querySelector("input")?.focus();
906
+ }, []), _i = u(() => {
907
+ j((e) => e === "terminal" ? "grid" : e === "grid" ? "list" : "terminal");
908
+ }, []), vi = u(() => {
909
+ Q?.agent?.id && b(`/agents/${Q.agent.id}`);
910
+ }, [Q, b]), yi = u(() => {
911
+ Q?.agent?.target?.id && b(`/targets/${Q.agent.target.id}`);
912
+ }, [Q, b]), bi = u(() => {
913
+ H && ci(H);
914
+ }, [H, ci]), xi = u(() => {
915
+ H && ri(H);
916
+ }, [H, ri]), Si = u(() => {
917
+ jn(!0);
918
+ }, []), Ci = u(() => {
919
+ Dn(!En);
920
+ }, [En, Dn]), wi = f(() => He({
921
+ newSession: () => M(!0),
922
+ closeActiveTab: xi,
923
+ openPalette: Si,
924
+ openCheatsheet: () => kn(!0),
925
+ focusSearch: gi,
926
+ cycleView: _i,
927
+ groupByNone: () => k("none"),
928
+ groupByAgent: () => k("agent"),
929
+ groupByTarget: () => k("target"),
930
+ groupByVibe: () => k("vibe"),
931
+ groupByStatus: () => k("status"),
932
+ reconnectActive: bi,
933
+ toggleFullscreen: hi,
934
+ toggleInfoPanel: Ci,
935
+ openActiveAgent: vi,
936
+ openActiveTarget: yi
937
+ }, x), [
942
938
  xi,
939
+ Si,
943
940
  gi,
944
941
  _i,
945
- C
946
- ]), Ci = m(null);
947
- f(() => {
942
+ bi,
943
+ hi,
944
+ Ci,
945
+ vi,
946
+ yi,
947
+ x
948
+ ]), Ti = p(null);
949
+ d(() => {
948
950
  let e = (e) => {
949
951
  let t = e.target, n = t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable, r = e.metaKey || e.ctrlKey;
950
952
  if (r && ["k", "p"].includes(e.key.toLowerCase())) {
951
- e.preventDefault(), bi();
953
+ e.preventDefault(), Si();
952
954
  return;
953
955
  }
954
956
  if (n) return;
955
- let i = Date.now(), a = Ci.current;
956
- if (a && a.key === "g" && i - a.at < 1e3) switch (Ci.current = null, e.key) {
957
+ let i = Date.now(), a = Ti.current;
958
+ if (a && a.key === "g" && i - a.at < 1e3) switch (Ti.current = null, e.key) {
957
959
  case "a":
958
- e.preventDefault(), j("agent");
960
+ e.preventDefault(), k("agent");
959
961
  return;
960
962
  case "t":
961
- e.preventDefault(), j("target");
963
+ e.preventDefault(), k("target");
962
964
  return;
963
965
  case "v":
964
- e.preventDefault(), j("vibe");
966
+ e.preventDefault(), k("vibe");
965
967
  return;
966
968
  case "s":
967
- e.preventDefault(), j("status");
969
+ e.preventDefault(), k("status");
968
970
  return;
969
971
  case "0":
970
- e.preventDefault(), j("none");
972
+ e.preventDefault(), k("none");
971
973
  return;
972
974
  case "A":
973
- e.preventDefault(), gi();
975
+ e.preventDefault(), vi();
974
976
  return;
975
977
  case "T":
976
- e.preventDefault(), _i();
978
+ e.preventDefault(), yi();
977
979
  return;
978
980
  default: break;
979
981
  }
980
982
  if (!r && !e.altKey && e.key === "g") {
981
- Ci.current = {
983
+ Ti.current = {
982
984
  key: "g",
983
985
  at: i
984
986
  };
985
987
  return;
986
988
  }
987
989
  if (r && e.key.toLowerCase() === "t") {
988
- e.preventDefault(), P(!0);
990
+ e.preventDefault(), M(!0);
989
991
  return;
990
992
  }
991
- if (r && e.key.toLowerCase() === "w" && W) {
992
- e.preventDefault(), yi();
993
+ if (r && e.key.toLowerCase() === "w" && H) {
994
+ e.preventDefault(), xi();
993
995
  return;
994
996
  }
995
- if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && H.length > 1) {
996
- e.preventDefault(), G(H[(H.findIndex((e) => e.sessionId === W) + 1) % H.length].sessionId);
997
+ if (e.ctrlKey && e.key === "Tab" && !e.shiftKey && B.length > 1) {
998
+ e.preventDefault(), U(B[(B.findIndex((e) => e.sessionId === H) + 1) % B.length].sessionId);
997
999
  return;
998
1000
  }
999
- if (e.ctrlKey && e.key === "Tab" && e.shiftKey && H.length > 1) {
1000
- e.preventDefault(), G(H[(H.findIndex((e) => e.sessionId === W) - 1 + H.length) % H.length].sessionId);
1001
+ if (e.ctrlKey && e.key === "Tab" && e.shiftKey && B.length > 1) {
1002
+ e.preventDefault(), U(B[(B.findIndex((e) => e.sessionId === H) - 1 + B.length) % B.length].sessionId);
1001
1003
  return;
1002
1004
  }
1003
- if (r && /^[1-9]$/.test(e.key) && H.length > 0) {
1005
+ if (r && /^[1-9]$/.test(e.key) && B.length > 0) {
1004
1006
  let t = Number(e.key) - 1;
1005
- t < H.length && (e.preventDefault(), G(H[t].sessionId));
1007
+ t < B.length && (e.preventDefault(), U(B[t].sessionId));
1006
1008
  return;
1007
1009
  }
1008
- if (r && e.key.toLowerCase() === "r" && W) {
1009
- e.preventDefault(), vi();
1010
+ if (r && e.key.toLowerCase() === "r" && H) {
1011
+ e.preventDefault(), bi();
1010
1012
  return;
1011
1013
  }
1012
1014
  if (r && e.key === "\\") {
1013
- e.preventDefault(), hi();
1015
+ e.preventDefault(), _i();
1014
1016
  return;
1015
1017
  }
1016
1018
  if (!r) {
1017
1019
  if (e.key === "/") {
1018
- e.preventDefault(), mi();
1020
+ e.preventDefault(), gi();
1019
1021
  return;
1020
1022
  }
1021
1023
  if (e.key === "f") {
1022
- e.preventDefault(), pi();
1024
+ e.preventDefault(), hi();
1023
1025
  return;
1024
1026
  }
1025
1027
  if (e.key === "i") {
1026
- e.preventDefault(), xi();
1028
+ e.preventDefault(), Ci();
1027
1029
  return;
1028
1030
  }
1029
1031
  if (e.key === "?") {
1030
- e.preventDefault(), En(!0);
1032
+ e.preventDefault(), kn(!0);
1031
1033
  return;
1032
1034
  }
1033
1035
  }
1034
1036
  };
1035
1037
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1036
1038
  }, [
1037
- W,
1038
1039
  H,
1039
- yi,
1040
- vi,
1041
- hi,
1042
- mi,
1040
+ B,
1041
+ xi,
1043
1042
  bi,
1044
- gi,
1045
1043
  _i,
1046
- xi,
1047
- pi
1044
+ gi,
1045
+ Si,
1046
+ vi,
1047
+ yi,
1048
+ Ci,
1049
+ hi
1048
1050
  ]);
1049
- let wi = p(() => {
1050
- let e = C("sessions.palette.groupActions", "Actions"), t = C("sessions.palette.groupView", "View"), n = C("sessions.palette.groupNav", "Navigation"), r = C("sessions.palette.groupSessions", "Sessions"), i = [
1051
+ let Ei = f(() => {
1052
+ 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 = [
1051
1053
  {
1052
1054
  id: "new-session",
1053
- label: C("sessions.newSession", "New Session"),
1055
+ label: x("sessions.newSession", "New Session"),
1054
1056
  group: e,
1055
- icon: /* @__PURE__ */ g(tt, { className: "size-4" }),
1057
+ icon: /* @__PURE__ */ h(rt, { className: "size-4" }),
1056
1058
  shortcut: "⌘/Ctrl T",
1057
- run: () => P(!0)
1059
+ run: () => M(!0)
1058
1060
  },
1059
1061
  {
1060
1062
  id: "reconnect",
1061
- label: C("sessions.palette.reconnect", "Reconnect active terminal"),
1063
+ label: x("sessions.palette.reconnect", "Reconnect active terminal"),
1062
1064
  group: e,
1063
- icon: /* @__PURE__ */ g(rt, { className: "size-4" }),
1064
- run: vi
1065
+ icon: /* @__PURE__ */ h(at, { className: "size-4" }),
1066
+ run: bi
1065
1067
  },
1066
1068
  {
1067
1069
  id: "refresh",
1068
- label: C("common.refresh", "Refresh"),
1070
+ label: x("common.refresh", "Refresh"),
1069
1071
  group: e,
1070
- icon: /* @__PURE__ */ g(nt, { className: "size-4" }),
1071
- run: () => void Y()
1072
+ icon: /* @__PURE__ */ h(it, { className: "size-4" }),
1073
+ run: () => void J()
1072
1074
  },
1073
- ...$ ? [{
1075
+ ...Q ? [{
1074
1076
  id: "share-active",
1075
- label: C("sessions.palette.shareActive", "Share / offer active session"),
1077
+ label: x("sessions.palette.shareActive", "Share / offer active session"),
1076
1078
  group: e,
1077
- icon: /* @__PURE__ */ g(at, { className: "size-4" }),
1078
- run: () => jn($)
1079
+ icon: /* @__PURE__ */ h(st, { className: "size-4" }),
1080
+ run: () => Pn(Q)
1079
1081
  }] : [],
1080
1082
  {
1081
1083
  id: "view-terminal",
1082
- label: C("sessions.palette.viewTerminal", "Switch to terminal view"),
1084
+ label: x("sessions.palette.viewTerminal", "Switch to terminal view"),
1083
1085
  group: t,
1084
- icon: /* @__PURE__ */ g(Qe, { className: "size-4" }),
1085
- run: () => N("terminal")
1086
+ icon: /* @__PURE__ */ h(et, { className: "size-4" }),
1087
+ run: () => j("terminal")
1086
1088
  },
1087
1089
  {
1088
1090
  id: "view-grid",
1089
- label: C("sessions.palette.viewGrid", "Switch to grid view"),
1091
+ label: x("sessions.palette.viewGrid", "Switch to grid view"),
1090
1092
  group: t,
1091
- icon: /* @__PURE__ */ g(qe, { className: "size-4" }),
1092
- run: () => N("grid")
1093
+ icon: /* @__PURE__ */ h(Ye, { className: "size-4" }),
1094
+ run: () => j("grid")
1093
1095
  },
1094
1096
  {
1095
1097
  id: "view-list",
1096
- label: C("sessions.palette.viewList", "Switch to list view"),
1098
+ label: x("sessions.palette.viewList", "Switch to list view"),
1097
1099
  group: t,
1098
- icon: /* @__PURE__ */ g(Ze, { className: "size-4" }),
1099
- run: () => N("list")
1100
+ icon: /* @__PURE__ */ h($e, { className: "size-4" }),
1101
+ run: () => j("list")
1100
1102
  },
1101
1103
  {
1102
1104
  id: "group-agent",
1103
- label: C("sessions.palette.groupByAgent", "Group by agent"),
1105
+ label: x("sessions.palette.groupByAgent", "Group by agent"),
1104
1106
  group: t,
1105
- icon: /* @__PURE__ */ g(it, { className: "size-4" }),
1106
- run: () => j("agent")
1107
+ icon: /* @__PURE__ */ h(ot, { className: "size-4" }),
1108
+ run: () => k("agent")
1107
1109
  },
1108
1110
  {
1109
1111
  id: "group-target",
1110
- label: C("sessions.palette.groupByTarget", "Group by target"),
1112
+ label: x("sessions.palette.groupByTarget", "Group by target"),
1111
1113
  group: t,
1112
- icon: /* @__PURE__ */ g($e, { className: "size-4" }),
1113
- run: () => j("target")
1114
+ icon: /* @__PURE__ */ h(tt, { className: "size-4" }),
1115
+ run: () => k("target")
1114
1116
  },
1115
1117
  {
1116
1118
  id: "group-vibe",
1117
- label: C("sessions.palette.groupByVibe", "Group by vibe"),
1119
+ label: x("sessions.palette.groupByVibe", "Group by vibe"),
1118
1120
  group: t,
1119
- icon: /* @__PURE__ */ g(Xe, { className: "size-4" }),
1120
- run: () => j("vibe")
1121
+ icon: /* @__PURE__ */ h(Qe, { className: "size-4" }),
1122
+ run: () => k("vibe")
1121
1123
  },
1122
1124
  {
1123
1125
  id: "group-none",
1124
- label: C("sessions.palette.groupClear", "Clear grouping"),
1126
+ label: x("sessions.palette.groupClear", "Clear grouping"),
1125
1127
  group: t,
1126
- icon: /* @__PURE__ */ g(Xe, { className: "size-4" }),
1127
- run: () => j("none")
1128
+ icon: /* @__PURE__ */ h(Qe, { className: "size-4" }),
1129
+ run: () => k("none")
1128
1130
  },
1129
1131
  {
1130
1132
  id: "toggle-info",
1131
- label: C("sessions.palette.toggleInfo", "Toggle session info panel"),
1133
+ label: x("sessions.palette.toggleInfo", "Toggle session info panel"),
1132
1134
  group: t,
1133
- icon: /* @__PURE__ */ g(Je, { className: "size-4" }),
1134
- run: xi
1135
+ icon: /* @__PURE__ */ h(Xe, { className: "size-4" }),
1136
+ run: Ci
1135
1137
  },
1136
1138
  {
1137
1139
  id: "shortcuts",
1138
- label: C("sessions.palette.shortcuts", "Keyboard shortcuts"),
1140
+ label: x("sessions.palette.shortcuts", "Keyboard shortcuts"),
1139
1141
  group: t,
1140
- icon: /* @__PURE__ */ g(Ye, { className: "size-4" }),
1141
- run: () => En(!0)
1142
+ icon: /* @__PURE__ */ h(Ze, { className: "size-4" }),
1143
+ run: () => kn(!0)
1142
1144
  },
1143
- ...$?.agent ? [{
1145
+ ...Q?.agent ? [{
1144
1146
  id: "goto-agent",
1145
- label: C("sessions.palette.gotoAgent", "Open active session's agent"),
1147
+ label: x("sessions.palette.gotoAgent", "Open active session's agent"),
1146
1148
  group: n,
1147
- icon: /* @__PURE__ */ g(it, { className: "size-4" }),
1148
- run: gi
1149
+ icon: /* @__PURE__ */ h(ot, { className: "size-4" }),
1150
+ run: vi
1149
1151
  }] : [],
1150
- ...$?.agent?.target ? [{
1152
+ ...Q?.agent?.target ? [{
1151
1153
  id: "goto-target",
1152
- label: C("sessions.palette.gotoTarget", "Open active session's target"),
1154
+ label: x("sessions.palette.gotoTarget", "Open active session's target"),
1153
1155
  group: n,
1154
- icon: /* @__PURE__ */ g($e, { className: "size-4" }),
1155
- run: _i
1156
+ icon: /* @__PURE__ */ h(tt, { className: "size-4" }),
1157
+ run: yi
1156
1158
  }] : []
1157
1159
  ];
1158
- for (let e of Z.slice(0, 30)) i.push({
1160
+ for (let e of X.slice(0, 30)) i.push({
1159
1161
  id: `open-${e.id}`,
1160
1162
  label: e.name,
1161
1163
  group: r,
1162
- icon: /* @__PURE__ */ g(st, { className: "size-4" }),
1164
+ icon: /* @__PURE__ */ h(lt, { className: "size-4" }),
1163
1165
  keywords: `${e.status} ${e.agent?.name ?? ""} ${e.agent?.target?.name ?? ""}`,
1164
- run: () => void Q(e)
1166
+ run: () => void Z(e)
1165
1167
  });
1166
1168
  return i;
1167
1169
  }, [
1168
- C,
1169
- $,
1170
- Z,
1170
+ x,
1171
+ Q,
1172
+ X,
1173
+ bi,
1174
+ J,
1175
+ Ci,
1171
1176
  vi,
1172
- Y,
1173
- xi,
1174
- gi,
1175
- _i,
1176
- Q
1177
- ]), Ti = {
1178
- total: X.length,
1179
- running: X.filter((e) => e.status === "RUNNING").length,
1180
- stopped: X.filter((e) => e.status === "STOPPED").length
1177
+ yi,
1178
+ Z
1179
+ ]), $ = {
1180
+ total: Y.length,
1181
+ running: Y.filter((e) => e.status === "RUNNING").length,
1182
+ stopped: Y.filter((e) => e.status === "STOPPED").length
1181
1183
  };
1182
- if (Et) return /* @__PURE__ */ g(v, {
1184
+ if (Ot) return /* @__PURE__ */ h(_, {
1183
1185
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
1184
- children: /* @__PURE__ */ g(ye, { message: C("sessions.loadingPermissions", "Loading permissions...") })
1186
+ children: /* @__PURE__ */ h(be, { message: x("sessions.loadingPermissions", "Loading permissions...") })
1185
1187
  });
1186
- if (Dt && Dt.permissionStrings?.length > 0 && !jt) return /* @__PURE__ */ g(v, {
1188
+ if (kt && kt.permissionStrings?.length > 0 && !Pt) return /* @__PURE__ */ h(_, {
1187
1189
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
1188
- children: /* @__PURE__ */ g(gt, {
1189
- title: C("common.accessDeniedTitle", "Access Denied"),
1190
- description: C("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
1191
- details: C("sessions.requiredPermission", "Required permission: session:list")
1190
+ children: /* @__PURE__ */ h(vt, {
1191
+ title: x("common.accessDeniedTitle", "Access Denied"),
1192
+ description: x("sessions.accessDeniedDescription", "You don't have permission to view sessions."),
1193
+ details: x("sessions.requiredPermission", "Required permission: session:list")
1192
1194
  })
1193
1195
  });
1194
- if (gr && !hr && X.length === 0) return /* @__PURE__ */ g(v, {
1196
+ if (q && !vr && Y.length === 0) return /* @__PURE__ */ h(_, {
1195
1197
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
1196
- children: /* @__PURE__ */ g(ye, { message: C("sessions.loading", "Loading sessions...") })
1198
+ children: /* @__PURE__ */ h(be, { message: x("sessions.loading", "Loading sessions...") })
1197
1199
  });
1198
- if (_r && X.length === 0) return /* @__PURE__ */ g(v, {
1200
+ if (yr && Y.length === 0) return /* @__PURE__ */ h(_, {
1199
1201
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
1200
- children: /* @__PURE__ */ g(be, {
1201
- title: C("sessions.failedLoad", "Failed to load sessions"),
1202
- message: _r.message,
1203
- onRetry: () => Y()
1202
+ children: /* @__PURE__ */ h(xe, {
1203
+ title: x("sessions.failedLoad", "Failed to load sessions"),
1204
+ message: yr.message,
1205
+ onRetry: () => J()
1204
1206
  })
1205
1207
  });
1206
- let Ei = () => !Vr || M === "terminal" ? null : /* @__PURE__ */ _("div", {
1208
+ let Di = () => !Ur || A === "terminal" ? null : /* @__PURE__ */ g("div", {
1207
1209
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 bg-action-primary-bg/10 border border-action-primary-bg/20 rounded-lg",
1208
- children: [/* @__PURE__ */ g("span", {
1210
+ children: [/* @__PURE__ */ h("span", {
1209
1211
  className: "text-sm font-medium text-text-primary",
1210
- children: C(R.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", R.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: R.size })
1211
- }), /* @__PURE__ */ _("div", {
1212
+ children: x(I.size === 1 ? "sessions.selectionCountSingle" : "sessions.selectionCountPlural", I.size === 1 ? "{{count}} session selected" : "{{count}} sessions selected", { count: I.size })
1213
+ }), /* @__PURE__ */ g("div", {
1212
1214
  className: "flex items-center gap-1.5 sm:ml-auto flex-wrap",
1213
1215
  children: [
1214
- /* @__PURE__ */ _("button", {
1216
+ /* @__PURE__ */ g("button", {
1215
1217
  type: "button",
1216
- onClick: Hr,
1217
- disabled: Jt,
1218
+ onClick: Wr,
1219
+ disabled: Zt,
1218
1220
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
1219
1221
  children: [
1220
- /* @__PURE__ */ g(ot, { className: "size-3" }),
1222
+ /* @__PURE__ */ h(ct, { className: "size-3" }),
1221
1223
  " ",
1222
- C("sessions.stop", "Stop")
1224
+ x("sessions.stop", "Stop")
1223
1225
  ]
1224
1226
  }),
1225
- /* @__PURE__ */ _("button", {
1227
+ /* @__PURE__ */ g("button", {
1226
1228
  type: "button",
1227
- onClick: Ur,
1228
- disabled: Jt,
1229
+ onClick: Gr,
1230
+ disabled: Zt,
1229
1231
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
1230
1232
  children: [
1231
- /* @__PURE__ */ g(rt, { className: "size-3" }),
1233
+ /* @__PURE__ */ h(at, { className: "size-3" }),
1232
1234
  " ",
1233
- C("sessions.restart", "Restart")
1235
+ x("sessions.restart", "Restart")
1234
1236
  ]
1235
1237
  }),
1236
- /* @__PURE__ */ _("button", {
1238
+ /* @__PURE__ */ g("button", {
1237
1239
  type: "button",
1238
- onClick: Wr,
1239
- disabled: Jt,
1240
+ onClick: Kr,
1241
+ disabled: Zt,
1240
1242
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg border border-status-error-text/20 rounded-md hover:bg-status-error-bg/80 transition-colors disabled:opacity-50",
1241
1243
  children: [
1242
- /* @__PURE__ */ g(ct, { className: "size-3" }),
1244
+ /* @__PURE__ */ h(ut, { className: "size-3" }),
1243
1245
  " ",
1244
- C("sessions.remove", "Remove")
1246
+ x("sessions.remove", "Remove")
1245
1247
  ]
1246
1248
  }),
1247
- /* @__PURE__ */ _("button", {
1249
+ /* @__PURE__ */ g("button", {
1248
1250
  type: "button",
1249
- onClick: Lr,
1251
+ onClick: zr,
1250
1252
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
1251
1253
  children: [
1252
- /* @__PURE__ */ g(lt, { className: "size-3" }),
1254
+ /* @__PURE__ */ h(dt, { className: "size-3" }),
1253
1255
  " ",
1254
- C("sessions.deselect", "Deselect")
1256
+ x("sessions.deselect", "Deselect")
1255
1257
  ]
1256
1258
  })
1257
1259
  ]
1258
1260
  })]
1259
- }), Di = /* @__PURE__ */ _("div", {
1261
+ }), Oi = /* @__PURE__ */ g("div", {
1260
1262
  className: "flex items-center gap-0.5 rounded-md bg-bg-sunken p-0.5 flex-shrink-0",
1261
1263
  children: [
1262
- /* @__PURE__ */ g("button", {
1264
+ /* @__PURE__ */ h("button", {
1263
1265
  type: "button",
1264
- onClick: () => N("terminal"),
1265
- className: `p-1.5 rounded ${M === "terminal" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1266
- title: C("sessions.terminalViewTitle", "Terminal view"),
1267
- "aria-label": C("sessions.terminalViewTitle", "Terminal view"),
1268
- children: /* @__PURE__ */ g(Qe, { className: "size-4 text-text-secondary" })
1266
+ onClick: () => j("terminal"),
1267
+ className: `p-1.5 rounded ${A === "terminal" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1268
+ title: x("sessions.terminalViewTitle", "Terminal view"),
1269
+ "aria-label": x("sessions.terminalViewTitle", "Terminal view"),
1270
+ children: /* @__PURE__ */ h(et, { className: "size-4 text-text-secondary" })
1269
1271
  }),
1270
- /* @__PURE__ */ g("button", {
1272
+ /* @__PURE__ */ h("button", {
1271
1273
  type: "button",
1272
- onClick: () => N("grid"),
1273
- className: `p-1.5 rounded ${M === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1274
- title: C("sessions.gridViewTitle", "Grid view"),
1275
- "aria-label": C("sessions.gridViewTitle", "Grid view"),
1276
- children: /* @__PURE__ */ g(qe, { className: "size-4 text-text-secondary" })
1274
+ onClick: () => j("grid"),
1275
+ className: `p-1.5 rounded ${A === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1276
+ title: x("sessions.gridViewTitle", "Grid view"),
1277
+ "aria-label": x("sessions.gridViewTitle", "Grid view"),
1278
+ children: /* @__PURE__ */ h(Ye, { className: "size-4 text-text-secondary" })
1277
1279
  }),
1278
- /* @__PURE__ */ g("button", {
1280
+ /* @__PURE__ */ h("button", {
1279
1281
  type: "button",
1280
- onClick: () => N("list"),
1281
- className: `p-1.5 rounded ${M === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1282
- title: C("sessions.listViewTitle", "List view"),
1283
- "aria-label": C("sessions.listViewTitle", "List view"),
1284
- children: /* @__PURE__ */ g(Ze, { className: "size-4 text-text-secondary" })
1282
+ onClick: () => j("list"),
1283
+ className: `p-1.5 rounded ${A === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
1284
+ title: x("sessions.listViewTitle", "List view"),
1285
+ "aria-label": x("sessions.listViewTitle", "List view"),
1286
+ children: /* @__PURE__ */ h($e, { className: "size-4 text-text-secondary" })
1285
1287
  })
1286
1288
  ]
1287
- }), Oi = /* @__PURE__ */ _(pt, { children: [
1288
- Ht && Mi(),
1289
- ji(),
1290
- An && /* @__PURE__ */ g(Le, {
1291
- session: An,
1292
- isOpen: !!An,
1293
- onClose: () => jn(null)
1289
+ }), ki = /* @__PURE__ */ g(ht, { children: [
1290
+ Gt && Ni(),
1291
+ Mi(),
1292
+ Nn && /* @__PURE__ */ h(ze, {
1293
+ session: Nn,
1294
+ isOpen: !!Nn,
1295
+ onClose: () => Pn(null)
1294
1296
  }),
1295
- /* @__PURE__ */ g(fe, {
1296
- isOpen: Ut,
1297
- onClose: () => F(!1),
1297
+ /* @__PURE__ */ h(pe, {
1298
+ isOpen: Kt,
1299
+ onClose: () => N(!1),
1298
1300
  onConfirm: () => {
1299
- F(!1), x("/billing/plans");
1301
+ N(!1), b("/billing/plans");
1300
1302
  },
1301
- title: pe("session").title,
1302
- message: pe("session").message,
1303
+ title: me("session").title,
1304
+ message: me("session").message,
1303
1305
  confirmLabel: "View Billing",
1304
1306
  cancelLabel: "Dismiss",
1305
1307
  variant: "warning"
1306
1308
  }),
1307
- /* @__PURE__ */ g(Ve, {
1308
- isOpen: Tn,
1309
- onClose: () => En(!1),
1310
- shortcuts: Si
1309
+ /* @__PURE__ */ h(Ue, {
1310
+ isOpen: On,
1311
+ onClose: () => kn(!1),
1312
+ shortcuts: wi
1311
1313
  }),
1312
- /* @__PURE__ */ g(He, {
1313
- open: Dn,
1314
- onOpenChange: On,
1315
- commands: wi
1314
+ /* @__PURE__ */ h(We, {
1315
+ open: An,
1316
+ onOpenChange: jn,
1317
+ commands: Ei
1316
1318
  }),
1317
- /* @__PURE__ */ g(Ue, {
1318
- open: Cn,
1319
- onOpenChange: wn,
1320
- session: $
1319
+ /* @__PURE__ */ h(Ge, {
1320
+ open: En,
1321
+ onOpenChange: Dn,
1322
+ session: Q
1321
1323
  })
1322
1324
  ] });
1323
- if (M === "terminal") return /* @__PURE__ */ _(v, {
1325
+ if (A === "terminal") return /* @__PURE__ */ g(_, {
1324
1326
  className: "flex flex-col bg-bg-surface h-screen",
1325
1327
  children: [
1326
- /* @__PURE__ */ _("div", {
1328
+ /* @__PURE__ */ g("div", {
1327
1329
  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",
1328
- children: [/* @__PURE__ */ _("div", {
1330
+ children: [/* @__PURE__ */ g("div", {
1329
1331
  className: "flex flex-wrap items-center gap-3",
1330
- children: [/* @__PURE__ */ g("h1", {
1332
+ children: [/* @__PURE__ */ h("h1", {
1331
1333
  className: "text-sm font-semibold text-text-primary",
1332
- children: C("nav.sessions", "Sessions")
1333
- }), /* @__PURE__ */ g("span", {
1334
+ children: x("nav.sessions", "Sessions")
1335
+ }), /* @__PURE__ */ h("span", {
1334
1336
  className: "text-xs text-text-muted",
1335
- children: C("sessions.runningSummary", "{{running}} running / {{total}} total", {
1336
- running: Ti.running,
1337
- total: Ti.total
1337
+ children: x("sessions.runningSummary", "{{running}} running / {{total}} total", {
1338
+ running: $.running,
1339
+ total: $.total
1338
1340
  })
1339
1341
  })]
1340
- }), /* @__PURE__ */ _("div", {
1342
+ }), /* @__PURE__ */ g("div", {
1341
1343
  className: "flex w-full flex-wrap items-center gap-2 sm:w-auto sm:justify-end",
1342
1344
  children: [
1343
- /* @__PURE__ */ g("button", {
1345
+ /* @__PURE__ */ h("button", {
1344
1346
  type: "button",
1345
- onClick: () => sr().then(() => Y()),
1347
+ onClick: () => ur().then(() => J()),
1346
1348
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors",
1347
- title: C("sessions.checkHealth", "Check session health"),
1348
- children: /* @__PURE__ */ g(Ge, { className: "size-3.5" })
1349
+ title: x("sessions.checkHealth", "Check session health"),
1350
+ children: /* @__PURE__ */ h(qe, { className: "size-3.5" })
1349
1351
  }),
1350
- /* @__PURE__ */ g("button", {
1352
+ /* @__PURE__ */ h("button", {
1351
1353
  type: "button",
1352
1354
  onClick: () => {
1353
- Y(), xr();
1355
+ J(), Cr();
1354
1356
  },
1355
- disabled: gr,
1357
+ disabled: q,
1356
1358
  className: "p-1.5 text-text-secondary hover:bg-bg-surface rounded transition-colors disabled:opacity-50",
1357
- title: C("common.refresh", "Refresh"),
1358
- children: /* @__PURE__ */ g(nt, { className: `size-3.5 ${gr ? "animate-spin" : ""}` })
1359
+ title: x("common.refresh", "Refresh"),
1360
+ children: /* @__PURE__ */ h(it, { className: `size-3.5 ${q ? "animate-spin" : ""}` })
1359
1361
  }),
1360
- Di
1362
+ Oi
1361
1363
  ]
1362
1364
  })]
1363
1365
  }),
1364
- /* @__PURE__ */ g("div", {
1366
+ /* @__PURE__ */ h("div", {
1365
1367
  className: "px-4 pt-3",
1366
- children: /* @__PURE__ */ g(ke, {
1368
+ children: /* @__PURE__ */ h(Ae, {
1367
1369
  showConnectionStatus: !0,
1368
1370
  maxVisible: 3
1369
1371
  })
1370
1372
  }),
1371
- /* @__PURE__ */ g(Ie, {
1372
- tabs: H,
1373
- activeTabId: W,
1374
- onTabSelect: G,
1375
- onTabClose: ti,
1376
- onOpenExternal: ni,
1373
+ /* @__PURE__ */ h(Re, {
1374
+ tabs: B,
1375
+ activeTabId: H,
1376
+ onTabSelect: U,
1377
+ onTabClose: ri,
1378
+ onOpenExternal: ii,
1377
1379
  collapsed: !1,
1378
- sessions: Z,
1379
- onOpenTerminal: Q,
1380
- onRetryTerminal: Q,
1381
- onRenameSession: ri,
1382
- onStopTerminal: ii,
1380
+ sessions: X,
1381
+ onOpenTerminal: Z,
1382
+ onRetryTerminal: Z,
1383
+ onRenameSession: ai,
1384
+ onStopTerminal: oi,
1383
1385
  onStopSession: (e) => {
1384
- let t = X.find((t) => t.id === e);
1385
- t && Xr(t);
1386
+ let t = Y.find((t) => t.id === e);
1387
+ t && Qr(t);
1386
1388
  },
1387
- onRestartTerminal: ai,
1388
- onReattachTerminal: oi,
1389
- onReorderTabs: si,
1390
- onTogglePin: ci,
1391
- onShowSessionInfo: li,
1392
- onViewAgent: ui,
1393
- onViewTarget: di,
1394
- onShareSession: Nt ? fi : void 0,
1395
- onCreateSession: qr,
1389
+ onRestartTerminal: si,
1390
+ onReattachTerminal: ci,
1391
+ onReorderTabs: li,
1392
+ onTogglePin: ui,
1393
+ onShowSessionInfo: di,
1394
+ onViewAgent: fi,
1395
+ onViewTarget: pi,
1396
+ onShareSession: It ? mi : void 0,
1397
+ onCreateSession: Yr,
1396
1398
  fullScreen: !0,
1397
- isImmersiveFullscreen: Mn,
1398
- onToggleImmersiveFullscreen: pi,
1399
+ isImmersiveFullscreen: Fn,
1400
+ onToggleImmersiveFullscreen: hi,
1399
1401
  contextSwitcher: void 0
1400
1402
  }),
1401
- /* @__PURE__ */ _("div", {
1403
+ /* @__PURE__ */ g("div", {
1402
1404
  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",
1403
- children: [/* @__PURE__ */ _("div", {
1405
+ children: [/* @__PURE__ */ g("div", {
1404
1406
  className: "flex items-center gap-3",
1405
1407
  children: [
1406
- /* @__PURE__ */ _("span", {
1408
+ /* @__PURE__ */ g("span", {
1407
1409
  className: "inline-flex items-center gap-1.5",
1408
- children: [/* @__PURE__ */ g("span", {
1410
+ children: [/* @__PURE__ */ h("span", {
1409
1411
  className: "size-1.5 rounded-full bg-status-success-bg",
1410
1412
  "aria-hidden": !0
1411
- }), C("sessions.statusOnline", "Online")]
1413
+ }), x("sessions.statusOnline", "Online")]
1412
1414
  }),
1413
- /* @__PURE__ */ _("span", { children: [
1414
- H.length,
1415
+ /* @__PURE__ */ g("span", { children: [
1416
+ B.length,
1415
1417
  " ",
1416
- H.length === 1 ? "tab" : "tabs"
1418
+ B.length === 1 ? "tab" : "tabs"
1417
1419
  ] }),
1418
- W && /* @__PURE__ */ g("span", {
1420
+ H && /* @__PURE__ */ h("span", {
1419
1421
  className: "truncate max-w-[28ch]",
1420
- children: H.find((e) => e.sessionId === W)?.name
1422
+ children: B.find((e) => e.sessionId === H)?.name
1421
1423
  }),
1422
- $?.agent && /* @__PURE__ */ _("span", {
1424
+ Q?.agent && /* @__PURE__ */ g("span", {
1423
1425
  className: "hidden md:inline-flex items-center gap-1",
1424
1426
  children: [
1425
- /* @__PURE__ */ g("span", {
1427
+ /* @__PURE__ */ h("span", {
1426
1428
  className: "text-text-muted",
1427
1429
  children: "·"
1428
1430
  }),
1429
- /* @__PURE__ */ g(Me, { agent: $.agent }),
1430
- $.agent.target && /* @__PURE__ */ g(Ne, { target: $.agent.target })
1431
+ /* @__PURE__ */ h(Pe, { agent: Q.agent }),
1432
+ Q.agent.target && /* @__PURE__ */ h(Fe, { target: Q.agent.target })
1431
1433
  ]
1432
1434
  })
1433
1435
  ]
1434
- }), /* @__PURE__ */ _("div", {
1436
+ }), /* @__PURE__ */ g("div", {
1435
1437
  className: "hidden sm:flex items-center gap-3",
1436
1438
  children: [
1437
- /* @__PURE__ */ _("button", {
1439
+ /* @__PURE__ */ g("button", {
1438
1440
  type: "button",
1439
- onClick: () => wn(!Cn),
1441
+ onClick: () => Dn(!En),
1440
1442
  className: "inline-flex items-center gap-1 hover:text-text-secondary transition-colors",
1441
- title: C("sessions.infoPanelHint", "Session info (i)"),
1442
- children: [/* @__PURE__ */ g(Je, { className: "size-3" }), C("sessions.infoPanelLabel", "Info")]
1443
+ title: x("sessions.infoPanelHint", "Session info (i)"),
1444
+ children: [/* @__PURE__ */ h(Xe, { className: "size-3" }), x("sessions.infoPanelLabel", "Info")]
1443
1445
  }),
1444
- $ && /* @__PURE__ */ _("button", {
1445
- type: "button",
1446
- onClick: () => jn($),
1447
- className: "inline-flex items-center gap-1 hover:text-text-secondary transition-colors",
1448
- title: C("sessions.shareOfferHint", "Share / offer this session"),
1449
- "data-testid": "terminal-share-active",
1450
- children: [/* @__PURE__ */ g(at, { className: "size-3" }), C("sessions.shareOfferLabel", "Share")]
1446
+ Q && /* @__PURE__ */ h(Ne, {
1447
+ entity: "session",
1448
+ resource: {
1449
+ id: Q.id,
1450
+ name: Q.name,
1451
+ vibeId: Q.vibeId ?? null
1452
+ },
1453
+ label: x("sessions.shareOfferLabel", "Share"),
1454
+ variant: "button"
1451
1455
  }),
1452
- /* @__PURE__ */ _("button", {
1456
+ /* @__PURE__ */ g("button", {
1453
1457
  type: "button",
1454
- onClick: () => En(!0),
1458
+ onClick: () => kn(!0),
1455
1459
  className: "inline-flex items-center gap-1 hover:text-text-secondary transition-colors",
1456
- children: [/* @__PURE__ */ g(Ye, { className: "size-3" }), C("sessions.shortcutsHint", "Press ? for shortcuts")]
1460
+ children: [/* @__PURE__ */ h(Ze, { className: "size-3" }), x("sessions.shortcutsHint", "Press ? for shortcuts")]
1457
1461
  }),
1458
- /* @__PURE__ */ g("button", {
1462
+ /* @__PURE__ */ h("button", {
1459
1463
  type: "button",
1460
- onClick: bi,
1464
+ onClick: Si,
1461
1465
  className: "hover:text-text-secondary transition-colors",
1462
- children: C("sessions.paletteHint", "⌘/Ctrl K · Command palette")
1466
+ children: x("sessions.paletteHint", "⌘/Ctrl K · Command palette")
1463
1467
  })
1464
1468
  ]
1465
1469
  })]
1466
1470
  }),
1467
- qt && /* @__PURE__ */ g("div", {
1471
+ Xt && /* @__PURE__ */ h("div", {
1468
1472
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
1469
- children: qt
1473
+ children: Xt
1470
1474
  }),
1471
- Oi
1475
+ ki
1472
1476
  ]
1473
1477
  });
1474
- let ki = (e) => /* @__PURE__ */ g(yt, {
1478
+ let Ai = (e) => /* @__PURE__ */ h(xt, {
1475
1479
  stagger: .04,
1476
1480
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
1477
- children: e.map((e) => /* @__PURE__ */ g(vt, { children: /* @__PURE__ */ g(Pe, {
1481
+ children: e.map((e) => /* @__PURE__ */ h(bt, { children: /* @__PURE__ */ h(Ie, {
1478
1482
  session: e,
1479
- onOpen: Kr,
1480
- onStart: Yr,
1481
- onStop: Xr,
1482
- onRestart: Zr,
1483
- onOpenTerminal: Q,
1484
- onShare: Nt ? ei : void 0,
1485
- selected: R.has(e.id),
1486
- onToggleSelect: () => Fr(e.id)
1483
+ onOpen: Jr,
1484
+ onStart: Zr,
1485
+ onStop: Qr,
1486
+ onRestart: $r,
1487
+ onOpenTerminal: Z,
1488
+ onShare: It ? ni : void 0,
1489
+ selected: I.has(e.id),
1490
+ onToggleSelect: () => Lr(e.id)
1487
1491
  }) }, e.id))
1488
- }), Ai = (e, t) => /* @__PURE__ */ g(Fe, {
1492
+ }), ji = (e, t) => /* @__PURE__ */ h(Le, {
1489
1493
  sessions: e,
1490
- onOpen: Kr,
1491
- onStart: Yr,
1492
- onStop: Xr,
1493
- onRestart: Zr,
1494
- onTerminate: Qr,
1495
- onOpenTerminal: Q,
1496
- onShare: Nt ? ei : void 0,
1497
- selectedIds: R,
1498
- onToggleSelect: Fr,
1499
- onSelectAll: Ir,
1500
- onDeselectAll: Lr,
1494
+ onOpen: Jr,
1495
+ onStart: Zr,
1496
+ onStop: Qr,
1497
+ onRestart: $r,
1498
+ onTerminate: ei,
1499
+ onOpenTerminal: Z,
1500
+ onShare: It ? ni : void 0,
1501
+ selectedIds: I,
1502
+ onToggleSelect: Lr,
1503
+ onSelectAll: Rr,
1504
+ onDeselectAll: zr,
1501
1505
  hideHeaderSelectAll: t
1502
1506
  });
1503
- return /* @__PURE__ */ _(v, {
1507
+ return /* @__PURE__ */ g(_, {
1504
1508
  className: "flex flex-col bg-bg-surface min-h-screen",
1505
1509
  children: [
1506
- /* @__PURE__ */ _("div", {
1510
+ /* @__PURE__ */ g("div", {
1507
1511
  className: "flex-1 overflow-y-auto space-y-6 p-4 sm:p-6",
1508
1512
  children: [
1509
- /* @__PURE__ */ g(ve, {
1510
- title: C("nav.sessions", "Sessions"),
1511
- description: C("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
1512
- running: Ti.running,
1513
- total: Ti.total
1513
+ /* @__PURE__ */ h(ye, {
1514
+ title: x("nav.sessions", "Sessions"),
1515
+ description: x("sessions.pageDescription", "{{running}} of {{total}} sessions running", {
1516
+ running: $.running,
1517
+ total: $.total
1514
1518
  }),
1515
- actions: /* @__PURE__ */ _("div", {
1519
+ actions: /* @__PURE__ */ g("div", {
1516
1520
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
1517
1521
  children: [
1518
- /* @__PURE__ */ g("button", {
1522
+ /* @__PURE__ */ h("button", {
1519
1523
  type: "button",
1520
- onClick: () => sr().then(() => Y()),
1524
+ onClick: () => ur().then(() => J()),
1521
1525
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
1522
- title: C("sessions.checkHealth", "Check session health"),
1523
- children: /* @__PURE__ */ g(Ge, { className: "size-4" })
1526
+ title: x("sessions.checkHealth", "Check session health"),
1527
+ children: /* @__PURE__ */ h(qe, { className: "size-4" })
1524
1528
  }),
1525
- /* @__PURE__ */ g("button", {
1529
+ /* @__PURE__ */ h("button", {
1526
1530
  type: "button",
1527
- onClick: () => Y(),
1528
- disabled: gr,
1531
+ onClick: () => J(),
1532
+ disabled: q,
1529
1533
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
1530
- title: C("sessions.refreshTitle", "Refresh sessions"),
1531
- children: /* @__PURE__ */ g(nt, { className: `size-4 ${gr ? "animate-spin" : ""}` })
1534
+ title: x("sessions.refreshTitle", "Refresh sessions"),
1535
+ children: /* @__PURE__ */ h(it, { className: `size-4 ${q ? "animate-spin" : ""}` })
1532
1536
  }),
1533
- /* @__PURE__ */ g(ht, {
1534
- label: C("sessions.export", "Export"),
1535
- disabled: Xt,
1537
+ /* @__PURE__ */ h(_t, {
1538
+ label: x("sessions.export", "Export"),
1539
+ disabled: $t,
1536
1540
  testId: "sessions-export",
1537
1541
  defaultFolderPath: "/Vibecontrols/Sessions",
1538
1542
  source: {
@@ -1540,310 +1544,310 @@ function Ct() {
1540
1544
  filename: `sessions-export-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`,
1541
1545
  mimeType: "text/csv",
1542
1546
  getBlob: async () => {
1543
- let e = (await dr({ variables: { input: {
1547
+ let e = (await mr({ variables: { input: {
1544
1548
  filter: {
1545
- status: T === "all" ? void 0 : T,
1546
- type: E === "all" ? void 0 : E,
1547
- vibeId: D !== "all" && D !== "none" ? D : void 0,
1548
- agentId: O === "all" ? void 0 : O
1549
+ status: C === "all" ? void 0 : C,
1550
+ type: w === "all" ? void 0 : w,
1551
+ vibeId: T !== "all" && T !== "none" ? T : void 0,
1552
+ agentId: E === "all" ? void 0 : E
1549
1553
  },
1550
1554
  format: "CSV"
1551
1555
  } } })).data?.exportSessions;
1552
1556
  return e ? { blob: new Blob([e.data], { type: "text/csv" }) } : null;
1553
1557
  }
1554
1558
  },
1555
- onDownload: () => Gr("CSV")
1559
+ onDownload: () => qr("CSV")
1556
1560
  }),
1557
- /* @__PURE__ */ g(_t, {
1558
- permission: je.SESSION_CREATE,
1559
- children: /* @__PURE__ */ _("button", {
1561
+ /* @__PURE__ */ h(yt, {
1562
+ permission: Me.SESSION_CREATE,
1563
+ children: /* @__PURE__ */ g("button", {
1560
1564
  type: "button",
1561
- onClick: () => Un(!0),
1565
+ onClick: () => Kn(!0),
1562
1566
  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",
1563
1567
  "data-testid": "sessions-reconnect-button",
1564
- title: C("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
1565
- children: [/* @__PURE__ */ g(nt, { className: "size-4" }), C("sessions.reconnect", "Reconnect")]
1568
+ title: x("sessions.reconnectTooltip", "Reconnect orphan tmux/wezterm/zellij sessions left over from a previous agent run"),
1569
+ children: [/* @__PURE__ */ h(it, { className: "size-4" }), x("sessions.reconnect", "Reconnect")]
1566
1570
  })
1567
1571
  }),
1568
- /* @__PURE__ */ g(_t, {
1569
- permission: je.SESSION_CREATE,
1570
- children: /* @__PURE__ */ _("button", {
1572
+ /* @__PURE__ */ h(yt, {
1573
+ permission: Me.SESSION_CREATE,
1574
+ children: /* @__PURE__ */ g("button", {
1571
1575
  type: "button",
1572
- onClick: qr,
1576
+ onClick: Yr,
1573
1577
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
1574
- children: [/* @__PURE__ */ g(tt, { className: "size-4" }), C("sessions.newSession", "New Session")]
1578
+ children: [/* @__PURE__ */ h(rt, { className: "size-4" }), x("sessions.newSession", "New Session")]
1575
1579
  })
1576
1580
  }),
1577
- Di
1581
+ Oi
1578
1582
  ]
1579
1583
  })
1580
1584
  }),
1581
- /* @__PURE__ */ g(ke, {
1585
+ /* @__PURE__ */ h(Ae, {
1582
1586
  showConnectionStatus: !0,
1583
1587
  maxVisible: 3
1584
1588
  }),
1585
- /* @__PURE__ */ _("div", {
1589
+ /* @__PURE__ */ g("div", {
1586
1590
  "data-tour": "sessions-filters",
1587
1591
  className: "space-y-3",
1588
- children: [/* @__PURE__ */ g("div", {
1589
- ref: Qt,
1592
+ children: [/* @__PURE__ */ h("div", {
1593
+ ref: tn,
1590
1594
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
1591
- children: /* @__PURE__ */ g(we, {
1592
- value: w,
1593
- onChange: Pt,
1594
- placeholder: C("sessions.searchPlaceholder", "Search sessions..."),
1595
+ children: /* @__PURE__ */ h(Te, {
1596
+ value: S,
1597
+ onChange: Lt,
1598
+ placeholder: x("sessions.searchPlaceholder", "Search sessions..."),
1595
1599
  className: "flex-1 sm:w-64 sm:flex-none"
1596
1600
  })
1597
- }), /* @__PURE__ */ _("div", {
1601
+ }), /* @__PURE__ */ g("div", {
1598
1602
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
1599
1603
  children: [
1600
- /* @__PURE__ */ g(Te, {
1601
- label: C("sessions.filterStatus", "Status"),
1604
+ /* @__PURE__ */ h(Ee, {
1605
+ label: x("sessions.filterStatus", "Status"),
1606
+ value: C,
1607
+ options: Mt,
1608
+ onChange: Rt
1609
+ }),
1610
+ /* @__PURE__ */ h(Ee, {
1611
+ label: x("sessions.filterType", "Type"),
1612
+ value: w,
1613
+ options: Nt,
1614
+ onChange: zt
1615
+ }),
1616
+ /* @__PURE__ */ h(Ee, {
1617
+ label: x("sessions.filterVibe", "Vibe"),
1602
1618
  value: T,
1603
- options: kt,
1604
- onChange: Ft
1619
+ options: Dr,
1620
+ onChange: Bt
1605
1621
  }),
1606
- /* @__PURE__ */ g(Te, {
1607
- label: C("sessions.filterType", "Type"),
1622
+ /* @__PURE__ */ h(Ee, {
1623
+ label: x("sessions.filterAgent", "Agent"),
1608
1624
  value: E,
1609
- options: At,
1610
- onChange: It
1625
+ options: Or,
1626
+ onChange: Vt
1611
1627
  }),
1612
- /* @__PURE__ */ g(Te, {
1613
- label: C("sessions.filterVibe", "Vibe"),
1628
+ /* @__PURE__ */ h(Ee, {
1629
+ label: x("sessions.filterTarget", "Target"),
1614
1630
  value: D,
1615
- options: Tr,
1616
- onChange: Lt
1617
- }),
1618
- /* @__PURE__ */ g(Te, {
1619
- label: C("sessions.filterAgent", "Agent"),
1620
- value: O,
1621
- options: Er,
1622
- onChange: Rt
1631
+ options: Fr,
1632
+ onChange: Ht,
1633
+ icon: /* @__PURE__ */ h(tt, { className: "size-3.5 text-text-secondary" })
1623
1634
  }),
1624
- /* @__PURE__ */ g(Te, {
1625
- label: C("sessions.filterTarget", "Target"),
1626
- value: k,
1627
- options: Nr,
1628
- onChange: zt,
1629
- icon: /* @__PURE__ */ g($e, { className: "size-3.5 text-text-secondary" })
1630
- }),
1631
- /* @__PURE__ */ g("div", {
1635
+ /* @__PURE__ */ h("div", {
1632
1636
  className: "sm:ml-auto",
1633
- children: /* @__PURE__ */ g(Te, {
1634
- label: C("sessions.groupByLabel", "Group"),
1635
- value: A,
1636
- options: Dr,
1637
- onChange: (e) => j(e),
1637
+ children: /* @__PURE__ */ h(Ee, {
1638
+ label: x("sessions.groupByLabel", "Group"),
1639
+ value: O,
1640
+ options: kr,
1641
+ onChange: (e) => k(e),
1638
1642
  allValue: "none",
1639
- allLabel: C("sessions.groupBy.none", "No grouping"),
1640
- icon: /* @__PURE__ */ g(Xe, { className: "size-3.5 text-text-secondary" })
1643
+ allLabel: x("sessions.groupBy.none", "No grouping"),
1644
+ icon: /* @__PURE__ */ h(Qe, { className: "size-3.5 text-text-secondary" })
1641
1645
  })
1642
1646
  })
1643
1647
  ]
1644
1648
  })]
1645
1649
  }),
1646
- /* @__PURE__ */ _("div", {
1650
+ /* @__PURE__ */ g("div", {
1647
1651
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-wrap",
1648
1652
  children: [
1649
- /* @__PURE__ */ _("button", {
1653
+ /* @__PURE__ */ g("button", {
1650
1654
  type: "button",
1651
- onClick: () => Ft("RUNNING"),
1652
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${T === "RUNNING" ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
1655
+ onClick: () => Rt("RUNNING"),
1656
+ 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"}`,
1653
1657
  children: [
1654
- /* @__PURE__ */ g(et, { className: "size-3" }),
1658
+ /* @__PURE__ */ h(nt, { className: "size-3" }),
1655
1659
  " ",
1656
- C("sessions.running", "Running"),
1660
+ x("sessions.running", "Running"),
1657
1661
  " (",
1658
- Ti.running,
1662
+ $.running,
1659
1663
  ")"
1660
1664
  ]
1661
1665
  }),
1662
- /* @__PURE__ */ _("button", {
1666
+ /* @__PURE__ */ g("button", {
1663
1667
  type: "button",
1664
- onClick: () => Ft("STOPPED"),
1665
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${T === "STOPPED" ? "bg-bg-sunken text-text-secondary" : "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80"}`,
1668
+ onClick: () => Rt("STOPPED"),
1669
+ 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"}`,
1666
1670
  children: [
1667
- /* @__PURE__ */ g(ot, { className: "size-3" }),
1671
+ /* @__PURE__ */ h(ct, { className: "size-3" }),
1668
1672
  " ",
1669
- C("sessions.stoppedState", "Stopped"),
1673
+ x("sessions.stoppedState", "Stopped"),
1670
1674
  " (",
1671
- Ti.stopped,
1675
+ $.stopped,
1672
1676
  ")"
1673
1677
  ]
1674
1678
  }),
1675
- /* @__PURE__ */ g("div", {
1679
+ /* @__PURE__ */ h("div", {
1676
1680
  className: "sm:ml-auto flex items-center gap-2",
1677
- children: Z.length > 0 && /* @__PURE__ */ _("button", {
1681
+ children: X.length > 0 && /* @__PURE__ */ g("button", {
1678
1682
  type: "button",
1679
- onClick: Br ? Lr : Ir,
1683
+ onClick: Hr ? zr : Rr,
1680
1684
  className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
1681
- children: [/* @__PURE__ */ g(Ke, { className: "size-3.5" }), Br ? C("sessions.deselectAll", "Deselect All") : C("sessions.selectAll", "Select All")]
1685
+ children: [/* @__PURE__ */ h(Je, { className: "size-3.5" }), Hr ? x("sessions.deselectAll", "Deselect All") : x("sessions.selectAll", "Select All")]
1682
1686
  })
1683
1687
  })
1684
1688
  ]
1685
1689
  }),
1686
- Ei(),
1687
- w || T !== "all" || E !== "all" || D !== "all" || O !== "all" || k !== "all" ? /* @__PURE__ */ _("p", {
1690
+ Di(),
1691
+ S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? /* @__PURE__ */ g("p", {
1688
1692
  className: "text-sm text-text-secondary",
1689
1693
  children: [
1690
- C("sessions.showing", "Showing"),
1694
+ x("sessions.showing", "Showing"),
1691
1695
  " ",
1692
- Z.length,
1696
+ X.length,
1693
1697
  " ",
1694
- C("sessions.of", "of"),
1698
+ x("sessions.of", "of"),
1695
1699
  " ",
1696
- X.length,
1700
+ Y.length,
1697
1701
  " ",
1698
- C("nav.sessions", "sessions"),
1699
- gr && /* @__PURE__ */ _("span", {
1702
+ x("nav.sessions", "sessions"),
1703
+ q && /* @__PURE__ */ g("span", {
1700
1704
  className: "ml-2 text-text-muted",
1701
1705
  children: [
1702
1706
  "(",
1703
- C("sessions.refreshing", "refreshing..."),
1707
+ x("sessions.refreshing", "refreshing..."),
1704
1708
  ")"
1705
1709
  ]
1706
1710
  })
1707
1711
  ]
1708
1712
  }) : null,
1709
- /* @__PURE__ */ g(ft, {
1713
+ /* @__PURE__ */ h(mt, {
1710
1714
  mode: "wait",
1711
- children: Z.length > 0 ? A === "none" ? M === "grid" ? /* @__PURE__ */ g("div", { children: ki(Z) }, "grid-view") : /* @__PURE__ */ g(vt, { children: Ai(Z, !1) }, "list-view") : /* @__PURE__ */ g("div", {
1715
+ children: X.length > 0 ? O === "none" ? A === "grid" ? /* @__PURE__ */ h("div", { children: Ai(X) }, "grid-view") : /* @__PURE__ */ h(bt, { children: ji(X, !1) }, "list-view") : /* @__PURE__ */ h("div", {
1712
1716
  className: "space-y-3",
1713
1717
  "data-testid": "sessions-grouped",
1714
- children: Pr.map((e) => {
1715
- let t = e.sessions.map((e) => e.id), n = t.length > 0 && t.every((e) => R.has(e)), r = t.some((e) => R.has(e));
1716
- return /* @__PURE__ */ g(Re, {
1718
+ children: Ir.map((e) => {
1719
+ 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));
1720
+ return /* @__PURE__ */ h(Be, {
1717
1721
  label: e.label,
1718
1722
  count: e.sessions.length,
1719
- collapsed: Bt.has(e.key),
1720
- onToggleCollapse: () => zr(e.key),
1723
+ collapsed: Ut.has(e.key),
1724
+ onToggleCollapse: () => Vr(e.key),
1721
1725
  allSelected: n,
1722
1726
  someSelected: r,
1723
- onToggleSelectGroup: () => Rr(t),
1724
- children: M === "grid" ? ki(e.sessions) : Ai(e.sessions, !0)
1727
+ onToggleSelectGroup: () => Br(t),
1728
+ children: A === "grid" ? Ai(e.sessions) : ji(e.sessions, !0)
1725
1729
  }, e.key);
1726
1730
  })
1727
- }, "grouped-view") : /* @__PURE__ */ _("div", {
1731
+ }, "grouped-view") : /* @__PURE__ */ g("div", {
1728
1732
  className: "space-y-4",
1729
- children: [/* @__PURE__ */ g(Ee, {
1733
+ children: [/* @__PURE__ */ h(De, {
1730
1734
  variant: "compact",
1731
1735
  dismissKey: "vibecontrols-sessions-setup-banner"
1732
- }), /* @__PURE__ */ g(Ce, {
1733
- icon: /* @__PURE__ */ g(st, { className: "size-8 text-text-secondary" }),
1734
- title: w || T !== "all" || E !== "all" || D !== "all" || O !== "all" || k !== "all" ? C("sessions.emptyFound", "No sessions found") : C("sessions.emptyConfigured", "No sessions configured"),
1735
- description: w || T !== "all" || E !== "all" || D !== "all" || O !== "all" || k !== "all" ? C("sessions.emptyAdjustSearch", "Try adjusting your search or filters") : C("sessions.emptyDescription", "Sessions require an active agent. Install the CLI agent first, then start a session."),
1736
- action: !w && T === "all" && E === "all" && D === "all" && O === "all" && k === "all" ? /* @__PURE__ */ _("div", {
1736
+ }), /* @__PURE__ */ h(we, {
1737
+ icon: /* @__PURE__ */ h(lt, { className: "size-8 text-text-secondary" }),
1738
+ title: S || C !== "all" || w !== "all" || T !== "all" || E !== "all" || D !== "all" ? x("sessions.emptyFound", "No sessions found") : x("sessions.emptyConfigured", "No sessions configured"),
1739
+ 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."),
1740
+ action: !S && C === "all" && w === "all" && T === "all" && E === "all" && D === "all" ? /* @__PURE__ */ g("div", {
1737
1741
  className: "flex items-center gap-2",
1738
- children: [Mt && /* @__PURE__ */ _("button", {
1742
+ children: [Ft && /* @__PURE__ */ g("button", {
1739
1743
  type: "button",
1740
- onClick: qr,
1744
+ onClick: Yr,
1741
1745
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
1742
1746
  children: [
1743
- /* @__PURE__ */ g(tt, { className: "size-4" }),
1747
+ /* @__PURE__ */ h(rt, { className: "size-4" }),
1744
1748
  " ",
1745
- C("sessions.newSession", "New Session")
1749
+ x("sessions.newSession", "New Session")
1746
1750
  ]
1747
- }), /* @__PURE__ */ g(De, { prompt: "What is a Session in VibeControls and how do I start one?" })]
1751
+ }), /* @__PURE__ */ h(Oe, { prompt: "What is a Session in VibeControls and how do I start one?" })]
1748
1752
  }) : void 0
1749
1753
  })]
1750
1754
  })
1751
1755
  }),
1752
- qt && /* @__PURE__ */ g("div", {
1756
+ Xt && /* @__PURE__ */ h("div", {
1753
1757
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
1754
- children: qt
1758
+ children: Xt
1755
1759
  })
1756
1760
  ]
1757
1761
  }),
1758
- H.length > 0 && /* @__PURE__ */ g(Ie, {
1759
- tabs: H,
1760
- activeTabId: W,
1761
- onTabSelect: G,
1762
- onTabClose: ti,
1763
- onOpenExternal: ni,
1764
- onToggleCollapse: () => K((e) => !e),
1765
- collapsed: kn,
1766
- sessions: Z,
1767
- onOpenTerminal: Q,
1768
- onRetryTerminal: Q,
1769
- onRenameSession: ri,
1770
- onStopTerminal: ii,
1762
+ B.length > 0 && /* @__PURE__ */ h(Re, {
1763
+ tabs: B,
1764
+ activeTabId: H,
1765
+ onTabSelect: U,
1766
+ onTabClose: ri,
1767
+ onOpenExternal: ii,
1768
+ onToggleCollapse: () => W((e) => !e),
1769
+ collapsed: Mn,
1770
+ sessions: X,
1771
+ onOpenTerminal: Z,
1772
+ onRetryTerminal: Z,
1773
+ onRenameSession: ai,
1774
+ onStopTerminal: oi,
1771
1775
  onStopSession: (e) => {
1772
- let t = X.find((t) => t.id === e);
1773
- t && Xr(t);
1776
+ let t = Y.find((t) => t.id === e);
1777
+ t && Qr(t);
1774
1778
  },
1775
- onRestartTerminal: ai,
1776
- onReattachTerminal: oi,
1777
- onReorderTabs: si,
1778
- onTogglePin: ci,
1779
- onShowSessionInfo: li,
1780
- onViewAgent: ui,
1781
- onViewTarget: di,
1782
- onShareSession: Nt ? fi : void 0,
1779
+ onRestartTerminal: si,
1780
+ onReattachTerminal: ci,
1781
+ onReorderTabs: li,
1782
+ onTogglePin: ui,
1783
+ onShowSessionInfo: di,
1784
+ onViewAgent: fi,
1785
+ onViewTarget: pi,
1786
+ onShareSession: It ? mi : void 0,
1783
1787
  heightClass: "h-[280px] sm:h-[380px]",
1784
- isImmersiveFullscreen: Mn,
1785
- onToggleImmersiveFullscreen: pi,
1788
+ isImmersiveFullscreen: Fn,
1789
+ onToggleImmersiveFullscreen: hi,
1786
1790
  contextSwitcher: void 0
1787
1791
  }),
1788
- Oi
1792
+ ki
1789
1793
  ]
1790
1794
  });
1791
- function ji() {
1792
- if (!Hn) return null;
1793
- let e = Zn?.agentSessionOrphans ?? [];
1794
- return /* @__PURE__ */ g("div", {
1795
+ function Mi() {
1796
+ if (!Gn) return null;
1797
+ let e = er?.agentSessionOrphans ?? [];
1798
+ return /* @__PURE__ */ h("div", {
1795
1799
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
1796
1800
  "data-testid": "sessions-reconnect-modal",
1797
- children: /* @__PURE__ */ _("div", {
1801
+ children: /* @__PURE__ */ g("div", {
1798
1802
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto",
1799
1803
  children: [
1800
- /* @__PURE__ */ g("h2", {
1804
+ /* @__PURE__ */ h("h2", {
1801
1805
  className: "text-lg font-semibold text-text-primary mb-1",
1802
- children: C("sessions.reconnectTitle", "Reconnect orphan sessions")
1806
+ children: x("sessions.reconnectTitle", "Reconnect orphan sessions")
1803
1807
  }),
1804
- /* @__PURE__ */ g("p", {
1808
+ /* @__PURE__ */ h("p", {
1805
1809
  className: "text-sm text-text-secondary mb-4",
1806
- children: C("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.")
1810
+ 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.")
1807
1811
  }),
1808
- /* @__PURE__ */ _("div", {
1812
+ /* @__PURE__ */ g("div", {
1809
1813
  className: "space-y-4",
1810
1814
  children: [
1811
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1815
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1812
1816
  className: "block text-sm font-medium text-text-primary mb-1",
1813
- children: C("sessions.agent", "Agent")
1814
- }), /* @__PURE__ */ g(Oe, {
1815
- options: kr,
1816
- value: Wn,
1817
+ children: x("sessions.agent", "Agent")
1818
+ }), /* @__PURE__ */ h(ke, {
1819
+ options: jr,
1820
+ value: qn,
1817
1821
  onChange: (e) => {
1818
- Gn(e), qn(null), e && Xn({ variables: { agentId: e } });
1822
+ Jn(e), Xn(null), e && $n({ variables: { agentId: e } });
1819
1823
  },
1820
- placeholder: C("sessions.selectAgent", "Select an agent"),
1821
- searchPlaceholder: C("sessions.searchAgents", "Search agents..."),
1824
+ placeholder: x("sessions.selectAgent", "Select an agent"),
1825
+ searchPlaceholder: x("sessions.searchAgents", "Search agents..."),
1822
1826
  clearable: !0
1823
1827
  })] }),
1824
- Kn && /* @__PURE__ */ g("div", {
1828
+ Yn && /* @__PURE__ */ h("div", {
1825
1829
  className: "p-3 bg-status-error-bg text-status-error-text text-sm rounded-md",
1826
1830
  "data-testid": "sessions-reconnect-error",
1827
- children: Kn
1831
+ children: Yn
1828
1832
  }),
1829
- Wn && /* @__PURE__ */ g("div", {
1833
+ qn && /* @__PURE__ */ h("div", {
1830
1834
  "data-testid": "sessions-reconnect-list",
1831
1835
  className: "space-y-2",
1832
- children: Qn ? /* @__PURE__ */ g("div", {
1836
+ children: tr ? /* @__PURE__ */ h("div", {
1833
1837
  className: "text-sm text-text-secondary",
1834
- children: C("sessions.scanningHost", "Scanning host...")
1835
- }) : e.length === 0 ? /* @__PURE__ */ g("div", {
1838
+ children: x("sessions.scanningHost", "Scanning host...")
1839
+ }) : e.length === 0 ? /* @__PURE__ */ h("div", {
1836
1840
  className: "text-sm text-text-secondary",
1837
- children: C("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
1838
- }) : e.map((e) => /* @__PURE__ */ _("div", {
1841
+ children: x("sessions.noOrphans", "No orphan vibe-* sessions found on this agent.")
1842
+ }) : e.map((e) => /* @__PURE__ */ g("div", {
1839
1843
  className: "flex items-center justify-between gap-3 p-3 border border-border-default rounded-md bg-bg-sunken/40",
1840
1844
  "data-testid": "sessions-reconnect-row",
1841
- children: [/* @__PURE__ */ _("div", {
1845
+ children: [/* @__PURE__ */ g("div", {
1842
1846
  className: "min-w-0 flex-1",
1843
- children: [/* @__PURE__ */ g("div", {
1847
+ children: [/* @__PURE__ */ h("div", {
1844
1848
  className: "font-mono text-sm text-text-primary break-all",
1845
1849
  children: e.externalName
1846
- }), /* @__PURE__ */ _("div", {
1850
+ }), /* @__PURE__ */ g("div", {
1847
1851
  className: "text-xs text-text-tertiary mt-0.5",
1848
1852
  children: [
1849
1853
  e.provider,
@@ -1855,213 +1859,213 @@ function Ct() {
1855
1859
  e.createdAt ? ` · created ${e.createdAt}` : ""
1856
1860
  ]
1857
1861
  })]
1858
- }), /* @__PURE__ */ g("button", {
1862
+ }), /* @__PURE__ */ h("button", {
1859
1863
  type: "button",
1860
- disabled: Jn === e.externalName,
1864
+ disabled: Zn === e.externalName,
1861
1865
  onClick: async () => {
1862
- Yn(e.externalName), qn(null);
1866
+ Qn(e.externalName), Xn(null);
1863
1867
  try {
1864
- await $n({ variables: {
1865
- agentId: Wn,
1868
+ await nr({ variables: {
1869
+ agentId: qn,
1866
1870
  externalName: e.externalName,
1867
1871
  name: e.externalName
1868
- } }), await Xn({ variables: { agentId: Wn } });
1872
+ } }), await $n({ variables: { agentId: qn } });
1869
1873
  } catch (e) {
1870
- qn(e instanceof Error ? e.message : String(e));
1874
+ Xn(e instanceof Error ? e.message : String(e));
1871
1875
  } finally {
1872
- Yn(null);
1876
+ Qn(null);
1873
1877
  }
1874
1878
  },
1875
1879
  className: "shrink-0 px-3 py-1.5 text-xs bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
1876
1880
  "data-testid": `sessions-reconnect-adopt-${e.externalName}`,
1877
- children: Jn === e.externalName ? C("sessions.adopting", "Adopting…") : C("sessions.adopt", "Adopt")
1881
+ children: Zn === e.externalName ? x("sessions.adopting", "Adopting…") : x("sessions.adopt", "Adopt")
1878
1882
  })]
1879
1883
  }, e.externalName))
1880
1884
  })
1881
1885
  ]
1882
1886
  }),
1883
- /* @__PURE__ */ g("div", {
1887
+ /* @__PURE__ */ h("div", {
1884
1888
  className: "flex justify-end gap-3 mt-6",
1885
- children: /* @__PURE__ */ g("button", {
1889
+ children: /* @__PURE__ */ h("button", {
1886
1890
  type: "button",
1887
1891
  onClick: () => {
1888
- Un(!1), qn(null);
1892
+ Kn(!1), Xn(null);
1889
1893
  },
1890
1894
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
1891
- children: C("common.close", "Close")
1895
+ children: x("common.close", "Close")
1892
1896
  })
1893
1897
  })
1894
1898
  ]
1895
1899
  })
1896
1900
  });
1897
1901
  }
1898
- function Mi() {
1899
- return /* @__PURE__ */ g("div", {
1902
+ function Ni() {
1903
+ return /* @__PURE__ */ h("div", {
1900
1904
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
1901
- children: /* @__PURE__ */ _("div", {
1905
+ children: /* @__PURE__ */ g("div", {
1902
1906
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-lg",
1903
1907
  children: [
1904
- /* @__PURE__ */ g("h2", {
1908
+ /* @__PURE__ */ h("h2", {
1905
1909
  className: "text-lg font-semibold text-text-primary mb-4",
1906
- children: C("sessions.newSession", "New Session")
1910
+ children: x("sessions.newSession", "New Session")
1907
1911
  }),
1908
- /* @__PURE__ */ _("div", {
1912
+ /* @__PURE__ */ g("div", {
1909
1913
  className: "space-y-4",
1910
1914
  children: [
1911
- Wt && /* @__PURE__ */ g("div", {
1915
+ qt && /* @__PURE__ */ h("div", {
1912
1916
  className: "p-3 bg-status-error-bg text-status-error-text text-sm rounded-md",
1913
- children: Wt
1917
+ children: qt
1914
1918
  }),
1915
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1919
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1916
1920
  className: "block text-sm font-medium text-text-primary mb-1",
1917
- children: C("sessions.name", "Name")
1918
- }), /* @__PURE__ */ g("input", {
1921
+ children: x("sessions.name", "Name")
1922
+ }), /* @__PURE__ */ h("input", {
1919
1923
  "aria-label": "control",
1920
- ref: $t,
1924
+ ref: nn,
1921
1925
  type: "text",
1922
- placeholder: C("sessions.namePlaceholder", "dev-server"),
1926
+ placeholder: x("sessions.namePlaceholder", "dev-server"),
1923
1927
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
1924
1928
  })] }),
1925
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1929
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1926
1930
  className: "block text-sm font-medium text-text-primary mb-1",
1927
- children: C("sessions.filterVibe", "Vibe")
1928
- }), /* @__PURE__ */ g(Oe, {
1929
- options: Or,
1930
- value: rn,
1931
- onChange: an,
1932
- placeholder: C("sessions.noVibe", "No vibe"),
1933
- searchPlaceholder: C("sessions.searchVibes", "Search vibes..."),
1931
+ children: x("sessions.filterVibe", "Vibe")
1932
+ }), /* @__PURE__ */ h(ke, {
1933
+ options: Ar,
1934
+ value: sn,
1935
+ onChange: cn,
1936
+ placeholder: x("sessions.noVibe", "No vibe"),
1937
+ searchPlaceholder: x("sessions.searchVibes", "Search vibes..."),
1934
1938
  clearable: !0
1935
1939
  })] }),
1936
- /* @__PURE__ */ _("div", { children: [
1937
- /* @__PURE__ */ g("label", {
1940
+ /* @__PURE__ */ g("div", { children: [
1941
+ /* @__PURE__ */ h("label", {
1938
1942
  className: "block text-sm font-medium text-text-primary mb-1",
1939
- children: C("sessions.filterAgent", "Agent")
1943
+ children: x("sessions.filterAgent", "Agent")
1940
1944
  }),
1941
- /* @__PURE__ */ g(Oe, {
1942
- options: kr,
1943
- value: on,
1944
- onChange: sn,
1945
- placeholder: C("sessions.selectAgent", "Select an agent"),
1946
- searchPlaceholder: C("sessions.searchAgents", "Search agents..."),
1945
+ /* @__PURE__ */ h(ke, {
1946
+ options: jr,
1947
+ value: ln,
1948
+ onChange: un,
1949
+ placeholder: x("sessions.selectAgent", "Select an agent"),
1950
+ searchPlaceholder: x("sessions.searchAgents", "Search agents..."),
1947
1951
  clearable: !0
1948
1952
  }),
1949
- /* @__PURE__ */ g("p", {
1953
+ /* @__PURE__ */ h("p", {
1950
1954
  className: "text-xs text-text-muted mt-1",
1951
- children: C("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
1955
+ children: x("sessions.agentHint", "Required when no vibe is selected. Overridden by the vibe's agent if a vibe is chosen.")
1952
1956
  })
1953
1957
  ] }),
1954
- /* @__PURE__ */ _("div", { children: [
1955
- /* @__PURE__ */ g("label", {
1958
+ /* @__PURE__ */ g("div", { children: [
1959
+ /* @__PURE__ */ h("label", {
1956
1960
  className: "block text-sm font-medium text-text-primary mb-1",
1957
- children: C("sessions.profile", "Profile")
1961
+ children: x("sessions.profile", "Profile")
1958
1962
  }),
1959
- /* @__PURE__ */ g(Oe, {
1960
- options: jr,
1961
- value: cn,
1962
- onChange: ln,
1963
- placeholder: C("sessions.selectProfile", "default"),
1964
- searchPlaceholder: C("sessions.searchProfiles", "Search profiles...")
1963
+ /* @__PURE__ */ h(ke, {
1964
+ options: Nr,
1965
+ value: dn,
1966
+ onChange: fn,
1967
+ placeholder: x("sessions.selectProfile", "default"),
1968
+ searchPlaceholder: x("sessions.searchProfiles", "Search profiles...")
1965
1969
  }),
1966
- /* @__PURE__ */ g("p", {
1970
+ /* @__PURE__ */ h("p", {
1967
1971
  className: "text-xs text-text-muted mt-1",
1968
- children: C("sessions.profileHint", "Which agent profile this session targets. Defaults to \"default\" — change only if the agent runs multiple isolated profiles.")
1972
+ children: x("sessions.profileHint", "Which agent profile this session targets. Defaults to \"default\" — change only if the agent runs multiple isolated profiles.")
1969
1973
  })
1970
1974
  ] }),
1971
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1975
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1972
1976
  className: "block text-sm font-medium text-text-primary mb-1",
1973
- children: C("sessions.filterType", "Type")
1974
- }), /* @__PURE__ */ g(Oe, {
1975
- options: Mr,
1976
- value: B,
1977
- onChange: un,
1978
- placeholder: C("sessions.selectType", "Select type"),
1979
- searchPlaceholder: C("sessions.searchTypes", "Search types...")
1977
+ children: x("sessions.filterType", "Type")
1978
+ }), /* @__PURE__ */ h(ke, {
1979
+ options: Pr,
1980
+ value: R,
1981
+ onChange: pn,
1982
+ placeholder: x("sessions.selectType", "Select type"),
1983
+ searchPlaceholder: x("sessions.searchTypes", "Search types...")
1980
1984
  })] }),
1981
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
1985
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1982
1986
  className: "block text-sm font-medium text-text-primary mb-1",
1983
- children: C("sessions.command", "Command")
1984
- }), /* @__PURE__ */ g("input", {
1987
+ children: x("sessions.command", "Command")
1988
+ }), /* @__PURE__ */ h("input", {
1985
1989
  "aria-label": "control",
1986
- ref: en,
1990
+ ref: rn,
1987
1991
  type: "text",
1988
- placeholder: C("sessions.commandPlaceholder", "bun run dev"),
1992
+ placeholder: x("sessions.commandPlaceholder", "bun run dev"),
1989
1993
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
1990
1994
  })] }),
1991
- /* @__PURE__ */ _("div", {
1995
+ /* @__PURE__ */ g("div", {
1992
1996
  className: "flex items-center gap-2",
1993
- children: [/* @__PURE__ */ g("input", {
1997
+ children: [/* @__PURE__ */ h("input", {
1994
1998
  "aria-label": "autoStart",
1995
- ref: tn,
1999
+ ref: an,
1996
2000
  type: "checkbox",
1997
2001
  id: "autoStart",
1998
2002
  className: "size-4 rounded border-border-default"
1999
- }), /* @__PURE__ */ g("label", {
2003
+ }), /* @__PURE__ */ h("label", {
2000
2004
  htmlFor: "autoStart",
2001
2005
  className: "text-sm text-text-primary",
2002
- children: C("sessions.autoStartWithVibe", "Auto-start with vibe")
2006
+ children: x("sessions.autoStartWithVibe", "Auto-start with vibe")
2003
2007
  })]
2004
2008
  }),
2005
- (B === "TMUX" || B === "WEZTERM" || B === "ZELLIJ") && /* @__PURE__ */ _("div", {
2009
+ (R === "TMUX" || R === "WEZTERM" || R === "ZELLIJ") && /* @__PURE__ */ g("div", {
2006
2010
  className: "rounded-md border border-border-default bg-bg-sunken/40",
2007
2011
  "data-testid": "sessions-create-advanced",
2008
- children: [/* @__PURE__ */ _("button", {
2012
+ children: [/* @__PURE__ */ g("button", {
2009
2013
  type: "button",
2010
- onClick: () => fn((e) => !e),
2014
+ onClick: () => hn((e) => !e),
2011
2015
  className: "w-full flex items-center justify-between px-3 py-2 text-sm font-medium text-text-primary",
2012
- "aria-expanded": dn,
2013
- children: [/* @__PURE__ */ g("span", { children: C("sessions.advanced", "Advanced options") }), /* @__PURE__ */ g("span", {
2016
+ "aria-expanded": mn,
2017
+ children: [/* @__PURE__ */ h("span", { children: x("sessions.advanced", "Advanced options") }), /* @__PURE__ */ h("span", {
2014
2018
  className: "text-text-tertiary text-xs",
2015
- children: dn ? "▾" : "▸"
2019
+ children: mn ? "▾" : "▸"
2016
2020
  })]
2017
- }), dn && /* @__PURE__ */ _("div", {
2021
+ }), mn && /* @__PURE__ */ g("div", {
2018
2022
  className: "px-3 pb-3 space-y-2",
2019
2023
  children: [
2020
- /* @__PURE__ */ g("label", {
2024
+ /* @__PURE__ */ h("label", {
2021
2025
  className: "block text-xs font-medium text-text-secondary",
2022
- children: C("sessions.attachExistingLabel", "Attach to existing session (optional)")
2026
+ children: x("sessions.attachExistingLabel", "Attach to existing session (optional)")
2023
2027
  }),
2024
- /* @__PURE__ */ g("input", {
2028
+ /* @__PURE__ */ h("input", {
2025
2029
  "aria-label": "control",
2026
- ref: nn,
2030
+ ref: on,
2027
2031
  type: "text",
2028
2032
  "data-testid": "sessions-create-external-name",
2029
- placeholder: B === "WEZTERM" ? "e.g. vibe-051c9c62 (existing wezterm workspace)" : B === "ZELLIJ" ? "e.g. vibe-051c9c62 (existing zellij session)" : "e.g. vibe-051c9c62 (existing tmux session)",
2033
+ 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)",
2030
2034
  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"
2031
2035
  }),
2032
- /* @__PURE__ */ g("p", {
2036
+ /* @__PURE__ */ h("p", {
2033
2037
  className: "text-xs text-text-tertiary",
2034
- children: C("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
2038
+ children: x("sessions.attachExistingHint", "When set, the agent attaches to that existing session instead of creating a new one. Leave blank to spawn fresh.")
2035
2039
  })
2036
2040
  ]
2037
2041
  })]
2038
2042
  })
2039
2043
  ]
2040
2044
  }),
2041
- /* @__PURE__ */ _("div", {
2045
+ /* @__PURE__ */ g("div", {
2042
2046
  className: "border-t border-border-default pt-4",
2043
- children: [/* @__PURE__ */ g("h3", {
2047
+ children: [/* @__PURE__ */ h("h3", {
2044
2048
  className: "text-sm font-medium text-text-secondary mb-2",
2045
- children: C("sessions.tags", "Tags")
2046
- }), /* @__PURE__ */ g(xe, {
2049
+ children: x("sessions.tags", "Tags")
2050
+ }), /* @__PURE__ */ h(Se, {
2047
2051
  entityType: "VIBECONTROLS_SESSION",
2048
- onDraftChange: Bn
2052
+ onDraftChange: Un
2049
2053
  })]
2050
2054
  }),
2051
- /* @__PURE__ */ _("div", {
2055
+ /* @__PURE__ */ g("div", {
2052
2056
  className: "flex justify-end gap-3 mt-6",
2053
- children: [/* @__PURE__ */ g("button", {
2057
+ children: [/* @__PURE__ */ h("button", {
2054
2058
  type: "button",
2055
- onClick: () => P(!1),
2056
- disabled: Gt,
2059
+ onClick: () => M(!1),
2060
+ disabled: Jt,
2057
2061
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
2058
- children: C("common.cancel", "Cancel")
2059
- }), /* @__PURE__ */ g("button", {
2062
+ children: x("common.cancel", "Cancel")
2063
+ }), /* @__PURE__ */ h("button", {
2060
2064
  type: "button",
2061
- onClick: Jr,
2062
- disabled: Gt,
2065
+ onClick: Xr,
2066
+ disabled: Jt,
2063
2067
  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",
2064
- children: Gt ? C("sessions.creating", "Creating...") : C("sessions.createSession", "Create Session")
2068
+ children: Jt ? x("sessions.creating", "Creating...") : x("sessions.createSession", "Create Session")
2065
2069
  })]
2066
2070
  })
2067
2071
  ]
@@ -2070,6 +2074,6 @@ function Ct() {
2070
2074
  }
2071
2075
  }
2072
2076
  //#endregion
2073
- export { Ct as SessionsPage };
2077
+ export { Tt as SessionsPage };
2074
2078
 
2075
2079
  //# sourceMappingURL=SessionsPage.js.map