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