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