@burdenoff/microfe-vibecontrols 2026.601.5 → 2026.601.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.
- package/dist/components/sessions/EntityInfoPopover.js +183 -0
- package/dist/components/sessions/EntityInfoPopover.js.map +1 -0
- package/dist/components/sessions/SessionCard.js +80 -72
- package/dist/components/sessions/SessionCard.js.map +1 -1
- package/dist/components/sessions/SessionGroup.js +49 -0
- package/dist/components/sessions/SessionGroup.js.map +1 -0
- package/dist/components/sessions/SessionInfoPanel.js +128 -0
- package/dist/components/sessions/SessionInfoPanel.js.map +1 -0
- package/dist/components/sessions/SessionList.js +109 -96
- package/dist/components/sessions/SessionList.js.map +1 -1
- package/dist/components/sessions/SessionsCommandPalette.js +36 -0
- package/dist/components/sessions/SessionsCommandPalette.js.map +1 -0
- package/dist/components/sessions/ShortcutCheatsheet.js +73 -0
- package/dist/components/sessions/ShortcutCheatsheet.js.map +1 -0
- package/dist/components/sessions/TerminalPanel.js +640 -537
- package/dist/components/sessions/TerminalPanel.js.map +1 -1
- package/dist/components/sessions/groupSessions.js +46 -0
- package/dist/components/sessions/groupSessions.js.map +1 -0
- package/dist/components/sessions/index.js +7 -0
- package/dist/components/sessions/sessionShortcuts.js +149 -0
- package/dist/components/sessions/sessionShortcuts.js.map +1 -0
- package/dist/components/shared/FilterDropdown.js +14 -13
- package/dist/components/shared/FilterDropdown.js.map +1 -1
- package/dist/components/shared/LinkToVibePanel.js.map +1 -1
- package/dist/components/vibe/VibeLinkedEntitiesPanel.js.map +1 -1
- package/dist/generated/wspace-operations.js +21 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
- package/dist/pages/AgentGraphPage.js +65 -65
- package/dist/pages/AgentGraphPage.js.map +1 -1
- package/dist/pages/SessionsPage.js +1189 -920
- package/dist/pages/SessionsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +105 -92
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeCalendarPage.js +2 -1
- package/dist/pages/VibeCalendarPage.js.map +1 -1
- package/dist/pages/ai/AgentManagerPage.js.map +1 -1
- package/dist/providers/VibeControlsProvider.js +147 -113
- package/dist/providers/VibeControlsProvider.js.map +1 -1
- package/dist/store/vibeControlsStore.js +16 -1
- package/dist/store/vibeControlsStore.js.map +1 -1
- package/dist/translations/en.js +97 -2
- package/dist/translations/en.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,168 +2,272 @@ import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
|
2
2
|
import { ConnectionLogPanel as t } from "../agents/ConnectionLogPanel.js";
|
|
3
3
|
import { TerminalIframe as n } from "./TerminalIframe.js";
|
|
4
4
|
import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
5
|
-
import { AlertCircle as ee, ChevronDown as te, ChevronUp as ne, Edit3 as re, Expand as ie, ExternalLink as s, GripVertical as ae, Loader2 as c, Maximize2 as oe, Minimize2 as se,
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { createPortal as
|
|
5
|
+
import { AlertCircle as ee, ChevronDown as te, ChevronUp as ne, Edit3 as re, Expand as ie, ExternalLink as s, GripVertical as ae, Loader2 as c, Maximize2 as oe, Minimize2 as se, MonitorSmartphone as l, Pin as ce, PinOff as le, Plus as u, RotateCcw as d, ScrollText as f, Search as ue, Shrink as de, Square as p, Terminal as m, Wifi as fe, WifiOff as pe, X as h } from "lucide-react";
|
|
6
|
+
import { Fragment as me, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as he } from "react-dom";
|
|
8
8
|
//#region src/components/sessions/TerminalPanel.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
9
|
+
function ge({ tab: e, index: t, isActive: n, isDragging: r, statusIndicator: i, isRenaming: a, renameValue: o, renameInputRef: ee, onRenameChange: te, onRenameBlur: ne, onRenameKeyDown: re, onSelect: ie, onClose: s, onContextMenu: ae, onDoubleClick: c, onDragStart: oe, onDragOver: se, onDrop: le, onDragEnd: u, closeLabel: d }) {
|
|
10
|
+
let f = [
|
|
11
|
+
e.name,
|
|
12
|
+
e.agentName ? `agent: ${e.agentName}` : null,
|
|
13
|
+
e.targetName ? `target: ${e.targetName}${e.targetType ? ` (${e.targetType})` : ""}` : null
|
|
14
|
+
].filter(Boolean).join("\n");
|
|
15
|
+
return /* @__PURE__ */ _("div", {
|
|
16
|
+
role: "button",
|
|
17
|
+
tabIndex: 0,
|
|
18
|
+
draggable: !a,
|
|
19
|
+
title: f,
|
|
20
|
+
onKeyDown: (e) => {
|
|
21
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), ie());
|
|
22
|
+
},
|
|
23
|
+
onDragStart: oe,
|
|
24
|
+
onDragOver: se,
|
|
25
|
+
onDrop: le,
|
|
26
|
+
onDragEnd: u,
|
|
27
|
+
"data-testid": "terminal-tab",
|
|
28
|
+
"data-session-id": e.sessionId,
|
|
29
|
+
"data-tab-index": t,
|
|
30
|
+
className: `flex items-center gap-1.5 px-3 py-1.5 text-xs border-r border-border-subtle cursor-pointer transition-colors min-w-0 max-w-[200px] group ${n ? "bg-bg-surface text-text-primary border-b-2 border-b-action-primary-bg" : "text-text-secondary hover:text-text-primary hover:bg-bg-surface/50"} ${r ? "opacity-50" : ""}`,
|
|
31
|
+
onClick: ie,
|
|
32
|
+
onAuxClick: (e) => {
|
|
33
|
+
e.button === 1 && (e.preventDefault(), s());
|
|
34
|
+
},
|
|
35
|
+
onContextMenu: ae,
|
|
36
|
+
onDoubleClick: c,
|
|
37
|
+
children: [
|
|
38
|
+
e.pinned && /* @__PURE__ */ g(ce, {
|
|
39
|
+
className: "size-2.5 text-action-primary-text shrink-0",
|
|
40
|
+
"aria-hidden": !0
|
|
41
|
+
}),
|
|
42
|
+
i,
|
|
43
|
+
a ? /* @__PURE__ */ g("input", {
|
|
44
|
+
"aria-label": "control",
|
|
45
|
+
ref: ee,
|
|
46
|
+
value: o,
|
|
47
|
+
onChange: (e) => te(e.target.value),
|
|
48
|
+
onBlur: ne,
|
|
49
|
+
onKeyDown: re,
|
|
50
|
+
onClick: (e) => e.stopPropagation(),
|
|
51
|
+
className: "bg-bg-sunken border border-border-strong rounded px-1 py-0 text-xs text-text-primary w-[100px] outline-none"
|
|
52
|
+
}) : /* @__PURE__ */ g("span", {
|
|
53
|
+
className: "truncate",
|
|
54
|
+
children: e.name
|
|
55
|
+
}),
|
|
56
|
+
e.targetName && /* @__PURE__ */ g(l, {
|
|
57
|
+
className: "size-2.5 text-text-muted shrink-0 hidden sm:inline",
|
|
58
|
+
"aria-hidden": !0
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ g("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: (e) => {
|
|
63
|
+
e.stopPropagation(), s();
|
|
64
|
+
},
|
|
65
|
+
className: `ml-auto hover:text-status-error-text transition-opacity shrink-0 ${e.pinned, "opacity-0 group-hover:opacity-100"}`,
|
|
66
|
+
title: d,
|
|
67
|
+
"aria-label": d,
|
|
68
|
+
children: /* @__PURE__ */ g(h, { className: "size-3" })
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function _e({ tabs: l, activeTabId: _e, onTabSelect: ve, onTabClose: ye, onOpenExternal: be, onToggleCollapse: xe, collapsed: v = !1, heightClass: Se = "h-[420px]", sessions: y, onOpenTerminal: Ce, onRetryTerminal: b, onRenameSession: x, onStopTerminal: we, onRestartTerminal: Te, onReattachTerminal: Ee, onReorderTabs: De, onTogglePin: S, onStopSession: C, onCreateSession: w, fullScreen: T = !1, isImmersiveFullscreen: E = !1, onToggleImmersiveFullscreen: D, contextSwitcher: Oe }) {
|
|
74
|
+
let O = e(), [k, ke] = o(!1), [Ae, je] = o(!1), [A, j] = o(!1), [M, N] = o(""), [P, F] = o({
|
|
11
75
|
visible: !1,
|
|
12
76
|
x: 0,
|
|
13
77
|
y: 0,
|
|
14
78
|
sessionId: null
|
|
15
|
-
}), [
|
|
16
|
-
|
|
17
|
-
|
|
79
|
+
}), [I, Me] = o(null), [L, R] = o(""), [z, Ne] = o(() => /* @__PURE__ */ new Set()), [B, Pe] = o({}), [Fe, Ie] = o({}), [Le, Re] = o(null), ze = a(!1), Be = a(0), Ve = a(0), He = a(null), V = a(null), Ue = a(null), H = a(null), U = a(null), We = a(null), Ge = a({}), W = a({}), G = a({}), K = a({}), [Ke, qe] = o({}), Je = a({}), [q, Ye] = o(null), Xe = r((e) => {
|
|
80
|
+
qe((t) => ({
|
|
81
|
+
...t,
|
|
82
|
+
[e]: (t[e] ?? 0) + 1
|
|
83
|
+
}));
|
|
84
|
+
}, []), Ze = [...l].sort((e, t) => !!t.pinned - +!!e.pinned).map((e) => {
|
|
85
|
+
let t = y?.find((t) => t.id === e.sessionId);
|
|
86
|
+
return {
|
|
87
|
+
...e,
|
|
88
|
+
agentName: e.agentName ?? t?.agent?.name ?? null,
|
|
89
|
+
targetName: e.targetName ?? t?.agent?.target?.name ?? null,
|
|
90
|
+
targetType: e.targetType ?? t?.agent?.target?.type ?? null
|
|
91
|
+
};
|
|
92
|
+
}), J = l.find((e) => e.sessionId === _e) || l[0] || null, Qe = r((e) => {
|
|
93
|
+
if (C) {
|
|
94
|
+
Ne((t) => {
|
|
18
95
|
if (t.has(e)) return t;
|
|
19
96
|
let n = new Set(t);
|
|
20
97
|
return n.add(e), n;
|
|
21
98
|
});
|
|
22
99
|
try {
|
|
23
|
-
|
|
100
|
+
C(e);
|
|
24
101
|
} catch {
|
|
25
|
-
|
|
102
|
+
Ne((t) => {
|
|
26
103
|
if (!t.has(e)) return t;
|
|
27
104
|
let n = new Set(t);
|
|
28
105
|
return n.delete(e), n;
|
|
29
106
|
});
|
|
30
107
|
}
|
|
31
108
|
window.setTimeout(() => {
|
|
32
|
-
|
|
109
|
+
Ne((t) => {
|
|
33
110
|
if (!t.has(e)) return t;
|
|
34
111
|
let n = new Set(t);
|
|
35
112
|
return n.delete(e), n;
|
|
36
113
|
});
|
|
37
114
|
}, 8e3);
|
|
38
115
|
}
|
|
39
|
-
}, [
|
|
116
|
+
}, [C]);
|
|
40
117
|
i(() => {
|
|
41
|
-
if (!y ||
|
|
42
|
-
let e = new Set(y.filter((e) => e.status === "STOPPED" || e.status === "TERMINATED" || e.status === "ERROR").map((e) => e.id)), t = !1, n = new Set(
|
|
43
|
-
|
|
118
|
+
if (!y || z.size === 0) return;
|
|
119
|
+
let e = new Set(y.filter((e) => e.status === "STOPPED" || e.status === "TERMINATED" || e.status === "ERROR").map((e) => e.id)), t = !1, n = new Set(z);
|
|
120
|
+
z.forEach((r) => {
|
|
44
121
|
e.has(r) && (n.delete(r), t = !0);
|
|
45
|
-
}), t &&
|
|
46
|
-
}, [y,
|
|
122
|
+
}), t && Ne(n);
|
|
123
|
+
}, [y, z]);
|
|
47
124
|
let Y = r((e, t) => {
|
|
48
|
-
|
|
125
|
+
Pe((n) => n[e] === t ? n : {
|
|
49
126
|
...n,
|
|
50
127
|
[e]: t
|
|
51
128
|
});
|
|
52
129
|
}, []), X = r((e, t) => {
|
|
53
|
-
|
|
130
|
+
Ie((n) => n[e] === t ? n : {
|
|
54
131
|
...n,
|
|
55
132
|
[e]: t
|
|
56
133
|
});
|
|
57
|
-
}, []),
|
|
134
|
+
}, []), $e = r((e) => {
|
|
58
135
|
if (!e) return null;
|
|
59
136
|
try {
|
|
60
137
|
let t = typeof window < "u" ? window.location.protocol : "https:", n = new URL(e).protocol;
|
|
61
|
-
return t === "https:" && n !== "https:" ?
|
|
138
|
+
return t === "https:" && n !== "https:" ? O("vibecontrols.sessions.terminal.mixedContentBlocked", "This terminal URL is not HTTPS, so the browser blocked it on this secure page.") : null;
|
|
62
139
|
} catch {
|
|
63
|
-
return
|
|
140
|
+
return O("vibecontrols.sessions.terminal.invalidUrl", "The terminal URL is invalid. Restart the terminal to generate a new URL.");
|
|
64
141
|
}
|
|
65
|
-
}, [
|
|
66
|
-
|
|
67
|
-
}, []), Z = (y ?? []).filter((e) => !
|
|
68
|
-
|
|
69
|
-
}, [X, Y]),
|
|
70
|
-
|
|
142
|
+
}, [O]), et = r(() => {
|
|
143
|
+
ke((e) => !e), Re(null);
|
|
144
|
+
}, []), Z = (y ?? []).filter((e) => !l.some((t) => t.sessionId === e.id)), tt = M.trim() ? Z.filter((e) => e.name.toLowerCase().includes(M.trim().toLowerCase())) : Z, nt = r((e) => {
|
|
145
|
+
K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), Y(e, "connected"), X(e, void 0);
|
|
146
|
+
}, [X, Y]), rt = r((e) => {
|
|
147
|
+
K.current[e] && (clearTimeout(K.current[e]), delete K.current[e]), Y(e, "error");
|
|
71
148
|
}, [Y]);
|
|
72
|
-
i(() => (
|
|
149
|
+
i(() => (l.forEach((e) => {
|
|
73
150
|
if (!e.terminalUrl || e.loading || e.error) return;
|
|
74
|
-
let t =
|
|
151
|
+
let t = $e(e.terminalUrl);
|
|
75
152
|
if (t) {
|
|
76
153
|
Y(e.sessionId, "error"), X(e.sessionId, t);
|
|
77
154
|
return;
|
|
78
155
|
}
|
|
79
|
-
|
|
80
|
-
delete
|
|
156
|
+
B[e.sessionId] || Y(e.sessionId, "connecting"), B[e.sessionId] === "connecting" && !K.current[e.sessionId] && (K.current[e.sessionId] = setTimeout(() => {
|
|
157
|
+
delete K.current[e.sessionId], Y(e.sessionId, "error"), X(e.sessionId, O("vibecontrols.sessions.terminal.connectionTimedOut", "Timed out waiting for the terminal to connect. Check the agent tunnel and retry."));
|
|
81
158
|
}, 12e3));
|
|
82
159
|
}), () => {
|
|
83
|
-
for (let e of Object.values(
|
|
84
|
-
|
|
160
|
+
for (let e of Object.values(K.current)) clearTimeout(e);
|
|
161
|
+
K.current = {};
|
|
85
162
|
}), [
|
|
86
|
-
|
|
87
|
-
|
|
163
|
+
B,
|
|
164
|
+
$e,
|
|
88
165
|
X,
|
|
89
166
|
Y,
|
|
90
|
-
|
|
91
|
-
|
|
167
|
+
l,
|
|
168
|
+
O
|
|
92
169
|
]);
|
|
93
|
-
let
|
|
94
|
-
|
|
170
|
+
let it = r((e) => {
|
|
171
|
+
W.current[e] && (clearTimeout(W.current[e]), delete W.current[e]), delete G.current[e];
|
|
95
172
|
}, []), Q = r((e) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
173
|
+
it(e), Je.current[e] = 0, Ie((t) => ({
|
|
174
|
+
...t,
|
|
175
|
+
[e]: void 0
|
|
176
|
+
})), Pe((t) => ({
|
|
177
|
+
...t,
|
|
178
|
+
[e]: "connecting"
|
|
179
|
+
})), Xe(e), Ee?.(e);
|
|
180
|
+
}, [
|
|
181
|
+
it,
|
|
182
|
+
Xe,
|
|
183
|
+
Ee
|
|
184
|
+
]), at = r((e, t) => {
|
|
185
|
+
Ye(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", String(t));
|
|
186
|
+
}, []), ot = r((e) => {
|
|
187
|
+
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
188
|
+
}, []), st = r((e, t) => {
|
|
189
|
+
if (e.preventDefault(), q === null || q === t || !De) {
|
|
190
|
+
Ye(null);
|
|
191
|
+
return;
|
|
109
192
|
}
|
|
110
|
-
|
|
193
|
+
let n = [...Ze], [r] = n.splice(q, 1);
|
|
194
|
+
n.splice(t, 0, r), De(n.map((e) => e.sessionId)), Ye(null);
|
|
195
|
+
}, [
|
|
196
|
+
q,
|
|
197
|
+
Ze,
|
|
198
|
+
De
|
|
199
|
+
]), ct = r(() => Ye(null), []);
|
|
111
200
|
i(() => {
|
|
112
|
-
for (let e of
|
|
113
|
-
let t =
|
|
114
|
-
if (t === "error" && e.terminalUrl && !e.error && !
|
|
115
|
-
if (
|
|
116
|
-
let t =
|
|
201
|
+
for (let e of l) {
|
|
202
|
+
let t = B[e.sessionId];
|
|
203
|
+
if (t === "error" && e.terminalUrl && !e.error && !Fe[e.sessionId]) {
|
|
204
|
+
if (W.current[e.sessionId]) continue;
|
|
205
|
+
let t = G.current[e.sessionId] ?? 0;
|
|
117
206
|
if (t >= 15) continue;
|
|
118
207
|
let n = Math.min(2e3 * 2 ** t, 3e4);
|
|
119
|
-
|
|
120
|
-
delete
|
|
121
|
-
let n =
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
...t,
|
|
128
|
-
[e.sessionId]: "connecting"
|
|
129
|
-
}));
|
|
130
|
-
let t = n.src;
|
|
131
|
-
n.src = "about:blank", requestAnimationFrame(() => {
|
|
132
|
-
n.src = t;
|
|
133
|
-
});
|
|
134
|
-
}
|
|
208
|
+
W.current[e.sessionId] = setTimeout(() => {
|
|
209
|
+
delete W.current[e.sessionId], G.current[e.sessionId] = t + 1;
|
|
210
|
+
let n = e.terminalUrl, r = `${new URL(n).origin}/health`;
|
|
211
|
+
fetch(r, { signal: AbortSignal.timeout(5e3) }).then((t) => {
|
|
212
|
+
t.ok && (Pe((t) => ({
|
|
213
|
+
...t,
|
|
214
|
+
[e.sessionId]: "connecting"
|
|
215
|
+
})), Xe(e.sessionId));
|
|
135
216
|
}).catch(() => {});
|
|
136
217
|
}, n);
|
|
137
218
|
}
|
|
138
|
-
t === "connected" &&
|
|
219
|
+
t === "connected" && it(e.sessionId);
|
|
139
220
|
}
|
|
140
|
-
let e =
|
|
221
|
+
let e = W.current;
|
|
141
222
|
return () => {
|
|
142
223
|
for (let t of Object.values(e)) clearTimeout(t);
|
|
143
224
|
};
|
|
144
225
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
226
|
+
l,
|
|
227
|
+
Fe,
|
|
228
|
+
B,
|
|
229
|
+
it,
|
|
230
|
+
Xe
|
|
231
|
+
]), i(() => {
|
|
232
|
+
if (!J || !J.terminalUrl || J.loading || J.error || B[J.sessionId] !== "connected") return;
|
|
233
|
+
let e;
|
|
234
|
+
try {
|
|
235
|
+
e = new URL(J.terminalUrl).origin;
|
|
236
|
+
} catch {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
let t = J.sessionId, n = setInterval(() => {
|
|
240
|
+
fetch(`${e}/health`, { signal: AbortSignal.timeout(5e3) }).then((e) => {
|
|
241
|
+
if (e.ok) Je.current[t] = 0;
|
|
242
|
+
else throw Error("unhealthy");
|
|
243
|
+
}).catch(() => {
|
|
244
|
+
let e = (Je.current[t] ?? 0) + 1;
|
|
245
|
+
Je.current[t] = e, e >= 2 && Y(t, "error");
|
|
246
|
+
});
|
|
247
|
+
}, 2e4);
|
|
248
|
+
return () => clearInterval(n);
|
|
249
|
+
}, [
|
|
250
|
+
J,
|
|
251
|
+
B,
|
|
252
|
+
Y
|
|
149
253
|
]);
|
|
150
|
-
let
|
|
151
|
-
|
|
152
|
-
}, [
|
|
254
|
+
let lt = r((e) => {
|
|
255
|
+
T || k || (e.preventDefault(), ze.current = !0, Be.current = e.clientY, Ve.current = He.current?.offsetHeight || 420, document.body.style.cursor = "ns-resize", document.body.style.userSelect = "none");
|
|
256
|
+
}, [T, k]);
|
|
153
257
|
i(() => {
|
|
154
258
|
let e = (e) => {
|
|
155
|
-
if (!
|
|
156
|
-
let t =
|
|
157
|
-
|
|
259
|
+
if (!ze.current) return;
|
|
260
|
+
let t = Be.current - e.clientY;
|
|
261
|
+
Re(Math.max(200, Math.min(Ve.current + t, window.innerHeight - 150)));
|
|
158
262
|
}, t = () => {
|
|
159
|
-
|
|
263
|
+
ze.current && (ze.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
160
264
|
};
|
|
161
265
|
return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), () => {
|
|
162
266
|
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
|
|
163
267
|
};
|
|
164
268
|
}, []);
|
|
165
|
-
let
|
|
166
|
-
e.preventDefault(), e.stopPropagation(),
|
|
269
|
+
let ut = r((e, t) => {
|
|
270
|
+
e.preventDefault(), e.stopPropagation(), F({
|
|
167
271
|
visible: !0,
|
|
168
272
|
x: e.clientX,
|
|
169
273
|
y: e.clientY,
|
|
@@ -172,165 +276,153 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
172
276
|
}, []);
|
|
173
277
|
i(() => {
|
|
174
278
|
let e = (e) => {
|
|
175
|
-
|
|
279
|
+
Ue.current && !Ue.current.contains(e.target) && F((e) => ({
|
|
176
280
|
...e,
|
|
177
281
|
visible: !1
|
|
178
282
|
}));
|
|
179
283
|
};
|
|
180
|
-
if (
|
|
181
|
-
}, [
|
|
284
|
+
if (P.visible) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
285
|
+
}, [P.visible]), i(() => {
|
|
182
286
|
let e = (e) => {
|
|
183
287
|
let t = e.target;
|
|
184
|
-
|
|
288
|
+
U.current && !U.current.contains(t) && H.current && !H.current.contains(t) && (j(!1), N(""));
|
|
185
289
|
};
|
|
186
|
-
if (
|
|
187
|
-
}, [
|
|
188
|
-
|
|
189
|
-
}, [
|
|
190
|
-
|
|
191
|
-
}, [
|
|
192
|
-
if (!
|
|
290
|
+
if (A) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
291
|
+
}, [A]), i(() => {
|
|
292
|
+
A && We.current && requestAnimationFrame(() => We.current?.focus());
|
|
293
|
+
}, [A]), i(() => {
|
|
294
|
+
I && V.current && (V.current.focus(), V.current.select());
|
|
295
|
+
}, [I]), i(() => {
|
|
296
|
+
if (!E || !D) return;
|
|
193
297
|
let e = (e) => {
|
|
194
|
-
e.key === "Escape" &&
|
|
298
|
+
e.key === "Escape" && D();
|
|
195
299
|
};
|
|
196
300
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
197
|
-
}, [
|
|
198
|
-
let
|
|
199
|
-
let t =
|
|
200
|
-
t && (
|
|
301
|
+
}, [E, D]);
|
|
302
|
+
let dt = r((e) => {
|
|
303
|
+
let t = l.find((t) => t.sessionId === e);
|
|
304
|
+
t && (Me(e), R(t.name)), F((e) => ({
|
|
201
305
|
...e,
|
|
202
306
|
visible: !1
|
|
203
307
|
}));
|
|
204
|
-
}, [
|
|
205
|
-
if (
|
|
206
|
-
let e =
|
|
207
|
-
e &&
|
|
308
|
+
}, [l]), ft = r(() => {
|
|
309
|
+
if (I && L.trim() && x) {
|
|
310
|
+
let e = l.find((e) => e.sessionId === I);
|
|
311
|
+
e && L.trim() !== e.name && x(I, L.trim());
|
|
208
312
|
}
|
|
209
|
-
|
|
313
|
+
Me(null), R("");
|
|
210
314
|
}, [
|
|
315
|
+
I,
|
|
211
316
|
L,
|
|
212
|
-
R,
|
|
213
317
|
x,
|
|
214
|
-
|
|
215
|
-
]),
|
|
216
|
-
e.key === "Enter" ?
|
|
217
|
-
}, [
|
|
218
|
-
if (
|
|
219
|
-
let
|
|
220
|
-
if (e.loading) return /* @__PURE__ */
|
|
221
|
-
if (e.error) return /* @__PURE__ */
|
|
222
|
-
let t =
|
|
223
|
-
return t === "connected" ? /* @__PURE__ */
|
|
318
|
+
l
|
|
319
|
+
]), pt = r((e) => {
|
|
320
|
+
e.key === "Enter" ? ft() : e.key === "Escape" && (Me(null), R(""));
|
|
321
|
+
}, [ft]);
|
|
322
|
+
if (l.length === 0 && !v && !T) return null;
|
|
323
|
+
let mt = T ? "h-full" : k ? "h-[calc(100vh-120px)]" : Le ? void 0 : Se, ht = !T && !k && Le ? { height: `${Le}px` } : void 0, $ = P.sessionId ? l.find((e) => e.sessionId === P.sessionId) : null, gt = (e) => {
|
|
324
|
+
if (e.loading) return /* @__PURE__ */ g(c, { className: "size-3 animate-spin shrink-0" });
|
|
325
|
+
if (e.error) return /* @__PURE__ */ g(ee, { className: "size-3 text-status-error-text shrink-0" });
|
|
326
|
+
let t = B[e.sessionId];
|
|
327
|
+
return t === "connected" ? /* @__PURE__ */ g(fe, { className: "size-3 text-status-success-text shrink-0" }) : t === "error" ? /* @__PURE__ */ g(pe, { className: "size-3 text-status-error-text shrink-0" }) : t === "connecting" ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin text-status-warning-text shrink-0" }) : /* @__PURE__ */ g(m, { className: "size-3 shrink-0" });
|
|
224
328
|
};
|
|
225
|
-
return
|
|
329
|
+
return E ? E ? he(/* @__PURE__ */ _("div", {
|
|
226
330
|
className: "fixed inset-0 z-[9999] bg-bg-surface flex flex-col",
|
|
227
331
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ _("div", {
|
|
229
333
|
className: "flex items-center justify-between px-3 py-2 bg-bg-sunken border-b border-border-default shrink-0",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ g("div", {
|
|
231
335
|
className: "flex items-center gap-4",
|
|
232
|
-
children:
|
|
233
|
-
}), /* @__PURE__ */
|
|
336
|
+
children: Oe
|
|
337
|
+
}), /* @__PURE__ */ _("div", {
|
|
234
338
|
className: "flex items-center gap-2",
|
|
235
339
|
children: [
|
|
236
|
-
J &&
|
|
340
|
+
J?.terminalUrl && /* @__PURE__ */ g("button", {
|
|
237
341
|
type: "button",
|
|
238
342
|
onClick: () => Q(J.sessionId),
|
|
239
|
-
className:
|
|
240
|
-
title: "
|
|
241
|
-
|
|
343
|
+
className: `p-1.5 transition-colors ${B[J.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
|
|
344
|
+
title: O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
|
|
345
|
+
"aria-label": O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
|
|
346
|
+
"data-testid": "terminal-reconnect",
|
|
347
|
+
children: /* @__PURE__ */ g(d, { className: "size-4" })
|
|
242
348
|
}),
|
|
243
|
-
J?.terminalUrl && /* @__PURE__ */
|
|
349
|
+
J?.terminalUrl && /* @__PURE__ */ g("button", {
|
|
244
350
|
type: "button",
|
|
245
|
-
onClick: () => J &&
|
|
351
|
+
onClick: () => J && be(J.sessionId),
|
|
246
352
|
className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
|
|
247
353
|
title: "Open in new tab",
|
|
248
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ g(s, { className: "size-4" })
|
|
249
355
|
}),
|
|
250
|
-
J &&
|
|
356
|
+
J && C && /* @__PURE__ */ _("button", {
|
|
251
357
|
type: "button",
|
|
252
|
-
onClick: () =>
|
|
253
|
-
disabled:
|
|
358
|
+
onClick: () => Qe(J.sessionId),
|
|
359
|
+
disabled: z.has(J.sessionId),
|
|
254
360
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all disabled:opacity-60 disabled:cursor-not-allowed",
|
|
255
|
-
title:
|
|
256
|
-
"aria-label":
|
|
257
|
-
"aria-busy":
|
|
258
|
-
children: [
|
|
361
|
+
title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
362
|
+
"aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
363
|
+
"aria-busy": z.has(J.sessionId),
|
|
364
|
+
children: [z.has(J.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3.5 fill-current" }), /* @__PURE__ */ g("span", {
|
|
259
365
|
className: "text-xs font-medium",
|
|
260
|
-
children:
|
|
366
|
+
children: z.has(J.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
|
|
261
367
|
})]
|
|
262
368
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ g("button", {
|
|
264
370
|
type: "button",
|
|
265
|
-
onClick:
|
|
371
|
+
onClick: D,
|
|
266
372
|
className: "p-1.5 text-text-secondary hover:text-text-primary transition-colors",
|
|
267
373
|
title: "Exit fullscreen (ESC)",
|
|
268
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ g(de, { className: "size-4" })
|
|
269
375
|
})
|
|
270
376
|
]
|
|
271
377
|
})]
|
|
272
378
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ _("div", {
|
|
274
380
|
className: "flex items-center bg-bg-sunken border-b border-border-default shrink-0",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ g("div", {
|
|
276
382
|
className: "flex items-center overflow-x-auto flex-1 min-w-0",
|
|
277
|
-
children:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}) : /* @__PURE__ */ h("span", {
|
|
299
|
-
className: "truncate",
|
|
300
|
-
children: e.name
|
|
301
|
-
}),
|
|
302
|
-
/* @__PURE__ */ h("button", {
|
|
303
|
-
type: "button",
|
|
304
|
-
onClick: (t) => {
|
|
305
|
-
t.stopPropagation(), ge(e.sessionId);
|
|
306
|
-
},
|
|
307
|
-
className: "ml-auto opacity-0 group-hover:opacity-100 hover:text-status-error-text transition-opacity shrink-0",
|
|
308
|
-
title: "Close terminal",
|
|
309
|
-
children: /* @__PURE__ */ h(m, { className: "size-3" })
|
|
310
|
-
})
|
|
311
|
-
]
|
|
383
|
+
children: Ze.map((e, t) => /* @__PURE__ */ g(ge, {
|
|
384
|
+
tab: e,
|
|
385
|
+
index: t,
|
|
386
|
+
isActive: e.sessionId === J?.sessionId,
|
|
387
|
+
isDragging: q === t,
|
|
388
|
+
statusIndicator: gt(e),
|
|
389
|
+
isRenaming: I === e.sessionId,
|
|
390
|
+
renameValue: L,
|
|
391
|
+
renameInputRef: V,
|
|
392
|
+
onRenameChange: R,
|
|
393
|
+
onRenameBlur: ft,
|
|
394
|
+
onRenameKeyDown: pt,
|
|
395
|
+
onSelect: () => ve(e.sessionId),
|
|
396
|
+
onClose: () => ye(e.sessionId),
|
|
397
|
+
onContextMenu: (t) => ut(t, e.sessionId),
|
|
398
|
+
onDoubleClick: () => dt(e.sessionId),
|
|
399
|
+
onDragStart: (e) => at(e, t),
|
|
400
|
+
onDragOver: ot,
|
|
401
|
+
onDrop: (e) => st(e, t),
|
|
402
|
+
onDragEnd: ct,
|
|
403
|
+
closeLabel: O("vibecontrols.sessions.terminal.closeTab", "Close terminal")
|
|
312
404
|
}, e.sessionId))
|
|
313
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ g("button", {
|
|
314
406
|
type: "button",
|
|
315
|
-
ref:
|
|
407
|
+
ref: H,
|
|
316
408
|
onClick: () => {
|
|
317
|
-
(
|
|
409
|
+
(w || Z.length > 0) && (j((e) => !e), N(""));
|
|
318
410
|
},
|
|
319
411
|
className: "flex items-center px-2.5 py-1.5 text-text-secondary hover:text-text-primary transition-colors shrink-0 border-r border-border-subtle",
|
|
320
412
|
title: "New session or open existing",
|
|
321
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ g(u, { className: "size-3.5" })
|
|
322
414
|
})]
|
|
323
415
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ g("div", {
|
|
325
417
|
className: "flex-1 bg-bg-sunken text-text-primary relative overflow-hidden",
|
|
326
|
-
children: J ?
|
|
327
|
-
let t =
|
|
328
|
-
return /* @__PURE__ */
|
|
418
|
+
children: J ? l.map((e) => {
|
|
419
|
+
let t = B[e.sessionId], r = t === "connecting" || e.loading, i = $e(e.terminalUrl), a = i ?? Fe[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
|
|
420
|
+
return /* @__PURE__ */ _("div", {
|
|
329
421
|
className: `absolute inset-0 ${e.sessionId === J.sessionId ? "block" : "hidden"}`,
|
|
330
422
|
children: [
|
|
331
|
-
o && e.terminalUrl && /* @__PURE__ */
|
|
423
|
+
o && e.terminalUrl && /* @__PURE__ */ g(n, {
|
|
332
424
|
ref: (t) => {
|
|
333
|
-
|
|
425
|
+
Ge.current[e.sessionId] = t;
|
|
334
426
|
},
|
|
335
427
|
sessionId: e.sessionId,
|
|
336
428
|
agentId: e.agentId ?? null,
|
|
@@ -339,55 +431,55 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
339
431
|
title: `Terminal - ${e.name}`,
|
|
340
432
|
className: "w-full h-full border-0",
|
|
341
433
|
allow: "clipboard-read *; clipboard-write *",
|
|
342
|
-
onLoad: () =>
|
|
343
|
-
onError: () =>
|
|
344
|
-
}),
|
|
345
|
-
o && r && /* @__PURE__ */
|
|
434
|
+
onLoad: () => nt(e.sessionId),
|
|
435
|
+
onError: () => rt(e.sessionId)
|
|
436
|
+
}, `tif-${e.sessionId}-${Ke[e.sessionId] ?? 0}`),
|
|
437
|
+
o && r && /* @__PURE__ */ g("div", {
|
|
346
438
|
className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
|
|
347
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ _("div", {
|
|
348
440
|
className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ g(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
350
442
|
className: "text-text-primary text-sm font-medium",
|
|
351
|
-
children: e.loading ?
|
|
352
|
-
}), /* @__PURE__ */
|
|
443
|
+
children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
|
|
444
|
+
}), /* @__PURE__ */ g("p", {
|
|
353
445
|
className: "text-text-secondary text-xs",
|
|
354
|
-
children: e.loading ?
|
|
446
|
+
children: e.loading ? O("vibecontrols.sessions.terminal.settingUpWebTerminal", "Setting up session + web terminal") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
|
|
355
447
|
})] })]
|
|
356
448
|
})
|
|
357
449
|
}),
|
|
358
|
-
te && !e.error && /* @__PURE__ */
|
|
450
|
+
te && !e.error && /* @__PURE__ */ g("div", {
|
|
359
451
|
className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center z-10",
|
|
360
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ _("div", {
|
|
361
453
|
className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
|
|
362
454
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ g(pe, { className: "size-6 text-status-error-text" }),
|
|
456
|
+
/* @__PURE__ */ _("div", {
|
|
365
457
|
className: "text-center",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ g("p", {
|
|
367
459
|
className: "text-text-primary text-sm font-medium",
|
|
368
|
-
children:
|
|
369
|
-
}), /* @__PURE__ */
|
|
460
|
+
children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
|
|
461
|
+
}), /* @__PURE__ */ g("p", {
|
|
370
462
|
className: "text-text-secondary text-xs mt-1",
|
|
371
|
-
children: a || ((
|
|
463
|
+
children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
|
|
372
464
|
})]
|
|
373
465
|
}),
|
|
374
|
-
!a && (
|
|
375
|
-
/* @__PURE__ */
|
|
466
|
+
!a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ g(c, { className: "size-4 text-text-tertiary animate-spin" }),
|
|
467
|
+
/* @__PURE__ */ _("button", {
|
|
376
468
|
type: "button",
|
|
377
469
|
onClick: () => Q(e.sessionId),
|
|
378
470
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
|
|
380
472
|
})
|
|
381
473
|
]
|
|
382
474
|
})
|
|
383
475
|
}),
|
|
384
|
-
!e.terminalUrl && e.loading && /* @__PURE__ */
|
|
476
|
+
!e.terminalUrl && e.loading && /* @__PURE__ */ g("div", {
|
|
385
477
|
className: "flex items-center justify-center h-full",
|
|
386
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ _("div", {
|
|
387
479
|
className: "text-center",
|
|
388
480
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ g(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
|
|
482
|
+
/* @__PURE__ */ _("p", {
|
|
391
483
|
className: "text-text-tertiary text-sm",
|
|
392
484
|
children: [
|
|
393
485
|
"Starting terminal for ",
|
|
@@ -395,139 +487,139 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
395
487
|
"..."
|
|
396
488
|
]
|
|
397
489
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ g("p", {
|
|
399
491
|
className: "text-text-secondary text-xs mt-1",
|
|
400
492
|
children: "Setting up session + web terminal"
|
|
401
493
|
})
|
|
402
494
|
]
|
|
403
495
|
})
|
|
404
496
|
}),
|
|
405
|
-
e.error && /* @__PURE__ */
|
|
497
|
+
e.error && /* @__PURE__ */ g("div", {
|
|
406
498
|
className: "flex items-center justify-center h-full",
|
|
407
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ _("div", {
|
|
408
500
|
className: "text-center max-w-md",
|
|
409
501
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ g(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
|
|
503
|
+
/* @__PURE__ */ g("p", {
|
|
412
504
|
className: "text-status-error-text text-sm font-medium",
|
|
413
|
-
children:
|
|
505
|
+
children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
|
|
414
506
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ g("p", {
|
|
416
508
|
className: "text-text-tertiary text-xs mt-2",
|
|
417
509
|
children: e.error
|
|
418
510
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ g("div", {
|
|
420
512
|
className: "flex items-center justify-center gap-3 mt-4",
|
|
421
|
-
children: b && y && /* @__PURE__ */
|
|
513
|
+
children: b && y && /* @__PURE__ */ _("button", {
|
|
422
514
|
type: "button",
|
|
423
515
|
onClick: () => {
|
|
424
516
|
let t = y.find((t) => t.id === e.sessionId);
|
|
425
517
|
t && b(t);
|
|
426
518
|
},
|
|
427
519
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
|
|
429
521
|
})
|
|
430
522
|
})
|
|
431
523
|
]
|
|
432
524
|
})
|
|
433
525
|
}),
|
|
434
|
-
!e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */
|
|
526
|
+
!e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ g("div", {
|
|
435
527
|
className: "flex items-center justify-center h-full",
|
|
436
|
-
children: /* @__PURE__ */
|
|
528
|
+
children: /* @__PURE__ */ _("div", {
|
|
437
529
|
className: "text-center max-w-sm space-y-3",
|
|
438
530
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ g(m, { className: "size-8 text-text-secondary mx-auto" }),
|
|
532
|
+
/* @__PURE__ */ g("p", {
|
|
441
533
|
className: "text-text-primary text-sm font-medium",
|
|
442
|
-
children:
|
|
534
|
+
children: O("vibecontrols.sessions.terminal.terminalNotStarted", "Terminal not started yet")
|
|
443
535
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ g("p", {
|
|
445
537
|
className: "text-text-secondary text-xs",
|
|
446
|
-
children:
|
|
538
|
+
children: O("vibecontrols.sessions.terminal.startTerminalHint", "Click below to start a ttyd terminal on the agent for this session.")
|
|
447
539
|
}),
|
|
448
|
-
b && y && /* @__PURE__ */
|
|
540
|
+
b && y && /* @__PURE__ */ _("button", {
|
|
449
541
|
type: "button",
|
|
450
542
|
onClick: () => {
|
|
451
543
|
let t = y.find((t) => t.id === e.sessionId);
|
|
452
544
|
t && b(t);
|
|
453
545
|
},
|
|
454
546
|
className: "px-4 py-2 bg-accent-primary text-white text-sm rounded-md hover:bg-accent-primary/90 transition-colors inline-flex items-center gap-2",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ g(m, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.startTerminal", "Start terminal")]
|
|
456
548
|
})
|
|
457
549
|
]
|
|
458
550
|
})
|
|
459
551
|
})
|
|
460
552
|
]
|
|
461
553
|
}, e.sessionId);
|
|
462
|
-
}) : /* @__PURE__ */
|
|
554
|
+
}) : /* @__PURE__ */ g("div", {
|
|
463
555
|
className: "flex items-center justify-center h-full",
|
|
464
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ _("div", {
|
|
465
557
|
className: "text-center max-w-md",
|
|
466
558
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ g(m, { className: "size-12 text-text-secondary mx-auto mb-4" }),
|
|
560
|
+
/* @__PURE__ */ g("p", {
|
|
469
561
|
className: "text-text-secondary text-base font-medium mb-2",
|
|
470
|
-
children:
|
|
562
|
+
children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
|
|
471
563
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ g("p", {
|
|
473
565
|
className: "text-text-secondary text-sm mb-4",
|
|
474
|
-
children:
|
|
566
|
+
children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
|
|
475
567
|
}),
|
|
476
|
-
|
|
568
|
+
w && /* @__PURE__ */ _("button", {
|
|
477
569
|
type: "button",
|
|
478
|
-
onClick:
|
|
570
|
+
onClick: w,
|
|
479
571
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ g(u, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
|
|
481
573
|
})
|
|
482
574
|
]
|
|
483
575
|
})
|
|
484
576
|
})
|
|
485
577
|
}),
|
|
486
|
-
|
|
487
|
-
ref:
|
|
578
|
+
A && (w || Z.length > 0) && H.current && /* @__PURE__ */ _("div", {
|
|
579
|
+
ref: U,
|
|
488
580
|
className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[10000] w-[280px]",
|
|
489
581
|
style: {
|
|
490
|
-
top:
|
|
491
|
-
left: Math.min(
|
|
582
|
+
top: H.current.getBoundingClientRect().bottom + 4,
|
|
583
|
+
left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
|
|
492
584
|
},
|
|
493
585
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ g("div", {
|
|
495
587
|
className: "p-2 border-b border-border-subtle",
|
|
496
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ _("div", {
|
|
497
589
|
className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
|
|
498
590
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ g(ue, { className: "size-3.5 text-text-muted shrink-0" }),
|
|
592
|
+
/* @__PURE__ */ g("input", {
|
|
501
593
|
"aria-label": "Search sessions...",
|
|
502
|
-
ref:
|
|
594
|
+
ref: We,
|
|
503
595
|
type: "text",
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
596
|
+
value: M,
|
|
597
|
+
onChange: (e) => N(e.target.value),
|
|
506
598
|
placeholder: "Search sessions...",
|
|
507
599
|
className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
|
|
508
600
|
}),
|
|
509
|
-
|
|
601
|
+
M && /* @__PURE__ */ g("button", {
|
|
510
602
|
type: "button",
|
|
511
|
-
onClick: () =>
|
|
603
|
+
onClick: () => N(""),
|
|
512
604
|
className: "text-text-muted hover:text-text-primary shrink-0",
|
|
513
|
-
children: /* @__PURE__ */ h
|
|
605
|
+
children: /* @__PURE__ */ g(h, { className: "size-3" })
|
|
514
606
|
})
|
|
515
607
|
]
|
|
516
608
|
})
|
|
517
609
|
}),
|
|
518
|
-
|
|
610
|
+
w && /* @__PURE__ */ _("button", {
|
|
519
611
|
type: "button",
|
|
520
612
|
onClick: () => {
|
|
521
|
-
|
|
613
|
+
w(), j(!1), N("");
|
|
522
614
|
},
|
|
523
615
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left font-medium",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ g(u, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ g("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
|
|
525
617
|
}),
|
|
526
|
-
Z.length > 0 && /* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
618
|
+
Z.length > 0 && /* @__PURE__ */ _(me, { children: [
|
|
619
|
+
/* @__PURE__ */ g("div", { className: "border-t border-border-subtle" }),
|
|
620
|
+
/* @__PURE__ */ g("div", {
|
|
529
621
|
className: "px-3 pt-2 pb-1",
|
|
530
|
-
children: /* @__PURE__ */
|
|
622
|
+
children: /* @__PURE__ */ _("span", {
|
|
531
623
|
className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
|
|
532
624
|
children: [
|
|
533
625
|
"Open existing (",
|
|
@@ -536,30 +628,30 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
536
628
|
]
|
|
537
629
|
})
|
|
538
630
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ g("div", {
|
|
540
632
|
className: "max-h-48 overflow-y-auto pb-1",
|
|
541
|
-
children:
|
|
633
|
+
children: tt.length > 0 ? tt.map((e) => /* @__PURE__ */ _("button", {
|
|
542
634
|
type: "button",
|
|
543
635
|
onClick: () => {
|
|
544
|
-
|
|
636
|
+
Ce?.(e), j(!1), N("");
|
|
545
637
|
},
|
|
546
638
|
className: "flex items-center gap-2 w-full px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
|
|
547
639
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ g(m, { className: "size-3.5 text-text-secondary shrink-0" }),
|
|
641
|
+
/* @__PURE__ */ g("span", {
|
|
550
642
|
className: "truncate",
|
|
551
643
|
children: e.name
|
|
552
644
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ g("span", {
|
|
554
646
|
className: `ml-auto text-[10px] px-1.5 py-0.5 rounded shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text/10 text-status-success-text" : e.status === "STOPPED" || e.status === "TERMINATED" ? "bg-text-secondary/10 text-text-tertiary" : "bg-status-warning-text/10 text-status-warning-text"}`,
|
|
555
647
|
children: e.status.toLowerCase()
|
|
556
648
|
})
|
|
557
649
|
]
|
|
558
|
-
}, e.id)) : /* @__PURE__ */
|
|
650
|
+
}, e.id)) : /* @__PURE__ */ _("div", {
|
|
559
651
|
className: "px-3 py-2 text-xs text-text-muted",
|
|
560
652
|
children: [
|
|
561
653
|
"No sessions matching “",
|
|
562
|
-
|
|
654
|
+
M,
|
|
563
655
|
"”"
|
|
564
656
|
]
|
|
565
657
|
})
|
|
@@ -567,320 +659,320 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
567
659
|
] })
|
|
568
660
|
]
|
|
569
661
|
}),
|
|
570
|
-
|
|
571
|
-
ref:
|
|
662
|
+
P.visible && $ && /* @__PURE__ */ _("div", {
|
|
663
|
+
ref: Ue,
|
|
572
664
|
className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[10000] min-w-[180px] py-1",
|
|
573
665
|
style: {
|
|
574
|
-
top:
|
|
575
|
-
left:
|
|
666
|
+
top: P.y,
|
|
667
|
+
left: P.x
|
|
576
668
|
},
|
|
577
669
|
children: [
|
|
578
|
-
x && /* @__PURE__ */
|
|
670
|
+
x && /* @__PURE__ */ _("button", {
|
|
579
671
|
type: "button",
|
|
580
|
-
onClick: () =>
|
|
672
|
+
onClick: () => dt($.sessionId),
|
|
581
673
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
582
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ g(re, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.rename", "Rename")]
|
|
583
675
|
}),
|
|
584
|
-
$.terminalUrl && /* @__PURE__ */
|
|
676
|
+
$.terminalUrl && /* @__PURE__ */ _("button", {
|
|
585
677
|
type: "button",
|
|
586
678
|
onClick: () => {
|
|
587
|
-
|
|
679
|
+
be($.sessionId), F((e) => ({
|
|
588
680
|
...e,
|
|
589
681
|
visible: !1
|
|
590
682
|
}));
|
|
591
683
|
},
|
|
592
684
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ g(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
|
|
594
686
|
}),
|
|
595
|
-
|
|
687
|
+
S && /* @__PURE__ */ _("button", {
|
|
596
688
|
type: "button",
|
|
597
689
|
onClick: () => {
|
|
598
|
-
|
|
690
|
+
S($.sessionId), F((e) => ({
|
|
599
691
|
...e,
|
|
600
692
|
visible: !1
|
|
601
693
|
}));
|
|
602
694
|
},
|
|
603
|
-
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-
|
|
604
|
-
children: [/* @__PURE__ */
|
|
695
|
+
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
696
|
+
children: [$.pinned ? /* @__PURE__ */ g(le, { className: "size-3.5" }) : /* @__PURE__ */ g(ce, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
|
|
697
|
+
}),
|
|
698
|
+
$.terminalUrl && /* @__PURE__ */ _("button", {
|
|
699
|
+
type: "button",
|
|
700
|
+
onClick: () => {
|
|
701
|
+
Q($.sessionId), F((e) => ({
|
|
702
|
+
...e,
|
|
703
|
+
visible: !1
|
|
704
|
+
}));
|
|
705
|
+
},
|
|
706
|
+
className: `flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-bg-sunken transition-colors ${B[$.sessionId] === "error" ? "text-status-warning-text" : "text-text-primary"}`,
|
|
707
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
|
|
605
708
|
}),
|
|
606
|
-
|
|
709
|
+
Te && /* @__PURE__ */ _("button", {
|
|
607
710
|
type: "button",
|
|
608
711
|
onClick: () => {
|
|
609
|
-
|
|
712
|
+
Te($.sessionId), F((e) => ({
|
|
610
713
|
...e,
|
|
611
714
|
visible: !1
|
|
612
715
|
}));
|
|
613
716
|
},
|
|
614
717
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
718
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.restartTerminal", "Restart Terminal")]
|
|
616
719
|
}),
|
|
617
|
-
|
|
720
|
+
we && /* @__PURE__ */ _("button", {
|
|
618
721
|
type: "button",
|
|
619
722
|
onClick: () => {
|
|
620
|
-
|
|
723
|
+
we($.sessionId), F((e) => ({
|
|
621
724
|
...e,
|
|
622
725
|
visible: !1
|
|
623
726
|
}));
|
|
624
727
|
},
|
|
625
728
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopTerminal", "Stop Terminal")]
|
|
627
730
|
}),
|
|
628
|
-
|
|
731
|
+
C && /* @__PURE__ */ _("button", {
|
|
629
732
|
type: "button",
|
|
630
733
|
onClick: () => {
|
|
631
|
-
|
|
734
|
+
C($.sessionId), F((e) => ({
|
|
632
735
|
...e,
|
|
633
736
|
visible: !1
|
|
634
737
|
}));
|
|
635
738
|
},
|
|
636
739
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-warning-text hover:bg-bg-sunken transition-colors",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
740
|
+
children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
|
|
638
741
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ g("div", { className: "border-t border-border-subtle my-1" }),
|
|
743
|
+
/* @__PURE__ */ _("button", {
|
|
641
744
|
type: "button",
|
|
642
745
|
onClick: () => {
|
|
643
|
-
|
|
746
|
+
ye($.sessionId), F((e) => ({
|
|
644
747
|
...e,
|
|
645
748
|
visible: !1
|
|
646
749
|
}));
|
|
647
750
|
},
|
|
648
751
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
|
|
649
|
-
children: [/* @__PURE__ */ h
|
|
752
|
+
children: [/* @__PURE__ */ g(h, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
|
|
650
753
|
})
|
|
651
754
|
]
|
|
652
755
|
})
|
|
653
756
|
]
|
|
654
|
-
}), document.body) : null : /* @__PURE__ */
|
|
655
|
-
ref:
|
|
656
|
-
className: `${
|
|
757
|
+
}), document.body) : null : /* @__PURE__ */ _("div", {
|
|
758
|
+
ref: He,
|
|
759
|
+
className: `${T ? "flex flex-col h-full" : ""} border-t border-border-default bg-bg-surface ${v && l.length === 0 && !T ? "hidden" : ""}`,
|
|
657
760
|
children: [
|
|
658
|
-
!
|
|
659
|
-
onMouseDown:
|
|
761
|
+
!T && !v && l.length > 0 && /* @__PURE__ */ g("div", {
|
|
762
|
+
onMouseDown: lt,
|
|
660
763
|
className: "h-1 cursor-ns-resize hover:bg-action-primary-bg/30 transition-colors flex items-center justify-center group",
|
|
661
764
|
title: "Drag to resize",
|
|
662
|
-
children: /* @__PURE__ */
|
|
765
|
+
children: /* @__PURE__ */ g(ae, { className: "w-4 h-3 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity rotate-90" })
|
|
663
766
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ _("div", {
|
|
665
768
|
className: "flex items-center bg-bg-sunken border-b border-border-default",
|
|
666
769
|
children: [
|
|
667
|
-
!
|
|
770
|
+
!T && /* @__PURE__ */ _("button", {
|
|
668
771
|
type: "button",
|
|
669
|
-
onClick:
|
|
772
|
+
onClick: xe,
|
|
670
773
|
className: "flex items-center gap-1 px-3 py-2 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide",
|
|
671
774
|
title: v ? "Expand terminal" : "Collapse terminal",
|
|
672
775
|
children: [
|
|
673
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ g(m, { className: "size-3.5" }),
|
|
674
777
|
"Terminal",
|
|
675
|
-
|
|
778
|
+
g(v ? ne : te, { className: "size-3" })
|
|
676
779
|
]
|
|
677
780
|
}),
|
|
678
|
-
(!v ||
|
|
781
|
+
(!v || T) && /* @__PURE__ */ g("div", {
|
|
679
782
|
className: "flex items-center overflow-x-auto flex-1 min-w-0",
|
|
680
|
-
children:
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
}) : /* @__PURE__ */ h("span", {
|
|
702
|
-
className: "truncate",
|
|
703
|
-
children: e.name
|
|
704
|
-
}),
|
|
705
|
-
/* @__PURE__ */ h("button", {
|
|
706
|
-
type: "button",
|
|
707
|
-
onClick: (t) => {
|
|
708
|
-
t.stopPropagation(), ge(e.sessionId);
|
|
709
|
-
},
|
|
710
|
-
className: "ml-auto opacity-0 group-hover:opacity-100 hover:text-status-error-text transition-opacity shrink-0",
|
|
711
|
-
title: "Close terminal",
|
|
712
|
-
children: /* @__PURE__ */ h(m, { className: "size-3" })
|
|
713
|
-
})
|
|
714
|
-
]
|
|
783
|
+
children: Ze.map((e, t) => /* @__PURE__ */ g(ge, {
|
|
784
|
+
tab: e,
|
|
785
|
+
index: t,
|
|
786
|
+
isActive: e.sessionId === J?.sessionId,
|
|
787
|
+
isDragging: q === t,
|
|
788
|
+
statusIndicator: gt(e),
|
|
789
|
+
isRenaming: I === e.sessionId,
|
|
790
|
+
renameValue: L,
|
|
791
|
+
renameInputRef: V,
|
|
792
|
+
onRenameChange: R,
|
|
793
|
+
onRenameBlur: ft,
|
|
794
|
+
onRenameKeyDown: pt,
|
|
795
|
+
onSelect: () => ve(e.sessionId),
|
|
796
|
+
onClose: () => ye(e.sessionId),
|
|
797
|
+
onContextMenu: (t) => ut(t, e.sessionId),
|
|
798
|
+
onDoubleClick: () => dt(e.sessionId),
|
|
799
|
+
onDragStart: (e) => at(e, t),
|
|
800
|
+
onDragOver: ot,
|
|
801
|
+
onDrop: (e) => st(e, t),
|
|
802
|
+
onDragEnd: ct,
|
|
803
|
+
closeLabel: O("vibecontrols.sessions.terminal.closeTab", "Close terminal")
|
|
715
804
|
}, e.sessionId))
|
|
716
805
|
}),
|
|
717
|
-
(!v ||
|
|
806
|
+
(!v || T) && /* @__PURE__ */ g("button", {
|
|
718
807
|
type: "button",
|
|
719
|
-
ref:
|
|
808
|
+
ref: H,
|
|
720
809
|
onClick: () => {
|
|
721
|
-
(
|
|
810
|
+
(w || Z.length > 0) && (j((e) => !e), N(""));
|
|
722
811
|
},
|
|
723
812
|
className: "flex items-center px-2.5 py-1.5 text-text-secondary hover:text-text-primary transition-colors shrink-0 border-r border-border-subtle",
|
|
724
813
|
title: "New session or open existing",
|
|
725
|
-
children: /* @__PURE__ */
|
|
814
|
+
children: /* @__PURE__ */ g(u, { className: "size-3.5" })
|
|
726
815
|
}),
|
|
727
|
-
(!v ||
|
|
816
|
+
(!v || T) && l.length > 0 && /* @__PURE__ */ _("div", {
|
|
728
817
|
className: "flex items-center gap-1 px-2 shrink-0",
|
|
729
818
|
children: [
|
|
730
|
-
J &&
|
|
819
|
+
J?.terminalUrl && /* @__PURE__ */ g("button", {
|
|
731
820
|
type: "button",
|
|
732
821
|
onClick: () => Q(J.sessionId),
|
|
733
|
-
className:
|
|
734
|
-
title: "
|
|
735
|
-
|
|
822
|
+
className: `p-1 transition-colors ${B[J.sessionId] === "error" ? "text-status-warning-text hover:text-status-warning-text/80" : "text-text-secondary hover:text-text-primary"}`,
|
|
823
|
+
title: O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
|
|
824
|
+
"aria-label": O("vibecontrols.sessions.terminal.reconnect", "Reconnect"),
|
|
825
|
+
"data-testid": "terminal-reconnect",
|
|
826
|
+
children: /* @__PURE__ */ g(d, { className: "size-3.5" })
|
|
736
827
|
}),
|
|
737
|
-
J?.terminalUrl && /* @__PURE__ */
|
|
828
|
+
J?.terminalUrl && /* @__PURE__ */ g("button", {
|
|
738
829
|
type: "button",
|
|
739
|
-
onClick: () => J &&
|
|
830
|
+
onClick: () => J && be(J.sessionId),
|
|
740
831
|
className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
|
|
741
832
|
title: "Open in new tab",
|
|
742
|
-
children: /* @__PURE__ */
|
|
833
|
+
children: /* @__PURE__ */ g(s, { className: "size-3.5" })
|
|
743
834
|
}),
|
|
744
|
-
J &&
|
|
835
|
+
J && C && /* @__PURE__ */ _("button", {
|
|
745
836
|
type: "button",
|
|
746
|
-
onClick: () =>
|
|
747
|
-
disabled:
|
|
837
|
+
onClick: () => Qe(J.sessionId),
|
|
838
|
+
disabled: z.has(J.sessionId),
|
|
748
839
|
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all disabled:opacity-60 disabled:cursor-not-allowed",
|
|
749
|
-
title:
|
|
750
|
-
"aria-label":
|
|
751
|
-
"aria-busy":
|
|
752
|
-
children: [
|
|
840
|
+
title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
841
|
+
"aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
842
|
+
"aria-busy": z.has(J.sessionId),
|
|
843
|
+
children: [z.has(J.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3 fill-current" }), /* @__PURE__ */ g("span", {
|
|
753
844
|
className: "text-[11px] font-medium",
|
|
754
|
-
children:
|
|
845
|
+
children: z.has(J.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop")
|
|
755
846
|
})]
|
|
756
847
|
}),
|
|
757
|
-
J && /* @__PURE__ */
|
|
848
|
+
J && /* @__PURE__ */ g("button", {
|
|
758
849
|
type: "button",
|
|
759
|
-
onClick: () =>
|
|
760
|
-
className: `p-1 transition-colors ${
|
|
761
|
-
title:
|
|
762
|
-
children: /* @__PURE__ */
|
|
850
|
+
onClick: () => je((e) => !e),
|
|
851
|
+
className: `p-1 transition-colors ${Ae ? "text-action-primary-text bg-action-primary-bg rounded" : "text-text-secondary hover:text-text-primary"}`,
|
|
852
|
+
title: O("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
|
|
853
|
+
children: /* @__PURE__ */ g(f, { className: "size-3.5" })
|
|
763
854
|
}),
|
|
764
|
-
|
|
855
|
+
D && /* @__PURE__ */ g("button", {
|
|
765
856
|
type: "button",
|
|
766
|
-
onClick:
|
|
857
|
+
onClick: D,
|
|
767
858
|
className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
|
|
768
|
-
title:
|
|
769
|
-
children:
|
|
859
|
+
title: E ? "Exit fullscreen" : "Enter fullscreen",
|
|
860
|
+
children: g(E ? de : ie, { className: "size-3.5" })
|
|
770
861
|
}),
|
|
771
|
-
!
|
|
862
|
+
!T && !E && /* @__PURE__ */ g("button", {
|
|
772
863
|
type: "button",
|
|
773
|
-
onClick:
|
|
864
|
+
onClick: et,
|
|
774
865
|
className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
|
|
775
|
-
title:
|
|
776
|
-
children:
|
|
866
|
+
title: k ? "Restore size" : "Maximize",
|
|
867
|
+
children: g(k ? se : oe, { className: "size-3.5" })
|
|
777
868
|
})
|
|
778
869
|
]
|
|
779
870
|
})
|
|
780
871
|
]
|
|
781
872
|
}),
|
|
782
|
-
(!v ||
|
|
783
|
-
className: `${
|
|
784
|
-
style:
|
|
785
|
-
children: [
|
|
873
|
+
(!v || T) && J && /* @__PURE__ */ _("div", {
|
|
874
|
+
className: `${mt || ""} bg-bg-sunken text-text-primary relative ${T ? "flex-1" : ""}`,
|
|
875
|
+
style: ht,
|
|
876
|
+
children: [Ae && J && /* @__PURE__ */ _("div", {
|
|
786
877
|
className: "absolute inset-0 z-30 bg-bg-surface flex flex-col",
|
|
787
|
-
children: [/* @__PURE__ */
|
|
878
|
+
children: [/* @__PURE__ */ _("div", {
|
|
788
879
|
className: "flex items-center justify-between px-4 py-2 border-b border-border-default",
|
|
789
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ _("div", {
|
|
790
881
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
791
882
|
children: [
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
|
|
794
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ g(f, { className: "size-4" }),
|
|
884
|
+
O("vibecontrols.sessions.terminal.connectionLog", "Connection Log"),
|
|
885
|
+
/* @__PURE__ */ _("span", {
|
|
795
886
|
className: "text-text-tertiary font-normal",
|
|
796
887
|
children: ["· ", J.name]
|
|
797
888
|
})
|
|
798
889
|
]
|
|
799
|
-
}), /* @__PURE__ */
|
|
890
|
+
}), /* @__PURE__ */ g("button", {
|
|
800
891
|
type: "button",
|
|
801
|
-
onClick: () =>
|
|
892
|
+
onClick: () => je(!1),
|
|
802
893
|
className: "p-1 text-text-secondary hover:text-text-primary",
|
|
803
|
-
title:
|
|
804
|
-
children: /* @__PURE__ */ h
|
|
894
|
+
title: O("common.close", "Close"),
|
|
895
|
+
children: /* @__PURE__ */ g(h, { className: "size-4" })
|
|
805
896
|
})]
|
|
806
|
-
}), /* @__PURE__ */
|
|
897
|
+
}), /* @__PURE__ */ g("div", {
|
|
807
898
|
className: "flex-1 overflow-hidden",
|
|
808
|
-
children: /* @__PURE__ */
|
|
899
|
+
children: /* @__PURE__ */ g(t, {
|
|
809
900
|
sessionId: J.sessionId,
|
|
810
901
|
sessionName: J.name
|
|
811
902
|
})
|
|
812
903
|
})]
|
|
813
|
-
}),
|
|
814
|
-
let t =
|
|
815
|
-
return /* @__PURE__ */
|
|
904
|
+
}), l.map((e) => {
|
|
905
|
+
let t = B[e.sessionId], r = t === "connecting" || e.loading, i = $e(e.terminalUrl), a = i ?? Fe[e.sessionId], o = !!e.terminalUrl && !e.error && !i, te = !!i || o && t === "error";
|
|
906
|
+
return /* @__PURE__ */ _("div", {
|
|
816
907
|
className: `absolute inset-0 ${e.sessionId === J.sessionId ? "block" : "hidden"}`,
|
|
817
908
|
children: [
|
|
818
|
-
o && e.terminalUrl && /* @__PURE__ */
|
|
909
|
+
o && e.terminalUrl && /* @__PURE__ */ g(n, {
|
|
819
910
|
ref: (t) => {
|
|
820
|
-
|
|
911
|
+
Ge.current[e.sessionId] = t;
|
|
821
912
|
},
|
|
822
913
|
sessionId: e.sessionId,
|
|
823
914
|
agentId: e.agentId ?? null,
|
|
915
|
+
profile: e.profile ?? null,
|
|
824
916
|
baseTtydUrl: e.terminalUrl,
|
|
825
917
|
title: `Terminal - ${e.name}`,
|
|
826
918
|
className: "w-full h-full border-0",
|
|
827
919
|
allow: "clipboard-read *; clipboard-write *",
|
|
828
|
-
onLoad: () =>
|
|
829
|
-
onError: () =>
|
|
830
|
-
}),
|
|
831
|
-
o && r && /* @__PURE__ */
|
|
920
|
+
onLoad: () => nt(e.sessionId),
|
|
921
|
+
onError: () => rt(e.sessionId)
|
|
922
|
+
}, `tif-${e.sessionId}-${Ke[e.sessionId] ?? 0}`),
|
|
923
|
+
o && r && /* @__PURE__ */ g("div", {
|
|
832
924
|
className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center pointer-events-none z-10",
|
|
833
|
-
children: /* @__PURE__ */
|
|
925
|
+
children: /* @__PURE__ */ _("div", {
|
|
834
926
|
className: "flex items-center gap-3 px-4 py-3 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
|
|
835
|
-
children: [/* @__PURE__ */
|
|
927
|
+
children: [/* @__PURE__ */ g(c, { className: "size-5 text-status-warning-text animate-spin" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
836
928
|
className: "text-text-primary text-sm font-medium",
|
|
837
|
-
children: e.loading ?
|
|
838
|
-
}), /* @__PURE__ */
|
|
929
|
+
children: e.loading ? O("vibecontrols.sessions.terminal.startingTerminal", "Starting terminal...") : O("vibecontrols.sessions.terminal.connecting", "Connecting...")
|
|
930
|
+
}), /* @__PURE__ */ g("p", {
|
|
839
931
|
className: "text-text-secondary text-xs",
|
|
840
|
-
children: e.loading ?
|
|
932
|
+
children: e.loading ? O("vibecontrols.sessions.terminal.settingUpWebTerminal", "Setting up session + web terminal") : O("vibecontrols.sessions.terminal.establishingConnection", "Establishing connection")
|
|
841
933
|
})] })]
|
|
842
934
|
})
|
|
843
935
|
}),
|
|
844
|
-
te && !e.error && /* @__PURE__ */
|
|
936
|
+
te && !e.error && /* @__PURE__ */ g("div", {
|
|
845
937
|
className: "absolute inset-0 bg-bg-overlay backdrop-blur-[2px] flex items-center justify-center z-10",
|
|
846
|
-
children: /* @__PURE__ */
|
|
938
|
+
children: /* @__PURE__ */ _("div", {
|
|
847
939
|
className: "flex flex-col items-center gap-3 px-6 py-4 bg-bg-surface/95 rounded-lg border border-border-default shadow-lg",
|
|
848
940
|
children: [
|
|
849
|
-
/* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ g(pe, { className: "size-6 text-status-error-text" }),
|
|
942
|
+
/* @__PURE__ */ _("div", {
|
|
851
943
|
className: "text-center",
|
|
852
|
-
children: [/* @__PURE__ */
|
|
944
|
+
children: [/* @__PURE__ */ g("p", {
|
|
853
945
|
className: "text-text-primary text-sm font-medium",
|
|
854
|
-
children:
|
|
855
|
-
}), /* @__PURE__ */
|
|
946
|
+
children: O("vibecontrols.sessions.terminal.connectionLost", "Connection Lost")
|
|
947
|
+
}), /* @__PURE__ */ g("p", {
|
|
856
948
|
className: "text-text-secondary text-xs mt-1",
|
|
857
|
-
children: a || ((
|
|
949
|
+
children: a || ((G.current[e.sessionId] ?? 0) < 15 ? O("vibecontrols.sessions.terminal.reconnectingAutomatically", "Reconnecting automatically...") : O("vibecontrols.sessions.terminal.connectionInterrupted", "Terminal connection was interrupted"))
|
|
858
950
|
})]
|
|
859
951
|
}),
|
|
860
|
-
!a && (
|
|
861
|
-
/* @__PURE__ */
|
|
952
|
+
!a && (G.current[e.sessionId] ?? 0) < 15 && /* @__PURE__ */ g(c, { className: "size-4 text-text-tertiary animate-spin" }),
|
|
953
|
+
/* @__PURE__ */ _("div", {
|
|
862
954
|
className: "flex items-center justify-center gap-2 flex-wrap",
|
|
863
|
-
children: [/* @__PURE__ */
|
|
955
|
+
children: [/* @__PURE__ */ _("button", {
|
|
864
956
|
type: "button",
|
|
865
957
|
onClick: () => Q(e.sessionId),
|
|
866
958
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
867
|
-
children: [/* @__PURE__ */
|
|
868
|
-
}), /* @__PURE__ */
|
|
959
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnectNow", "Reconnect Now")]
|
|
960
|
+
}), /* @__PURE__ */ _("a", {
|
|
869
961
|
href: `/vibecontrols/sessions/${e.sessionId}#connection-log`,
|
|
870
962
|
className: "px-4 py-2 text-action-primary-text bg-action-primary-bg text-sm rounded-md hover:bg-action-primary-bg-hover transition-colors inline-flex items-center gap-2",
|
|
871
|
-
children: [/* @__PURE__ */
|
|
963
|
+
children: [/* @__PURE__ */ g(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
|
|
872
964
|
})]
|
|
873
965
|
})
|
|
874
966
|
]
|
|
875
967
|
})
|
|
876
968
|
}),
|
|
877
|
-
!e.terminalUrl && e.loading && /* @__PURE__ */
|
|
969
|
+
!e.terminalUrl && e.loading && /* @__PURE__ */ g("div", {
|
|
878
970
|
className: "flex items-center justify-center h-full",
|
|
879
|
-
children: /* @__PURE__ */
|
|
971
|
+
children: /* @__PURE__ */ _("div", {
|
|
880
972
|
className: "text-center",
|
|
881
973
|
children: [
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ g(c, { className: "size-8 text-text-tertiary animate-spin mx-auto mb-3" }),
|
|
975
|
+
/* @__PURE__ */ _("p", {
|
|
884
976
|
className: "text-text-tertiary text-sm",
|
|
885
977
|
children: [
|
|
886
978
|
"Starting terminal for ",
|
|
@@ -888,63 +980,63 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
888
980
|
"..."
|
|
889
981
|
]
|
|
890
982
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ g("p", {
|
|
892
984
|
className: "text-text-secondary text-xs mt-1",
|
|
893
985
|
children: "Setting up session + web terminal"
|
|
894
986
|
})
|
|
895
987
|
]
|
|
896
988
|
})
|
|
897
989
|
}),
|
|
898
|
-
e.error && /* @__PURE__ */
|
|
990
|
+
e.error && /* @__PURE__ */ g("div", {
|
|
899
991
|
className: "flex items-center justify-center h-full",
|
|
900
|
-
children: /* @__PURE__ */
|
|
992
|
+
children: /* @__PURE__ */ _("div", {
|
|
901
993
|
className: "text-center max-w-md",
|
|
902
994
|
children: [
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ g(ee, { className: "size-8 text-status-error-text mx-auto mb-3" }),
|
|
996
|
+
/* @__PURE__ */ g("p", {
|
|
905
997
|
className: "text-status-error-text text-sm font-medium",
|
|
906
|
-
children:
|
|
998
|
+
children: O("vibecontrols.sessions.terminal.failedToStart", "Failed to start terminal")
|
|
907
999
|
}),
|
|
908
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ g("p", {
|
|
909
1001
|
className: "text-text-tertiary text-xs mt-2",
|
|
910
1002
|
children: e.error
|
|
911
1003
|
}),
|
|
912
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ g("p", {
|
|
913
1005
|
className: "text-text-secondary text-xs mt-3",
|
|
914
|
-
children:
|
|
1006
|
+
children: O("vibecontrols.sessions.terminal.seeConnectionLogPrompt", "See the connection log for the step-by-step timeline of probe / start / mint / exchange events.")
|
|
915
1007
|
}),
|
|
916
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ _("div", {
|
|
917
1009
|
className: "flex items-center justify-center gap-3 mt-4 flex-wrap",
|
|
918
|
-
children: [b && y && /* @__PURE__ */
|
|
1010
|
+
children: [b && y && /* @__PURE__ */ _("button", {
|
|
919
1011
|
type: "button",
|
|
920
1012
|
onClick: () => {
|
|
921
1013
|
let t = y.find((t) => t.id === e.sessionId);
|
|
922
1014
|
t && b(t);
|
|
923
1015
|
},
|
|
924
1016
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
925
|
-
children: [/* @__PURE__ */
|
|
926
|
-
}), /* @__PURE__ */
|
|
1017
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.retry", "Retry")]
|
|
1018
|
+
}), /* @__PURE__ */ _("a", {
|
|
927
1019
|
href: `/vibecontrols/sessions/${e.sessionId}#connection-log`,
|
|
928
1020
|
className: "px-4 py-2 text-action-primary-text bg-action-primary-bg text-sm rounded-md hover:bg-action-primary-bg-hover transition-colors inline-flex items-center gap-2",
|
|
929
|
-
children: [/* @__PURE__ */
|
|
1021
|
+
children: [/* @__PURE__ */ g(f, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.seeConnectionLog", "See connection log")]
|
|
930
1022
|
})]
|
|
931
1023
|
})
|
|
932
1024
|
]
|
|
933
1025
|
})
|
|
934
1026
|
}),
|
|
935
|
-
!e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */
|
|
1027
|
+
!e.terminalUrl && !e.loading && !e.error && /* @__PURE__ */ g("div", {
|
|
936
1028
|
className: "flex items-center justify-center h-full",
|
|
937
|
-
children: /* @__PURE__ */
|
|
1029
|
+
children: /* @__PURE__ */ _("div", {
|
|
938
1030
|
className: "text-center",
|
|
939
1031
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ g(m, { className: "size-8 text-text-secondary mx-auto mb-3" }),
|
|
1033
|
+
/* @__PURE__ */ g("p", {
|
|
942
1034
|
className: "text-text-tertiary text-sm",
|
|
943
|
-
children:
|
|
1035
|
+
children: O("vibecontrols.sessions.terminal.noTerminalUrl", "No terminal URL available")
|
|
944
1036
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ g("p", {
|
|
946
1038
|
className: "text-text-secondary text-xs mt-1",
|
|
947
|
-
children:
|
|
1039
|
+
children: O("vibecontrols.sessions.terminal.agentNeedsTtyd", "The agent needs to start ttyd for this session")
|
|
948
1040
|
})
|
|
949
1041
|
]
|
|
950
1042
|
})
|
|
@@ -953,70 +1045,70 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
953
1045
|
}, e.sessionId);
|
|
954
1046
|
})]
|
|
955
1047
|
}),
|
|
956
|
-
(!v ||
|
|
1048
|
+
(!v || T) && l.length === 0 && T && /* @__PURE__ */ g("div", {
|
|
957
1049
|
className: "flex-1 bg-bg-sunken text-text-primary flex items-center justify-center",
|
|
958
|
-
children: /* @__PURE__ */
|
|
1050
|
+
children: /* @__PURE__ */ _("div", {
|
|
959
1051
|
className: "text-center max-w-md",
|
|
960
1052
|
children: [
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ g(m, { className: "size-12 text-text-secondary mx-auto mb-4" }),
|
|
1054
|
+
/* @__PURE__ */ g("p", {
|
|
963
1055
|
className: "text-text-secondary text-base font-medium mb-2",
|
|
964
|
-
children:
|
|
1056
|
+
children: O("vibecontrols.sessions.terminal.noTerminalsOpen", "No terminals open")
|
|
965
1057
|
}),
|
|
966
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ g("p", {
|
|
967
1059
|
className: "text-text-secondary text-sm mb-4",
|
|
968
|
-
children:
|
|
1060
|
+
children: O("vibecontrols.sessions.terminal.clickPlusTab", "Click the + tab above to create a new session or open an existing one")
|
|
969
1061
|
}),
|
|
970
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ g("div", {
|
|
971
1063
|
className: "flex items-center justify-center gap-2 flex-wrap",
|
|
972
|
-
children:
|
|
1064
|
+
children: w && /* @__PURE__ */ _("button", {
|
|
973
1065
|
type: "button",
|
|
974
|
-
onClick:
|
|
1066
|
+
onClick: w,
|
|
975
1067
|
className: "px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken/80 transition-colors inline-flex items-center gap-2",
|
|
976
|
-
children: [/* @__PURE__ */
|
|
1068
|
+
children: [/* @__PURE__ */ g(u, { className: "size-4" }), O("vibecontrols.sessions.terminal.newSession", "New Session")]
|
|
977
1069
|
})
|
|
978
1070
|
}),
|
|
979
|
-
Z.length > 0 && /* @__PURE__ */
|
|
1071
|
+
Z.length > 0 && /* @__PURE__ */ _("div", {
|
|
980
1072
|
className: "mt-6",
|
|
981
|
-
children: [/* @__PURE__ */
|
|
1073
|
+
children: [/* @__PURE__ */ g("p", {
|
|
982
1074
|
className: "text-text-secondary text-xs uppercase tracking-wider mb-3",
|
|
983
1075
|
children: "Or open an existing session"
|
|
984
|
-
}), /* @__PURE__ */
|
|
1076
|
+
}), /* @__PURE__ */ _("div", {
|
|
985
1077
|
className: "flex flex-col items-stretch gap-2 max-w-md mx-auto",
|
|
986
|
-
children: [Z.slice(0, 6).map((e) => /* @__PURE__ */
|
|
1078
|
+
children: [Z.slice(0, 6).map((e) => /* @__PURE__ */ _("div", {
|
|
987
1079
|
className: "flex items-center gap-2 px-3 py-2 bg-bg-canvas text-text-secondary text-xs rounded-md border border-border-default",
|
|
988
|
-
children: [/* @__PURE__ */
|
|
1080
|
+
children: [/* @__PURE__ */ _("button", {
|
|
989
1081
|
type: "button",
|
|
990
|
-
onClick: () =>
|
|
1082
|
+
onClick: () => Ce?.(e),
|
|
991
1083
|
className: "flex items-center gap-1.5 flex-1 min-w-0 text-left hover:text-text-primary transition-colors",
|
|
992
1084
|
title: `Open ${e.name}`,
|
|
993
1085
|
children: [
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ g(m, { className: "size-3 shrink-0" }),
|
|
1087
|
+
/* @__PURE__ */ g("span", {
|
|
996
1088
|
className: "truncate",
|
|
997
1089
|
children: e.name
|
|
998
1090
|
}),
|
|
999
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ g("span", {
|
|
1000
1092
|
className: `size-1.5 rounded-full shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text" : "bg-text-secondary"}`,
|
|
1001
1093
|
title: e.status
|
|
1002
1094
|
})
|
|
1003
1095
|
]
|
|
1004
|
-
}),
|
|
1096
|
+
}), C && e.status === "RUNNING" && /* @__PURE__ */ g("button", {
|
|
1005
1097
|
type: "button",
|
|
1006
1098
|
onClick: (t) => {
|
|
1007
|
-
t.stopPropagation(),
|
|
1099
|
+
t.stopPropagation(), Qe(e.id);
|
|
1008
1100
|
},
|
|
1009
|
-
disabled:
|
|
1101
|
+
disabled: z.has(e.id),
|
|
1010
1102
|
className: "inline-flex items-center justify-center size-6 rounded-md border border-status-error-bg/40 bg-status-error-bg/10 text-status-error-text hover:bg-status-error-bg/20 hover:border-status-error-bg/60 active:scale-95 transition-all shrink-0 disabled:opacity-60 disabled:cursor-not-allowed",
|
|
1011
|
-
title:
|
|
1012
|
-
"aria-label":
|
|
1013
|
-
"aria-busy":
|
|
1014
|
-
children:
|
|
1103
|
+
title: O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
1104
|
+
"aria-label": O("vibecontrols.sessions.terminal.stopSession", "Stop Session"),
|
|
1105
|
+
"aria-busy": z.has(e.id),
|
|
1106
|
+
children: z.has(e.id) ? /* @__PURE__ */ g(c, { className: "size-3 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3 fill-current" })
|
|
1015
1107
|
})]
|
|
1016
|
-
}, e.id)), Z.length > 6 && /* @__PURE__ */
|
|
1108
|
+
}, e.id)), Z.length > 6 && /* @__PURE__ */ _("button", {
|
|
1017
1109
|
type: "button",
|
|
1018
1110
|
onClick: () => {
|
|
1019
|
-
|
|
1111
|
+
j(!0), N("");
|
|
1020
1112
|
},
|
|
1021
1113
|
className: "text-text-tertiary text-xs self-center hover:text-text-primary transition-colors cursor-pointer",
|
|
1022
1114
|
children: [
|
|
@@ -1030,51 +1122,51 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
1030
1122
|
]
|
|
1031
1123
|
})
|
|
1032
1124
|
}),
|
|
1033
|
-
|
|
1034
|
-
ref:
|
|
1125
|
+
A && (w || Z.length > 0) && H.current && /* @__PURE__ */ _("div", {
|
|
1126
|
+
ref: U,
|
|
1035
1127
|
className: "fixed bg-bg-elevated border border-border-default rounded-md shadow-xl z-[100] w-[280px]",
|
|
1036
1128
|
style: {
|
|
1037
|
-
top:
|
|
1038
|
-
left: Math.min(
|
|
1129
|
+
top: H.current.getBoundingClientRect().bottom + 4,
|
|
1130
|
+
left: Math.min(H.current.getBoundingClientRect().left, window.innerWidth - 290)
|
|
1039
1131
|
},
|
|
1040
1132
|
children: [
|
|
1041
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ g("div", {
|
|
1042
1134
|
className: "p-2 border-b border-border-subtle",
|
|
1043
|
-
children: /* @__PURE__ */
|
|
1135
|
+
children: /* @__PURE__ */ _("div", {
|
|
1044
1136
|
className: "flex items-center gap-2 px-2 py-1.5 bg-bg-sunken rounded border border-border-subtle focus-within:border-border-strong",
|
|
1045
1137
|
children: [
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ g(ue, { className: "size-3.5 text-text-muted shrink-0" }),
|
|
1139
|
+
/* @__PURE__ */ g("input", {
|
|
1048
1140
|
"aria-label": "Search sessions...",
|
|
1049
|
-
ref:
|
|
1141
|
+
ref: We,
|
|
1050
1142
|
type: "text",
|
|
1051
|
-
value:
|
|
1052
|
-
onChange: (e) =>
|
|
1143
|
+
value: M,
|
|
1144
|
+
onChange: (e) => N(e.target.value),
|
|
1053
1145
|
placeholder: "Search sessions...",
|
|
1054
1146
|
className: "w-full bg-bg-surface/0 text-sm text-text-primary outline-none placeholder:text-text-placeholder"
|
|
1055
1147
|
}),
|
|
1056
|
-
|
|
1148
|
+
M && /* @__PURE__ */ g("button", {
|
|
1057
1149
|
type: "button",
|
|
1058
|
-
onClick: () =>
|
|
1150
|
+
onClick: () => N(""),
|
|
1059
1151
|
className: "text-text-muted hover:text-text-primary shrink-0",
|
|
1060
|
-
children: /* @__PURE__ */ h
|
|
1152
|
+
children: /* @__PURE__ */ g(h, { className: "size-3" })
|
|
1061
1153
|
})
|
|
1062
1154
|
]
|
|
1063
1155
|
})
|
|
1064
1156
|
}),
|
|
1065
|
-
|
|
1157
|
+
w && /* @__PURE__ */ _("button", {
|
|
1066
1158
|
type: "button",
|
|
1067
1159
|
onClick: () => {
|
|
1068
|
-
|
|
1160
|
+
w(), j(!1), N("");
|
|
1069
1161
|
},
|
|
1070
1162
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left font-medium",
|
|
1071
|
-
children: [/* @__PURE__ */
|
|
1163
|
+
children: [/* @__PURE__ */ g(u, { className: "size-3.5 text-text-secondary" }), /* @__PURE__ */ g("span", { children: O("vibecontrols.sessions.terminal.newSession", "New Session") })]
|
|
1072
1164
|
}),
|
|
1073
|
-
Z.length > 0 && /* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1165
|
+
Z.length > 0 && /* @__PURE__ */ _(me, { children: [
|
|
1166
|
+
/* @__PURE__ */ g("div", { className: "border-t border-border-subtle" }),
|
|
1167
|
+
/* @__PURE__ */ g("div", {
|
|
1076
1168
|
className: "px-3 pt-2 pb-1",
|
|
1077
|
-
children: /* @__PURE__ */
|
|
1169
|
+
children: /* @__PURE__ */ _("span", {
|
|
1078
1170
|
className: "text-[10px] font-medium uppercase tracking-wider text-text-muted",
|
|
1079
1171
|
children: [
|
|
1080
1172
|
"Open existing (",
|
|
@@ -1083,30 +1175,30 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
1083
1175
|
]
|
|
1084
1176
|
})
|
|
1085
1177
|
}),
|
|
1086
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ g("div", {
|
|
1087
1179
|
className: "max-h-48 overflow-y-auto pb-1",
|
|
1088
|
-
children:
|
|
1180
|
+
children: tt.length > 0 ? tt.map((e) => /* @__PURE__ */ _("button", {
|
|
1089
1181
|
type: "button",
|
|
1090
1182
|
onClick: () => {
|
|
1091
|
-
|
|
1183
|
+
Ce?.(e), j(!1), N("");
|
|
1092
1184
|
},
|
|
1093
1185
|
className: "flex items-center gap-2 w-full px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors text-left",
|
|
1094
1186
|
children: [
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ g(m, { className: "size-3.5 text-text-secondary shrink-0" }),
|
|
1188
|
+
/* @__PURE__ */ g("span", {
|
|
1097
1189
|
className: "truncate",
|
|
1098
1190
|
children: e.name
|
|
1099
1191
|
}),
|
|
1100
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ g("span", {
|
|
1101
1193
|
className: `ml-auto text-[10px] px-1.5 py-0.5 rounded shrink-0 ${e.status === "RUNNING" ? "bg-status-success-text/10 text-status-success-text" : e.status === "STOPPED" || e.status === "TERMINATED" ? "bg-text-secondary/10 text-text-tertiary" : "bg-status-warning-text/10 text-status-warning-text"}`,
|
|
1102
1194
|
children: e.status.toLowerCase()
|
|
1103
1195
|
})
|
|
1104
1196
|
]
|
|
1105
|
-
}, e.id)) : /* @__PURE__ */
|
|
1197
|
+
}, e.id)) : /* @__PURE__ */ _("div", {
|
|
1106
1198
|
className: "px-3 py-2 text-xs text-text-muted",
|
|
1107
1199
|
children: [
|
|
1108
1200
|
"No sessions matching “",
|
|
1109
|
-
|
|
1201
|
+
M,
|
|
1110
1202
|
"”"
|
|
1111
1203
|
]
|
|
1112
1204
|
})
|
|
@@ -1114,88 +1206,99 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
1114
1206
|
] })
|
|
1115
1207
|
]
|
|
1116
1208
|
}),
|
|
1117
|
-
|
|
1118
|
-
ref:
|
|
1209
|
+
P.visible && $ && /* @__PURE__ */ _("div", {
|
|
1210
|
+
ref: Ue,
|
|
1119
1211
|
className: "fixed bg-bg-elevated border border-border-default rounded-lg shadow-lg z-[100] min-w-[180px] py-1",
|
|
1120
1212
|
style: {
|
|
1121
|
-
top:
|
|
1122
|
-
left:
|
|
1213
|
+
top: P.y,
|
|
1214
|
+
left: P.x
|
|
1123
1215
|
},
|
|
1124
1216
|
children: [
|
|
1125
|
-
x && /* @__PURE__ */
|
|
1217
|
+
x && /* @__PURE__ */ _("button", {
|
|
1126
1218
|
type: "button",
|
|
1127
|
-
onClick: () =>
|
|
1219
|
+
onClick: () => dt($.sessionId),
|
|
1128
1220
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1129
|
-
children: [/* @__PURE__ */
|
|
1221
|
+
children: [/* @__PURE__ */ g(re, { className: "size-3.5" }), "Rename"]
|
|
1130
1222
|
}),
|
|
1131
|
-
$.terminalUrl && /* @__PURE__ */
|
|
1223
|
+
$.terminalUrl && /* @__PURE__ */ _("button", {
|
|
1132
1224
|
type: "button",
|
|
1133
1225
|
onClick: () => {
|
|
1134
|
-
|
|
1226
|
+
be($.sessionId), F((e) => ({
|
|
1135
1227
|
...e,
|
|
1136
1228
|
visible: !1
|
|
1137
1229
|
}));
|
|
1138
1230
|
},
|
|
1139
1231
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1140
|
-
children: [/* @__PURE__ */
|
|
1232
|
+
children: [/* @__PURE__ */ g(s, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.openInNewTab", "Open in New Tab")]
|
|
1141
1233
|
}),
|
|
1142
|
-
|
|
1234
|
+
S && /* @__PURE__ */ _("button", {
|
|
1143
1235
|
type: "button",
|
|
1144
1236
|
onClick: () => {
|
|
1145
|
-
|
|
1237
|
+
S($.sessionId), F((e) => ({
|
|
1146
1238
|
...e,
|
|
1147
1239
|
visible: !1
|
|
1148
1240
|
}));
|
|
1149
1241
|
},
|
|
1150
|
-
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-
|
|
1151
|
-
children: [/* @__PURE__ */
|
|
1242
|
+
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1243
|
+
children: [$.pinned ? /* @__PURE__ */ g(le, { className: "size-3.5" }) : /* @__PURE__ */ g(ce, { className: "size-3.5" }), $.pinned ? O("vibecontrols.sessions.terminal.unpinTab", "Unpin Tab") : O("vibecontrols.sessions.terminal.pinTab", "Pin Tab")]
|
|
1244
|
+
}),
|
|
1245
|
+
$.terminalUrl && /* @__PURE__ */ _("button", {
|
|
1246
|
+
type: "button",
|
|
1247
|
+
onClick: () => {
|
|
1248
|
+
Q($.sessionId), F((e) => ({
|
|
1249
|
+
...e,
|
|
1250
|
+
visible: !1
|
|
1251
|
+
}));
|
|
1252
|
+
},
|
|
1253
|
+
className: `flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-bg-sunken transition-colors ${B[$.sessionId] === "error" ? "text-status-warning-text" : "text-text-primary"}`,
|
|
1254
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.reconnect", "Reconnect")]
|
|
1152
1255
|
}),
|
|
1153
|
-
|
|
1256
|
+
Te && /* @__PURE__ */ _("button", {
|
|
1154
1257
|
type: "button",
|
|
1155
1258
|
onClick: () => {
|
|
1156
|
-
|
|
1259
|
+
Te($.sessionId), F((e) => ({
|
|
1157
1260
|
...e,
|
|
1158
1261
|
visible: !1
|
|
1159
1262
|
}));
|
|
1160
1263
|
},
|
|
1161
1264
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1162
|
-
children: [/* @__PURE__ */
|
|
1265
|
+
children: [/* @__PURE__ */ g(d, { className: "size-3.5" }), "Restart Terminal"]
|
|
1163
1266
|
}),
|
|
1164
|
-
|
|
1267
|
+
we && /* @__PURE__ */ _("button", {
|
|
1165
1268
|
type: "button",
|
|
1166
1269
|
onClick: () => {
|
|
1167
|
-
|
|
1270
|
+
we($.sessionId), F((e) => ({
|
|
1168
1271
|
...e,
|
|
1169
1272
|
visible: !1
|
|
1170
1273
|
}));
|
|
1171
1274
|
},
|
|
1172
1275
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
1173
|
-
children: [/* @__PURE__ */
|
|
1276
|
+
children: [/* @__PURE__ */ g(p, { className: "size-3.5" }), "Stop Terminal"]
|
|
1174
1277
|
}),
|
|
1175
|
-
|
|
1278
|
+
C && /* @__PURE__ */ _("button", {
|
|
1176
1279
|
type: "button",
|
|
1177
1280
|
onClick: () => {
|
|
1178
|
-
|
|
1281
|
+
Qe($.sessionId), F((e) => ({
|
|
1179
1282
|
...e,
|
|
1180
1283
|
visible: !1
|
|
1181
1284
|
}));
|
|
1182
1285
|
},
|
|
1183
|
-
disabled:
|
|
1286
|
+
disabled: z.has($.sessionId),
|
|
1184
1287
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg/15 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
|
|
1185
|
-
"aria-busy":
|
|
1186
|
-
children: [
|
|
1288
|
+
"aria-busy": z.has($.sessionId),
|
|
1289
|
+
children: [z.has($.sessionId) ? /* @__PURE__ */ g(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ g(p, { className: "size-3.5 fill-current" }), z.has($.sessionId) ? O("vibecontrols.sessions.terminal.stoppingSession", "Stopping…") : O("vibecontrols.sessions.terminal.stopSession", "Stop Session")]
|
|
1187
1290
|
}),
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ g("div", { className: "border-t border-border-subtle my-1" }),
|
|
1292
|
+
/* @__PURE__ */ _("button", {
|
|
1190
1293
|
type: "button",
|
|
1191
1294
|
onClick: () => {
|
|
1192
|
-
|
|
1295
|
+
ye($.sessionId), F((e) => ({
|
|
1193
1296
|
...e,
|
|
1194
1297
|
visible: !1
|
|
1195
1298
|
}));
|
|
1196
1299
|
},
|
|
1197
1300
|
className: "flex items-center gap-2 w-full px-3 py-2 text-sm text-status-error-text hover:bg-bg-sunken transition-colors",
|
|
1198
|
-
children: [/* @__PURE__ */ h
|
|
1301
|
+
children: [/* @__PURE__ */ g(h, { className: "size-3.5" }), O("vibecontrols.sessions.terminal.closeTab", "Close Tab")]
|
|
1199
1302
|
})
|
|
1200
1303
|
]
|
|
1201
1304
|
})
|
|
@@ -1203,6 +1306,6 @@ function _({ tabs: _, activeTabId: me, onTabSelect: he, onTabClose: ge, onOpenEx
|
|
|
1203
1306
|
});
|
|
1204
1307
|
}
|
|
1205
1308
|
//#endregion
|
|
1206
|
-
export {
|
|
1309
|
+
export { _e as TerminalPanel };
|
|
1207
1310
|
|
|
1208
1311
|
//# sourceMappingURL=TerminalPanel.js.map
|