@burdenoff/microfe-vibecontrols 2026.526.6 → 2026.526.7

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