@burdenoff/microfe-vibecontrols 2026.530.6 → 2026.530.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,50 @@
1
- import { useProbeAgentTunnelLazyQuery as e } from "../../generated/wspace-operations.js";
2
- import { SearchableSelect as t } from "../shared/SearchableSelect.js";
1
+ import { isQuotaExhaustedError as e, wasQuotaHandledLocally as t } from "../../utils/quotaUtils.js";
2
+ import { useProbeAgentTunnelLazyQuery as n } from "../../generated/wspace-operations.js";
3
+ import { SearchableSelect as r } from "../shared/SearchableSelect.js";
3
4
  import "../shared/index.js";
4
- import { useCallback as n, useEffect as r, useRef as ee, useState as i } from "react";
5
- import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
- import { Check as a, CheckCircle2 as o, ChevronDown as ne, ChevronLeft as re, ChevronRight as s, Copy as ie, Download as ae, Eye as oe, EyeOff as se, Loader2 as c, Plus as ce, RefreshCw as le, Settings2 as ue, Terminal as de, X as fe, XCircle as l } from "lucide-react";
7
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ import { useCallback as ee, useEffect as te, useRef as ne, useState as i } from "react";
6
+ import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { Check as a, CheckCircle2 as o, ChevronDown as ie, ChevronLeft as ae, ChevronRight as s, Copy as oe, Download as se, Eye as ce, EyeOff as le, Loader2 as c, Plus as l, RefreshCw as ue, Settings2 as de, Terminal as fe, X as pe, XCircle as u } from "lucide-react";
8
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
8
9
  //#region src/components/agents/AgentForm.tsx
