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