@burdenoff/microfe-vibecontrols 2026.1117.2 → 2026.1123.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/agents/OpenInBrowserEditorButton.js +94 -95
- package/dist/components/agents/PluginUIPanel.js +122 -116
- package/dist/components/gitops/VibeGitOpsTab.js +150 -147
- package/dist/components/scorecard/ScorecardPanel.js +79 -69
- package/dist/components/sessions/TerminalIframe.js +37 -17
- package/dist/components/sessions/TerminalPanel.js +2 -2
- package/dist/pages/SessionDetailsPage.js +495 -492
- package/dist/pages/SessionsPage.js +962 -961
- package/dist/pages/SharedSessionPage.js +27 -25
- package/dist/utils/iframeUrl.d.ts +26 -0
- package/dist/utils/iframeUrl.js +63 -0
- package/package.json +1 -1
|
@@ -6,27 +6,28 @@ import { PageSkeleton as i } from "../components/shared/PageSkeleton.js";
|
|
|
6
6
|
import { PageHeader as a } from "../components/shared/PageHeader.js";
|
|
7
7
|
import { ErrorState as ee } from "../components/shared/ErrorState.js";
|
|
8
8
|
import { useVibeControlsStore as te } from "../store/vibeControlsStore.js";
|
|
9
|
-
import "../
|
|
10
|
-
import { EmptyState as
|
|
11
|
-
import { StatusBadge as
|
|
9
|
+
import { getSafeTunnelIframeUrl as ne } from "../utils/iframeUrl.js";
|
|
10
|
+
import { EmptyState as re } from "../components/shared/EmptyState.js";
|
|
11
|
+
import { StatusBadge as ie } from "../components/shared/StatusBadge.js";
|
|
12
12
|
import { Card as o } from "../components/shared/Card.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
13
|
+
import "../components/shared/index.js";
|
|
14
|
+
import { BILLING_PLANS_ROUTE as ae, useVibeControls as oe, useVibeNavigate as se } from "../providers/VibeControlsProvider.js";
|
|
15
|
+
import { useCollaboratorJoinedSubscription as ce, useCollaboratorLeftSubscription as le, useGetSessionQuery as ue, useJoinSharedSessionMutation as de, useMintAgentCapabilityMutation as fe, useReleaseSessionControlMutation as pe, useRequestSessionControlMutation as me, useRestartSessionMutation as he, useRestartSessionTerminalMutation as ge, useSessionControlChangedSubscription as _e, useStartSessionMutation as ve, useStartSessionTerminalMutation as ye, useStopSessionMutation as be, useUpdateSessionMutation as xe } from "../generated/wspace-operations.js";
|
|
16
|
+
import { AgentCapabilityScope as Se, CollaboratorRole as Ce, SessionSharePermission as we } from "../generated/wspace-types.js";
|
|
17
|
+
import { SharedTerminalPanel as Te } from "../components/sessions/SharedTerminalPanel.js";
|
|
18
|
+
import { SessionPublicLinkPanel as Ee } from "../components/sessions/SessionPublicLinkPanel.js";
|
|
19
|
+
import { SessionWorkbenchDrawer as De } from "../components/sessions/SessionWorkbenchDrawer.js";
|
|
20
|
+
import { getQuotaDialogContent as Oe, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../utils/quotaUtils.js";
|
|
20
21
|
import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
|
|
21
|
-
import { useI18n as
|
|
22
|
-
import { AlertCircle as
|
|
23
|
-
import { useParams as
|
|
24
|
-
import { usePermissions as
|
|
25
|
-
import { Fragment as
|
|
26
|
-
import { PagePurpose as
|
|
27
|
-
import { MotionItem as
|
|
22
|
+
import { useI18n as ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { AlertCircle as Ae, ArrowLeft as p, Check as je, ChevronDown as Me, ChevronUp as Ne, Clock as Pe, Code as Fe, ExternalLink as Ie, Folder as Le, Hash as Re, Link2 as ze, Loader2 as m, Maximize2 as Be, Minimize2 as Ve, PanelRightOpen as He, Pencil as Ue, Play as We, RefreshCw as Ge, RotateCcw as Ke, Server as qe, Square as Je, Tag as Ye, Terminal as h, Variable as Xe, X as Ze, Zap as Qe } from "lucide-react";
|
|
24
|
+
import { useParams as $e } from "react-router";
|
|
25
|
+
import { usePermissions as et } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
26
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
27
|
+
import { PagePurpose as tt } from "@burdenoff/fe-libs/ui";
|
|
28
|
+
import { MotionItem as y, MotionList as nt, MotionPage as b } from "@burdenoff/fe-libs/shared/motion";
|
|
28
29
|
// src/pages/SessionDetailsPage.tsx
|
|
29
|
-
function
|
|
30
|
+
function rt(e) {
|
|
30
31
|
let t = e.ttydUrl;
|
|
31
32
|
if (!t) return null;
|
|
32
33
|
try {
|
|
@@ -36,121 +37,121 @@ function tt(e) {
|
|
|
36
37
|
return t;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
var
|
|
40
|
-
function
|
|
40
|
+
var it = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
41
|
+
function at(e) {
|
|
41
42
|
if (!e) return "Never";
|
|
42
43
|
let t = Date.now() - new Date(e).getTime();
|
|
43
44
|
return t < 6e4 ? "Just now" : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : new Date(e).toLocaleDateString();
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let { t:
|
|
47
|
-
let r =
|
|
48
|
-
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${
|
|
49
|
-
}, [
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
if (
|
|
53
|
-
|
|
46
|
+
function x() {
|
|
47
|
+
let { t: x } = ke(), S = l((e, t, n) => {
|
|
48
|
+
let r = x(e, n);
|
|
49
|
+
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${it(t)}\\}\\}`, "g"), () => String(n)), t) : t : r;
|
|
50
|
+
}, [x]), { id: C } = $e(), { basePath: ot, currentUser: st } = oe(), ct = ot || "", w = st?.id ?? "", T = se(), { hasPermission: lt, isLoading: ut, permissions: dt } = et(), [ft] = ve({ refetchQueries: ["GetSession"] }), [pt] = be({ refetchQueries: ["GetSession"] }), [mt] = he({ refetchQueries: ["GetSession"] }), [ht] = ye({ refetchQueries: ["GetSession"] }), [gt] = ge({ refetchQueries: ["GetSession"] }), [_t] = xe({ refetchQueries: ["GetSession"] }), [vt, yt] = f(!1), [bt, xt] = f(""), [St, Ct] = f(""), [wt, Tt] = f(!1), Et = () => {
|
|
51
|
+
xt(O?.command || ""), Ct(O?.workingDirectory || ""), yt(!0);
|
|
52
|
+
}, Dt = async () => {
|
|
53
|
+
if (O?.id) {
|
|
54
|
+
Tt(!0);
|
|
54
55
|
try {
|
|
55
|
-
await
|
|
56
|
-
id:
|
|
56
|
+
await _t({ variables: {
|
|
57
|
+
id: O.id,
|
|
57
58
|
input: {
|
|
58
|
-
command:
|
|
59
|
-
workingDirectory:
|
|
59
|
+
command: bt || null,
|
|
60
|
+
workingDirectory: St || null
|
|
60
61
|
}
|
|
61
|
-
} }),
|
|
62
|
+
} }), yt(!1);
|
|
62
63
|
} finally {
|
|
63
|
-
|
|
64
|
+
Tt(!1);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
}, { data:
|
|
67
|
-
variables: { id:
|
|
68
|
-
skip: !
|
|
67
|
+
}, { data: Ot, loading: E, error: kt, refetch: D } = ue({
|
|
68
|
+
variables: { id: C || "" },
|
|
69
|
+
skip: !C,
|
|
69
70
|
fetchPolicy: "cache-and-network"
|
|
70
|
-
}),
|
|
71
|
+
}), O = Ot?.session, k = O?.agent || null, A = O?.vibe || null;
|
|
71
72
|
u(() => {
|
|
72
|
-
|
|
73
|
-
activeAgentId:
|
|
74
|
-
selectedAgentId:
|
|
75
|
-
activeVibeId:
|
|
76
|
-
selectedVibeId:
|
|
77
|
-
activeSessionId:
|
|
78
|
-
selectedSessionId:
|
|
73
|
+
O && te.setState({
|
|
74
|
+
activeAgentId: k?.id ?? null,
|
|
75
|
+
selectedAgentId: k?.id ?? null,
|
|
76
|
+
activeVibeId: A?.id ?? null,
|
|
77
|
+
selectedVibeId: A?.id ?? null,
|
|
78
|
+
activeSessionId: O.id,
|
|
79
|
+
selectedSessionId: O.id
|
|
79
80
|
});
|
|
80
81
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
O?.id,
|
|
83
|
+
k?.id,
|
|
84
|
+
A?.id
|
|
84
85
|
]);
|
|
85
|
-
let
|
|
86
|
+
let j = O?.context?.userId ?? null, At = !!j && !!w && j === w, jt = O?.collaborators ?? [], M = jt.find((e) => e.userId === w) ?? null, N = !!O && !At && (!!j || !!O?.myGrantRole || !!M), [Mt] = de(), [Nt, { loading: Pt }] = me(), [Ft, { loading: It }] = pe(), Lt = d(null);
|
|
86
87
|
u(() => {
|
|
87
|
-
let e =
|
|
88
|
-
e &&
|
|
89
|
-
|
|
88
|
+
let e = O?.id;
|
|
89
|
+
e && N && !M && Lt.current !== e && (Lt.current = e, Mt({ variables: { input: { sessionId: e } } }).then(() => {
|
|
90
|
+
D();
|
|
90
91
|
}).catch((e) => {
|
|
91
|
-
|
|
92
|
+
Lt.current = null, console.warn("[sessionDetails] joinSharedSession(sessionId) failed", e);
|
|
92
93
|
}));
|
|
93
94
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
O?.id,
|
|
96
|
+
N,
|
|
97
|
+
M,
|
|
98
|
+
Mt,
|
|
99
|
+
D
|
|
99
100
|
]);
|
|
100
|
-
let { data:
|
|
101
|
-
variables: { sessionId:
|
|
102
|
-
skip: !
|
|
103
|
-
}), { data:
|
|
104
|
-
variables: { sessionId:
|
|
105
|
-
skip: !
|
|
106
|
-
}), { data:
|
|
107
|
-
variables: { sessionId:
|
|
108
|
-
skip: !
|
|
101
|
+
let { data: Rt } = ce({
|
|
102
|
+
variables: { sessionId: O?.id ?? "" },
|
|
103
|
+
skip: !O?.id || !N
|
|
104
|
+
}), { data: zt } = le({
|
|
105
|
+
variables: { sessionId: O?.id ?? "" },
|
|
106
|
+
skip: !O?.id || !N
|
|
107
|
+
}), { data: Bt } = _e({
|
|
108
|
+
variables: { sessionId: O?.id ?? "" },
|
|
109
|
+
skip: !O?.id || !N
|
|
109
110
|
});
|
|
110
111
|
u(() => {
|
|
111
|
-
(
|
|
112
|
+
(Rt || zt || Bt) && D();
|
|
112
113
|
}, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
Rt,
|
|
115
|
+
zt,
|
|
116
|
+
Bt,
|
|
117
|
+
D
|
|
117
118
|
]);
|
|
118
|
-
let
|
|
119
|
-
if (
|
|
120
|
-
await
|
|
119
|
+
let Vt = M?.role === Ce.Viewer ? we.View : we.Interact, Ht = l(async () => {
|
|
120
|
+
if (O?.id) try {
|
|
121
|
+
await Nt({ variables: { sessionId: O.id } }), await D();
|
|
121
122
|
} catch (e) {
|
|
122
123
|
console.error("Failed to request control:", e);
|
|
123
124
|
}
|
|
124
125
|
}, [
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
]),
|
|
129
|
-
if (
|
|
130
|
-
await
|
|
126
|
+
O?.id,
|
|
127
|
+
Nt,
|
|
128
|
+
D
|
|
129
|
+
]), Ut = l(async () => {
|
|
130
|
+
if (O?.id) try {
|
|
131
|
+
await Ft({ variables: { sessionId: O.id } }), await D();
|
|
131
132
|
} catch (e) {
|
|
132
133
|
console.error("Failed to release control:", e);
|
|
133
134
|
}
|
|
134
135
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
]), [
|
|
136
|
+
O?.id,
|
|
137
|
+
Ft,
|
|
138
|
+
D
|
|
139
|
+
]), [Wt, P] = f(!1);
|
|
139
140
|
u(() => {
|
|
140
141
|
let e = (e) => {
|
|
141
|
-
(e.metaKey || e.ctrlKey) && (e.key === "j" || e.key === "J") ? (e.preventDefault(),
|
|
142
|
+
(e.metaKey || e.ctrlKey) && (e.key === "j" || e.key === "J") ? (e.preventDefault(), P((e) => !e)) : e.key === "Escape" && P(!1);
|
|
142
143
|
};
|
|
143
144
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
144
145
|
}, []);
|
|
145
|
-
let [
|
|
146
|
+
let [F, I] = f(!0), [L, Gt] = f(!1), [R, Kt] = f(!1), [qt, z] = f(null), [Jt, B] = f(!1), [Yt, V] = f(!1), [Xt, Zt] = f(!1), [H, U] = f(null), W = d(null), Qt = d(null), $t = d(!1), G = d(!1), K = O ? rt(O) : null, [en] = fe(), [tn, q] = f(null), [nn, J] = f(null), [rn, an] = f(!1), [on, sn] = f(0), cn = l(() => sn((e) => e + 1), []), ln = k?.id ?? null, Y = O?.id ?? null;
|
|
146
147
|
u(() => {
|
|
147
148
|
let e = !1;
|
|
148
|
-
if (!K || !
|
|
149
|
-
else return
|
|
150
|
-
agentId:
|
|
149
|
+
if (!K || !ln || !Y) q(null), J(null);
|
|
150
|
+
else return an(!0), J(null), en({ variables: {
|
|
151
|
+
agentId: ln,
|
|
151
152
|
profile: "default",
|
|
152
|
-
scope:
|
|
153
|
-
resourceId:
|
|
153
|
+
scope: Se.TerminalSession,
|
|
154
|
+
resourceId: Y,
|
|
154
155
|
ttlSeconds: 60
|
|
155
156
|
} }).then((t) => {
|
|
156
157
|
if (e) return;
|
|
@@ -159,433 +160,433 @@ function S() {
|
|
|
159
160
|
}).catch((t) => {
|
|
160
161
|
e || (J(t instanceof Error ? t.message : "Failed to mint terminal capability"), q(null));
|
|
161
162
|
}).finally(() => {
|
|
162
|
-
e ||
|
|
163
|
+
e || an(!1);
|
|
163
164
|
}), () => {
|
|
164
165
|
e = !0;
|
|
165
166
|
};
|
|
166
167
|
}, [
|
|
167
168
|
K,
|
|
169
|
+
ln,
|
|
168
170
|
Y,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
$t
|
|
171
|
+
on,
|
|
172
|
+
en
|
|
172
173
|
]);
|
|
173
|
-
let X = K &&
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
if (
|
|
177
|
-
await
|
|
174
|
+
let X = K && tn ? ne(`${K}#vt=${encodeURIComponent(tn)}`) : null, Z = () => {
|
|
175
|
+
T("/sessions");
|
|
176
|
+
}, un = async () => {
|
|
177
|
+
if (O?.id) try {
|
|
178
|
+
await ft({ variables: { id: O.id } });
|
|
178
179
|
} catch (e) {
|
|
179
180
|
if (s(e)) {
|
|
180
|
-
c(),
|
|
181
|
+
c(), B(!0);
|
|
181
182
|
return;
|
|
182
183
|
}
|
|
183
184
|
console.error("Failed to start session:", e);
|
|
184
185
|
}
|
|
185
|
-
},
|
|
186
|
-
if (
|
|
187
|
-
await
|
|
186
|
+
}, dn = async () => {
|
|
187
|
+
if (O?.id) try {
|
|
188
|
+
await pt({ variables: { id: O.id } });
|
|
188
189
|
} catch (e) {
|
|
189
190
|
console.error("Failed to stop session:", e);
|
|
190
191
|
}
|
|
191
|
-
},
|
|
192
|
-
if (
|
|
193
|
-
await
|
|
192
|
+
}, fn = async () => {
|
|
193
|
+
if (O?.id) try {
|
|
194
|
+
await mt({ variables: { id: O.id } });
|
|
194
195
|
} catch (e) {
|
|
195
196
|
if (s(e)) {
|
|
196
|
-
c(),
|
|
197
|
+
c(), B(!0);
|
|
197
198
|
return;
|
|
198
199
|
}
|
|
199
200
|
console.error("Failed to restart session:", e);
|
|
200
201
|
}
|
|
201
202
|
}, Q = l(() => {
|
|
202
203
|
requestAnimationFrame(() => {
|
|
203
|
-
|
|
204
|
+
Qt.current?.scrollIntoView({
|
|
204
205
|
behavior: "smooth",
|
|
205
206
|
block: "end"
|
|
206
207
|
});
|
|
207
208
|
});
|
|
208
209
|
}, []), $ = l(async (e, t, n) => {
|
|
209
|
-
let r =
|
|
210
|
+
let r = O?.id;
|
|
210
211
|
if (!r) return;
|
|
211
|
-
|
|
212
|
+
Kt(!0), z(null);
|
|
212
213
|
let i = !1;
|
|
213
214
|
try {
|
|
214
215
|
let a = await e(r);
|
|
215
|
-
a.error && s(a.error) ? (c(),
|
|
216
|
+
a.error && s(a.error) ? (c(), B(!0)) : a.error ? z(a.error.message) : !a.data || !a.data[t] ? z(n) : (I(!0), i = !0);
|
|
216
217
|
} catch (e) {
|
|
217
218
|
if (s(e)) {
|
|
218
|
-
c(),
|
|
219
|
+
c(), B(!0);
|
|
219
220
|
return;
|
|
220
221
|
}
|
|
221
222
|
let t = e instanceof Error ? e.message : n;
|
|
222
|
-
|
|
223
|
+
z(t);
|
|
223
224
|
} finally {
|
|
224
|
-
|
|
225
|
+
Kt(!1), i && Q();
|
|
225
226
|
}
|
|
226
|
-
}, [
|
|
227
|
+
}, [O?.id, Q]), pn = l(() => $((e) => ht({ variables: { id: e } }), "startSessionTerminal", "Failed to start terminal"), [ht, $]), mn = l(() => $((e) => gt({ variables: { id: e } }), "restartSessionTerminal", "Failed to restart terminal"), [gt, $]);
|
|
227
228
|
u(() => {
|
|
228
|
-
if (
|
|
229
|
-
|
|
229
|
+
if (!$t.current) {
|
|
230
|
+
$t.current = !0, G.current = F;
|
|
230
231
|
return;
|
|
231
232
|
}
|
|
232
|
-
let e =
|
|
233
|
-
|
|
234
|
-
}, [
|
|
235
|
-
let
|
|
233
|
+
let e = F && !G.current;
|
|
234
|
+
G.current = F, e && Q();
|
|
235
|
+
}, [F, Q]);
|
|
236
|
+
let hn = O?.id ?? null, gn = d(null);
|
|
236
237
|
u(() => {
|
|
237
|
-
let e =
|
|
238
|
-
if (
|
|
239
|
-
|
|
238
|
+
let e = O?.status ?? null, t = O?.exitCode ?? null;
|
|
239
|
+
if (hn !== gn.current) {
|
|
240
|
+
gn.current = hn, W.current = e, U(null);
|
|
240
241
|
return;
|
|
241
242
|
}
|
|
242
243
|
if (e === "RUNNING" || e === "STARTING") {
|
|
243
|
-
|
|
244
|
+
U(null), W.current = e;
|
|
244
245
|
return;
|
|
245
246
|
}
|
|
246
|
-
let n =
|
|
247
|
-
e === "STOPPED" && (n === "RUNNING" || n === "STARTING") &&
|
|
247
|
+
let n = W.current;
|
|
248
|
+
e === "STOPPED" && (n === "RUNNING" || n === "STARTING") && F ? U({ exitCode: t }) : e === "STOPPED" && F && t !== null && U((e) => e && e.exitCode === null ? { exitCode: t } : e), W.current = e;
|
|
248
249
|
}, [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
hn,
|
|
251
|
+
O?.status,
|
|
252
|
+
O?.exitCode,
|
|
253
|
+
F
|
|
253
254
|
]);
|
|
254
|
-
let
|
|
255
|
-
X && window.open(X, "_blank");
|
|
255
|
+
let _n = l(() => {
|
|
256
|
+
X && window.open(X, "_blank", "noopener,noreferrer");
|
|
256
257
|
}, [X]);
|
|
257
|
-
if (
|
|
258
|
+
if (ut) return /* @__PURE__ */ _("div", {
|
|
258
259
|
className: "flex items-center justify-center min-h-[400px]",
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ _("p", {
|
|
260
261
|
className: "text-text-secondary",
|
|
261
|
-
children:
|
|
262
|
+
children: S("sessionDetails.loadingPermissions", "Loading permissions...")
|
|
262
263
|
})
|
|
263
264
|
});
|
|
264
|
-
if (
|
|
265
|
+
if (dt && (dt.permissionStrings?.length ?? 0) > 0 && !lt(e.SESSION_READ)) return /* @__PURE__ */ _("div", {
|
|
265
266
|
className: "flex items-center justify-center min-h-[400px] px-4",
|
|
266
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ v("div", {
|
|
267
268
|
className: "text-center space-y-2 max-w-sm",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
269
270
|
className: "text-lg font-semibold tracking-tight text-text-primary",
|
|
270
|
-
children:
|
|
271
|
-
}), /* @__PURE__ */
|
|
271
|
+
children: S("sessionDetails.accessDenied", "Access Denied")
|
|
272
|
+
}), /* @__PURE__ */ _("p", {
|
|
272
273
|
className: "text-sm text-text-secondary",
|
|
273
|
-
children:
|
|
274
|
+
children: S("sessionDetails.accessDeniedDesc", "You don't have permission to access this page.")
|
|
274
275
|
})]
|
|
275
276
|
})
|
|
276
277
|
});
|
|
277
|
-
let
|
|
278
|
-
|
|
279
|
-
},
|
|
280
|
-
|
|
278
|
+
let vn = () => {
|
|
279
|
+
k && T(`/agents/${k.id}`);
|
|
280
|
+
}, yn = () => {
|
|
281
|
+
A && T(`/vibes/${A.id}`);
|
|
281
282
|
};
|
|
282
|
-
if (
|
|
283
|
+
if (E && !O) return /* @__PURE__ */ v(b, {
|
|
283
284
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ v("button", {
|
|
285
286
|
type: "button",
|
|
286
287
|
onClick: Z,
|
|
287
288
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
289
|
-
}), /* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ _(p, { className: "size-4" }), S("sessionDetails.backToSessions", "Back to Sessions")]
|
|
290
|
+
}), /* @__PURE__ */ _(i, { variant: "detail" })]
|
|
290
291
|
});
|
|
291
|
-
if (
|
|
292
|
+
if (kt && !O) return /* @__PURE__ */ v(b, {
|
|
292
293
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ v("button", {
|
|
294
295
|
type: "button",
|
|
295
296
|
onClick: Z,
|
|
296
297
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
298
|
-
}), /* @__PURE__ */
|
|
299
|
-
title:
|
|
300
|
-
message:
|
|
301
|
-
onRetry: () =>
|
|
298
|
+
children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
|
|
299
|
+
}), /* @__PURE__ */ _(ee, {
|
|
300
|
+
title: S("sessionDetails.failedLoad", "Failed to load session"),
|
|
301
|
+
message: kt.message,
|
|
302
|
+
onRetry: () => D()
|
|
302
303
|
})]
|
|
303
304
|
});
|
|
304
|
-
if (!
|
|
305
|
+
if (!O) return /* @__PURE__ */ v(b, {
|
|
305
306
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ v("button", {
|
|
307
308
|
type: "button",
|
|
308
309
|
onClick: Z,
|
|
309
310
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
icon: /* @__PURE__ */
|
|
313
|
-
title:
|
|
314
|
-
description: `${
|
|
315
|
-
action: /* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
|
|
312
|
+
}), /* @__PURE__ */ _(re, {
|
|
313
|
+
icon: /* @__PURE__ */ _(h, { className: "size-8 text-text-secondary" }),
|
|
314
|
+
title: S("sessionDetails.notFound", "Session not found"),
|
|
315
|
+
description: `${S("sessionDetails.notFoundDescPrefix", "No session with ID")} "${C}" ${S("sessionDetails.notFoundDescSuffix", "exists")}`,
|
|
316
|
+
action: /* @__PURE__ */ _("button", {
|
|
316
317
|
type: "button",
|
|
317
318
|
onClick: Z,
|
|
318
319
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
319
|
-
children:
|
|
320
|
+
children: S("sessionDetails.backToSessions", "Back to Sessions")
|
|
320
321
|
})
|
|
321
322
|
})]
|
|
322
323
|
});
|
|
323
|
-
let
|
|
324
|
-
return /* @__PURE__ */
|
|
324
|
+
let bn = O.status === "RUNNING", xn = L ? "h-[calc(100vh-200px)]" : "h-[280px] sm:h-[420px]";
|
|
325
|
+
return /* @__PURE__ */ v(b, {
|
|
325
326
|
className: "flex flex-col bg-bg-surface min-h-screen",
|
|
326
327
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
className: `flex-1 overflow-y-auto space-y-6 p-4 sm:p-6 ${
|
|
328
|
+
/* @__PURE__ */ v("div", {
|
|
329
|
+
className: `flex-1 overflow-y-auto space-y-6 p-4 sm:p-6 ${F && X ? "pb-2" : ""}`,
|
|
329
330
|
children: [
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ v("button", {
|
|
331
332
|
type: "button",
|
|
332
333
|
onClick: Z,
|
|
333
334
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
|
|
335
336
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
title:
|
|
338
|
-
description:
|
|
337
|
+
/* @__PURE__ */ _(a, {
|
|
338
|
+
title: O.name,
|
|
339
|
+
description: O.command || "No command specified",
|
|
339
340
|
breadcrumb: [{
|
|
340
341
|
label: "Sessions",
|
|
341
|
-
path:
|
|
342
|
-
}, { label:
|
|
343
|
-
actions: /* @__PURE__ */
|
|
342
|
+
path: ct ? `${ct}/sessions` : "/sessions"
|
|
343
|
+
}, { label: O.name }],
|
|
344
|
+
actions: /* @__PURE__ */ v("div", {
|
|
344
345
|
className: "flex items-center gap-2 flex-wrap",
|
|
345
346
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ _("button", {
|
|
347
348
|
type: "button",
|
|
348
|
-
onClick: () =>
|
|
349
|
-
disabled:
|
|
349
|
+
onClick: () => D(),
|
|
350
|
+
disabled: E,
|
|
350
351
|
className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
|
|
351
352
|
title: "Refresh",
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ _(Ge, { className: `size-4 ${E ? "animate-spin" : ""}` })
|
|
353
354
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ v("button", {
|
|
355
356
|
type: "button",
|
|
356
|
-
onClick: () =>
|
|
357
|
+
onClick: () => Zt(!0),
|
|
357
358
|
className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
358
|
-
title:
|
|
359
|
-
children: [/* @__PURE__ */
|
|
359
|
+
title: S("sessionDetails.publicLinkTitle", "Create an expiring share link (viewer or interactive, optional password)"),
|
|
360
|
+
children: [/* @__PURE__ */ _(ze, { className: "size-4" }), /* @__PURE__ */ _("span", {
|
|
360
361
|
className: "hidden sm:inline",
|
|
361
|
-
children:
|
|
362
|
+
children: S("sessionDetails.publicLink", "Share link")
|
|
362
363
|
})]
|
|
363
364
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ v("button", {
|
|
365
366
|
type: "button",
|
|
366
|
-
onClick: () =>
|
|
367
|
-
className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${
|
|
368
|
-
title:
|
|
369
|
-
children: [/* @__PURE__ */
|
|
367
|
+
onClick: () => P((e) => !e),
|
|
368
|
+
className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${Wt ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
|
|
369
|
+
title: S("sessionDetails.workbenchTitle", "Notes, prompts & history for this session (Cmd/Ctrl+J)"),
|
|
370
|
+
children: [/* @__PURE__ */ _(He, { className: "size-4" }), S("sessionDetails.workbench", "Workbench")]
|
|
370
371
|
}),
|
|
371
|
-
|
|
372
|
+
bn ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
|
|
372
373
|
type: "button",
|
|
373
|
-
onClick:
|
|
374
|
+
onClick: dn,
|
|
374
375
|
className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
376
|
-
}), /* @__PURE__ */
|
|
376
|
+
children: [/* @__PURE__ */ _(Je, { className: "size-4" }), S("sessionDetails.stopCommand", "Stop Command")]
|
|
377
|
+
}), /* @__PURE__ */ v("button", {
|
|
377
378
|
type: "button",
|
|
378
|
-
onClick:
|
|
379
|
+
onClick: fn,
|
|
379
380
|
className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
381
|
-
})] }) : /* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ _(Ke, { className: "size-4" }), S("sessionDetails.restartCommand", "Restart Command")]
|
|
382
|
+
})] }) : /* @__PURE__ */ v("button", {
|
|
382
383
|
type: "button",
|
|
383
|
-
onClick:
|
|
384
|
+
onClick: un,
|
|
384
385
|
className: "flex items-center gap-2 px-3 py-2 bg-status-success-bg-subtle text-status-success-text border border-status-success-border rounded-button hover:bg-status-success-bg-subtle/80 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ _(We, { className: "size-4" }), S("sessionDetails.runCommand", "Run Command")]
|
|
386
387
|
}),
|
|
387
|
-
X ? /* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
X ? /* @__PURE__ */ v(g, { children: [
|
|
389
|
+
/* @__PURE__ */ v("button", {
|
|
389
390
|
type: "button",
|
|
390
|
-
onClick: () =>
|
|
391
|
-
className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${
|
|
392
|
-
title:
|
|
393
|
-
children: [/* @__PURE__ */
|
|
391
|
+
onClick: () => I((e) => !e),
|
|
392
|
+
className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${F ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
|
|
393
|
+
title: F ? S("sessionDetails.hideTerminal", "Hide terminal") : S("sessionDetails.showTerminal", "Show terminal"),
|
|
394
|
+
children: [/* @__PURE__ */ _(h, { className: "size-4" }), S("sessionDetails.terminal", "Terminal")]
|
|
394
395
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ v("button", {
|
|
396
397
|
type: "button",
|
|
397
|
-
onClick: () =>
|
|
398
|
-
disabled:
|
|
398
|
+
onClick: () => V(!0),
|
|
399
|
+
disabled: R,
|
|
399
400
|
className: "flex items-center gap-1.5 p-2 bg-bg-sunken text-text-secondary rounded-md hover:text-text-primary hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
|
|
400
|
-
title:
|
|
401
|
-
children: [
|
|
401
|
+
title: S("sessionDetails.restartTerminalTitle", "Restart terminal — kills the tmux session and re-runs the command"),
|
|
402
|
+
children: [R ? /* @__PURE__ */ _(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ _(Ke, { className: "size-3.5" }), /* @__PURE__ */ _("span", {
|
|
402
403
|
className: "text-xs",
|
|
403
|
-
children:
|
|
404
|
+
children: S("sessionDetails.restartTerminalShort", "Restart")
|
|
404
405
|
})]
|
|
405
406
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ _("button", {
|
|
407
408
|
type: "button",
|
|
408
|
-
onClick:
|
|
409
|
+
onClick: _n,
|
|
409
410
|
className: "flex items-center p-2 bg-bg-sunken text-text-secondary rounded-md hover:text-text-primary hover:bg-bg-sunken/80 transition-colors",
|
|
410
|
-
title:
|
|
411
|
-
children: /* @__PURE__ */
|
|
411
|
+
title: S("sessionDetails.openInNewTab", "Open terminal in new tab"),
|
|
412
|
+
children: /* @__PURE__ */ _(Ie, { className: "size-4" })
|
|
412
413
|
})
|
|
413
|
-
] }) : /* @__PURE__ */
|
|
414
|
+
] }) : /* @__PURE__ */ v("button", {
|
|
414
415
|
type: "button",
|
|
415
|
-
onClick:
|
|
416
|
-
disabled:
|
|
416
|
+
onClick: pn,
|
|
417
|
+
disabled: R || !k,
|
|
417
418
|
className: "flex items-center gap-2 px-3 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
418
|
-
title:
|
|
419
|
-
children: [
|
|
419
|
+
title: k ? k.tunnelUrl ? S("sessionDetails.openTerminal", "Open terminal") : S("sessionDetails.agentNoTunnelUrl", "Agent has no tunnel URL configured") : S("sessionDetails.noAgentAssigned", "No agent assigned"),
|
|
420
|
+
children: [R ? /* @__PURE__ */ _(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ _(h, { className: "size-4" }), S("sessionDetails.openTerminal", "Open Terminal")]
|
|
420
421
|
})
|
|
421
422
|
]
|
|
422
423
|
})
|
|
423
424
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
icon: /* @__PURE__ */
|
|
426
|
-
children:
|
|
425
|
+
/* @__PURE__ */ _(tt, {
|
|
426
|
+
icon: /* @__PURE__ */ _(h, { className: "size-4" }),
|
|
427
|
+
children: S("sessionDetails.purpose", "This is a single session — a live terminal or task running on an agent through a vibe. Open the terminal to interact with it, follow its output, share a read-only public link so others can watch, rename it, or stop it when the work is done. Everything you need to drive and review this one piece of running work is here.")
|
|
427
428
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ v(nt, {
|
|
429
430
|
stagger: .04,
|
|
430
431
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
|
|
431
432
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
|
|
433
434
|
className: "p-4",
|
|
434
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ v("div", {
|
|
435
436
|
className: "flex items-center gap-3",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ _("div", {
|
|
437
438
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
438
|
-
children: /* @__PURE__ */
|
|
439
|
-
}), /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ _(h, { className: "size-5 text-action-primary-bg" })
|
|
440
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
440
441
|
className: "text-sm text-text-secondary",
|
|
441
|
-
children:
|
|
442
|
-
}), /* @__PURE__ */
|
|
443
|
-
status:
|
|
442
|
+
children: S("sessionDetails.statusLabel", "Status")
|
|
443
|
+
}), /* @__PURE__ */ _(ie, {
|
|
444
|
+
status: O.status,
|
|
444
445
|
size: "md"
|
|
445
446
|
})] })]
|
|
446
447
|
})
|
|
447
448
|
}) }),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
|
|
449
450
|
className: "p-4",
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
+
children: /* @__PURE__ */ v("div", {
|
|
451
452
|
className: "flex items-center gap-3",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ _("div", {
|
|
453
454
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
-
}), /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ _(Fe, { className: "size-5 text-action-primary-bg" })
|
|
456
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
456
457
|
className: "text-sm text-text-secondary",
|
|
457
|
-
children:
|
|
458
|
-
}), /* @__PURE__ */
|
|
458
|
+
children: S("sessionDetails.typeLabel", "Type")
|
|
459
|
+
}), /* @__PURE__ */ _("p", {
|
|
459
460
|
className: "font-semibold text-text-primary",
|
|
460
|
-
children:
|
|
461
|
+
children: O.type
|
|
461
462
|
})] })]
|
|
462
463
|
})
|
|
463
464
|
}) }),
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
|
|
465
466
|
className: "p-4",
|
|
466
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ v("div", {
|
|
467
468
|
className: "flex items-center gap-3",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ _("div", {
|
|
469
470
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
470
|
-
children: /* @__PURE__ */
|
|
471
|
-
}), /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ _(Re, { className: "size-5 text-action-primary-bg" })
|
|
472
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
472
473
|
className: "text-sm text-text-secondary",
|
|
473
|
-
children:
|
|
474
|
-
}), /* @__PURE__ */
|
|
474
|
+
children: S("sessionDetails.pidLabel", "PID")
|
|
475
|
+
}), /* @__PURE__ */ _("p", {
|
|
475
476
|
className: "font-semibold text-text-primary",
|
|
476
|
-
children:
|
|
477
|
+
children: O.pid || "N/A"
|
|
477
478
|
})] })]
|
|
478
479
|
})
|
|
479
480
|
}) }),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
|
|
481
482
|
className: "p-4",
|
|
482
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ v("div", {
|
|
483
484
|
className: "flex items-center gap-3",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ _("div", {
|
|
485
486
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
486
|
-
children: /* @__PURE__ */
|
|
487
|
-
}), /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ _(qe, { className: "size-5 text-action-primary-bg" })
|
|
488
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
488
489
|
className: "text-sm text-text-secondary",
|
|
489
|
-
children:
|
|
490
|
-
}), /* @__PURE__ */
|
|
490
|
+
children: S("sessionDetails.agentLabel", "Agent")
|
|
491
|
+
}), /* @__PURE__ */ _("p", {
|
|
491
492
|
className: "font-semibold text-text-primary truncate",
|
|
492
|
-
children:
|
|
493
|
+
children: k?.name || "Unknown"
|
|
493
494
|
})] })]
|
|
494
495
|
})
|
|
495
496
|
}) })
|
|
496
497
|
]
|
|
497
498
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ v("div", {
|
|
499
500
|
className: "p-4 border-b border-border-default flex items-center justify-between",
|
|
500
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ v("h3", {
|
|
501
502
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
503
|
-
}), !
|
|
503
|
+
children: [/* @__PURE__ */ _(Fe, { className: "size-5" }), S("sessionDetails.commandTitle", "Command")]
|
|
504
|
+
}), !vt && /* @__PURE__ */ _("button", {
|
|
504
505
|
type: "button",
|
|
505
|
-
onClick:
|
|
506
|
+
onClick: Et,
|
|
506
507
|
className: "p-1.5 rounded text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
|
|
507
|
-
title:
|
|
508
|
-
children: /* @__PURE__ */
|
|
508
|
+
title: S("sessionDetails.editCommandTitle", "Edit command and working directory"),
|
|
509
|
+
children: /* @__PURE__ */ _(Ue, { className: "size-4" })
|
|
509
510
|
})]
|
|
510
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ _("div", {
|
|
511
512
|
className: "p-4",
|
|
512
|
-
children:
|
|
513
|
+
children: vt ? /* @__PURE__ */ v("div", {
|
|
513
514
|
className: "space-y-3",
|
|
514
515
|
children: [
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
516
517
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
517
|
-
children:
|
|
518
|
-
}), /* @__PURE__ */
|
|
518
|
+
children: S("sessionDetails.commandLabel", "Command")
|
|
519
|
+
}), /* @__PURE__ */ _("input", {
|
|
519
520
|
"aria-label": "control",
|
|
520
521
|
type: "text",
|
|
521
|
-
value:
|
|
522
|
-
onChange: (e) =>
|
|
523
|
-
placeholder:
|
|
522
|
+
value: bt,
|
|
523
|
+
onChange: (e) => xt(e.target.value),
|
|
524
|
+
placeholder: S("sessionDetails.commandPlaceholder", "bun run dev"),
|
|
524
525
|
className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-subtle rounded-input text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)] focus:border-border-strong font-mono transition-colors"
|
|
525
526
|
})] }),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
527
528
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
528
|
-
children:
|
|
529
|
-
}), /* @__PURE__ */
|
|
529
|
+
children: S("sessionDetails.workingDirLabel", "Working Directory")
|
|
530
|
+
}), /* @__PURE__ */ _("input", {
|
|
530
531
|
"aria-label": "control",
|
|
531
532
|
type: "text",
|
|
532
|
-
value:
|
|
533
|
-
onChange: (e) =>
|
|
534
|
-
placeholder:
|
|
533
|
+
value: St,
|
|
534
|
+
onChange: (e) => Ct(e.target.value),
|
|
535
|
+
placeholder: S("sessionDetails.workingDirPlaceholder", "/home/user/myproject"),
|
|
535
536
|
className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-subtle rounded-input text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)] focus:border-border-strong font-mono transition-colors"
|
|
536
537
|
})] }),
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ v("div", {
|
|
538
539
|
className: "flex items-center gap-2",
|
|
539
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: [/* @__PURE__ */ v("button", {
|
|
540
541
|
type: "button",
|
|
541
|
-
onClick:
|
|
542
|
-
disabled:
|
|
542
|
+
onClick: Dt,
|
|
543
|
+
disabled: wt,
|
|
543
544
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
544
|
-
children: [
|
|
545
|
-
}), /* @__PURE__ */
|
|
545
|
+
children: [wt ? /* @__PURE__ */ _(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ _(je, { className: "size-3.5" }), S("sessionDetails.save", "Save")]
|
|
546
|
+
}), /* @__PURE__ */ v("button", {
|
|
546
547
|
type: "button",
|
|
547
|
-
onClick: () =>
|
|
548
|
-
disabled:
|
|
548
|
+
onClick: () => yt(!1),
|
|
549
|
+
disabled: wt,
|
|
549
550
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bg-sunken text-text-primary rounded-md hover:bg-bg-elevated transition-colors disabled:opacity-50",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ _(Ze, { className: "size-3.5" }), S("sessionDetails.cancel", "Cancel")]
|
|
551
552
|
})]
|
|
552
553
|
})
|
|
553
554
|
]
|
|
554
|
-
}) : /* @__PURE__ */
|
|
555
|
+
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
555
556
|
className: "bg-bg-sunken rounded-md p-3 font-mono text-sm text-text-primary overflow-x-auto",
|
|
556
557
|
children: [
|
|
557
558
|
"$",
|
|
558
559
|
" ",
|
|
559
|
-
|
|
560
|
+
O.command || S("sessionDetails.noCommandSpecified", "No command specified")
|
|
560
561
|
]
|
|
561
|
-
}), /* @__PURE__ */
|
|
562
|
+
}), /* @__PURE__ */ v("div", {
|
|
562
563
|
className: "mt-3 flex items-center gap-2 text-sm text-text-secondary",
|
|
563
564
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
|
|
565
|
+
/* @__PURE__ */ _(Le, { className: "size-4" }),
|
|
566
|
+
S("sessionDetails.workingDirectory", "Working Directory"),
|
|
566
567
|
":",
|
|
567
568
|
" ",
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ _("span", {
|
|
569
570
|
className: "text-text-primary font-mono",
|
|
570
|
-
children:
|
|
571
|
+
children: O.workingDirectory || /* @__PURE__ */ _("em", {
|
|
571
572
|
className: "not-italic text-text-placeholder",
|
|
572
|
-
children:
|
|
573
|
+
children: S("sessionDetails.workingDirDefault", "not set — defaults to OS home")
|
|
573
574
|
})
|
|
574
575
|
})
|
|
575
576
|
]
|
|
576
577
|
})] })
|
|
577
578
|
})] }),
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
|
|
579
580
|
className: "p-4 border-b border-border-default",
|
|
580
|
-
children: /* @__PURE__ */
|
|
581
|
+
children: /* @__PURE__ */ v("h3", {
|
|
581
582
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
582
|
-
children: [/* @__PURE__ */
|
|
583
|
+
children: [/* @__PURE__ */ _(Xe, { className: "size-5" }), S("sessionDetails.envVars", "Environment Variables")]
|
|
583
584
|
})
|
|
584
|
-
}), /* @__PURE__ */
|
|
585
|
+
}), /* @__PURE__ */ _("div", {
|
|
585
586
|
className: "p-4",
|
|
586
|
-
children:
|
|
587
|
+
children: O.environmentVariables && Object.keys(O.environmentVariables).length > 0 ? /* @__PURE__ */ _("div", {
|
|
587
588
|
className: "flex flex-wrap gap-2",
|
|
588
|
-
children: Object.entries(
|
|
589
|
+
children: Object.entries(O.environmentVariables).map(([e, t]) => /* @__PURE__ */ v("span", {
|
|
589
590
|
className: "px-3 py-1 bg-bg-sunken text-text-primary text-sm rounded-full font-mono",
|
|
590
591
|
children: [
|
|
591
592
|
e,
|
|
@@ -593,313 +594,315 @@ function S() {
|
|
|
593
594
|
String(t)
|
|
594
595
|
]
|
|
595
596
|
}, e))
|
|
596
|
-
}) : /* @__PURE__ */
|
|
597
|
+
}) : /* @__PURE__ */ _("p", {
|
|
597
598
|
className: "text-text-secondary",
|
|
598
|
-
children:
|
|
599
|
+
children: S("sessionDetails.noEnvVars", "No environment variables configured")
|
|
599
600
|
})
|
|
600
601
|
})] }),
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
|
|
602
603
|
className: "p-4 border-b border-border-default",
|
|
603
|
-
children: /* @__PURE__ */
|
|
604
|
+
children: /* @__PURE__ */ v("h3", {
|
|
604
605
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ _(h, { className: "size-5" }), S("sessionDetails.lastOutput", "Last Output")]
|
|
606
607
|
})
|
|
607
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ _("div", {
|
|
608
609
|
className: "p-4",
|
|
609
|
-
children:
|
|
610
|
+
children: O.lastOutput ? /* @__PURE__ */ _("div", {
|
|
610
611
|
className: "bg-bg-sunken rounded-md p-3 font-mono text-sm text-text-primary overflow-x-auto whitespace-pre-wrap",
|
|
611
|
-
children:
|
|
612
|
-
}) : /* @__PURE__ */
|
|
612
|
+
children: O.lastOutput
|
|
613
|
+
}) : /* @__PURE__ */ _("p", {
|
|
613
614
|
className: "text-text-secondary",
|
|
614
|
-
children:
|
|
615
|
+
children: S("sessionDetails.noOutput", "No output captured")
|
|
615
616
|
})
|
|
616
617
|
})] }),
|
|
617
|
-
|
|
618
|
-
onClick:
|
|
618
|
+
A && /* @__PURE__ */ _(o, {
|
|
619
|
+
onClick: yn,
|
|
619
620
|
hoverable: !0,
|
|
620
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ v("div", {
|
|
621
622
|
className: "p-4 flex items-center justify-between",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ v("div", {
|
|
623
624
|
className: "flex items-center gap-3",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ _("div", {
|
|
625
626
|
className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
|
|
626
|
-
children: /* @__PURE__ */
|
|
627
|
-
}), /* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ _(Qe, { className: "size-5 text-text-secondary" })
|
|
628
|
+
}), /* @__PURE__ */ v("div", { children: [
|
|
629
|
+
/* @__PURE__ */ _("p", {
|
|
629
630
|
className: "text-sm text-text-secondary",
|
|
630
|
-
children:
|
|
631
|
+
children: S("sessionDetails.relatedVibe", "Related Vibe")
|
|
631
632
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ _("p", {
|
|
633
634
|
className: "font-medium text-text-primary",
|
|
634
|
-
children:
|
|
635
|
+
children: A.name
|
|
635
636
|
}),
|
|
636
|
-
|
|
637
|
+
A.path && /* @__PURE__ */ _("p", {
|
|
637
638
|
className: "text-sm text-text-secondary truncate max-w-md",
|
|
638
|
-
children:
|
|
639
|
+
children: A.path
|
|
639
640
|
})
|
|
640
641
|
] })]
|
|
641
|
-
}), /* @__PURE__ */
|
|
642
|
+
}), /* @__PURE__ */ _(ie, { status: A.status })]
|
|
642
643
|
})
|
|
643
644
|
}),
|
|
644
|
-
|
|
645
|
-
onClick:
|
|
645
|
+
k && /* @__PURE__ */ _(o, {
|
|
646
|
+
onClick: vn,
|
|
646
647
|
hoverable: !0,
|
|
647
|
-
children: /* @__PURE__ */
|
|
648
|
+
children: /* @__PURE__ */ v("div", {
|
|
648
649
|
className: "p-4 flex items-center justify-between",
|
|
649
|
-
children: [/* @__PURE__ */
|
|
650
|
+
children: [/* @__PURE__ */ v("div", {
|
|
650
651
|
className: "flex items-center gap-3",
|
|
651
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ _("div", {
|
|
652
653
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
653
|
-
children: /* @__PURE__ */
|
|
654
|
-
}), /* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
654
|
+
children: /* @__PURE__ */ _(qe, { className: "size-5 text-action-primary-bg" })
|
|
655
|
+
}), /* @__PURE__ */ v("div", { children: [
|
|
656
|
+
/* @__PURE__ */ _("p", {
|
|
656
657
|
className: "text-sm text-text-secondary",
|
|
657
|
-
children:
|
|
658
|
+
children: S("sessionDetails.runningOnAgent", "Running on Agent")
|
|
658
659
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ _("p", {
|
|
660
661
|
className: "font-medium text-text-primary",
|
|
661
|
-
children:
|
|
662
|
+
children: k.name
|
|
662
663
|
}),
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ _("p", {
|
|
664
665
|
className: "text-sm text-text-secondary",
|
|
665
|
-
children:
|
|
666
|
+
children: k.hostname
|
|
666
667
|
})
|
|
667
668
|
] })]
|
|
668
|
-
}), /* @__PURE__ */
|
|
669
|
+
}), /* @__PURE__ */ _(ie, { status: k.isActive ? "ACTIVE" : "OFFLINE" })]
|
|
669
670
|
})
|
|
670
671
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
|
|
672
673
|
className: "p-4 border-b border-border-default",
|
|
673
|
-
children: /* @__PURE__ */
|
|
674
|
+
children: /* @__PURE__ */ v("h3", {
|
|
674
675
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ _(Pe, { className: "size-5" }), S("sessionDetails.timeline", "Timeline")]
|
|
676
677
|
})
|
|
677
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ v("div", {
|
|
678
679
|
className: "p-4",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
680
|
+
children: [/* @__PURE__ */ v("div", {
|
|
680
681
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-4 text-sm",
|
|
681
682
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
683
684
|
className: "text-text-secondary",
|
|
684
|
-
children:
|
|
685
|
-
}), /* @__PURE__ */
|
|
685
|
+
children: S("sessionDetails.autoStart", "Auto Start")
|
|
686
|
+
}), /* @__PURE__ */ _("p", {
|
|
686
687
|
className: "font-medium text-text-primary",
|
|
687
|
-
children:
|
|
688
|
+
children: O.autoStart ? S("sessionDetails.yes", "Yes") : S("sessionDetails.no", "No")
|
|
688
689
|
})] }),
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
690
691
|
className: "text-text-secondary",
|
|
691
|
-
children:
|
|
692
|
-
}), /* @__PURE__ */
|
|
692
|
+
children: S("sessionDetails.created", "Created")
|
|
693
|
+
}), /* @__PURE__ */ _("p", {
|
|
693
694
|
className: "font-medium text-text-primary",
|
|
694
|
-
children:
|
|
695
|
+
children: at(O.createdAt)
|
|
695
696
|
})] }),
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
697
698
|
className: "text-text-secondary",
|
|
698
|
-
children:
|
|
699
|
-
}), /* @__PURE__ */
|
|
699
|
+
children: S("sessionDetails.updated", "Updated")
|
|
700
|
+
}), /* @__PURE__ */ _("p", {
|
|
700
701
|
className: "font-medium text-text-primary",
|
|
701
|
-
children:
|
|
702
|
+
children: at(O.updatedAt)
|
|
702
703
|
})] })
|
|
703
704
|
]
|
|
704
|
-
}),
|
|
705
|
+
}), O.exitCode !== null && O.exitCode !== void 0 && /* @__PURE__ */ v("div", {
|
|
705
706
|
className: "mt-4 pt-4 border-t border-border-default",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
707
|
+
children: [/* @__PURE__ */ _("p", {
|
|
707
708
|
className: "text-sm text-text-secondary",
|
|
708
|
-
children:
|
|
709
|
-
}), /* @__PURE__ */
|
|
710
|
-
className: `font-medium ${
|
|
711
|
-
children:
|
|
709
|
+
children: S("sessionDetails.exitCode", "Exit Code")
|
|
710
|
+
}), /* @__PURE__ */ _("p", {
|
|
711
|
+
className: `font-medium ${O.exitCode === 0 ? "text-status-success-text" : "text-status-error-text"}`,
|
|
712
|
+
children: O.exitCode
|
|
712
713
|
})]
|
|
713
714
|
})]
|
|
714
715
|
})] }),
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
|
|
716
717
|
className: "p-4 border-b border-border-default",
|
|
717
|
-
children: /* @__PURE__ */
|
|
718
|
+
children: /* @__PURE__ */ v("h3", {
|
|
718
719
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
719
|
-
children: [/* @__PURE__ */
|
|
720
|
+
children: [/* @__PURE__ */ _(Ye, { className: "size-5" }), S("sessionDetails.tags", "Tags")]
|
|
720
721
|
})
|
|
721
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ _("div", {
|
|
722
723
|
className: "p-4",
|
|
723
|
-
children: /* @__PURE__ */
|
|
724
|
+
children: /* @__PURE__ */ _(r, {
|
|
724
725
|
entityType: "VIBECONTROLS_SESSION",
|
|
725
|
-
entityId:
|
|
726
|
+
entityId: O.id
|
|
726
727
|
})
|
|
727
728
|
})] }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ _("div", {
|
|
729
730
|
id: "connection-log",
|
|
730
731
|
className: "scroll-mt-20",
|
|
731
|
-
children: /* @__PURE__ */
|
|
732
|
+
children: /* @__PURE__ */ _(o, {
|
|
732
733
|
className: "min-h-[40vh]",
|
|
733
|
-
children: /* @__PURE__ */
|
|
734
|
-
sessionId:
|
|
735
|
-
sessionName:
|
|
734
|
+
children: /* @__PURE__ */ _(n, {
|
|
735
|
+
sessionId: O.id,
|
|
736
|
+
sessionName: O.name
|
|
736
737
|
})
|
|
737
738
|
})
|
|
738
739
|
})
|
|
739
740
|
]
|
|
740
741
|
}),
|
|
741
|
-
|
|
742
|
-
ref:
|
|
742
|
+
F && /* @__PURE__ */ v("div", {
|
|
743
|
+
ref: Qt,
|
|
743
744
|
className: "border-t border-border-default bg-bg-surface shrink-0",
|
|
744
745
|
children: [
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ v("div", {
|
|
746
747
|
className: "flex items-center bg-bg-sunken border-b border-border-default",
|
|
747
748
|
children: [
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ v("button", {
|
|
749
750
|
type: "button",
|
|
750
|
-
onClick: () =>
|
|
751
|
+
onClick: () => I(!1),
|
|
751
752
|
className: "flex items-center gap-1.5 px-3 py-2 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide",
|
|
752
|
-
title:
|
|
753
|
+
title: S("sessionDetails.collapseTerminal", "Collapse terminal"),
|
|
753
754
|
children: [
|
|
754
|
-
/* @__PURE__ */
|
|
755
|
-
|
|
756
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ _(h, { className: "size-3.5" }),
|
|
756
|
+
S("sessionDetails.terminal", "Terminal"),
|
|
757
|
+
/* @__PURE__ */ _(Me, { className: "size-3" })
|
|
757
758
|
]
|
|
758
759
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ v("div", {
|
|
760
761
|
className: "flex items-center px-3 py-1.5 text-xs bg-bg-surface text-text-primary border-r border-border-subtle border-b-2 border-b-action-primary-bg",
|
|
761
|
-
children: [/* @__PURE__ */
|
|
762
|
+
children: [/* @__PURE__ */ _(h, { className: "size-3 mr-1.5" }), O.name]
|
|
762
763
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ _("div", { className: "flex-1" }),
|
|
765
|
+
/* @__PURE__ */ v("div", {
|
|
765
766
|
className: "flex items-center gap-1 px-2",
|
|
766
|
-
children: [X && /* @__PURE__ */
|
|
767
|
+
children: [X && /* @__PURE__ */ _("button", {
|
|
767
768
|
type: "button",
|
|
768
|
-
onClick:
|
|
769
|
+
onClick: _n,
|
|
769
770
|
className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
|
|
770
|
-
title:
|
|
771
|
-
children: /* @__PURE__ */
|
|
772
|
-
}), /* @__PURE__ */
|
|
771
|
+
title: S("sessionDetails.openInNewTabShort", "Open in new tab"),
|
|
772
|
+
children: /* @__PURE__ */ _(Ie, { className: "size-3.5" })
|
|
773
|
+
}), /* @__PURE__ */ _("button", {
|
|
773
774
|
type: "button",
|
|
774
|
-
onClick: () =>
|
|
775
|
+
onClick: () => Gt((e) => !e),
|
|
775
776
|
className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
|
|
776
|
-
title:
|
|
777
|
-
children:
|
|
777
|
+
title: L ? S("sessionDetails.restoreSize", "Restore size") : S("sessionDetails.maximize", "Maximize"),
|
|
778
|
+
children: _(L ? Ve : Be, { className: "size-3.5" })
|
|
778
779
|
})]
|
|
779
780
|
})
|
|
780
781
|
]
|
|
781
782
|
}),
|
|
782
|
-
|
|
783
|
+
H && /* @__PURE__ */ v("div", {
|
|
783
784
|
role: "status",
|
|
784
785
|
className: "flex items-start justify-between gap-3 px-3 py-2 bg-status-warning-bg/30 text-status-warning-text border-b border-status-warning-bg/50 text-xs",
|
|
785
|
-
children: [/* @__PURE__ */
|
|
786
|
+
children: [/* @__PURE__ */ v("div", {
|
|
786
787
|
className: "flex items-center gap-2 flex-1",
|
|
787
|
-
children: [/* @__PURE__ */
|
|
788
|
-
}), /* @__PURE__ */
|
|
788
|
+
children: [/* @__PURE__ */ _(Ae, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ _("span", { children: S("sessionDetails.commandExited", "Command exited{{code}} — click Run Command to run it again.", { code: H.exitCode === null ? "" : ` (exit ${H.exitCode})` }) })]
|
|
789
|
+
}), /* @__PURE__ */ _("button", {
|
|
789
790
|
type: "button",
|
|
790
|
-
onClick: () =>
|
|
791
|
+
onClick: () => U(null),
|
|
791
792
|
className: "text-text-secondary hover:text-text-primary",
|
|
792
|
-
title:
|
|
793
|
-
children: /* @__PURE__ */
|
|
793
|
+
title: S("common.dismiss", "Dismiss"),
|
|
794
|
+
children: /* @__PURE__ */ _(Ze, { className: "size-3.5" })
|
|
794
795
|
})]
|
|
795
796
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
className: `${
|
|
798
|
-
children:
|
|
797
|
+
/* @__PURE__ */ _("div", {
|
|
798
|
+
className: `${xn} bg-bg-inverse text-text-inverse`,
|
|
799
|
+
children: R ? /* @__PURE__ */ _("div", {
|
|
799
800
|
className: "flex items-center justify-center h-full",
|
|
800
|
-
children: /* @__PURE__ */
|
|
801
|
+
children: /* @__PURE__ */ v("div", {
|
|
801
802
|
className: "text-center",
|
|
802
803
|
children: [
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ _(m, { className: "size-8 text-text-secondary animate-spin mx-auto mb-3" }),
|
|
805
|
+
/* @__PURE__ */ v("p", {
|
|
805
806
|
className: "text-text-secondary text-sm",
|
|
806
807
|
children: [
|
|
807
|
-
|
|
808
|
+
S("sessionDetails.startingTerminal", "Starting terminal for"),
|
|
808
809
|
" ",
|
|
809
|
-
|
|
810
|
+
O.name,
|
|
810
811
|
"..."
|
|
811
812
|
]
|
|
812
813
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ _("p", {
|
|
814
815
|
className: "text-text-tertiary text-xs mt-1",
|
|
815
|
-
children:
|
|
816
|
+
children: S("sessionDetails.settingUpTunnel", "Setting up session + web terminal tunnel")
|
|
816
817
|
})
|
|
817
818
|
]
|
|
818
819
|
})
|
|
819
|
-
}) :
|
|
820
|
+
}) : qt ? /* @__PURE__ */ _("div", {
|
|
820
821
|
className: "flex items-center justify-center h-full",
|
|
821
|
-
children: /* @__PURE__ */
|
|
822
|
+
children: /* @__PURE__ */ v("div", {
|
|
822
823
|
className: "text-center max-w-md",
|
|
823
824
|
children: [
|
|
824
|
-
/* @__PURE__ */
|
|
825
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ _(Ae, { className: "size-8 text-status-error-text mx-auto mb-3" }),
|
|
826
|
+
/* @__PURE__ */ _("p", {
|
|
826
827
|
className: "text-status-error-text text-sm font-medium",
|
|
827
|
-
children:
|
|
828
|
+
children: S("sessionDetails.failedStartTerminal", "Failed to start terminal")
|
|
828
829
|
}),
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ _("p", {
|
|
830
831
|
className: "text-text-secondary text-xs mt-2",
|
|
831
|
-
children:
|
|
832
|
+
children: qt
|
|
832
833
|
}),
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ _("button", {
|
|
834
835
|
type: "button",
|
|
835
|
-
onClick:
|
|
836
|
+
onClick: pn,
|
|
836
837
|
className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-button hover:bg-bg-elevated transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
837
|
-
children:
|
|
838
|
+
children: S("sessionDetails.retry", "Retry")
|
|
838
839
|
})
|
|
839
840
|
]
|
|
840
841
|
})
|
|
841
|
-
}) : X ? /* @__PURE__ */
|
|
842
|
-
isShared:
|
|
843
|
-
collaborators:
|
|
844
|
-
currentUserId:
|
|
845
|
-
permission:
|
|
846
|
-
onRequestControl:
|
|
847
|
-
onReleaseControl:
|
|
848
|
-
isRequestingControl:
|
|
849
|
-
isReleasingControl:
|
|
842
|
+
}) : X ? /* @__PURE__ */ _(Te, {
|
|
843
|
+
isShared: N,
|
|
844
|
+
collaborators: jt,
|
|
845
|
+
currentUserId: w,
|
|
846
|
+
permission: Vt,
|
|
847
|
+
onRequestControl: Ht,
|
|
848
|
+
onReleaseControl: Ut,
|
|
849
|
+
isRequestingControl: Pt,
|
|
850
|
+
isReleasingControl: It,
|
|
850
851
|
className: "h-full",
|
|
851
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ _("iframe", {
|
|
852
853
|
src: X,
|
|
853
|
-
title: `Terminal - ${
|
|
854
|
+
title: `Terminal - ${O.name}`,
|
|
854
855
|
className: "w-full h-full border-0",
|
|
855
856
|
allow: "clipboard-read; clipboard-write",
|
|
856
|
-
|
|
857
|
+
sandbox: "allow-scripts allow-same-origin allow-forms",
|
|
858
|
+
referrerPolicy: "no-referrer",
|
|
859
|
+
onError: cn
|
|
857
860
|
})
|
|
858
|
-
}) : K && (
|
|
861
|
+
}) : K && (rn || nn) ? /* @__PURE__ */ _("div", {
|
|
859
862
|
className: "flex items-center justify-center h-full",
|
|
860
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ _("div", {
|
|
861
864
|
className: "text-center",
|
|
862
|
-
children:
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
+
children: nn ? /* @__PURE__ */ v(g, { children: [
|
|
866
|
+
/* @__PURE__ */ _(Ae, { className: "size-8 text-status-error mx-auto mb-3" }),
|
|
867
|
+
/* @__PURE__ */ _("p", {
|
|
865
868
|
className: "text-text-secondary text-sm",
|
|
866
|
-
children:
|
|
869
|
+
children: S("sessionDetails.terminalCapabilityFailed", "Could not prepare terminal access")
|
|
867
870
|
}),
|
|
868
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ _("p", {
|
|
869
872
|
className: "text-text-tertiary text-xs mt-1",
|
|
870
|
-
children:
|
|
873
|
+
children: nn
|
|
871
874
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ _("button", {
|
|
873
876
|
type: "button",
|
|
874
|
-
onClick:
|
|
877
|
+
onClick: cn,
|
|
875
878
|
className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-button hover:bg-bg-elevated transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
876
|
-
children:
|
|
879
|
+
children: S("sessionDetails.retry", "Retry")
|
|
877
880
|
})
|
|
878
|
-
] }) : /* @__PURE__ */
|
|
881
|
+
] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(m, { className: "size-6 text-text-tertiary mx-auto mb-3 animate-spin" }), /* @__PURE__ */ _("p", {
|
|
879
882
|
className: "text-text-secondary text-sm",
|
|
880
|
-
children:
|
|
883
|
+
children: S("sessionDetails.preparingTerminal", "Preparing terminal…")
|
|
881
884
|
})] })
|
|
882
885
|
})
|
|
883
|
-
}) : /* @__PURE__ */
|
|
886
|
+
}) : /* @__PURE__ */ _("div", {
|
|
884
887
|
className: "flex items-center justify-center h-full",
|
|
885
|
-
children: /* @__PURE__ */
|
|
888
|
+
children: /* @__PURE__ */ v("div", {
|
|
886
889
|
className: "text-center",
|
|
887
890
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ _(h, { className: "size-8 text-text-tertiary mx-auto mb-3" }),
|
|
892
|
+
/* @__PURE__ */ _("p", {
|
|
890
893
|
className: "text-text-secondary text-sm",
|
|
891
|
-
children:
|
|
894
|
+
children: S("sessionDetails.noTerminalRunning", "No terminal running")
|
|
892
895
|
}),
|
|
893
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ _("p", {
|
|
894
897
|
className: "text-text-tertiary text-xs mt-1",
|
|
895
|
-
children:
|
|
898
|
+
children: k ? S("sessionDetails.clickOpenTerminalHint", "Click \"Open Terminal\" to create a tmux session with a browser terminal.") : S("sessionDetails.noAgentForSession", "No agent is assigned to this session.")
|
|
896
899
|
}),
|
|
897
|
-
|
|
900
|
+
k && /* @__PURE__ */ _("button", {
|
|
898
901
|
type: "button",
|
|
899
|
-
onClick:
|
|
900
|
-
disabled:
|
|
902
|
+
onClick: pn,
|
|
903
|
+
disabled: R,
|
|
901
904
|
className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
902
|
-
children:
|
|
905
|
+
children: R ? S("sessionDetails.opening", "Opening...") : S("sessionDetails.openTerminal", "Open Terminal")
|
|
903
906
|
})
|
|
904
907
|
]
|
|
905
908
|
})
|
|
@@ -907,57 +910,57 @@ function S() {
|
|
|
907
910
|
})
|
|
908
911
|
]
|
|
909
912
|
}),
|
|
910
|
-
!
|
|
913
|
+
!F && (X || qt) && /* @__PURE__ */ _("div", {
|
|
911
914
|
className: "border-t border-border-default bg-bg-sunken shrink-0",
|
|
912
|
-
children: /* @__PURE__ */
|
|
915
|
+
children: /* @__PURE__ */ v("button", {
|
|
913
916
|
type: "button",
|
|
914
|
-
onClick: () =>
|
|
917
|
+
onClick: () => I(!0),
|
|
915
918
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide w-full",
|
|
916
|
-
title:
|
|
919
|
+
title: S("sessionDetails.expandTerminal", "Expand terminal"),
|
|
917
920
|
children: [
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
|
|
921
|
+
/* @__PURE__ */ _(h, { className: "size-3.5" }),
|
|
922
|
+
S("sessionDetails.terminal", "Terminal"),
|
|
920
923
|
" - ",
|
|
921
|
-
|
|
922
|
-
/* @__PURE__ */
|
|
924
|
+
O.name,
|
|
925
|
+
/* @__PURE__ */ _(Ne, { className: "size-3 ml-1" })
|
|
923
926
|
]
|
|
924
927
|
})
|
|
925
928
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
927
|
-
isOpen:
|
|
928
|
-
onClose: () =>
|
|
929
|
+
/* @__PURE__ */ _(t, {
|
|
930
|
+
isOpen: Jt,
|
|
931
|
+
onClose: () => B(!1),
|
|
929
932
|
onConfirm: () => {
|
|
930
|
-
|
|
933
|
+
B(!1), T(ae);
|
|
931
934
|
},
|
|
932
|
-
title:
|
|
933
|
-
message:
|
|
935
|
+
title: Oe("session").title,
|
|
936
|
+
message: Oe("session").message,
|
|
934
937
|
confirmLabel: "View Billing",
|
|
935
938
|
cancelLabel: "Dismiss",
|
|
936
939
|
variant: "warning"
|
|
937
940
|
}),
|
|
938
|
-
|
|
939
|
-
sessionId:
|
|
940
|
-
sessionName:
|
|
941
|
-
onClose: () =>
|
|
941
|
+
Xt && O && /* @__PURE__ */ _(Ee, {
|
|
942
|
+
sessionId: O.id,
|
|
943
|
+
sessionName: O.name,
|
|
944
|
+
onClose: () => Zt(!1)
|
|
942
945
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
isOpen:
|
|
945
|
-
onClose: () =>
|
|
946
|
+
/* @__PURE__ */ _(t, {
|
|
947
|
+
isOpen: Yt,
|
|
948
|
+
onClose: () => V(!1),
|
|
946
949
|
onConfirm: () => {
|
|
947
|
-
|
|
950
|
+
V(!1), mn();
|
|
948
951
|
},
|
|
949
|
-
title:
|
|
950
|
-
message:
|
|
951
|
-
confirmLabel:
|
|
952
|
-
cancelLabel:
|
|
952
|
+
title: S("sessionDetails.restartTerminalConfirmTitle", "Restart terminal?"),
|
|
953
|
+
message: S("sessionDetails.restartTerminalConfirmBody", "This kills the current tmux session and re-runs the command from scratch. Any in-progress output will be lost."),
|
|
954
|
+
confirmLabel: S("sessionDetails.restartTerminalConfirmLabel", "Restart terminal"),
|
|
955
|
+
cancelLabel: S("common.cancel", "Cancel"),
|
|
953
956
|
variant: "warning"
|
|
954
957
|
}),
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
sessionId:
|
|
957
|
-
open:
|
|
958
|
-
onClose: () =>
|
|
958
|
+
/* @__PURE__ */ _(De, {
|
|
959
|
+
sessionId: O.id,
|
|
960
|
+
open: Wt,
|
|
961
|
+
onClose: () => P(!1)
|
|
959
962
|
})
|
|
960
963
|
]
|
|
961
964
|
});
|
|
962
965
|
}
|
|
963
|
-
export {
|
|
966
|
+
export { x as SessionDetailsPage };
|