@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.
- package/dist/components/actions/ActionForm.js +260 -252
- package/dist/components/actions/ActionForm.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +138 -135
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/aliases/AliasManager.js +225 -224
- package/dist/components/aliases/AliasManager.js.map +1 -1
- package/dist/components/common/ActionAgentTargetNotice.js +125 -0
- package/dist/components/common/ActionAgentTargetNotice.js.map +1 -0
- package/dist/components/common/CommandEditor.js +49 -0
- package/dist/components/common/CommandEditor.js.map +1 -0
- package/dist/components/common/actionAgentTarget.js +55 -0
- package/dist/components/common/actionAgentTarget.js.map +1 -0
- package/dist/components/common/commandHighlight.js +190 -0
- package/dist/components/common/commandHighlight.js.map +1 -0
- package/dist/components/vibecalendar/ScheduleTaskModal.js +151 -149
- package/dist/components/vibecalendar/ScheduleTaskModal.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckButtonForm.js +231 -219
- package/dist/components/vibedeck/VibeDeckButtonForm.js.map +1 -1
- package/dist/pages/ActionsPage.js +233 -224
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +490 -489
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
5
|
-
import { Check as re, Loader2 as
|
|
6
|
-
import { Fragment as
|
|
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
|
|
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 !!(
|
|
13
|
+
return !!(m.test(t) || p.test(t) || t.includes("not installed on the agent"));
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
-
function ce(e, t =
|
|
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
|
|
19
|
-
let
|
|
20
|
-
|
|
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(
|
|
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) ?
|
|
27
|
+
se(t) ? b(!0) : y(t);
|
|
27
28
|
} finally {
|
|
28
|
-
|
|
29
|
+
_(!1);
|
|
29
30
|
}
|
|
30
|
-
}, [
|
|
31
|
+
}, [p.id, h]);
|
|
31
32
|
ne(() => {
|
|
32
33
|
$();
|
|
33
34
|
}, [$]);
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
let e = ee(
|
|
35
|
+
let ge = async () => {
|
|
36
|
+
M(null);
|
|
37
|
+
let e = ee(x.trim());
|
|
37
38
|
if (e) {
|
|
38
|
-
|
|
39
|
+
M(e);
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
|
-
if (!
|
|
42
|
-
|
|
42
|
+
if (!C.trim()) {
|
|
43
|
+
M(m("aliases.commandRequired", "Command is required"));
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
A(!0);
|
|
46
47
|
try {
|
|
47
|
-
await n(
|
|
48
|
-
name:
|
|
49
|
-
command:
|
|
50
|
-
description:
|
|
51
|
-
cwd:
|
|
52
|
-
}),
|
|
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
|
-
|
|
55
|
+
M(e instanceof Error ? e.message : String(e));
|
|
55
56
|
} finally {
|
|
56
|
-
|
|
57
|
+
A(!1);
|
|
57
58
|
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
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(
|
|
66
|
-
command:
|
|
67
|
-
description:
|
|
68
|
-
cwd:
|
|
69
|
-
}),
|
|
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
|
-
|
|
72
|
+
y(e instanceof Error ? e.message : String(e));
|
|
72
73
|
} finally {
|
|
73
|
-
|
|
74
|
+
V(!1);
|
|
74
75
|
}
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
|
|
76
|
+
}, be = async () => {
|
|
77
|
+
if (Z) {
|
|
78
|
+
he(!0);
|
|
78
79
|
try {
|
|
79
|
-
await n(
|
|
80
|
+
await n(p.id, `${h}/${encodeURIComponent(Z.name)}`, "DELETE"), Q(null), await $();
|
|
80
81
|
} catch (e) {
|
|
81
|
-
|
|
82
|
+
y(e instanceof Error ? e.message : String(e));
|
|
82
83
|
} finally {
|
|
83
|
-
|
|
84
|
+
he(!1);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
},
|
|
87
|
-
if (
|
|
88
|
-
|
|
87
|
+
}, xe = async () => {
|
|
88
|
+
if (H) {
|
|
89
|
+
pe(!0), X(null), q(null);
|
|
89
90
|
try {
|
|
90
|
-
let e =
|
|
91
|
-
|
|
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
|
-
|
|
94
|
+
X(e instanceof Error ? e.message : String(e));
|
|
94
95
|
} finally {
|
|
95
|
-
|
|
96
|
+
pe(!1);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
|
-
return
|
|
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__ */
|
|
103
|
-
/* @__PURE__ */
|
|
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:
|
|
106
|
+
children: m("aliases.unavailableTitle", "Aliases not available on this agent")
|
|
106
107
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ d("p", {
|
|
108
109
|
className: "text-sm text-text-secondary max-w-md mx-auto",
|
|
109
|
-
children:
|
|
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__ */
|
|
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:
|
|
116
|
+
children: m("aliases.retry", "Retry")
|
|
116
117
|
})
|
|
117
118
|
]
|
|
118
|
-
}) : /* @__PURE__ */
|
|
119
|
+
}) : /* @__PURE__ */ f("div", {
|
|
119
120
|
className: "space-y-4",
|
|
120
121
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
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__ */
|
|
125
|
+
/* @__PURE__ */ f("h3", {
|
|
125
126
|
className: "text-sm font-medium text-text-primary flex items-center gap-2",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ d(s, { className: "size-4" }), m("aliases.createTitle", "New alias")]
|
|
127
128
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ f("div", {
|
|
129
130
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ d("input", {
|
|
131
132
|
"aria-label": "control",
|
|
132
133
|
type: "text",
|
|
133
|
-
value:
|
|
134
|
-
onChange: (e) =>
|
|
135
|
-
placeholder:
|
|
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__ */
|
|
138
|
+
}), /* @__PURE__ */ d("input", {
|
|
138
139
|
"aria-label": "control",
|
|
139
140
|
type: "text",
|
|
140
|
-
value:
|
|
141
|
-
onChange: (e) =>
|
|
142
|
-
placeholder:
|
|
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__ */
|
|
147
|
+
/* @__PURE__ */ d("input", {
|
|
147
148
|
"aria-label": "control",
|
|
148
149
|
type: "text",
|
|
149
|
-
value:
|
|
150
|
-
onChange: (e) =>
|
|
151
|
-
placeholder:
|
|
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__ */
|
|
155
|
+
/* @__PURE__ */ d(r, {
|
|
155
156
|
"aria-label": "control",
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
163
|
+
j && /* @__PURE__ */ d("div", {
|
|
163
164
|
className: "text-xs text-status-error-text",
|
|
164
|
-
children:
|
|
165
|
+
children: j
|
|
165
166
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ d("div", {
|
|
167
168
|
className: "flex justify-end",
|
|
168
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ f("button", {
|
|
169
170
|
type: "button",
|
|
170
|
-
onClick:
|
|
171
|
-
disabled:
|
|
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: [
|
|
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__ */
|
|
179
|
+
/* @__PURE__ */ d("div", {
|
|
179
180
|
className: "rounded-lg border border-border-default overflow-hidden",
|
|
180
|
-
children: ue ? /* @__PURE__ */
|
|
181
|
+
children: ue ? /* @__PURE__ */ d("div", {
|
|
181
182
|
className: "p-8 text-center text-text-secondary",
|
|
182
|
-
children: /* @__PURE__ */
|
|
183
|
-
}) :
|
|
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:
|
|
186
|
-
}) :
|
|
186
|
+
children: v
|
|
187
|
+
}) : g.length === 0 ? /* @__PURE__ */ d("div", {
|
|
187
188
|
className: "p-8 text-center text-sm text-text-secondary",
|
|
188
|
-
children:
|
|
189
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
192
|
+
children: [/* @__PURE__ */ d("thead", {
|
|
192
193
|
className: "bg-bg-sunken text-text-secondary",
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ f("tr", { children: [
|
|
195
|
+
/* @__PURE__ */ d("th", {
|
|
195
196
|
className: "text-left px-3 py-2 font-medium",
|
|
196
|
-
children:
|
|
197
|
+
children: m("aliases.colName", "Name")
|
|
197
198
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ d("th", {
|
|
199
200
|
className: "text-left px-3 py-2 font-medium",
|
|
200
|
-
children:
|
|
201
|
+
children: m("aliases.colCommand", "Command")
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ d("th", {
|
|
203
204
|
className: "text-left px-3 py-2 font-medium",
|
|
204
|
-
children:
|
|
205
|
+
children: m("aliases.colDescription", "Description")
|
|
205
206
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ d("th", {
|
|
207
208
|
className: "text-left px-3 py-2 font-medium",
|
|
208
|
-
children:
|
|
209
|
+
children: m("aliases.colCwd", "Cwd")
|
|
209
210
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ d("th", {
|
|
211
212
|
className: "text-left px-3 py-2 font-medium",
|
|
212
|
-
children:
|
|
213
|
+
children: m("aliases.colUpdatedAt", "Updated")
|
|
213
214
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ d("th", {
|
|
215
216
|
className: "text-right px-3 py-2 font-medium",
|
|
216
|
-
children:
|
|
217
|
+
children: m("aliases.colActions", "Actions")
|
|
217
218
|
})
|
|
218
219
|
] })
|
|
219
|
-
}), /* @__PURE__ */
|
|
220
|
-
let t =
|
|
221
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
229
|
+
/* @__PURE__ */ d("td", {
|
|
229
230
|
className: "px-3 py-2 align-top",
|
|
230
|
-
children: t ? /* @__PURE__ */
|
|
231
|
+
children: t ? /* @__PURE__ */ d(r, {
|
|
231
232
|
"aria-label": "control",
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
243
|
+
/* @__PURE__ */ d("td", {
|
|
243
244
|
className: "px-3 py-2 align-top",
|
|
244
|
-
children: t ? /* @__PURE__ */
|
|
245
|
+
children: t ? /* @__PURE__ */ d("input", {
|
|
245
246
|
"aria-label": "control",
|
|
246
|
-
value:
|
|
247
|
-
onChange: (e) =>
|
|
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__ */
|
|
250
|
+
}) : /* @__PURE__ */ d("span", {
|
|
250
251
|
className: "text-xs text-text-secondary",
|
|
251
252
|
children: e.description ?? "—"
|
|
252
253
|
})
|
|
253
254
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ d("td", {
|
|
255
256
|
className: "px-3 py-2 align-top",
|
|
256
|
-
children: t ? /* @__PURE__ */
|
|
257
|
+
children: t ? /* @__PURE__ */ d("input", {
|
|
257
258
|
"aria-label": "~",
|
|
258
|
-
value:
|
|
259
|
-
onChange: (e) =>
|
|
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__ */
|
|
263
|
+
}) : /* @__PURE__ */ d("code", {
|
|
263
264
|
className: "text-xs text-text-secondary",
|
|
264
|
-
title: e.cwd ? e.cwd :
|
|
265
|
-
children: e.cwd ?? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
276
|
+
/* @__PURE__ */ d("td", {
|
|
276
277
|
className: "px-3 py-2 align-top",
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ d("div", {
|
|
278
279
|
className: "flex items-center justify-end gap-1",
|
|
279
|
-
children: t ? /* @__PURE__ */
|
|
280
|
+
children: t ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("button", {
|
|
280
281
|
type: "button",
|
|
281
|
-
onClick: () => void
|
|
282
|
-
disabled:
|
|
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:
|
|
285
|
-
children:
|
|
286
|
-
}), /* @__PURE__ */
|
|
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:
|
|
289
|
+
onClick: ve,
|
|
289
290
|
className: "p-1.5 rounded hover:bg-bg-sunken text-text-secondary",
|
|
290
|
-
title:
|
|
291
|
-
children: /* @__PURE__ */
|
|
292
|
-
})] }) : /* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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:
|
|
300
|
-
children: /* @__PURE__ */
|
|
300
|
+
title: m("aliases.run", "Run"),
|
|
301
|
+
children: /* @__PURE__ */ d(o, { className: "size-4" })
|
|
301
302
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ d("button", {
|
|
303
304
|
type: "button",
|
|
304
|
-
onClick: () =>
|
|
305
|
+
onClick: () => _e(e),
|
|
305
306
|
className: "p-1.5 rounded hover:bg-bg-sunken text-text-secondary",
|
|
306
|
-
title:
|
|
307
|
-
children: /* @__PURE__ */
|
|
307
|
+
title: m("aliases.edit", "Edit"),
|
|
308
|
+
children: /* @__PURE__ */ d(ae, { className: "size-4" })
|
|
308
309
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ d("button", {
|
|
310
311
|
type: "button",
|
|
311
|
-
onClick: () =>
|
|
312
|
+
onClick: () => Q(e),
|
|
312
313
|
className: "p-1.5 rounded hover:bg-bg-sunken text-status-error-text",
|
|
313
|
-
title:
|
|
314
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
325
|
+
H && /* @__PURE__ */ d("div", {
|
|
325
326
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
|
|
326
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
330
|
+
/* @__PURE__ */ f("div", {
|
|
330
331
|
className: "flex items-center justify-between px-6 py-4 border-b border-border-default",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
335
|
-
|
|
335
|
+
/* @__PURE__ */ d(oe, { className: "size-5" }),
|
|
336
|
+
m("aliases.runTitle", "Run alias"),
|
|
336
337
|
": ",
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ d("code", { children: H.name })
|
|
338
339
|
]
|
|
339
|
-
}), /* @__PURE__ */
|
|
340
|
+
}), /* @__PURE__ */ d("button", {
|
|
340
341
|
type: "button",
|
|
341
|
-
onClick: () =>
|
|
342
|
+
onClick: () => U(null),
|
|
342
343
|
className: "p-1 rounded hover:bg-bg-sunken",
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ d(l, { className: "size-5 text-text-secondary" })
|
|
344
345
|
})]
|
|
345
346
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ f("div", {
|
|
347
348
|
className: "flex-1 overflow-y-auto p-6 space-y-3",
|
|
348
349
|
children: [
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ f("div", {
|
|
350
351
|
className: "text-xs text-text-secondary font-mono break-all",
|
|
351
|
-
children: ["$ ",
|
|
352
|
+
children: ["$ ", H.command]
|
|
352
353
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ d("input", {
|
|
354
355
|
"aria-label": "control",
|
|
355
356
|
type: "text",
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
placeholder:
|
|
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
|
-
|
|
362
|
+
Y && /* @__PURE__ */ d("div", {
|
|
362
363
|
className: "text-sm text-status-error-text",
|
|
363
|
-
children:
|
|
364
|
+
children: Y
|
|
364
365
|
}),
|
|
365
|
-
|
|
366
|
+
K && /* @__PURE__ */ f("div", {
|
|
366
367
|
className: "space-y-2",
|
|
367
368
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ f("div", {
|
|
369
370
|
className: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-text-secondary",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
371
|
-
|
|
371
|
+
children: [/* @__PURE__ */ f("span", { children: [
|
|
372
|
+
m("aliases.exitCode", "Exit code"),
|
|
372
373
|
":",
|
|
373
374
|
" ",
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
className:
|
|
376
|
-
children:
|
|
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
|
-
] }),
|
|
379
|
-
|
|
379
|
+
] }), K.cwd && /* @__PURE__ */ f("span", { children: [
|
|
380
|
+
m("aliases.runCwd", "Cwd"),
|
|
380
381
|
":",
|
|
381
382
|
" ",
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ d("code", {
|
|
383
384
|
className: "font-mono text-text-primary",
|
|
384
|
-
children:
|
|
385
|
+
children: K.cwd
|
|
385
386
|
})
|
|
386
387
|
] })]
|
|
387
388
|
}),
|
|
388
|
-
|
|
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__ */
|
|
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:
|
|
394
|
+
children: K.stdout
|
|
394
395
|
})] }),
|
|
395
|
-
|
|
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__ */
|
|
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:
|
|
401
|
+
children: K.stderr
|
|
401
402
|
})] })
|
|
402
403
|
]
|
|
403
404
|
})
|
|
404
405
|
]
|
|
405
406
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
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__ */
|
|
409
|
+
children: [/* @__PURE__ */ d("button", {
|
|
409
410
|
type: "button",
|
|
410
|
-
onClick: () =>
|
|
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:
|
|
413
|
-
}), /* @__PURE__ */
|
|
413
|
+
children: m("common.close", "Close")
|
|
414
|
+
}), /* @__PURE__ */ f("button", {
|
|
414
415
|
type: "button",
|
|
415
|
-
onClick: () => void
|
|
416
|
-
disabled:
|
|
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: [
|
|
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
|
-
|
|
425
|
+
Z && /* @__PURE__ */ d("div", {
|
|
425
426
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
|
|
426
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
430
|
+
/* @__PURE__ */ d("h2", {
|
|
430
431
|
className: "text-lg font-semibold text-text-primary",
|
|
431
|
-
children:
|
|
432
|
+
children: m("aliases.deleteTitle", "Delete alias?")
|
|
432
433
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ f("p", {
|
|
434
435
|
className: "text-sm text-text-secondary",
|
|
435
436
|
children: [
|
|
436
|
-
|
|
437
|
+
m("aliases.deleteConfirm", "This permanently removes the alias from this profile."),
|
|
437
438
|
" ",
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ d("code", {
|
|
439
440
|
className: "font-mono text-text-primary",
|
|
440
|
-
children:
|
|
441
|
+
children: Z.name
|
|
441
442
|
})
|
|
442
443
|
]
|
|
443
444
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ f("div", {
|
|
445
446
|
className: "flex justify-end gap-3",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ d("button", {
|
|
447
448
|
type: "button",
|
|
448
|
-
onClick: () =>
|
|
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:
|
|
451
|
-
}), /* @__PURE__ */
|
|
451
|
+
children: m("common.cancel", "Cancel")
|
|
452
|
+
}), /* @__PURE__ */ f("button", {
|
|
452
453
|
type: "button",
|
|
453
|
-
onClick: () => void
|
|
454
|
-
disabled:
|
|
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: [
|
|
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 {
|
|
467
|
+
export { g as AliasManager };
|
|
467
468
|
|
|
468
469
|
//# sourceMappingURL=AliasManager.js.map
|