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