@burdenoff/microfe-vibecontrols 2026.801.1 → 2026.813.1
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/agents/AgentForm.js +164 -128
- package/dist/components/agents/AgentForm.js.map +1 -1
- package/dist/components/notes/NoteCard.js +10 -26
- package/dist/components/notes/NoteCard.js.map +1 -1
- package/dist/components/notes/NoteList.js +27 -44
- package/dist/components/notes/NoteList.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +179 -194
- package/dist/components/notes/NotesTabPanel.js.map +1 -1
- package/dist/pages/AgentsPage.js +339 -315
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/utils/onboardingUtils.js +27 -0
- package/dist/utils/onboardingUtils.js.map +1 -0
- package/package.json +2 -2
|
@@ -6,14 +6,15 @@ import { SearchableSelect as te } from "../shared/SearchableSelect.js";
|
|
|
6
6
|
import { MotionTabPanel as ne } from "../shared/MotionTabPanel.js";
|
|
7
7
|
import { useField as i } from "../../shared/hooks/useField.js";
|
|
8
8
|
import "../shared/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { isOnboardingTimeout as re } from "../../utils/onboardingUtils.js";
|
|
10
|
+
import { useCallback as ie, useEffect as ae, useRef as oe, useState as a } from "react";
|
|
11
|
+
import { Check as se, CheckCircle2 as ce, ChevronDown as le, ChevronLeft as ue, ChevronRight as o, Copy as de, Download as fe, Eye as pe, EyeOff as me, Loader2 as s, Plus as he, RefreshCw as ge, Settings2 as _e, Terminal as ve, XCircle as c } from "lucide-react";
|
|
11
12
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
12
|
-
import { Button as f, Input as p, ResponsiveDialog as
|
|
13
|
+
import { Button as f, Input as p, ResponsiveDialog as ye, ResponsiveDialogContent as be, ResponsiveDialogDescription as xe, ResponsiveDialogFooter as Se, ResponsiveDialogHeader as Ce, ResponsiveDialogTitle as we, Select as Te, SelectContent as Ee, SelectItem as m, SelectTrigger as De, SelectValue as Oe, Stepper as ke } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/components/agents/AgentForm.tsx
|
|
14
|
-
function
|
|
15
|
-
let y = t(), [b, x] = a("details"), [S,
|
|
16
|
-
|
|
15
|
+
function Ae({ onSubmit: Ae, onCancel: h, isLoading: g, onNavigate: je, targets: _, targetsLoading: Me, onCreateTarget: v, extraSection: Ne }) {
|
|
16
|
+
let y = t(), [b, x] = a("details"), [S, Pe] = a(!1), [C, Fe] = a(!1), [Ie, Le] = a(null), [w, T] = a(""), [E, Re] = a(!1), [D, ze] = a(""), [O, Be] = a(""), [k, Ve] = a("");
|
|
17
|
+
ae(() => {
|
|
17
18
|
if (E || !k) return;
|
|
18
19
|
let e = (_ ?? []).find((e) => e.id === k);
|
|
19
20
|
e?.name && T(e.name);
|
|
@@ -22,17 +23,17 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
22
23
|
_,
|
|
23
24
|
E
|
|
24
25
|
]);
|
|
25
|
-
let [A, j] = a(!1), [M, N] = a(""), [P,
|
|
26
|
-
navigator.clipboard.writeText(e),
|
|
27
|
-
}, []),
|
|
26
|
+
let [A, j] = a(!1), [M, N] = a(""), [P, He] = a(!1), [F, I] = a(null), [L, Ue] = a(!1), [R, z] = a(null), [B, V] = a(null), [We, Ge] = a(""), [Ke, qe] = a("linux"), [Je, Ye] = a("x86_64"), [Xe, Ze] = a("1.0.0"), [Qe, H] = a(null), [$e, U] = a(!1), [W, et] = a(!1), [tt, nt] = a("default"), G = "visible", K = i({ hint: G }), q = i({ error: F }), J = i({ hint: G }), Y = i({ hint: G }), X = i({ hint: G }), rt = i(), it = i(), at = ie((e, t) => {
|
|
27
|
+
navigator.clipboard.writeText(e), Le(t), setTimeout(() => Le(null), 2e3);
|
|
28
|
+
}, []), ot = (e) => {
|
|
28
29
|
let t = e.trim();
|
|
29
30
|
return t.endsWith("/") && (t = t.slice(0, -1)), t;
|
|
30
|
-
}, [
|
|
31
|
-
let e =
|
|
31
|
+
}, [st] = e({ fetchPolicy: "network-only" }), ct = async () => {
|
|
32
|
+
let e = ot(D);
|
|
32
33
|
if (e) {
|
|
33
|
-
|
|
34
|
+
Ue(!0), z(null), V(null);
|
|
34
35
|
try {
|
|
35
|
-
let { data: t, error: n } = await
|
|
36
|
+
let { data: t, error: n } = await st({ variables: {
|
|
36
37
|
url: e,
|
|
37
38
|
agentApiKey: O || null
|
|
38
39
|
} }), r = t?.probeAgentTunnel;
|
|
@@ -55,7 +56,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
55
56
|
} : {
|
|
56
57
|
ok: !1,
|
|
57
58
|
error: r.healthError ?? "Health check failed"
|
|
58
|
-
}), r.agentVersion &&
|
|
59
|
+
}), r.agentVersion && Ze(r.agentVersion), V(r.identityOk ? {
|
|
59
60
|
ok: !0,
|
|
60
61
|
data: {
|
|
61
62
|
hostname: r.hostname ?? "",
|
|
@@ -65,7 +66,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
65
66
|
} : {
|
|
66
67
|
ok: !1,
|
|
67
68
|
error: r.identityError ?? "Identity check failed"
|
|
68
|
-
}), r.identityOk && (r.platform &&
|
|
69
|
+
}), r.identityOk && (r.platform && qe(r.platform), r.architecture && Ye(r.architecture), r.hostname && (Ge(r.hostname), !E && !k && T(r.hostname)));
|
|
69
70
|
} catch (e) {
|
|
70
71
|
let t = e instanceof Error ? e.message : "Probe failed";
|
|
71
72
|
z({
|
|
@@ -76,94 +77,103 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
76
77
|
error: t
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
|
|
80
|
+
Ue(!1);
|
|
80
81
|
}
|
|
81
|
-
},
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
let e =
|
|
85
|
-
name: w ||
|
|
86
|
-
hostname:
|
|
87
|
-
platform:
|
|
88
|
-
architecture:
|
|
89
|
-
version:
|
|
90
|
-
tunnelUrl:
|
|
82
|
+
}, Z = oe(!1), lt = async () => {
|
|
83
|
+
if (Z.current) return;
|
|
84
|
+
Z.current = !0, H(null), U(!1);
|
|
85
|
+
let e = tt.trim() || "default", t = {
|
|
86
|
+
name: w || We || "Unnamed Agent",
|
|
87
|
+
hostname: We || "unknown",
|
|
88
|
+
platform: Ke,
|
|
89
|
+
architecture: Je,
|
|
90
|
+
version: Xe,
|
|
91
|
+
tunnelUrl: ot(D),
|
|
91
92
|
tunnelStatus: "ACTIVE",
|
|
92
93
|
agentApiKey: O,
|
|
93
94
|
metadata: { profile: e },
|
|
94
95
|
...k ? { targetId: k } : {}
|
|
95
96
|
};
|
|
96
97
|
try {
|
|
97
|
-
let e =
|
|
98
|
-
if (
|
|
98
|
+
let e = await Ae(t);
|
|
99
|
+
if (e && "pending" in e && e.pending) {
|
|
100
|
+
U(!0);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let n = (e && "id" in e ? e.id : null) || null;
|
|
104
|
+
if (!n) {
|
|
99
105
|
H("Agent creation returned no ID. The agent may already exist.");
|
|
100
106
|
return;
|
|
101
107
|
}
|
|
102
|
-
|
|
108
|
+
je ? je(`/agents/${n}`) : h();
|
|
103
109
|
} catch (e) {
|
|
110
|
+
if (re(e)) {
|
|
111
|
+
U(!0);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
104
114
|
H(e instanceof Error ? e.message : "Failed to create agent");
|
|
105
115
|
} finally {
|
|
106
|
-
|
|
116
|
+
Z.current = !1;
|
|
107
117
|
}
|
|
108
|
-
},
|
|
118
|
+
}, ut = R?.ok && B?.ok, Q = _ && _.length > 0, dt = (v || Q) && k.length === 0, ft = D.trim().length > 0 && !dt, pt = ie(async () => {
|
|
109
119
|
if (!(!v || !M.trim())) {
|
|
110
|
-
|
|
120
|
+
He(!0), I(null);
|
|
111
121
|
try {
|
|
112
122
|
let e = await v(M.trim());
|
|
113
|
-
e ? (
|
|
123
|
+
e ? (Ve(e.id), j(!1), N("")) : r() ? (j(!1), N("")) : I(y("agentsPage.inlineTargetFailed", "Failed to create target. Please try again."));
|
|
114
124
|
} catch (e) {
|
|
115
125
|
n(e) ? (j(!1), N("")) : I(e instanceof Error ? e.message : "Failed to create target");
|
|
116
126
|
} finally {
|
|
117
|
-
|
|
127
|
+
He(!1);
|
|
118
128
|
}
|
|
119
129
|
}
|
|
120
130
|
}, [
|
|
121
131
|
v,
|
|
122
132
|
M,
|
|
123
133
|
y
|
|
124
|
-
]),
|
|
125
|
-
let n =
|
|
134
|
+
]), mt = (e, t) => {
|
|
135
|
+
let n = Ie === t;
|
|
126
136
|
return /* @__PURE__ */ u(f, {
|
|
127
137
|
type: "button",
|
|
128
138
|
variant: "ghost",
|
|
129
139
|
size: "icon-sm",
|
|
130
|
-
onClick: () =>
|
|
140
|
+
onClick: () => at(e, t),
|
|
131
141
|
"aria-label": n ? y("agentsPage.copied", "Copied") : y("agentsPage.copy", "Copy"),
|
|
132
142
|
className: "shrink-0",
|
|
133
|
-
children: n ? /* @__PURE__ */ u(
|
|
143
|
+
children: n ? /* @__PURE__ */ u(se, {
|
|
134
144
|
className: "size-3.5 text-status-success-text",
|
|
135
145
|
"aria-hidden": "true"
|
|
136
|
-
}) : /* @__PURE__ */ u(
|
|
146
|
+
}) : /* @__PURE__ */ u(de, {
|
|
137
147
|
className: "size-3.5 text-text-secondary",
|
|
138
148
|
"aria-hidden": "true"
|
|
139
149
|
})
|
|
140
150
|
});
|
|
141
|
-
},
|
|
151
|
+
}, $ = /* @__PURE__ */ d("span", {
|
|
142
152
|
"aria-hidden": "true",
|
|
143
153
|
className: "text-status-error-text",
|
|
144
154
|
children: [" ", "*"]
|
|
145
|
-
}),
|
|
155
|
+
}), ht = [{
|
|
146
156
|
key: "details",
|
|
147
157
|
label: y("agentsPage.stepSetup", "Setup")
|
|
148
158
|
}, {
|
|
149
159
|
key: "validate",
|
|
150
160
|
label: y("agentsPage.stepValidate", "Validate")
|
|
151
|
-
}],
|
|
152
|
-
return /* @__PURE__ */ u(
|
|
161
|
+
}], gt = ht.findIndex((e) => e.key === b);
|
|
162
|
+
return /* @__PURE__ */ u(ye, {
|
|
153
163
|
open: !0,
|
|
154
164
|
onOpenChange: (e) => {
|
|
155
165
|
!e && !g && h();
|
|
156
166
|
},
|
|
157
|
-
children: /* @__PURE__ */ d(
|
|
167
|
+
children: /* @__PURE__ */ d(be, {
|
|
158
168
|
className: "sm:max-w-xl md:max-h-[min(90vh,52rem)] md:overflow-y-auto",
|
|
159
169
|
onPointerDownOutside: (e) => e.preventDefault(),
|
|
160
170
|
children: [
|
|
161
|
-
/* @__PURE__ */ d(
|
|
162
|
-
/* @__PURE__ */ u(
|
|
163
|
-
steps:
|
|
164
|
-
active:
|
|
171
|
+
/* @__PURE__ */ d(Ce, { children: [/* @__PURE__ */ u(we, { children: y("agentsPage.addNewAgent", "Add New Agent") }), /* @__PURE__ */ u(xe, { children: y("agentsPage.addNewAgentDescription", "Connect a running vibe agent to this workspace.") })] }),
|
|
172
|
+
/* @__PURE__ */ u(ke, {
|
|
173
|
+
steps: ht,
|
|
174
|
+
active: gt,
|
|
165
175
|
onStepClick: (e) => {
|
|
166
|
-
let t =
|
|
176
|
+
let t = ht[e];
|
|
167
177
|
t && x(t.key === "validate" ? "validate" : "details");
|
|
168
178
|
}
|
|
169
179
|
}),
|
|
@@ -176,12 +186,12 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
176
186
|
className: "border border-border-default rounded-lg overflow-hidden",
|
|
177
187
|
children: [/* @__PURE__ */ d("button", {
|
|
178
188
|
type: "button",
|
|
179
|
-
onClick: () =>
|
|
189
|
+
onClick: () => Fe(!C),
|
|
180
190
|
"aria-expanded": C,
|
|
181
191
|
className: "w-full flex items-center justify-between px-4 py-3 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
182
192
|
children: [/* @__PURE__ */ d("div", {
|
|
183
193
|
className: "flex items-center gap-2",
|
|
184
|
-
children: [/* @__PURE__ */ u(
|
|
194
|
+
children: [/* @__PURE__ */ u(fe, {
|
|
185
195
|
className: "size-4 text-text-secondary",
|
|
186
196
|
"aria-hidden": "true"
|
|
187
197
|
}), /* @__PURE__ */ u("span", {
|
|
@@ -207,7 +217,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
207
217
|
}), /* @__PURE__ */ d("div", {
|
|
208
218
|
className: "flex items-center gap-2 bg-bg-sunken rounded-md px-3 py-1.5 font-mono text-xs text-text-primary",
|
|
209
219
|
children: [
|
|
210
|
-
/* @__PURE__ */ u(
|
|
220
|
+
/* @__PURE__ */ u(ve, {
|
|
211
221
|
className: "size-3 text-text-muted flex-shrink-0",
|
|
212
222
|
"aria-hidden": "true"
|
|
213
223
|
}),
|
|
@@ -215,7 +225,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
215
225
|
className: "flex-1 min-w-0 break-words",
|
|
216
226
|
children: "vibe start"
|
|
217
227
|
}),
|
|
218
|
-
|
|
228
|
+
mt("vibe start", "vibe start")
|
|
219
229
|
]
|
|
220
230
|
})] }),
|
|
221
231
|
/* @__PURE__ */ u("p", {
|
|
@@ -228,23 +238,23 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
228
238
|
}),
|
|
229
239
|
/* @__PURE__ */ d("div", { children: [
|
|
230
240
|
/* @__PURE__ */ u("label", {
|
|
231
|
-
htmlFor:
|
|
241
|
+
htmlFor: K.id,
|
|
232
242
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
233
243
|
children: y("agentsPage.name", "Name")
|
|
234
244
|
}),
|
|
235
245
|
/* @__PURE__ */ u(p, {
|
|
236
|
-
...
|
|
246
|
+
...K.inputProps,
|
|
237
247
|
type: "text",
|
|
238
248
|
value: w,
|
|
239
249
|
onChange: (e) => {
|
|
240
|
-
T(e.target.value),
|
|
250
|
+
T(e.target.value), Re(!0);
|
|
241
251
|
},
|
|
242
252
|
placeholder: y("agentsPage.namePlaceholderUpfront", "My laptop, prod jump-host, …"),
|
|
243
253
|
className: "text-base md:text-sm",
|
|
244
254
|
"data-testid": "agent-form-name-input"
|
|
245
255
|
}),
|
|
246
256
|
/* @__PURE__ */ u("p", {
|
|
247
|
-
id:
|
|
257
|
+
id: K.hintId,
|
|
248
258
|
className: "mt-1.5 text-xs text-text-muted",
|
|
249
259
|
children: y("agentsPage.nameHint", "How this agent shows up in the UI. Defaults to the target's name (or the machine's hostname after Validate) — leave blank to accept the autogen.")
|
|
250
260
|
})
|
|
@@ -252,9 +262,9 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
252
262
|
/* @__PURE__ */ d("div", { children: [
|
|
253
263
|
/* @__PURE__ */ d("span", {
|
|
254
264
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
255
|
-
children: [y("agentsPage.target", "Target"),
|
|
265
|
+
children: [y("agentsPage.target", "Target"), $]
|
|
256
266
|
}),
|
|
257
|
-
|
|
267
|
+
Q && !A && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(te, {
|
|
258
268
|
placeholder: y("agentsPage.selectTarget", "Select a target..."),
|
|
259
269
|
searchPlaceholder: y("agentsPage.searchTargets", "Search targets..."),
|
|
260
270
|
options: (_ ?? []).map((e) => ({
|
|
@@ -263,7 +273,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
263
273
|
description: `${e.type}${e.status ? ` · ${e.status}` : ""}`
|
|
264
274
|
})),
|
|
265
275
|
value: k,
|
|
266
|
-
onChange:
|
|
276
|
+
onChange: Ve,
|
|
267
277
|
clearable: !0
|
|
268
278
|
}), /* @__PURE__ */ d("p", {
|
|
269
279
|
className: "mt-1.5 text-xs text-text-muted",
|
|
@@ -276,14 +286,14 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
276
286
|
j(!0), N(w.trim() || "");
|
|
277
287
|
},
|
|
278
288
|
className: "text-text-link hover:text-text-linkHover hover:underline inline-flex items-center gap-1 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
279
|
-
children: [/* @__PURE__ */ u(
|
|
289
|
+
children: [/* @__PURE__ */ u(he, {
|
|
280
290
|
className: "size-3",
|
|
281
291
|
"aria-hidden": "true"
|
|
282
292
|
}), y("agentsPage.createNewTarget", "Create a new target")]
|
|
283
293
|
})
|
|
284
294
|
]
|
|
285
295
|
})] }),
|
|
286
|
-
!
|
|
296
|
+
!Q && !Me && v && !A && /* @__PURE__ */ d("div", {
|
|
287
297
|
className: "p-3 bg-bg-sunken border border-border-default rounded-lg",
|
|
288
298
|
children: [/* @__PURE__ */ u("p", {
|
|
289
299
|
className: "text-sm text-text-secondary mb-2",
|
|
@@ -294,7 +304,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
294
304
|
onClick: () => {
|
|
295
305
|
j(!0), N(w.trim() || "");
|
|
296
306
|
},
|
|
297
|
-
children: [/* @__PURE__ */ u(
|
|
307
|
+
children: [/* @__PURE__ */ u(he, {
|
|
298
308
|
className: "size-4",
|
|
299
309
|
"aria-hidden": "true"
|
|
300
310
|
}), y("agentsPage.createFirstTarget", "Create first target")]
|
|
@@ -309,23 +319,23 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
309
319
|
}),
|
|
310
320
|
/* @__PURE__ */ d("div", { children: [
|
|
311
321
|
/* @__PURE__ */ u("label", {
|
|
312
|
-
htmlFor:
|
|
322
|
+
htmlFor: q.id,
|
|
313
323
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
314
324
|
children: y("agentsPage.targetName", "Target name")
|
|
315
325
|
}),
|
|
316
326
|
/* @__PURE__ */ u(p, {
|
|
317
|
-
...
|
|
327
|
+
...q.inputProps,
|
|
318
328
|
type: "text",
|
|
319
329
|
value: M,
|
|
320
330
|
onChange: (e) => N(e.target.value),
|
|
321
331
|
placeholder: y("agentsPage.targetName", "Target name"),
|
|
322
332
|
className: "text-base md:text-sm",
|
|
323
333
|
onKeyDown: (e) => {
|
|
324
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
334
|
+
e.key === "Enter" && (e.preventDefault(), pt());
|
|
325
335
|
}
|
|
326
336
|
}),
|
|
327
337
|
F && /* @__PURE__ */ u("p", {
|
|
328
|
-
id:
|
|
338
|
+
id: q.errorId,
|
|
329
339
|
role: "alert",
|
|
330
340
|
className: "mt-1.5 text-sm text-status-error-text",
|
|
331
341
|
children: F
|
|
@@ -336,13 +346,13 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
336
346
|
children: [/* @__PURE__ */ d(f, {
|
|
337
347
|
type: "button",
|
|
338
348
|
size: "sm",
|
|
339
|
-
onClick: () => void
|
|
349
|
+
onClick: () => void pt(),
|
|
340
350
|
disabled: !M.trim() || P,
|
|
341
351
|
"aria-busy": P,
|
|
342
352
|
children: [P ? /* @__PURE__ */ u(s, {
|
|
343
353
|
className: "size-3.5 animate-spin",
|
|
344
354
|
"aria-hidden": "true"
|
|
345
|
-
}) : /* @__PURE__ */ u(
|
|
355
|
+
}) : /* @__PURE__ */ u(se, {
|
|
346
356
|
className: "size-3.5",
|
|
347
357
|
"aria-hidden": "true"
|
|
348
358
|
}), y("agentsPage.create", "Create")]
|
|
@@ -358,7 +368,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
358
368
|
})
|
|
359
369
|
]
|
|
360
370
|
}),
|
|
361
|
-
|
|
371
|
+
Me && !Q && /* @__PURE__ */ d("div", {
|
|
362
372
|
role: "status",
|
|
363
373
|
className: "p-3 bg-bg-sunken border border-border-default rounded-lg flex items-center gap-2 text-sm text-text-secondary",
|
|
364
374
|
children: [/* @__PURE__ */ u(s, {
|
|
@@ -369,38 +379,38 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
369
379
|
] }),
|
|
370
380
|
/* @__PURE__ */ d("div", { children: [
|
|
371
381
|
/* @__PURE__ */ d("label", {
|
|
372
|
-
htmlFor:
|
|
382
|
+
htmlFor: J.id,
|
|
373
383
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
374
|
-
children: [y("agentsPage.apiTunnelUrl", "API / Tunnel URL"),
|
|
384
|
+
children: [y("agentsPage.apiTunnelUrl", "API / Tunnel URL"), $]
|
|
375
385
|
}),
|
|
376
386
|
/* @__PURE__ */ u(p, {
|
|
377
|
-
...
|
|
387
|
+
...J.inputProps,
|
|
378
388
|
type: "url",
|
|
379
389
|
value: D,
|
|
380
|
-
onChange: (e) =>
|
|
390
|
+
onChange: (e) => ze(e.target.value),
|
|
381
391
|
placeholder: "https://your-tunnel.trycloudflare.com",
|
|
382
392
|
"aria-required": "true",
|
|
383
393
|
className: "text-base md:text-sm font-mono"
|
|
384
394
|
}),
|
|
385
395
|
/* @__PURE__ */ u("p", {
|
|
386
|
-
id:
|
|
396
|
+
id: J.hintId,
|
|
387
397
|
className: "mt-1.5 text-xs text-text-muted",
|
|
388
398
|
children: y("agentsPage.tunnelUrlHint", "The agent's tunnel URL or local API URL (e.g. http://localhost:3005)")
|
|
389
399
|
})
|
|
390
400
|
] }),
|
|
391
401
|
/* @__PURE__ */ d("div", { children: [
|
|
392
402
|
/* @__PURE__ */ d("label", {
|
|
393
|
-
htmlFor:
|
|
403
|
+
htmlFor: Y.id,
|
|
394
404
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
395
|
-
children: [y("agentsPage.agentApiKey", "Agent API Key"),
|
|
405
|
+
children: [y("agentsPage.agentApiKey", "Agent API Key"), $]
|
|
396
406
|
}),
|
|
397
407
|
/* @__PURE__ */ d("div", {
|
|
398
408
|
className: "relative",
|
|
399
409
|
children: [/* @__PURE__ */ u(p, {
|
|
400
|
-
...
|
|
410
|
+
...Y.inputProps,
|
|
401
411
|
type: S ? "text" : "password",
|
|
402
412
|
value: O,
|
|
403
|
-
onChange: (e) =>
|
|
413
|
+
onChange: (e) => Be(e.target.value),
|
|
404
414
|
placeholder: "vcak_...",
|
|
405
415
|
"aria-required": "true",
|
|
406
416
|
className: "pr-10 text-base md:text-sm font-mono"
|
|
@@ -408,18 +418,18 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
408
418
|
type: "button",
|
|
409
419
|
variant: "ghost",
|
|
410
420
|
size: "icon-sm",
|
|
411
|
-
onClick: () =>
|
|
421
|
+
onClick: () => Pe(!S),
|
|
412
422
|
"aria-label": S ? y("agentsPage.hideApiKey", "Hide API key") : y("agentsPage.showApiKey", "Show API key"),
|
|
413
423
|
"aria-pressed": S,
|
|
414
424
|
className: "absolute right-1 top-1/2 -translate-y-1/2",
|
|
415
|
-
children: u(S ?
|
|
425
|
+
children: u(S ? me : pe, {
|
|
416
426
|
className: "size-4 text-text-secondary",
|
|
417
427
|
"aria-hidden": "true"
|
|
418
428
|
})
|
|
419
429
|
})]
|
|
420
430
|
}),
|
|
421
431
|
/* @__PURE__ */ d("p", {
|
|
422
|
-
id:
|
|
432
|
+
id: Y.hintId,
|
|
423
433
|
className: "mt-1.5 text-xs text-text-muted",
|
|
424
434
|
children: [
|
|
425
435
|
y("agentsPage.apiKeyHint", "Run"),
|
|
@@ -437,53 +447,53 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
437
447
|
className: "border border-border-default rounded-lg overflow-hidden",
|
|
438
448
|
children: [/* @__PURE__ */ d("button", {
|
|
439
449
|
type: "button",
|
|
440
|
-
onClick: () =>
|
|
450
|
+
onClick: () => et((e) => !e),
|
|
441
451
|
className: "w-full flex items-center justify-between px-4 py-2.5 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
442
|
-
"aria-expanded":
|
|
452
|
+
"aria-expanded": W,
|
|
443
453
|
"data-testid": "agent-form-advanced-toggle",
|
|
444
454
|
children: [/* @__PURE__ */ d("div", {
|
|
445
455
|
className: "flex items-center gap-2",
|
|
446
|
-
children: [/* @__PURE__ */ u(
|
|
456
|
+
children: [/* @__PURE__ */ u(_e, {
|
|
447
457
|
className: "size-4 text-text-secondary",
|
|
448
458
|
"aria-hidden": "true"
|
|
449
459
|
}), /* @__PURE__ */ u("span", {
|
|
450
460
|
className: "text-sm font-medium text-text-primary",
|
|
451
461
|
children: y("agentsPage.advancedOptions", "Advanced options")
|
|
452
462
|
})]
|
|
453
|
-
}), /* @__PURE__ */ u(
|
|
463
|
+
}), /* @__PURE__ */ u(le, {
|
|
454
464
|
"aria-hidden": "true",
|
|
455
|
-
className: `size-4 text-text-secondary transition-transform ${
|
|
465
|
+
className: `size-4 text-text-secondary transition-transform ${W ? "rotate-180" : ""}`
|
|
456
466
|
})]
|
|
457
|
-
}),
|
|
467
|
+
}), W && /* @__PURE__ */ u("div", {
|
|
458
468
|
className: "px-4 py-3 space-y-3 border-t border-border-default",
|
|
459
469
|
children: /* @__PURE__ */ d("div", { children: [
|
|
460
470
|
/* @__PURE__ */ u("label", {
|
|
461
|
-
htmlFor:
|
|
471
|
+
htmlFor: X.id,
|
|
462
472
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
463
473
|
children: y("agentsPage.profileName", "Profile name")
|
|
464
474
|
}),
|
|
465
475
|
/* @__PURE__ */ u(p, {
|
|
466
|
-
...
|
|
476
|
+
...X.inputProps,
|
|
467
477
|
type: "text",
|
|
468
|
-
value:
|
|
469
|
-
onChange: (e) =>
|
|
478
|
+
value: tt,
|
|
479
|
+
onChange: (e) => nt(e.target.value),
|
|
470
480
|
placeholder: "default",
|
|
471
481
|
className: "text-base md:text-sm font-mono",
|
|
472
482
|
"data-testid": "agent-form-profile-input"
|
|
473
483
|
}),
|
|
474
484
|
/* @__PURE__ */ u("p", {
|
|
475
|
-
id:
|
|
485
|
+
id: X.hintId,
|
|
476
486
|
className: "mt-1.5 text-xs text-text-muted",
|
|
477
487
|
children: y("agentsPage.profileNameHint", "Each profile runs an isolated CLI on the daemon. Leave as \"default\" unless you want this agent to host multiple parallel profiles.")
|
|
478
488
|
})
|
|
479
489
|
] })
|
|
480
490
|
})]
|
|
481
491
|
}),
|
|
482
|
-
|
|
492
|
+
Ne && /* @__PURE__ */ u("div", {
|
|
483
493
|
className: "border-t border-border-default pt-4 mt-4",
|
|
484
|
-
children:
|
|
494
|
+
children: Ne
|
|
485
495
|
}),
|
|
486
|
-
/* @__PURE__ */ d(
|
|
496
|
+
/* @__PURE__ */ d(Se, {
|
|
487
497
|
className: "pt-2",
|
|
488
498
|
children: [/* @__PURE__ */ u(f, {
|
|
489
499
|
type: "button",
|
|
@@ -492,9 +502,9 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
492
502
|
children: y("agentsPage.cancel", "Cancel")
|
|
493
503
|
}), /* @__PURE__ */ d(f, {
|
|
494
504
|
type: "button",
|
|
495
|
-
disabled: !
|
|
505
|
+
disabled: !ft,
|
|
496
506
|
onClick: () => {
|
|
497
|
-
x("validate"),
|
|
507
|
+
x("validate"), ct();
|
|
498
508
|
},
|
|
499
509
|
children: [y("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ u(o, {
|
|
500
510
|
className: "size-4",
|
|
@@ -514,7 +524,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
514
524
|
children: [L && !R ? /* @__PURE__ */ u(s, {
|
|
515
525
|
className: "size-5 text-text-secondary animate-spin",
|
|
516
526
|
"aria-hidden": "true"
|
|
517
|
-
}) : R?.ok ? /* @__PURE__ */ u(
|
|
527
|
+
}) : R?.ok ? /* @__PURE__ */ u(ce, {
|
|
518
528
|
className: "size-5 text-status-success-text",
|
|
519
529
|
"aria-hidden": "true"
|
|
520
530
|
}) : R ? /* @__PURE__ */ u(c, {
|
|
@@ -554,7 +564,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
554
564
|
children: [L && !B ? /* @__PURE__ */ u(s, {
|
|
555
565
|
className: "size-5 text-text-secondary animate-spin",
|
|
556
566
|
"aria-hidden": "true"
|
|
557
|
-
}) : B?.ok ? /* @__PURE__ */ u(
|
|
567
|
+
}) : B?.ok ? /* @__PURE__ */ u(ce, {
|
|
558
568
|
className: "size-5 text-status-success-text",
|
|
559
569
|
"aria-hidden": "true"
|
|
560
570
|
}) : B ? /* @__PURE__ */ u(c, {
|
|
@@ -594,13 +604,13 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
594
604
|
type: "button",
|
|
595
605
|
variant: "ghost",
|
|
596
606
|
size: "sm",
|
|
597
|
-
onClick:
|
|
598
|
-
children: [/* @__PURE__ */ u(
|
|
607
|
+
onClick: ct,
|
|
608
|
+
children: [/* @__PURE__ */ u(ge, {
|
|
599
609
|
className: "size-3.5",
|
|
600
610
|
"aria-hidden": "true"
|
|
601
611
|
}), y("agentsPage.retryValidation", "Retry validation")]
|
|
602
612
|
}),
|
|
603
|
-
|
|
613
|
+
ut && /* @__PURE__ */ d("div", {
|
|
604
614
|
className: "space-y-3 pt-2",
|
|
605
615
|
children: [/* @__PURE__ */ u("p", {
|
|
606
616
|
className: "text-sm font-medium text-text-primary",
|
|
@@ -608,17 +618,17 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
608
618
|
}), /* @__PURE__ */ d("div", {
|
|
609
619
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
610
620
|
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
611
|
-
htmlFor:
|
|
621
|
+
htmlFor: rt.id,
|
|
612
622
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
613
623
|
children: y("agentsPage.platform", "Platform")
|
|
614
|
-
}), /* @__PURE__ */ d(
|
|
615
|
-
value:
|
|
616
|
-
onValueChange:
|
|
617
|
-
children: [/* @__PURE__ */ u(
|
|
618
|
-
id:
|
|
624
|
+
}), /* @__PURE__ */ d(Te, {
|
|
625
|
+
value: Ke,
|
|
626
|
+
onValueChange: qe,
|
|
627
|
+
children: [/* @__PURE__ */ u(De, {
|
|
628
|
+
id: rt.id,
|
|
619
629
|
className: "text-base md:text-sm",
|
|
620
|
-
children: /* @__PURE__ */ u(
|
|
621
|
-
}), /* @__PURE__ */ d(
|
|
630
|
+
children: /* @__PURE__ */ u(Oe, {})
|
|
631
|
+
}), /* @__PURE__ */ d(Ee, { children: [
|
|
622
632
|
/* @__PURE__ */ u(m, {
|
|
623
633
|
value: "linux",
|
|
624
634
|
children: "Linux"
|
|
@@ -633,17 +643,17 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
633
643
|
})
|
|
634
644
|
] })]
|
|
635
645
|
})] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
636
|
-
htmlFor:
|
|
646
|
+
htmlFor: it.id,
|
|
637
647
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
638
648
|
children: y("agentsPage.architecture", "Architecture")
|
|
639
|
-
}), /* @__PURE__ */ d(
|
|
640
|
-
value:
|
|
641
|
-
onValueChange:
|
|
642
|
-
children: [/* @__PURE__ */ u(
|
|
643
|
-
id:
|
|
649
|
+
}), /* @__PURE__ */ d(Te, {
|
|
650
|
+
value: Je,
|
|
651
|
+
onValueChange: Ye,
|
|
652
|
+
children: [/* @__PURE__ */ u(De, {
|
|
653
|
+
id: it.id,
|
|
644
654
|
className: "text-base md:text-sm",
|
|
645
|
-
children: /* @__PURE__ */ u(
|
|
646
|
-
}), /* @__PURE__ */ d(
|
|
655
|
+
children: /* @__PURE__ */ u(Oe, {})
|
|
656
|
+
}), /* @__PURE__ */ d(Ee, { children: [
|
|
647
657
|
/* @__PURE__ */ u(m, {
|
|
648
658
|
value: "x86_64",
|
|
649
659
|
children: "x86_64"
|
|
@@ -660,7 +670,33 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
660
670
|
})] })]
|
|
661
671
|
})]
|
|
662
672
|
}),
|
|
663
|
-
|
|
673
|
+
$e && /* @__PURE__ */ d("div", {
|
|
674
|
+
role: "status",
|
|
675
|
+
className: "p-3 bg-status-info-bg-subtle border border-status-info-border rounded-lg",
|
|
676
|
+
children: [/* @__PURE__ */ d("div", {
|
|
677
|
+
className: "flex items-start gap-2",
|
|
678
|
+
children: [/* @__PURE__ */ u(s, {
|
|
679
|
+
className: "size-5 text-status-info-text flex-shrink-0 animate-spin",
|
|
680
|
+
"aria-hidden": "true"
|
|
681
|
+
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
682
|
+
className: "text-sm font-medium text-status-info-text",
|
|
683
|
+
children: y("agentsPage.provisioningTitle", "This is taking a little longer than usual")
|
|
684
|
+
}), /* @__PURE__ */ u("p", {
|
|
685
|
+
className: "text-sm text-status-info-text break-words mt-1",
|
|
686
|
+
children: y("agentsPage.provisioningBody", "Your agent is still being set up in the background. You can close this — it'll finish on its own and appear in your agents list within a minute.")
|
|
687
|
+
})] })]
|
|
688
|
+
}), /* @__PURE__ */ u("div", {
|
|
689
|
+
className: "flex flex-wrap items-center gap-2 mt-3",
|
|
690
|
+
children: /* @__PURE__ */ u(f, {
|
|
691
|
+
type: "button",
|
|
692
|
+
variant: "outline",
|
|
693
|
+
size: "sm",
|
|
694
|
+
onClick: h,
|
|
695
|
+
children: y("agentsPage.closeAndCheckBack", "Close — I'll check back")
|
|
696
|
+
})
|
|
697
|
+
})]
|
|
698
|
+
}),
|
|
699
|
+
Qe && /* @__PURE__ */ d("div", {
|
|
664
700
|
role: "alert",
|
|
665
701
|
className: "p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
666
702
|
children: [/* @__PURE__ */ d("div", {
|
|
@@ -670,7 +706,7 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
670
706
|
"aria-hidden": "true"
|
|
671
707
|
}), /* @__PURE__ */ u("p", {
|
|
672
708
|
className: "text-sm text-status-error-text break-words",
|
|
673
|
-
children:
|
|
709
|
+
children: Qe
|
|
674
710
|
})]
|
|
675
711
|
}), /* @__PURE__ */ d("div", {
|
|
676
712
|
className: "flex flex-wrap items-center gap-2 mt-3",
|
|
@@ -679,9 +715,9 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
679
715
|
variant: "outline",
|
|
680
716
|
size: "sm",
|
|
681
717
|
onClick: () => {
|
|
682
|
-
H(null), x("details"),
|
|
718
|
+
H(null), x("details"), ze(""), Be(""), z(null), V(null);
|
|
683
719
|
},
|
|
684
|
-
children: [/* @__PURE__ */ u(
|
|
720
|
+
children: [/* @__PURE__ */ u(ge, {
|
|
685
721
|
className: "size-3.5",
|
|
686
722
|
"aria-hidden": "true"
|
|
687
723
|
}), y("agentsPage.tryDifferentAgent", "Try Different Agent")]
|
|
@@ -694,20 +730,20 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
694
730
|
})]
|
|
695
731
|
})]
|
|
696
732
|
}),
|
|
697
|
-
/* @__PURE__ */ d(
|
|
733
|
+
/* @__PURE__ */ d(Se, {
|
|
698
734
|
className: "pt-2",
|
|
699
735
|
children: [/* @__PURE__ */ d(f, {
|
|
700
736
|
type: "button",
|
|
701
737
|
variant: "outline",
|
|
702
738
|
onClick: () => x("details"),
|
|
703
|
-
children: [/* @__PURE__ */ u(
|
|
739
|
+
children: [/* @__PURE__ */ u(ue, {
|
|
704
740
|
className: "size-4",
|
|
705
741
|
"aria-hidden": "true"
|
|
706
742
|
}), y("agentsPage.back", "Back")]
|
|
707
743
|
}), /* @__PURE__ */ u(f, {
|
|
708
744
|
type: "button",
|
|
709
|
-
disabled: !
|
|
710
|
-
onClick:
|
|
745
|
+
disabled: !ut || g || L || $e,
|
|
746
|
+
onClick: lt,
|
|
711
747
|
"aria-busy": g,
|
|
712
748
|
children: g ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(s, {
|
|
713
749
|
className: "size-4 animate-spin",
|
|
@@ -726,6 +762,6 @@ function ke({ onSubmit: ke, onCancel: h, isLoading: g, onNavigate: Ae, targets:
|
|
|
726
762
|
});
|
|
727
763
|
}
|
|
728
764
|
//#endregion
|
|
729
|
-
export {
|
|
765
|
+
export { Ae as AgentForm };
|
|
730
766
|
|
|
731
767
|
//# sourceMappingURL=AgentForm.js.map
|