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