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