@burdenoff/microfe-vibecontrols 2026.601.6 → 2026.601.7

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