@burdenoff/microfe-vibecontrols 2026.608.2 → 2026.608.4

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