9
- function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _, targetsLoading: v, onCreateTarget: y, extraSection: pe }) {
10
- let { t: me } = te(), b = (e, t) => {
11
- let n = me(e);
10
+ function m({ onSubmit: m, onCancel: h, isLoading: me, onNavigate: g, targets: _, targetsLoading: v, onCreateTarget: y, extraSection: he }) {
11
+ let { t: ge } = re(), b = (e, t) => {
12
+ let n = ge(e);
12
13
  return n === e ? t : n;
13
- }, [x, S] = i("details"), [C, he] = i(!1), [w, ge] = i(!1), [_e, ve] = i(null), [T, E] = i(""), [D, ye] = i(!1), [O, k] = i(""), [A, j] = i(""), [M, N] = i("");
14
- r(() => {
15
- if (D || !M) return;
16
- let e = (_ ?? []).find((e) => e.id === M);
17
- e?.name && E(e.name);
14
+ }, [x, S] = i("details"), [C, _e] = i(!1), [w, ve] = i(!1), [ye, T] = i(null), [E, D] = i(""), [O, be] = i(!1), [k, A] = i(""), [j, M] = i(""), [N, P] = i("");
15
+ te(() => {
16
+ if (O || !N) return;
17
+ let e = (_ ?? []).find((e) => e.id === N);
18
+ e?.name && D(e.name);
18
19
  }, [
19
- M,
20
+ N,
20
21
  _,
21
- D
22
+ O
22
23
  ]);
23
- let [P, F] = i(!1), [I, L] = i(""), [R, z] = i(!1), [B, V] = i(null), [H, be] = i(!1), [U, W] = i(null), [G, K] = i(null), [xe, Se] = i(""), [Ce, we] = i("linux"), [Te, Ee] = i("x86_64"), [De, Oe] = i("1.0.0"), [ke, q] = i(null), [J, Ae] = i(!1), [je, Me] = i("default"), Ne = n((e, t) => {
24
- navigator.clipboard.writeText(e), ve(t), setTimeout(() => ve(null), 2e3);
25
- }, []), Pe = (e) => {
24
+ let [F, I] = i(!1), [L, R] = i(""), [z, B] = i(!1), [V, H] = i(null), [U, xe] = i(!1), [W, G] = i(null), [K, q] = i(null), [Se, Ce] = i(""), [we, Te] = i("linux"), [Ee, De] = i("x86_64"), [Oe, ke] = i("1.0.0"), [Ae, J] = i(null), [Y, je] = i(!1), [Me, Ne] = i("default"), Pe = ee((e, t) => {
25
+ navigator.clipboard.writeText(e), T(t), setTimeout(() => T(null), 2e3);
26
+ }, []), Fe = (e) => {
26
27
  let t = e.trim();
27
28
  return t.endsWith("/") && (t = t.slice(0, -1)), t;
28
- }, [Fe] = e({ fetchPolicy: "network-only" }), Ie = async () => {
29
- let e = Pe(O);
29
+ }, [Ie] = n({ fetchPolicy: "network-only" }), Le = async () => {
30
+ let e = Fe(k);
30
31
  if (e) {
31
- be(!0), W(null), K(null);
32
+ xe(!0), G(null), q(null);
32
33
  try {
33
- let { data: t, error: n } = await Fe({ variables: {
34
+ let { data: t, error: n } = await Ie({ variables: {
34
35
  url: e,
35
- agentApiKey: A || null
36
+ agentApiKey: j || null
36
37
  } }), r = t?.probeAgentTunnel;
37
38
  if (n || !r) {
38
39
  let e = n?.message ?? "Probe failed";
39
- W({
40
+ G({
40
41
  ok: !1,
41
42
  error: e
42
- }), K({
43
+ }), q({
43
44
  ok: !1,
44
45
  error: e
45
46
  });
46
- } else W(r.healthOk ? {
47
+ } else G(r.healthOk ? {
47
48
  ok: !0,
48
49
  data: {
49
50
  status: r.healthStatus ?? "healthy",
@@ -53,7 +54,7 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
53
54
  } : {
54
55
  ok: !1,
55
56
  error: r.healthError ?? "Health check failed"
56
- }), r.agentVersion && Oe(r.agentVersion), K(r.identityOk ? {
57
+ }), r.agentVersion && ke(r.agentVersion), q(r.identityOk ? {
57
58
  ok: !0,
58
59
  data: {
59
60
  hostname: r.hostname ?? "",
@@ -63,68 +64,68 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
63
64
  } : {
64
65
  ok: !1,
65
66
  error: r.identityError ?? "Identity check failed"
66
- }), r.identityOk && (r.platform && we(r.platform), r.architecture && Ee(r.architecture), r.hostname && (Se(r.hostname), !D && !M && E(r.hostname)));
67
+ }), r.identityOk && (r.platform && Te(r.platform), r.architecture && De(r.architecture), r.hostname && (Ce(r.hostname), !O && !N && D(r.hostname)));
67
68
  } catch (e) {
68
69
  let t = e instanceof Error ? e.message : "Probe failed";
69
- W({
70
+ G({
70
71
  ok: !1,
71
72
  error: t
72
- }), K({
73
+ }), q({
73
74
  ok: !1,
74
75
  error: t
75
76
  });
76
77
  }
77
- be(!1);
78
+ xe(!1);
78
79
  }
79
- }, Y = ee(!1), Le = async () => {
80
- if (Y.current) return;
81
- Y.current = !0, q(null);
82
- let e = je.trim() || "default", t = {
83
- name: T || xe || "Unnamed Agent",
84
- hostname: xe || "unknown",
85
- platform: Ce,
86
- architecture: Te,
87
- version: De,
88
- tunnelUrl: Pe(O),
80
+ }, X = ne(!1), Re = async () => {
81
+ if (X.current) return;
82
+ X.current = !0, J(null);
83
+ let e = Me.trim() || "default", t = {
84
+ name: E || Se || "Unnamed Agent",
85
+ hostname: Se || "unknown",
86
+ platform: we,
87
+ architecture: Ee,
88
+ version: Oe,
89
+ tunnelUrl: Fe(k),
89
90
  tunnelStatus: "ACTIVE",
90
- agentApiKey: A,
91
+ agentApiKey: j,
91
92
  metadata: { profile: e },
92
- ...M ? { targetId: M } : {}
93
+ ...N ? { targetId: N } : {}
93
94
  };
94
95
  try {
95
- let e = (await p(t))?.id || null;
96
+ let e = (await m(t))?.id || null;
96
97
  if (!e) {
97
- q("Agent creation returned no ID. The agent may already exist.");
98
+ J("Agent creation returned no ID. The agent may already exist.");
98
99
  return;
99
100
  }
100
- g ? g(`/agents/${e}`) : m();
101
+ g ? g(`/agents/${e}`) : h();
101
102
  } catch (e) {
102
- q(e instanceof Error ? e.message : "Failed to create agent");
103
+ J(e instanceof Error ? e.message : "Failed to create agent");
103
104
  } finally {
104
- Y.current = !1;
105
+ X.current = !1;
105
106
  }
106
- }, Re = U?.ok && G?.ok, X = _ && _.length > 0, ze = (y || X) && M.length === 0, Be = O.trim().length > 0 && !ze, Z = n(async () => {
107
- if (!(!y || !I.trim())) {
108
- z(!0), V(null);
107
+ }, ze = W?.ok && K?.ok, Z = _ && _.length > 0, Be = (y || Z) && N.length === 0, Ve = k.trim().length > 0 && !Be, He = ee(async () => {
108
+ if (!(!y || !L.trim())) {
109
+ B(!0), H(null);
109
110
  try {
110
- let e = await y(I.trim());
111
- e ? (N(e.id), F(!1), L("")) : V(b("agentsPage.inlineTargetFailed", "Failed to create target. Please try again."));
112
- } catch (e) {
113
- V(e instanceof Error ? e.message : "Failed to create target");
111
+ let e = await y(L.trim());
112
+ e ? (P(e.id), I(!1), R("")) : t() ? (I(!1), R("")) : H(b("agentsPage.inlineTargetFailed", "Failed to create target. Please try again."));
113
+ } catch (t) {
114
+ e(t) ? (I(!1), R("")) : H(t instanceof Error ? t.message : "Failed to create target");
114
115
  } finally {
115
- z(!1);
116
+ B(!1);
116
117
  }
117
118
  }
118
119
  }, [
119
120
  y,
120
- I,
121
+ L,
121
122
  b
122
- ]), Ve = (e, t) => /* @__PURE__ */ d("button", {
123
+ ]), Ue = (e, t) => /* @__PURE__ */ f("button", {
123
124
  type: "button",
124
- onClick: () => Ne(e, t),
125
+ onClick: () => Pe(e, t),
125
126
  className: "p-1 rounded hover:bg-bg-elevated transition-colors",
126
127
  title: b("agentsPage.copy", "Copy"),
127
- children: _e === t ? /* @__PURE__ */ d(a, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ d(ie, { className: "size-3.5 text-text-secondary" })
128
+ children: ye === t ? /* @__PURE__ */ f(a, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ f(oe, { className: "size-3.5 text-text-secondary" })
128
129
  }), Q = [{
129
130
  key: "details",
130
131
  label: "Setup"
@@ -132,61 +133,61 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
132
133
  key: "validate",
133
134
  label: "Validate"
134
135
  }], $ = Q.findIndex((e) => e.key === x);
135
- return /* @__PURE__ */ d("div", {
136
+ return /* @__PURE__ */ f("div", {
136
137
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
137
- children: /* @__PURE__ */ f("div", {
138
+ children: /* @__PURE__ */ p("div", {
138
139
  className: "w-full max-w-xl bg-bg-surface rounded-lg shadow-xl max-h-[90vh] overflow-y-auto",
139
140
  children: [
140
- /* @__PURE__ */ f("div", {
141
+ /* @__PURE__ */ p("div", {
141
142
  className: "flex items-center justify-between px-6 py-4 border-b border-border-default sticky top-0 bg-bg-surface z-10",
142
- children: [/* @__PURE__ */ d("h2", {
143
+ children: [/* @__PURE__ */ f("h2", {
143
144
  className: "text-lg font-semibold text-text-primary",
144
145
  children: b("agentsPage.addNewAgent", "Add New Agent")
145
- }), /* @__PURE__ */ d("button", {
146
+ }), /* @__PURE__ */ f("button", {
146
147
  type: "button",
147
- onClick: m,
148
+ onClick: h,
148
149
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
149
- children: /* @__PURE__ */ d(fe, { className: "size-5 text-text-secondary" })
150
+ children: /* @__PURE__ */ f(pe, { className: "size-5 text-text-secondary" })
150
151
  })]
151
152
  }),
152
- /* @__PURE__ */ d("div", {
153
+ /* @__PURE__ */ f("div", {
153
154
  className: "flex items-center gap-2 px-6 pt-4 pb-2",
154
- children: Q.map((e, t) => /* @__PURE__ */ f("div", {
155
+ children: Q.map((e, t) => /* @__PURE__ */ p("div", {
155
156
  className: "flex items-center gap-2",
156
157
  children: [
157
- /* @__PURE__ */ d("div", {
158
+ /* @__PURE__ */ f("div", {
158
159
  className: `flex items-center justify-center size-7 rounded-full text-xs font-semibold transition-colors ${t < $ ? "bg-status-success-bg text-status-success-text" : t === $ ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"}`,
159
- children: t < $ ? /* @__PURE__ */ d(o, { className: "size-4" }) : t + 1
160
+ children: t < $ ? /* @__PURE__ */ f(o, { className: "size-4" }) : t + 1
160
161
  }),
161
- /* @__PURE__ */ d("span", {
162
+ /* @__PURE__ */ f("span", {
162
163
  className: `text-sm ${t === $ ? "font-medium text-text-primary" : "text-text-secondary"}`,
163
164
  children: e.label
164
165
  }),
165
- t < Q.length - 1 && /* @__PURE__ */ d(s, { className: "size-4 text-text-muted" })
166
+ t < Q.length - 1 && /* @__PURE__ */ f(s, { className: "size-4 text-text-muted" })
166
167
  ]
167
168
  }, e.key))
168
169
  }),
169
- /* @__PURE__ */ f("div", {
170
+ /* @__PURE__ */ p("div", {
170
171
  className: "p-6",
171
- children: [x === "details" && /* @__PURE__ */ f("div", {
172
+ children: [x === "details" && /* @__PURE__ */ p("div", {
172
173
  className: "space-y-4",
173
174
  children: [
174
- /* @__PURE__ */ f("div", {
175
+ /* @__PURE__ */ p("div", {
175
176
  className: "border border-border-default rounded-lg overflow-hidden",
176
- children: [/* @__PURE__ */ f("button", {
177
+ children: [/* @__PURE__ */ p("button", {
177
178
  type: "button",
178
- onClick: () => ge(!w),
179
+ onClick: () => ve(!w),
179
180
  className: "w-full flex items-center justify-between px-4 py-3 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors",
180
- children: [/* @__PURE__ */ f("div", {
181
+ children: [/* @__PURE__ */ p("div", {
181
182
  className: "flex items-center gap-2",
182
- children: [/* @__PURE__ */ d(ae, { className: "size-4 text-action-primary-bg" }), /* @__PURE__ */ d("span", {
183
+ children: [/* @__PURE__ */ f(se, { className: "size-4 text-action-primary-bg" }), /* @__PURE__ */ f("span", {
183
184
  className: "text-sm font-medium text-text-primary",
184
185
  children: b("agentsPage.installInstructions", "Agent Install Instructions")
185
186
  })]
186
- }), /* @__PURE__ */ d(s, { className: `size-4 text-text-secondary transition-transform ${w ? "rotate-90" : ""}` })]
187
- }), w && /* @__PURE__ */ d("div", {
187
+ }), /* @__PURE__ */ f(s, { className: `size-4 text-text-secondary transition-transform ${w ? "rotate-90" : ""}` })]
188
+ }), w && /* @__PURE__ */ f("div", {
188
189
  className: "px-4 py-3 space-y-3 border-t border-border-default",
189
- children: /* @__PURE__ */ f("div", {
190
+ children: /* @__PURE__ */ p("div", {
190
191
  className: "space-y-2",
191
192
  children: [[{
192
193
  label: b("agentsPage.installStep1", "1. Install the agent CLI"),
@@ -194,60 +195,60 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
194
195
  }, {
195
196
  label: b("agentsPage.installStep2", "2. Start the agent (prints tunnel URL + API key)"),
196
197
  cmd: "vibe start"
197
- }].map((e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
198
+ }].map((e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
198
199
  className: "text-xs text-text-secondary mb-1",
199
200
  children: e.label
200
- }), /* @__PURE__ */ f("div", {
201
+ }), /* @__PURE__ */ p("div", {
201
202
  className: "flex items-center gap-2 bg-bg-sunken rounded-md px-3 py-1.5 font-mono text-xs text-text-primary",
202
203
  children: [
203
- /* @__PURE__ */ d(de, { className: "size-3 text-text-muted flex-shrink-0" }),
204
- /* @__PURE__ */ d("code", {
204
+ /* @__PURE__ */ f(fe, { className: "size-3 text-text-muted flex-shrink-0" }),
205
+ /* @__PURE__ */ f("code", {
205
206
  className: "flex-1",
206
207
  children: e.cmd
207
208
  }),
208
- Ve(e.cmd, e.cmd)
209
+ Ue(e.cmd, e.cmd)
209
210
  ]
210
- })] }, e.cmd)), /* @__PURE__ */ d("p", {
211
+ })] }, e.cmd)), /* @__PURE__ */ f("p", {
211
212
  className: "text-xs text-text-secondary pt-1",
212
213
  children: b("agentsPage.installHint", "After running vibe start, copy the printed tunnel URL and API key into the fields above.")
213
214
  })]
214
215
  })
215
216
  })]
216
217
  }),
217
- /* @__PURE__ */ f("div", { children: [
218
- /* @__PURE__ */ d("label", {
218
+ /* @__PURE__ */ p("div", { children: [
219
+ /* @__PURE__ */ f("label", {
219
220
  className: "block text-sm font-medium text-text-primary mb-1",
220
221
  children: b("agentsPage.name", "Name")
221
222
  }),
222
- /* @__PURE__ */ d("input", {
223
+ /* @__PURE__ */ f("input", {
223
224
  "aria-label": b("agentsPage.name", "Name"),
224
225
  type: "text",
225
- value: T,
226
+ value: E,
226
227
  onChange: (e) => {
227
- E(e.target.value), ye(!0);
228
+ D(e.target.value), be(!0);
228
229
  },
229
230
  placeholder: b("agentsPage.namePlaceholderUpfront", "My laptop, prod jump-host, …"),
230
231
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
231
232
  "data-testid": "agent-form-name-input"
232
233
  }),
233
- /* @__PURE__ */ d("p", {
234
+ /* @__PURE__ */ f("p", {
234
235
  className: "mt-1 text-xs text-text-muted",
235
236
  children: b("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.")
236
237
  })
237
238
  ] }),
238
- /* @__PURE__ */ f("div", { children: [
239
- /* @__PURE__ */ f("label", {
239
+ /* @__PURE__ */ p("div", { children: [
240
+ /* @__PURE__ */ p("label", {
240
241
  className: "block text-sm font-medium text-text-primary mb-1",
241
242
  children: [
242
243
  b("agentsPage.target", "Target"),
243
244
  " ",
244
- /* @__PURE__ */ d("span", {
245
+ /* @__PURE__ */ f("span", {
245
246
  className: "text-status-error-text",
246
247
  children: "*"
247
248
  })
248
249
  ]
249
250
  }),
250
- X && !P && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(t, {
251
+ Z && !F && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(r, {
251
252
  placeholder: b("agentsPage.selectTarget", "Select a target..."),
252
253
  searchPlaceholder: b("agentsPage.searchTargets", "Search targets..."),
253
254
  options: (_ ?? []).map((e) => ({
@@ -255,72 +256,72 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
255
256
  label: e.name,
256
257
  description: `${e.type}${e.status ? ` · ${e.status}` : ""}`
257
258
  })),
258
- value: M,
259
- onChange: N,
259
+ value: N,
260
+ onChange: P,
260
261
  clearable: !0
261
- }), /* @__PURE__ */ f("p", {
262
+ }), /* @__PURE__ */ p("p", {
262
263
  className: "mt-1 text-xs text-text-muted",
263
264
  children: [
264
265
  b("agentsPage.targetDescription", "The target machine this agent will be installed on."),
265
266
  " ",
266
- y && /* @__PURE__ */ f("button", {
267
+ y && /* @__PURE__ */ p("button", {
267
268
  type: "button",
268
269
  onClick: () => {
269
- F(!0), L(T.trim() || "");
270
+ I(!0), R(E.trim() || "");
270
271
  },
271
272
  className: "text-action-primary-bg hover:underline inline-flex items-center gap-1",
272
- children: [/* @__PURE__ */ d(ce, { className: "size-3" }), b("agentsPage.createNewTarget", "Create a new target")]
273
+ children: [/* @__PURE__ */ f(l, { className: "size-3" }), b("agentsPage.createNewTarget", "Create a new target")]
273
274
  })
274
275
  ]
275
276
  })] }),
276
- !X && !v && y && !P && /* @__PURE__ */ f("div", {
277
+ !Z && !v && y && !F && /* @__PURE__ */ p("div", {
277
278
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg",
278
- children: [/* @__PURE__ */ d("p", {
279
+ children: [/* @__PURE__ */ f("p", {
279
280
  className: "text-sm text-text-secondary mb-2",
280
281
  children: b("agentsPage.noTargetsInlinePrompt", "You don't have any targets yet. Create one now to install this agent on it.")
281
- }), /* @__PURE__ */ f("button", {
282
+ }), /* @__PURE__ */ p("button", {
282
283
  type: "button",
283
284
  onClick: () => {
284
- F(!0), L(T.trim() || "");
285
+ I(!0), R(E.trim() || "");
285
286
  },
286
287
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:opacity-90",
287
- children: [/* @__PURE__ */ d(ce, { className: "size-4" }), b("agentsPage.createFirstTarget", "Create first target")]
288
+ children: [/* @__PURE__ */ f(l, { className: "size-4" }), b("agentsPage.createFirstTarget", "Create first target")]
288
289
  })]
289
290
  }),
290
- P && y && /* @__PURE__ */ f("div", {
291
+ F && y && /* @__PURE__ */ p("div", {
291
292
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg space-y-2",
292
293
  children: [
293
- /* @__PURE__ */ d("p", {
294
+ /* @__PURE__ */ f("p", {
294
295
  className: "text-xs font-medium text-text-secondary",
295
296
  children: b("agentsPage.newDirectTarget", "New target (Direct — you can change the type later)")
296
297
  }),
297
- /* @__PURE__ */ d("input", {
298
+ /* @__PURE__ */ f("input", {
298
299
  "aria-label": "control",
299
300
  type: "text",
300
- value: I,
301
- onChange: (e) => L(e.target.value),
301
+ value: L,
302
+ onChange: (e) => R(e.target.value),
302
303
  placeholder: b("agentsPage.targetName", "Target name"),
303
304
  className: "w-full px-3 py-2 text-sm bg-bg-elevated border border-border-default rounded-md text-text-primary placeholder-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
304
305
  onKeyDown: (e) => {
305
- e.key === "Enter" && (e.preventDefault(), Z());
306
+ e.key === "Enter" && (e.preventDefault(), He());
306
307
  }
307
308
  }),
308
- B && /* @__PURE__ */ d("p", {
309
+ V && /* @__PURE__ */ f("p", {
309
310
  className: "text-xs text-status-error-text",
310
- children: B
311
+ children: V
311
312
  }),
312
- /* @__PURE__ */ f("div", {
313
+ /* @__PURE__ */ p("div", {
313
314
  className: "flex items-center gap-2",
314
- children: [/* @__PURE__ */ f("button", {
315
+ children: [/* @__PURE__ */ p("button", {
315
316
  type: "button",
316
- onClick: () => void Z(),
317
- disabled: !I.trim() || R,
317
+ onClick: () => void He(),
318
+ disabled: !L.trim() || z,
318
319
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:opacity-90 disabled:opacity-50",
319
- children: [R ? /* @__PURE__ */ d(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ d(a, { className: "size-3.5" }), b("agentsPage.create", "Create")]
320
- }), /* @__PURE__ */ d("button", {
320
+ children: [z ? /* @__PURE__ */ f(c, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ f(a, { className: "size-3.5" }), b("agentsPage.create", "Create")]
321
+ }), /* @__PURE__ */ f("button", {
321
322
  type: "button",
322
323
  onClick: () => {
323
- F(!1), L(""), V(null);
324
+ I(!1), R(""), H(null);
324
325
  },
325
326
  className: "px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary",
326
327
  children: b("agentsPage.cancel", "Cancel")
@@ -328,72 +329,72 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
328
329
  })
329
330
  ]
330
331
  }),
331
- v && !X && /* @__PURE__ */ f("div", {
332
+ v && !Z && /* @__PURE__ */ p("div", {
332
333
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg flex items-center gap-2 text-sm text-text-secondary",
333
- children: [/* @__PURE__ */ d(c, { className: "size-4 animate-spin" }), b("agentsPage.loadingTargets", "Loading targets...")]
334
+ children: [/* @__PURE__ */ f(c, { className: "size-4 animate-spin" }), b("agentsPage.loadingTargets", "Loading targets...")]
334
335
  })
335
336
  ] }),
336
- /* @__PURE__ */ f("div", { children: [
337
- /* @__PURE__ */ f("label", {
337
+ /* @__PURE__ */ p("div", { children: [
338
+ /* @__PURE__ */ p("label", {
338
339
  className: "block text-sm font-medium text-text-primary mb-1",
339
340
  children: [
340
341
  b("agentsPage.apiTunnelUrl", "API / Tunnel URL"),
341
342
  " ",
342
- /* @__PURE__ */ d("span", {
343
+ /* @__PURE__ */ f("span", {
343
344
  className: "text-status-error-text",
344
345
  children: "*"
345
346
  })
346
347
  ]
347
348
  }),
348
- /* @__PURE__ */ d("input", {
349
+ /* @__PURE__ */ f("input", {
349
350
  "aria-label": "https://your-tunnel.trycloudflare.com",
350
351
  type: "url",
351
- value: O,
352
- onChange: (e) => k(e.target.value),
352
+ value: k,
353
+ onChange: (e) => A(e.target.value),
353
354
  placeholder: "https://your-tunnel.trycloudflare.com",
354
355
  required: !0,
355
356
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono"
356
357
  }),
357
- /* @__PURE__ */ d("p", {
358
+ /* @__PURE__ */ f("p", {
358
359
  className: "mt-1 text-xs text-text-muted",
359
360
  children: b("agentsPage.tunnelUrlHint", "The agent's tunnel URL or local API URL (e.g. http://localhost:3005)")
360
361
  })
361
362
  ] }),
362
- /* @__PURE__ */ f("div", { children: [
363
- /* @__PURE__ */ f("label", {
363
+ /* @__PURE__ */ p("div", { children: [
364
+ /* @__PURE__ */ p("label", {
364
365
  className: "block text-sm font-medium text-text-primary mb-1",
365
366
  children: [
366
367
  b("agentsPage.agentApiKey", "Agent API Key"),
367
368
  " ",
368
- /* @__PURE__ */ d("span", {
369
+ /* @__PURE__ */ f("span", {
369
370
  className: "text-status-error-text",
370
371
  children: "*"
371
372
  })
372
373
  ]
373
374
  }),
374
- /* @__PURE__ */ f("div", {
375
+ /* @__PURE__ */ p("div", {
375
376
  className: "relative",
376
- children: [/* @__PURE__ */ d("input", {
377
+ children: [/* @__PURE__ */ f("input", {
377
378
  "aria-label": "vcak_...",
378
379
  type: C ? "text" : "password",
379
- value: A,
380
- onChange: (e) => j(e.target.value),
380
+ value: j,
381
+ onChange: (e) => M(e.target.value),
381
382
  placeholder: "vcak_...",
382
383
  required: !0,
383
384
  className: "w-full px-3 py-2 pr-10 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono"
384
- }), /* @__PURE__ */ d("button", {
385
+ }), /* @__PURE__ */ f("button", {
385
386
  type: "button",
386
- onClick: () => he(!C),
387
+ onClick: () => _e(!C),
387
388
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-elevated transition-colors",
388
- children: d(C ? se : oe, { className: "size-4 text-text-secondary" })
389
+ children: f(C ? le : ce, { className: "size-4 text-text-secondary" })
389
390
  })]
390
391
  }),
391
- /* @__PURE__ */ f("p", {
392
+ /* @__PURE__ */ p("p", {
392
393
  className: "mt-1 text-xs text-text-muted",
393
394
  children: [
394
395
  b("agentsPage.apiKeyHint", "Run"),
395
396
  " ",
396
- /* @__PURE__ */ d("code", {
397
+ /* @__PURE__ */ f("code", {
397
398
  className: "bg-bg-sunken px-1 rounded",
398
399
  children: "vibe key"
399
400
  }),
@@ -402,178 +403,178 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
402
403
  ]
403
404
  })
404
405
  ] }),
405
- /* @__PURE__ */ f("div", {
406
+ /* @__PURE__ */ p("div", {
406
407
  className: "border border-border-default rounded-lg overflow-hidden",
407
- children: [/* @__PURE__ */ f("button", {
408
+ children: [/* @__PURE__ */ p("button", {
408
409
  type: "button",
409
- onClick: () => Ae((e) => !e),
410
+ onClick: () => je((e) => !e),
410
411
  className: "w-full flex items-center justify-between px-4 py-2.5 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors",
411
- "aria-expanded": J,
412
+ "aria-expanded": Y,
412
413
  "data-testid": "agent-form-advanced-toggle",
413
- children: [/* @__PURE__ */ f("div", {
414
+ children: [/* @__PURE__ */ p("div", {
414
415
  className: "flex items-center gap-2",
415
- children: [/* @__PURE__ */ d(ue, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ d("span", {
416
+ children: [/* @__PURE__ */ f(de, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ f("span", {
416
417
  className: "text-sm font-medium text-text-primary",
417
418
  children: b("agentsPage.advancedOptions", "Advanced options")
418
419
  })]
419
- }), /* @__PURE__ */ d(ne, { className: `size-4 text-text-secondary transition-transform ${J ? "rotate-180" : ""}` })]
420
- }), J && /* @__PURE__ */ d("div", {
420
+ }), /* @__PURE__ */ f(ie, { className: `size-4 text-text-secondary transition-transform ${Y ? "rotate-180" : ""}` })]
421
+ }), Y && /* @__PURE__ */ f("div", {
421
422
  className: "px-4 py-3 space-y-3 border-t border-border-default",
422
- children: /* @__PURE__ */ f("div", { children: [
423
- /* @__PURE__ */ d("label", {
423
+ children: /* @__PURE__ */ p("div", { children: [
424
+ /* @__PURE__ */ f("label", {
424
425
  className: "block text-sm font-medium text-text-primary mb-1",
425
426
  children: b("agentsPage.profileName", "Profile name")
426
427
  }),
427
- /* @__PURE__ */ d("input", {
428
+ /* @__PURE__ */ f("input", {
428
429
  "aria-label": "default",
429
430
  type: "text",
430
- value: je,
431
- onChange: (e) => Me(e.target.value),
431
+ value: Me,
432
+ onChange: (e) => Ne(e.target.value),
432
433
  placeholder: "default",
433
434
  className: "w-full px-3 py-2 text-sm bg-bg-surface border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono",
434
435
  "data-testid": "agent-form-profile-input"
435
436
  }),
436
- /* @__PURE__ */ d("p", {
437
+ /* @__PURE__ */ f("p", {
437
438
  className: "mt-1 text-xs text-text-muted",
438
439
  children: b("agentsPage.profileNameHint", "Each profile runs an isolated CLI on the daemon. Leave as \"default\" unless you want this agent to host multiple parallel profiles.")
439
440
  })
440
441
  ] })
441
442
  })]
442
443
  }),
443
- pe && /* @__PURE__ */ d("div", {
444
+ he && /* @__PURE__ */ f("div", {
444
445
  className: "border-t border-border-default pt-4 mt-4",
445
- children: pe
446
+ children: he
446
447
  }),
447
- /* @__PURE__ */ f("div", {
448
+ /* @__PURE__ */ p("div", {
448
449
  className: "flex items-center justify-between pt-4",
449
- children: [/* @__PURE__ */ d("button", {
450
+ children: [/* @__PURE__ */ f("button", {
450
451
  type: "button",
451
- onClick: m,
452
+ onClick: h,
452
453
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
453
454
  children: b("agentsPage.cancel", "Cancel")
454
- }), /* @__PURE__ */ f("button", {
455
+ }), /* @__PURE__ */ p("button", {
455
456
  type: "button",
456
- disabled: !Be,
457
+ disabled: !Ve,
457
458
  onClick: () => {
458
- S("validate"), Ie();
459
+ S("validate"), Le();
459
460
  },
460
461
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
461
- children: [b("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ d(s, { className: "size-4" })]
462
+ children: [b("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ f(s, { className: "size-4" })]
462
463
  })]
463
464
  })
464
465
  ]
465
- }), x === "validate" && /* @__PURE__ */ f("div", {
466
+ }), x === "validate" && /* @__PURE__ */ p("div", {
466
467
  className: "space-y-4",
467
468
  children: [
468
- /* @__PURE__ */ f("div", {
469
+ /* @__PURE__ */ p("div", {
469
470
  className: "space-y-3",
470
- children: [/* @__PURE__ */ f("div", {
471
- className: `flex items-center gap-3 p-3 rounded-lg border ${U === null ? "border-border-default bg-bg-sunken" : U.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
472
- children: [H && !U ? /* @__PURE__ */ d(c, { className: "size-5 text-text-secondary animate-spin" }) : U?.ok ? /* @__PURE__ */ d(o, { className: "size-5 text-status-success-text" }) : U ? /* @__PURE__ */ d(l, { className: "size-5 text-status-error-text" }) : /* @__PURE__ */ d("div", { className: "size-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ f("div", {
471
+ children: [/* @__PURE__ */ p("div", {
472
+ className: `flex items-center gap-3 p-3 rounded-lg border ${W === null ? "border-border-default bg-bg-sunken" : W.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
473
+ children: [U && !W ? /* @__PURE__ */ f(c, { className: "size-5 text-text-secondary animate-spin" }) : W?.ok ? /* @__PURE__ */ f(o, { className: "size-5 text-status-success-text" }) : W ? /* @__PURE__ */ f(u, { className: "size-5 text-status-error-text" }) : /* @__PURE__ */ f("div", { className: "size-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ p("div", {
473
474
  className: "flex-1",
474
475
  children: [
475
- /* @__PURE__ */ d("p", {
476
+ /* @__PURE__ */ f("p", {
476
477
  className: "text-sm font-medium text-text-primary",
477
478
  children: b("agentsPage.healthCheck", "Health Check")
478
479
  }),
479
- U?.ok && U.data && /* @__PURE__ */ f("p", {
480
+ W?.ok && W.data && /* @__PURE__ */ p("p", {
480
481
  className: "text-xs text-text-secondary",
481
482
  children: [
482
483
  "Status: ",
483
- U.data.status,
484
+ W.data.status,
484
485
  " | Version: ",
485
- U.data.version,
486
+ W.data.version,
486
487
  " | Uptime: ",
487
- Math.round(U.data.uptime),
488
+ Math.round(W.data.uptime),
488
489
  "s"
489
490
  ]
490
491
  }),
491
- U && !U.ok && /* @__PURE__ */ d("p", {
492
+ W && !W.ok && /* @__PURE__ */ f("p", {
492
493
  className: "text-xs text-status-error-text",
493
- children: U.error
494
+ children: W.error
494
495
  })
495
496
  ]
496
497
  })]
497
- }), /* @__PURE__ */ f("div", {
498
- className: `flex items-center gap-3 p-3 rounded-lg border ${G === null ? "border-border-default bg-bg-sunken" : G.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
499
- children: [H && !G ? /* @__PURE__ */ d(c, { className: "size-5 text-text-secondary animate-spin" }) : G?.ok ? /* @__PURE__ */ d(o, { className: "size-5 text-status-success-text" }) : G ? /* @__PURE__ */ d(l, { className: "size-5 text-status-error-text" }) : /* @__PURE__ */ d("div", { className: "size-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ f("div", {
498
+ }), /* @__PURE__ */ p("div", {
499
+ className: `flex items-center gap-3 p-3 rounded-lg border ${K === null ? "border-border-default bg-bg-sunken" : K.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
500
+ children: [U && !K ? /* @__PURE__ */ f(c, { className: "size-5 text-text-secondary animate-spin" }) : K?.ok ? /* @__PURE__ */ f(o, { className: "size-5 text-status-success-text" }) : K ? /* @__PURE__ */ f(u, { className: "size-5 text-status-error-text" }) : /* @__PURE__ */ f("div", { className: "size-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ p("div", {
500
501
  className: "flex-1",
501
502
  children: [
502
- /* @__PURE__ */ d("p", {
503
+ /* @__PURE__ */ f("p", {
503
504
  className: "text-sm font-medium text-text-primary",
504
505
  children: b("agentsPage.apiAccess", "API Access")
505
506
  }),
506
- G?.ok && G.data && /* @__PURE__ */ f("p", {
507
+ K?.ok && K.data && /* @__PURE__ */ p("p", {
507
508
  className: "text-xs text-text-secondary",
508
509
  children: [
509
510
  "Host: ",
510
- G.data.hostname,
511
+ K.data.hostname,
511
512
  " | ",
512
- G.data.platform,
513
+ K.data.platform,
513
514
  " /",
514
515
  " ",
515
- G.data.arch
516
+ K.data.arch
516
517
  ]
517
518
  }),
518
- G && !G.ok && /* @__PURE__ */ d("p", {
519
+ K && !K.ok && /* @__PURE__ */ f("p", {
519
520
  className: "text-xs text-status-error-text",
520
- children: G.error
521
+ children: K.error
521
522
  })
522
523
  ]
523
524
  })]
524
525
  })]
525
526
  }),
526
- !H && (!U?.ok || !G?.ok) && /* @__PURE__ */ f("button", {
527
+ !U && (!W?.ok || !K?.ok) && /* @__PURE__ */ p("button", {
527
528
  type: "button",
528
- onClick: Ie,
529
+ onClick: Le,
529
530
  className: "flex items-center gap-2 px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
530
- children: [/* @__PURE__ */ d(le, { className: "size-3.5" }), b("agentsPage.retryValidation", "Retry validation")]
531
+ children: [/* @__PURE__ */ f(ue, { className: "size-3.5" }), b("agentsPage.retryValidation", "Retry validation")]
531
532
  }),
532
- Re && /* @__PURE__ */ f("div", {
533
+ ze && /* @__PURE__ */ p("div", {
533
534
  className: "space-y-3 pt-2",
534
- children: [/* @__PURE__ */ d("p", {
535
+ children: [/* @__PURE__ */ f("p", {
535
536
  className: "text-sm font-medium text-text-primary",
536
537
  children: b("agentsPage.detectedAgentInfo", "Detected Agent Info")
537
- }), /* @__PURE__ */ f("div", {
538
+ }), /* @__PURE__ */ p("div", {
538
539
  className: "grid grid-cols-2 gap-3",
539
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
540
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
540
541
  className: "block text-xs font-medium text-text-secondary mb-1",
541
542
  children: b("agentsPage.platform", "Platform")
542
- }), /* @__PURE__ */ f("select", {
543
- value: Ce,
544
- onChange: (e) => we(e.target.value),
543
+ }), /* @__PURE__ */ p("select", {
544
+ value: we,
545
+ onChange: (e) => Te(e.target.value),
545
546
  className: "w-full px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
546
547
  children: [
547
- /* @__PURE__ */ d("option", {
548
+ /* @__PURE__ */ f("option", {
548
549
  value: "linux",
549
550
  children: "Linux"
550
551
  }),
551
- /* @__PURE__ */ d("option", {
552
+ /* @__PURE__ */ f("option", {
552
553
  value: "darwin",
553
554
  children: "macOS"
554
555
  }),
555
- /* @__PURE__ */ d("option", {
556
+ /* @__PURE__ */ f("option", {
556
557
  value: "windows",
557
558
  children: "Windows"
558
559
  })
559
560
  ]
560
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
561
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
561
562
  className: "block text-xs font-medium text-text-secondary mb-1",
562
563
  children: b("agentsPage.architecture", "Architecture")
563
- }), /* @__PURE__ */ f("select", {
564
- value: Te,
565
- onChange: (e) => Ee(e.target.value),
564
+ }), /* @__PURE__ */ p("select", {
565
+ value: Ee,
566
+ onChange: (e) => De(e.target.value),
566
567
  className: "w-full px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
567
568
  children: [
568
- /* @__PURE__ */ d("option", {
569
+ /* @__PURE__ */ f("option", {
569
570
  value: "x86_64",
570
571
  children: "x86_64"
571
572
  }),
572
- /* @__PURE__ */ d("option", {
573
+ /* @__PURE__ */ f("option", {
573
574
  value: "arm64",
574
575
  children: "arm64"
575
576
  }),
576
- /* @__PURE__ */ d("option", {
577
+ /* @__PURE__ */ f("option", {
577
578
  value: "aarch64",
578
579
  children: "aarch64"
579
580
  })
@@ -581,44 +582,44 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
581
582
  })] })]
582
583
  })]
583
584
  }),
584
- ke && /* @__PURE__ */ f("div", {
585
+ Ae && /* @__PURE__ */ p("div", {
585
586
  className: "p-3 bg-status-error-bg/30 border border-status-error-text/20 rounded-lg",
586
- children: [/* @__PURE__ */ f("div", {
587
+ children: [/* @__PURE__ */ p("div", {
587
588
  className: "flex items-center gap-2",
588
- children: [/* @__PURE__ */ d(l, { className: "size-5 text-status-error-text flex-shrink-0" }), /* @__PURE__ */ d("p", {
589
+ children: [/* @__PURE__ */ f(u, { className: "size-5 text-status-error-text flex-shrink-0" }), /* @__PURE__ */ f("p", {
589
590
  className: "text-sm text-status-error-text",
590
- children: ke
591
+ children: Ae
591
592
  })]
592
- }), /* @__PURE__ */ f("div", {
593
+ }), /* @__PURE__ */ p("div", {
593
594
  className: "flex items-center gap-2 mt-3",
594
- children: [/* @__PURE__ */ f("button", {
595
+ children: [/* @__PURE__ */ p("button", {
595
596
  type: "button",
596
597
  onClick: () => {
597
- q(null), S("details"), k(""), j(""), W(null), K(null);
598
+ J(null), S("details"), A(""), M(""), G(null), q(null);
598
599
  },
599
600
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
600
- children: [/* @__PURE__ */ d(le, { className: "size-3.5" }), b("agentsPage.tryDifferentAgent", "Try Different Agent")]
601
- }), /* @__PURE__ */ d("button", {
601
+ children: [/* @__PURE__ */ f(ue, { className: "size-3.5" }), b("agentsPage.tryDifferentAgent", "Try Different Agent")]
602
+ }), /* @__PURE__ */ f("button", {
602
603
  type: "button",
603
- onClick: m,
604
+ onClick: h,
604
605
  className: "px-3 py-1.5 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
605
606
  children: b("agentsPage.close", "Close")
606
607
  })]
607
608
  })]
608
609
  }),
609
- /* @__PURE__ */ f("div", {
610
+ /* @__PURE__ */ p("div", {
610
611
  className: "flex items-center justify-between pt-4",
611
- children: [/* @__PURE__ */ f("button", {
612
+ children: [/* @__PURE__ */ p("button", {
612
613
  type: "button",
613
614
  onClick: () => S("details"),
614
615
  className: "flex items-center gap-1 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
615
- children: [/* @__PURE__ */ d(re, { className: "size-4" }), b("agentsPage.back", "Back")]
616
- }), /* @__PURE__ */ d("button", {
616
+ children: [/* @__PURE__ */ f(ae, { className: "size-4" }), b("agentsPage.back", "Back")]
617
+ }), /* @__PURE__ */ f("button", {
617
618
  type: "button",
618
- disabled: !Re || h || H,
619
- onClick: Le,
619
+ disabled: !ze || me || U,
620
+ onClick: Re,
620
621
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
621
- children: h ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(c, { className: "size-4 animate-spin" }), b("agentsPage.adding", "Adding...")] }) : /* @__PURE__ */ f(u, { children: [b("agentsPage.addAgent", "Add Agent"), /* @__PURE__ */ d(s, { className: "size-4" })] })
622
+ children: me ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(c, { className: "size-4 animate-spin" }), b("agentsPage.adding", "Adding...")] }) : /* @__PURE__ */ p(d, { children: [b("agentsPage.addAgent", "Add Agent"), /* @__PURE__ */ f(s, { className: "size-4" })] })
622
623
  })]
623
624
  })
624
625
  ]
@@ -629,6 +630,6 @@ function p({ onSubmit: p, onCancel: m, isLoading: h, onNavigate: g, targets: _,
629
630
  });
630
631
  }
631
632
  //#endregion
632
- export { p as AgentForm };
633
+ export { m as AgentForm };
633
634
 
634
635
  //# sourceMappingURL=AgentForm.js.map