@burdenoff/microfe-vibecontrols 2026.602.6 → 2026.602.8

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