@burdenoff/microfe-vibecontrols 2026.602.9 → 2026.608.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,317 +1,318 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { agentAiGet as t, agentAiMutate as n } from "../../services/aiApi.js";
3
+ import { CommandEditor as r } from "../common/CommandEditor.js";
3
4
  import { validateAliasName as ee } from "./aliasReservedNames.js";
4
- import { useCallback as te, useEffect as ne, useState as r } from "react";
5
- import { Check as re, Loader2 as i, PackageOpen as ie, Pencil as ae, Play as a, Plus as o, Terminal as oe, Trash2 as s, X as c } from "lucide-react";
6
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { useCallback as te, useEffect as ne, useState as i } from "react";
6
+ import { Check as re, Loader2 as a, PackageOpen as ie, Pencil as ae, Play as o, Plus as s, Terminal as oe, Trash2 as c, X as l } from "lucide-react";
7
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
7
8
  //#region src/components/aliases/AliasManager.tsx
8
- var f = /(?:^|[\s"'(:\[])404(?=$|[\s"',.):;\]])/, p = /(?:^|[\s"'(:\[])not_found(?=$|[\s"',.):;\]])/;
9
+ var p = /(?:^|[\s"'(:\[])404(?=$|[\s"',.):;\]])/, m = /(?:^|[\s"'(:\[])not_found(?=$|[\s"',.):;\]])/;
9
10
  function se(e) {
10
11
  if (!e) return !1;
11
12
  let t = e.toLowerCase();
12
- return !!(p.test(t) || f.test(t) || t.includes("not installed on the agent"));
13
+ return !!(m.test(t) || p.test(t) || t.includes("not installed on the agent"));
13
14
  }
14
- var m = 80;
15
- function ce(e, t = m) {
15
+ var h = 80;
16
+ function ce(e, t = h) {
16
17
  return e ? e.length > t ? `${e.slice(0, t)}…` : e : "";
17
18
  }
18
- function h({ agent: f }) {
19
- let p = e(), m = `/api/profiles/${encodeURIComponent(f.profile ?? "default")}/agent/aliases`, [h, le] = r([]), [ue, de] = r(!0), [g, _] = r(null), [fe, v] = r(!1), [y, b] = r(""), [x, S] = r(""), [C, w] = r(""), [T, E] = r(""), [D, O] = r(!1), [k, A] = r(null), [pe, j] = r(null), [M, N] = r(""), [P, F] = r(""), [I, L] = r(""), [R, z] = r(!1), [B, V] = r(null), [H, U] = r(""), [W, G] = r(null), [K, q] = r(!1), [J, Y] = r(null), [X, Z] = r(null), [Q, me] = r(!1), $ = te(async () => {
20
- de(!0), _(null), v(!1);
19
+ function g({ agent: p }) {
20
+ let m = e(), h = `/api/profiles/${encodeURIComponent(p.profile ?? "default")}/agent/aliases`, [g, le] = i([]), [ue, _] = i(!0), [v, y] = i(null), [de, b] = i(!1), [x, S] = i(""), [C, w] = i(""), [T, E] = i(""), [D, O] = i(""), [k, A] = i(!1), [j, M] = i(null), [fe, N] = i(null), [P, F] = i(""), [I, L] = i(""), [R, z] = i(""), [B, V] = i(!1), [H, U] = i(null), [W, G] = i(""), [K, q] = i(null), [J, pe] = i(!1), [Y, X] = i(null), [Z, Q] = i(null), [me, he] = i(!1), $ = te(async () => {
21
+ _(!0), y(null), b(!1);
21
22
  try {
22
- let e = await t(f.id, m);
23
+ let e = await t(p.id, h);
23
24
  le(Array.isArray(e) ? e : e.aliases ?? e.items ?? []);
24
25
  } catch (e) {
25
26
  let t = e instanceof Error ? e.message : String(e);
26
- se(t) ? v(!0) : _(t);
27
+ se(t) ? b(!0) : y(t);
27
28
  } finally {
28
- de(!1);
29
+ _(!1);
29
30
  }
30
- }, [f.id, m]);
31
+ }, [p.id, h]);
31
32
  ne(() => {
32
33
  $();
33
34
  }, [$]);
34
- let he = async () => {
35
- A(null);
36
- let e = ee(y.trim());
35
+ let ge = async () => {
36
+ M(null);
37
+ let e = ee(x.trim());
37
38
  if (e) {
38
- A(e);
39
+ M(e);
39
40
  return;
40
41
  }
41
- if (!x.trim()) {
42
- A(p("aliases.commandRequired", "Command is required"));
42
+ if (!C.trim()) {
43
+ M(m("aliases.commandRequired", "Command is required"));
43
44
  return;
44
45
  }
45
- O(!0);
46
+ A(!0);
46
47
  try {
47
- await n(f.id, m, "POST", {
48
- name: y.trim(),
49
- command: x,
50
- description: C || void 0,
51
- cwd: T.trim() || void 0
52
- }), b(""), S(""), w(""), E(""), await $();
48
+ await n(p.id, h, "POST", {
49
+ name: x.trim(),
50
+ command: C,
51
+ description: T || void 0,
52
+ cwd: D.trim() || void 0
53
+ }), S(""), w(""), E(""), O(""), await $();
53
54
  } catch (e) {
54
- A(e instanceof Error ? e.message : String(e));
55
+ M(e instanceof Error ? e.message : String(e));
55
56
  } finally {
56
- O(!1);
57
+ A(!1);
57
58
  }
58
- }, ge = (e) => {
59
- j(e.name), N(e.command), F(e.description ?? ""), L(e.cwd ?? "");
60
- }, _e = () => {
61
- j(null), N(""), F(""), L("");
62
- }, ve = async (e) => {
63
- z(!0);
59
+ }, _e = (e) => {
60
+ N(e.name), F(e.command), L(e.description ?? ""), z(e.cwd ?? "");
61
+ }, ve = () => {
62
+ N(null), F(""), L(""), z("");
63
+ }, ye = async (e) => {
64
+ V(!0);
64
65
  try {
65
- await n(f.id, `${m}/${encodeURIComponent(e.name)}`, "PUT", {
66
- command: M,
67
- description: P || void 0,
68
- cwd: I.trim()
69
- }), _e(), await $();
66
+ await n(p.id, `${h}/${encodeURIComponent(e.name)}`, "PUT", {
67
+ command: P,
68
+ description: I || void 0,
69
+ cwd: R.trim()
70
+ }), ve(), await $();
70
71
  } catch (e) {
71
- _(e instanceof Error ? e.message : String(e));
72
+ y(e instanceof Error ? e.message : String(e));
72
73
  } finally {
73
- z(!1);
74
+ V(!1);
74
75
  }
75
- }, ye = async () => {
76
- if (X) {
77
- me(!0);
76
+ }, be = async () => {
77
+ if (Z) {
78
+ he(!0);
78
79
  try {
79
- await n(f.id, `${m}/${encodeURIComponent(X.name)}`, "DELETE"), Z(null), await $();
80
+ await n(p.id, `${h}/${encodeURIComponent(Z.name)}`, "DELETE"), Q(null), await $();
80
81
  } catch (e) {
81
- _(e instanceof Error ? e.message : String(e));
82
+ y(e instanceof Error ? e.message : String(e));
82
83
  } finally {
83
- me(!1);
84
+ he(!1);
84
85
  }
85
86
  }
86
- }, be = async () => {
87
- if (B) {
88
- q(!0), Y(null), G(null);
87
+ }, xe = async () => {
88
+ if (H) {
89
+ pe(!0), X(null), q(null);
89
90
  try {
90
- let e = H.split(/\s+/).filter(Boolean);
91
- G(await n(f.id, `${m}/${encodeURIComponent(B.name)}/execute`, "POST", { args: e }));
91
+ let e = W.split(/\s+/).filter(Boolean);
92
+ q(await n(p.id, `${h}/${encodeURIComponent(H.name)}/execute`, "POST", { args: e }));
92
93
  } catch (e) {
93
- Y(e instanceof Error ? e.message : String(e));
94
+ X(e instanceof Error ? e.message : String(e));
94
95
  } finally {
95
- q(!1);
96
+ pe(!1);
96
97
  }
97
98
  }
98
99
  };
99
- return fe ? /* @__PURE__ */ d("div", {
100
+ return de ? /* @__PURE__ */ f("div", {
100
101
  className: "rounded-lg border border-border-default bg-bg-surface p-8 text-center space-y-3",
101
102
  children: [
102
- /* @__PURE__ */ u(ie, { className: "size-8 mx-auto text-text-muted" }),
103
- /* @__PURE__ */ u("h3", {
103
+ /* @__PURE__ */ d(ie, { className: "size-8 mx-auto text-text-muted" }),
104
+ /* @__PURE__ */ d("h3", {
104
105
  className: "text-base font-medium text-text-primary",
105
- children: p("aliases.unavailableTitle", "Aliases not available on this agent")
106
+ children: m("aliases.unavailableTitle", "Aliases not available on this agent")
106
107
  }),
107
- /* @__PURE__ */ u("p", {
108
+ /* @__PURE__ */ d("p", {
108
109
  className: "text-sm text-text-secondary max-w-md mx-auto",
109
- children: p("aliases.unavailableBody", "This agent version doesn't support shell aliases. Upgrade the agent to the latest @vibecontrols/agent release to enable per-agent shell aliases.")
110
+ children: m("aliases.unavailableBody", "This agent version doesn't support shell aliases. Upgrade the agent to the latest @vibecontrols/agent release to enable per-agent shell aliases.")
110
111
  }),
111
- /* @__PURE__ */ u("button", {
112
+ /* @__PURE__ */ d("button", {
112
113
  type: "button",
113
114
  onClick: $,
114
115
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-text-secondary border border-border-default rounded-md hover:bg-bg-sunken transition-colors",
115
- children: p("aliases.retry", "Retry")
116
+ children: m("aliases.retry", "Retry")
116
117
  })
117
118
  ]
118
- }) : /* @__PURE__ */ d("div", {
119
+ }) : /* @__PURE__ */ f("div", {
119
120
  className: "space-y-4",
120
121
  children: [
121
- /* @__PURE__ */ d("div", {
122
+ /* @__PURE__ */ f("div", {
122
123
  className: "rounded-lg border border-border-default bg-bg-sunken p-4 space-y-3",
123
124
  children: [
124
- /* @__PURE__ */ d("h3", {
125
+ /* @__PURE__ */ f("h3", {
125
126
  className: "text-sm font-medium text-text-primary flex items-center gap-2",
126
- children: [/* @__PURE__ */ u(o, { className: "size-4" }), p("aliases.createTitle", "New alias")]
127
+ children: [/* @__PURE__ */ d(s, { className: "size-4" }), m("aliases.createTitle", "New alias")]
127
128
  }),
128
- /* @__PURE__ */ d("div", {
129
+ /* @__PURE__ */ f("div", {
129
130
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
130
- children: [/* @__PURE__ */ u("input", {
131
+ children: [/* @__PURE__ */ d("input", {
131
132
  "aria-label": "control",
132
133
  type: "text",
133
- value: y,
134
- onChange: (e) => b(e.target.value),
135
- placeholder: p("aliases.namePlaceholder", "Name (a-z, 0-9, _, -)"),
134
+ value: x,
135
+ onChange: (e) => S(e.target.value),
136
+ placeholder: m("aliases.namePlaceholder", "Name (a-z, 0-9, _, -)"),
136
137
  className: "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"
137
- }), /* @__PURE__ */ u("input", {
138
+ }), /* @__PURE__ */ d("input", {
138
139
  "aria-label": "control",
139
140
  type: "text",
140
- value: C,
141
- onChange: (e) => w(e.target.value),
142
- placeholder: p("aliases.descriptionPlaceholder", "Description (optional)"),
141
+ value: T,
142
+ onChange: (e) => E(e.target.value),
143
+ placeholder: m("aliases.descriptionPlaceholder", "Description (optional)"),
143
144
  className: "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"
144
145
  })]
145
146
  }),
146
- /* @__PURE__ */ u("input", {
147
+ /* @__PURE__ */ d("input", {
147
148
  "aria-label": "control",
148
149
  type: "text",
149
- value: T,
150
- onChange: (e) => E(e.target.value),
151
- placeholder: p("aliases.cwdPlaceholder", "Working directory (optional, defaults to ~). Examples: ~/code/myrepo, /tmp, products/microfe"),
150
+ value: D,
151
+ onChange: (e) => O(e.target.value),
152
+ placeholder: m("aliases.cwdPlaceholder", "Working directory (optional, defaults to ~). Examples: ~/code/myrepo, /tmp, products/microfe"),
152
153
  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"
153
154
  }),
154
- /* @__PURE__ */ u("textarea", {
155
+ /* @__PURE__ */ d(r, {
155
156
  "aria-label": "control",
156
- value: x,
157
- onChange: (e) => S(e.target.value),
158
- placeholder: p("aliases.commandPlaceholder", "Command (e.g. git status)"),
159
- rows: 3,
160
- 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"
157
+ language: "shell",
158
+ value: C,
159
+ onChange: (e) => w(e.target.value),
160
+ placeholder: m("aliases.commandPlaceholder", "Command (e.g. git status)"),
161
+ rows: 3
161
162
  }),
162
- k && /* @__PURE__ */ u("div", {
163
+ j && /* @__PURE__ */ d("div", {
163
164
  className: "text-xs text-status-error-text",
164
- children: k
165
+ children: j
165
166
  }),
166
- /* @__PURE__ */ u("div", {
167
+ /* @__PURE__ */ d("div", {
167
168
  className: "flex justify-end",
168
- children: /* @__PURE__ */ d("button", {
169
+ children: /* @__PURE__ */ f("button", {
169
170
  type: "button",
170
- onClick: he,
171
- disabled: D || !y.trim() || !x.trim(),
171
+ onClick: ge,
172
+ disabled: k || !x.trim() || !C.trim(),
172
173
  className: "inline-flex items-center gap-2 px-3 py-1.5 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",
173
- children: [D ? /* @__PURE__ */ u(i, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(o, { className: "size-4" }), p("aliases.create", "Create")]
174
+ children: [k ? /* @__PURE__ */ d(a, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(s, { className: "size-4" }), m("aliases.create", "Create")]
174
175
  })
175
176
  })
176
177
  ]
177
178
  }),
178
- /* @__PURE__ */ u("div", {
179
+ /* @__PURE__ */ d("div", {
179
180
  className: "rounded-lg border border-border-default overflow-hidden",
180
- children: ue ? /* @__PURE__ */ u("div", {
181
+ children: ue ? /* @__PURE__ */ d("div", {
181
182
  className: "p-8 text-center text-text-secondary",
182
- children: /* @__PURE__ */ u(i, { className: "size-5 animate-spin mx-auto" })
183
- }) : g ? /* @__PURE__ */ u("div", {
183
+ children: /* @__PURE__ */ d(a, { className: "size-5 animate-spin mx-auto" })
184
+ }) : v ? /* @__PURE__ */ d("div", {
184
185
  className: "p-4 text-sm text-status-error-text",
185
- children: g
186
- }) : h.length === 0 ? /* @__PURE__ */ u("div", {
186
+ children: v
187
+ }) : g.length === 0 ? /* @__PURE__ */ d("div", {
187
188
  className: "p-8 text-center text-sm text-text-secondary",
188
- children: p("aliases.empty", "No aliases yet. Create one above.")
189
- }) : /* @__PURE__ */ d("table", {
189
+ children: m("aliases.empty", "No aliases yet. Create one above.")
190
+ }) : /* @__PURE__ */ f("table", {
190
191
  className: "w-full text-sm",
191
- children: [/* @__PURE__ */ u("thead", {
192
+ children: [/* @__PURE__ */ d("thead", {
192
193
  className: "bg-bg-sunken text-text-secondary",
193
- children: /* @__PURE__ */ d("tr", { children: [
194
- /* @__PURE__ */ u("th", {
194
+ children: /* @__PURE__ */ f("tr", { children: [
195
+ /* @__PURE__ */ d("th", {
195
196
  className: "text-left px-3 py-2 font-medium",
196
- children: p("aliases.colName", "Name")
197
+ children: m("aliases.colName", "Name")
197
198
  }),
198
- /* @__PURE__ */ u("th", {
199
+ /* @__PURE__ */ d("th", {
199
200
  className: "text-left px-3 py-2 font-medium",
200
- children: p("aliases.colCommand", "Command")
201
+ children: m("aliases.colCommand", "Command")
201
202
  }),
202
- /* @__PURE__ */ u("th", {
203
+ /* @__PURE__ */ d("th", {
203
204
  className: "text-left px-3 py-2 font-medium",
204
- children: p("aliases.colDescription", "Description")
205
+ children: m("aliases.colDescription", "Description")
205
206
  }),
206
- /* @__PURE__ */ u("th", {
207
+ /* @__PURE__ */ d("th", {
207
208
  className: "text-left px-3 py-2 font-medium",
208
- children: p("aliases.colCwd", "Cwd")
209
+ children: m("aliases.colCwd", "Cwd")
209
210
  }),
210
- /* @__PURE__ */ u("th", {
211
+ /* @__PURE__ */ d("th", {
211
212
  className: "text-left px-3 py-2 font-medium",
212
- children: p("aliases.colUpdatedAt", "Updated")
213
+ children: m("aliases.colUpdatedAt", "Updated")
213
214
  }),
214
- /* @__PURE__ */ u("th", {
215
+ /* @__PURE__ */ d("th", {
215
216
  className: "text-right px-3 py-2 font-medium",
216
- children: p("aliases.colActions", "Actions")
217
+ children: m("aliases.colActions", "Actions")
217
218
  })
218
219
  ] })
219
- }), /* @__PURE__ */ u("tbody", { children: h.map((e) => {
220
- let t = pe === e.name;
221
- return /* @__PURE__ */ d("tr", {
220
+ }), /* @__PURE__ */ d("tbody", { children: g.map((e) => {
221
+ let t = fe === e.name;
222
+ return /* @__PURE__ */ f("tr", {
222
223
  className: "border-t border-border-default",
223
224
  children: [
224
- /* @__PURE__ */ u("td", {
225
+ /* @__PURE__ */ d("td", {
225
226
  className: "px-3 py-2 font-mono text-text-primary align-top",
226
227
  children: e.name
227
228
  }),
228
- /* @__PURE__ */ u("td", {
229
+ /* @__PURE__ */ d("td", {
229
230
  className: "px-3 py-2 align-top",
230
- children: t ? /* @__PURE__ */ u("textarea", {
231
+ children: t ? /* @__PURE__ */ d(r, {
231
232
  "aria-label": "control",
232
- value: M,
233
- onChange: (e) => N(e.target.value),
234
- rows: 2,
235
- className: "w-full px-2 py-1 text-xs bg-bg-surface border border-border-default rounded text-text-primary font-mono"
236
- }) : /* @__PURE__ */ u("code", {
233
+ language: "shell",
234
+ value: P,
235
+ onChange: (e) => F(e.target.value),
236
+ rows: 2
237
+ }) : /* @__PURE__ */ d("code", {
237
238
  className: "text-xs text-text-primary",
238
239
  title: e.command,
239
240
  children: ce(e.command)
240
241
  })
241
242
  }),
242
- /* @__PURE__ */ u("td", {
243
+ /* @__PURE__ */ d("td", {
243
244
  className: "px-3 py-2 align-top",
244
- children: t ? /* @__PURE__ */ u("input", {
245
+ children: t ? /* @__PURE__ */ d("input", {
245
246
  "aria-label": "control",
246
- value: P,
247
- onChange: (e) => F(e.target.value),
247
+ value: I,
248
+ onChange: (e) => L(e.target.value),
248
249
  className: "w-full px-2 py-1 text-xs bg-bg-surface border border-border-default rounded text-text-primary"
249
- }) : /* @__PURE__ */ u("span", {
250
+ }) : /* @__PURE__ */ d("span", {
250
251
  className: "text-xs text-text-secondary",
251
252
  children: e.description ?? "—"
252
253
  })
253
254
  }),
254
- /* @__PURE__ */ u("td", {
255
+ /* @__PURE__ */ d("td", {
255
256
  className: "px-3 py-2 align-top",
256
- children: t ? /* @__PURE__ */ u("input", {
257
+ children: t ? /* @__PURE__ */ d("input", {
257
258
  "aria-label": "~",
258
- value: I,
259
- onChange: (e) => L(e.target.value),
259
+ value: R,
260
+ onChange: (e) => z(e.target.value),
260
261
  placeholder: "~",
261
262
  className: "w-full px-2 py-1 text-xs bg-bg-surface border border-border-default rounded text-text-primary font-mono"
262
- }) : /* @__PURE__ */ u("code", {
263
+ }) : /* @__PURE__ */ d("code", {
263
264
  className: "text-xs text-text-secondary",
264
- title: e.cwd ? e.cwd : p("aliases.cwdDefaultTitle", "No cwd set — runs in $HOME (the user home directory)."),
265
- children: e.cwd ?? /* @__PURE__ */ u("span", {
265
+ title: e.cwd ? e.cwd : m("aliases.cwdDefaultTitle", "No cwd set — runs in $HOME (the user home directory)."),
266
+ children: e.cwd ?? /* @__PURE__ */ d("span", {
266
267
  className: "italic text-text-placeholder",
267
268
  children: "~"
268
269
  })
269
270
  })
270
271
  }),
271
- /* @__PURE__ */ u("td", {
272
+ /* @__PURE__ */ d("td", {
272
273
  className: "px-3 py-2 text-xs text-text-secondary align-top",
273
274
  children: e.updatedAt ? new Date(e.updatedAt).toLocaleString() : "—"
274
275
  }),
275
- /* @__PURE__ */ u("td", {
276
+ /* @__PURE__ */ d("td", {
276
277
  className: "px-3 py-2 align-top",
277
- children: /* @__PURE__ */ u("div", {
278
+ children: /* @__PURE__ */ d("div", {
278
279
  className: "flex items-center justify-end gap-1",
279
- children: t ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("button", {
280
+ children: t ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("button", {
280
281
  type: "button",
281
- onClick: () => void ve(e),
282
- disabled: R,
282
+ onClick: () => void ye(e),
283
+ disabled: B,
283
284
  className: "p-1.5 rounded hover:bg-bg-sunken text-status-success-text",
284
- title: p("aliases.save", "Save"),
285
- children: R ? /* @__PURE__ */ u(i, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(re, { className: "size-4" })
286
- }), /* @__PURE__ */ u("button", {
285
+ title: m("aliases.save", "Save"),
286
+ children: B ? /* @__PURE__ */ d(a, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(re, { className: "size-4" })
287
+ }), /* @__PURE__ */ d("button", {
287
288
  type: "button",
288
- onClick: _e,
289
+ onClick: ve,
289
290
  className: "p-1.5 rounded hover:bg-bg-sunken text-text-secondary",
290
- title: p("common.cancel", "Cancel"),
291
- children: /* @__PURE__ */ u(c, { className: "size-4" })
292
- })] }) : /* @__PURE__ */ d(l, { children: [
293
- /* @__PURE__ */ u("button", {
291
+ title: m("common.cancel", "Cancel"),
292
+ children: /* @__PURE__ */ d(l, { className: "size-4" })
293
+ })] }) : /* @__PURE__ */ f(u, { children: [
294
+ /* @__PURE__ */ d("button", {
294
295
  type: "button",
295
296
  onClick: () => {
296
- V(e), U(""), G(null), Y(null);
297
+ U(e), G(""), q(null), X(null);
297
298
  },
298
299
  className: "p-1.5 rounded hover:bg-bg-sunken text-action-primary-bg",
299
- title: p("aliases.run", "Run"),
300
- children: /* @__PURE__ */ u(a, { className: "size-4" })
300
+ title: m("aliases.run", "Run"),
301
+ children: /* @__PURE__ */ d(o, { className: "size-4" })
301
302
  }),
302
- /* @__PURE__ */ u("button", {
303
+ /* @__PURE__ */ d("button", {
303
304
  type: "button",
304
- onClick: () => ge(e),
305
+ onClick: () => _e(e),
305
306
  className: "p-1.5 rounded hover:bg-bg-sunken text-text-secondary",
306
- title: p("aliases.edit", "Edit"),
307
- children: /* @__PURE__ */ u(ae, { className: "size-4" })
307
+ title: m("aliases.edit", "Edit"),
308
+ children: /* @__PURE__ */ d(ae, { className: "size-4" })
308
309
  }),
309
- /* @__PURE__ */ u("button", {
310
+ /* @__PURE__ */ d("button", {
310
311
  type: "button",
311
- onClick: () => Z(e),
312
+ onClick: () => Q(e),
312
313
  className: "p-1.5 rounded hover:bg-bg-sunken text-status-error-text",
313
- title: p("aliases.delete", "Delete"),
314
- children: /* @__PURE__ */ u(s, { className: "size-4" })
314
+ title: m("aliases.delete", "Delete"),
315
+ children: /* @__PURE__ */ d(c, { className: "size-4" })
315
316
  })
316
317
  ] })
317
318
  })
@@ -321,139 +322,139 @@ function h({ agent: f }) {
321
322
  }) })]
322
323
  })
323
324
  }),
324
- B && /* @__PURE__ */ u("div", {
325
+ H && /* @__PURE__ */ d("div", {
325
326
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
326
- children: /* @__PURE__ */ d("div", {
327
+ children: /* @__PURE__ */ f("div", {
327
328
  className: "w-full max-w-2xl bg-bg-surface rounded-lg shadow-xl max-h-[90vh] flex flex-col",
328
329
  children: [
329
- /* @__PURE__ */ d("div", {
330
+ /* @__PURE__ */ f("div", {
330
331
  className: "flex items-center justify-between px-6 py-4 border-b border-border-default",
331
- children: [/* @__PURE__ */ d("h2", {
332
+ children: [/* @__PURE__ */ f("h2", {
332
333
  className: "text-lg font-semibold text-text-primary flex items-center gap-2",
333
334
  children: [
334
- /* @__PURE__ */ u(oe, { className: "size-5" }),
335
- p("aliases.runTitle", "Run alias"),
335
+ /* @__PURE__ */ d(oe, { className: "size-5" }),
336
+ m("aliases.runTitle", "Run alias"),
336
337
  ": ",
337
- /* @__PURE__ */ u("code", { children: B.name })
338
+ /* @__PURE__ */ d("code", { children: H.name })
338
339
  ]
339
- }), /* @__PURE__ */ u("button", {
340
+ }), /* @__PURE__ */ d("button", {
340
341
  type: "button",
341
- onClick: () => V(null),
342
+ onClick: () => U(null),
342
343
  className: "p-1 rounded hover:bg-bg-sunken",
343
- children: /* @__PURE__ */ u(c, { className: "size-5 text-text-secondary" })
344
+ children: /* @__PURE__ */ d(l, { className: "size-5 text-text-secondary" })
344
345
  })]
345
346
  }),
346
- /* @__PURE__ */ d("div", {
347
+ /* @__PURE__ */ f("div", {
347
348
  className: "flex-1 overflow-y-auto p-6 space-y-3",
348
349
  children: [
349
- /* @__PURE__ */ d("div", {
350
+ /* @__PURE__ */ f("div", {
350
351
  className: "text-xs text-text-secondary font-mono break-all",
351
- children: ["$ ", B.command]
352
+ children: ["$ ", H.command]
352
353
  }),
353
- /* @__PURE__ */ u("input", {
354
+ /* @__PURE__ */ d("input", {
354
355
  "aria-label": "control",
355
356
  type: "text",
356
- value: H,
357
- onChange: (e) => U(e.target.value),
358
- placeholder: p("aliases.argsPlaceholder", "Args (space-separated, optional)"),
357
+ value: W,
358
+ onChange: (e) => G(e.target.value),
359
+ placeholder: m("aliases.argsPlaceholder", "Args (space-separated, optional)"),
359
360
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary font-mono"
360
361
  }),
361
- J && /* @__PURE__ */ u("div", {
362
+ Y && /* @__PURE__ */ d("div", {
362
363
  className: "text-sm text-status-error-text",
363
- children: J
364
+ children: Y
364
365
  }),
365
- W && /* @__PURE__ */ d("div", {
366
+ K && /* @__PURE__ */ f("div", {
366
367
  className: "space-y-2",
367
368
  children: [
368
- /* @__PURE__ */ d("div", {
369
+ /* @__PURE__ */ f("div", {
369
370
  className: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-text-secondary",
370
- children: [/* @__PURE__ */ d("span", { children: [
371
- p("aliases.exitCode", "Exit code"),
371
+ children: [/* @__PURE__ */ f("span", { children: [
372
+ m("aliases.exitCode", "Exit code"),
372
373
  ":",
373
374
  " ",
374
- /* @__PURE__ */ u("span", {
375
- className: W.exit_code === 0 ? "text-status-success-text font-mono" : "text-status-error-text font-mono",
376
- children: W.exit_code
375
+ /* @__PURE__ */ d("span", {
376
+ className: K.exit_code === 0 ? "text-status-success-text font-mono" : "text-status-error-text font-mono",
377
+ children: K.exit_code
377
378
  })
378
- ] }), W.cwd && /* @__PURE__ */ d("span", { children: [
379
- p("aliases.runCwd", "Cwd"),
379
+ ] }), K.cwd && /* @__PURE__ */ f("span", { children: [
380
+ m("aliases.runCwd", "Cwd"),
380
381
  ":",
381
382
  " ",
382
- /* @__PURE__ */ u("code", {
383
+ /* @__PURE__ */ d("code", {
383
384
  className: "font-mono text-text-primary",
384
- children: W.cwd
385
+ children: K.cwd
385
386
  })
386
387
  ] })]
387
388
  }),
388
- W.stdout && /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
389
+ K.stdout && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
389
390
  className: "text-xs text-text-secondary mb-1",
390
391
  children: "stdout"
391
- }), /* @__PURE__ */ u("pre", {
392
+ }), /* @__PURE__ */ d("pre", {
392
393
  className: "text-xs bg-bg-sunken p-3 rounded font-mono whitespace-pre-wrap break-all max-h-64 overflow-y-auto text-text-primary",
393
- children: W.stdout
394
+ children: K.stdout
394
395
  })] }),
395
- W.stderr && /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("div", {
396
+ K.stderr && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
396
397
  className: "text-xs text-text-secondary mb-1",
397
398
  children: "stderr"
398
- }), /* @__PURE__ */ u("pre", {
399
+ }), /* @__PURE__ */ d("pre", {
399
400
  className: "text-xs bg-bg-sunken p-3 rounded font-mono whitespace-pre-wrap break-all max-h-64 overflow-y-auto text-status-error-text",
400
- children: W.stderr
401
+ children: K.stderr
401
402
  })] })
402
403
  ]
403
404
  })
404
405
  ]
405
406
  }),
406
- /* @__PURE__ */ d("div", {
407
+ /* @__PURE__ */ f("div", {
407
408
  className: "flex items-center justify-end gap-3 px-6 py-4 border-t border-border-default bg-bg-sunken",
408
- children: [/* @__PURE__ */ u("button", {
409
+ children: [/* @__PURE__ */ d("button", {
409
410
  type: "button",
410
- onClick: () => V(null),
411
+ onClick: () => U(null),
411
412
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-elevated",
412
- children: p("common.close", "Close")
413
- }), /* @__PURE__ */ d("button", {
413
+ children: m("common.close", "Close")
414
+ }), /* @__PURE__ */ f("button", {
414
415
  type: "button",
415
- onClick: () => void be(),
416
- disabled: K,
416
+ onClick: () => void xe(),
417
+ disabled: J,
417
418
  className: "inline-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 disabled:opacity-50",
418
- children: [K ? /* @__PURE__ */ u(i, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(a, { className: "size-4" }), p("aliases.run", "Run")]
419
+ children: [J ? /* @__PURE__ */ d(a, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(o, { className: "size-4" }), m("aliases.run", "Run")]
419
420
  })]
420
421
  })
421
422
  ]
422
423
  })
423
424
  }),
424
- X && /* @__PURE__ */ u("div", {
425
+ Z && /* @__PURE__ */ d("div", {
425
426
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
426
- children: /* @__PURE__ */ d("div", {
427
+ children: /* @__PURE__ */ f("div", {
427
428
  className: "w-full max-w-md bg-bg-surface rounded-lg shadow-xl p-6 space-y-4",
428
429
  children: [
429
- /* @__PURE__ */ u("h2", {
430
+ /* @__PURE__ */ d("h2", {
430
431
  className: "text-lg font-semibold text-text-primary",
431
- children: p("aliases.deleteTitle", "Delete alias?")
432
+ children: m("aliases.deleteTitle", "Delete alias?")
432
433
  }),
433
- /* @__PURE__ */ d("p", {
434
+ /* @__PURE__ */ f("p", {
434
435
  className: "text-sm text-text-secondary",
435
436
  children: [
436
- p("aliases.deleteConfirm", "This permanently removes the alias from this profile."),
437
+ m("aliases.deleteConfirm", "This permanently removes the alias from this profile."),
437
438
  " ",
438
- /* @__PURE__ */ u("code", {
439
+ /* @__PURE__ */ d("code", {
439
440
  className: "font-mono text-text-primary",
440
- children: X.name
441
+ children: Z.name
441
442
  })
442
443
  ]
443
444
  }),
444
- /* @__PURE__ */ d("div", {
445
+ /* @__PURE__ */ f("div", {
445
446
  className: "flex justify-end gap-3",
446
- children: [/* @__PURE__ */ u("button", {
447
+ children: [/* @__PURE__ */ d("button", {
447
448
  type: "button",
448
- onClick: () => Z(null),
449
+ onClick: () => Q(null),
449
450
  className: "px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary hover:bg-bg-elevated",
450
- children: p("common.cancel", "Cancel")
451
- }), /* @__PURE__ */ d("button", {
451
+ children: m("common.cancel", "Cancel")
452
+ }), /* @__PURE__ */ f("button", {
452
453
  type: "button",
453
- onClick: () => void ye(),
454
- disabled: Q,
454
+ onClick: () => void be(),
455
+ disabled: me,
455
456
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-status-error-text bg-status-error-bg rounded-md hover:opacity-80 disabled:opacity-50",
456
- children: [Q ? /* @__PURE__ */ u(i, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(s, { className: "size-4" }), p("aliases.delete", "Delete")]
457
+ children: [me ? /* @__PURE__ */ d(a, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(c, { className: "size-4" }), m("aliases.delete", "Delete")]
457
458
  })]
458
459
  })
459
460
  ]
@@ -463,6 +464,6 @@ function h({ agent: f }) {
463
464
  });
464
465
  }
465
466
  //#endregion
466
- export { h as AliasManager };
467
+ export { g as AliasManager };
467
468
 
468
469
  //# sourceMappingURL=AliasManager.js.map