@burdenoff/microfe-vibecontrols 2026.602.8 → 2026.602.10
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/generated/wspace-operations.js +1 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.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/dist/pages/SessionDetailsPage.js +401 -401
- package/dist/pages/SessionDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,14 +28,14 @@ import "../components/actions/index.js";
|
|
|
28
28
|
import { useCallback as u, useEffect as Oe, useMemo as d, useState as f } from "react";
|
|
29
29
|
import { useI18n as ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
30
30
|
import { Copy as Ae, Play as je, Plus as Me, RefreshCw as Ne, Trash2 as Pe } from "lucide-react";
|
|
31
|
-
import { useNavigate as Fe } from "react-router-dom";
|
|
32
|
-
import { usePermissions as
|
|
31
|
+
import { useNavigate as Fe, useSearchParams as Ie } from "react-router-dom";
|
|
32
|
+
import { usePermissions as Le } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
33
33
|
import { AnimatePresence as p } from "framer-motion";
|
|
34
34
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
35
|
-
import { AccessDenied as
|
|
35
|
+
import { AccessDenied as Re } from "@burdenoff/fe-libs/shared/components";
|
|
36
36
|
import { MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
|
|
37
37
|
//#region src/pages/ActionsPage.tsx
|
|
38
|
-
var
|
|
38
|
+
var ze = [
|
|
39
39
|
{
|
|
40
40
|
value: "COMMAND",
|
|
41
41
|
label: "Command"
|
|
@@ -52,7 +52,7 @@ var Re = [
|
|
|
52
52
|
value: "WORKFLOW",
|
|
53
53
|
label: "Workflow"
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], Be = [
|
|
56
56
|
{
|
|
57
57
|
value: "MANUAL",
|
|
58
58
|
label: "Manual"
|
|
@@ -71,43 +71,43 @@ var Re = [
|
|
|
71
71
|
}
|
|
72
72
|
];
|
|
73
73
|
function _() {
|
|
74
|
-
let _ = Fe(), { workspaceId:
|
|
74
|
+
let _ = Fe(), [v, Ve] = Ie(), { workspaceId: He } = ae(), { hasPermission: y, isLoading: Ue, permissions: b } = Le(), x = ((e) => (t, n) => {
|
|
75
75
|
let r = e.t(t);
|
|
76
76
|
return r === t ? n : r;
|
|
77
|
-
})(ke()),
|
|
77
|
+
})(ke()), S = (Array.isArray(b) ? b : b?.permissionStrings)?.some?.((e) => e.startsWith("action:")), We = S ? y(l.ACTION_LIST) : !0, Ge = S ? y(l.ACTION_CREATE) : !0, Ke = S ? y(l.ACTION_UPDATE) : !0, qe = S ? y(l.ACTION_DELETE) : !0, Je = S ? y(l.ACTION_EXECUTE) : !0, C = Ue, [w, T] = f({ type: "none" }), [Ye, E] = f([]), [D, Xe] = f(""), [O, Ze] = f(null), [k, Qe] = f(null), [A, j] = f(null), [M, N] = f(/* @__PURE__ */ new Set()), [$e, et] = f(null), [tt, P] = f(null), [F, I] = f(null), [L, R] = f(null), [z, B] = f(null), [nt, rt] = f(!1), { profiles: it } = ye(z?.agentId ?? null), at = it.find((e) => e.isDefault)?.name ?? "default", [V, ot] = f(c), [st, ct] = f(c), H = u((e, t, n, r = 1e4) => {
|
|
78
78
|
let i = Date.now() + Math.random();
|
|
79
|
-
|
|
79
|
+
E((r) => [...r, {
|
|
80
80
|
message: e,
|
|
81
81
|
variant: t,
|
|
82
82
|
detail: n,
|
|
83
83
|
id: i
|
|
84
|
-
}]), t === "success" && setTimeout(() =>
|
|
85
|
-
}, []),
|
|
86
|
-
|
|
87
|
-
}, []), { data:
|
|
84
|
+
}]), t === "success" && setTimeout(() => E((e) => e.filter((e) => e.id !== i)), r);
|
|
85
|
+
}, []), lt = u((e) => {
|
|
86
|
+
E((t) => t.filter((t) => t.id !== e));
|
|
87
|
+
}, []), { data: ut, loading: dt, error: ft, refetch: U } = ee({
|
|
88
88
|
variables: {
|
|
89
89
|
filter: {
|
|
90
|
-
...
|
|
91
|
-
...
|
|
92
|
-
...
|
|
90
|
+
...O && O !== "all" ? { actionType: O } : {},
|
|
91
|
+
...k && k !== "all" ? { triggerType: k } : {},
|
|
92
|
+
...D ? { search: D } : {}
|
|
93
93
|
},
|
|
94
94
|
pagination: { limit: 50 }
|
|
95
95
|
},
|
|
96
|
-
skip:
|
|
97
|
-
}),
|
|
98
|
-
variables: { id:
|
|
99
|
-
skip: !
|
|
100
|
-
}),
|
|
96
|
+
skip: C
|
|
97
|
+
}), W = d(() => ut?.actions?.items || [], [ut]), { data: pt } = i({
|
|
98
|
+
variables: { id: A },
|
|
99
|
+
skip: !A || C
|
|
100
|
+
}), G = pt?.action, mt = G?.recentExecutions || [], { data: ht } = te({
|
|
101
101
|
variables: { pagination: { limit: 100 } },
|
|
102
102
|
fetchPolicy: "cache-and-network",
|
|
103
|
-
skip:
|
|
104
|
-
}),
|
|
103
|
+
skip: C
|
|
104
|
+
}), K = d(() => (ht?.vibecontrolsAgents ?? []).map((e) => ({
|
|
105
105
|
id: e.id,
|
|
106
106
|
name: e.name,
|
|
107
107
|
isActive: e.isActive
|
|
108
|
-
})), [
|
|
108
|
+
})), [ht]), [gt, { loading: _t }] = e({ refetchQueries: ["ListActions"] }), { setDraftTagIds: vt, flushTags: yt } = ue("VIBECONTROLS_ACTION"), [bt, { loading: xt }] = ne({ refetchQueries: ["ListActions", "GetAction"] }), [q] = t({ refetchQueries: ["ListActions"] }), [J] = r({ refetchQueries: ["GetAction"] }), [Y] = n({ refetchQueries: ["ListActions"] }), St = u(async (e) => {
|
|
109
109
|
try {
|
|
110
|
-
let t = await
|
|
110
|
+
let t = await gt({ variables: { input: {
|
|
111
111
|
name: e.name,
|
|
112
112
|
displayName: e.displayName || null,
|
|
113
113
|
description: e.description || null,
|
|
@@ -128,30 +128,30 @@ function _() {
|
|
|
128
128
|
timeoutMs: e.timeoutMs,
|
|
129
129
|
retryCount: e.retryCount,
|
|
130
130
|
confirmationRequired: e.confirmationRequired,
|
|
131
|
-
...ge(
|
|
131
|
+
...ge(V)
|
|
132
132
|
} } });
|
|
133
133
|
if (t.error && o(t.error)) {
|
|
134
|
-
|
|
134
|
+
T({ type: "none" }), s(), R("action");
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
let n = t.data?.createAction?.id;
|
|
138
|
-
|
|
138
|
+
T({ type: "none" }), H("Action created", "success"), ot(c), n && await yt(n);
|
|
139
139
|
} catch (e) {
|
|
140
140
|
if (o(e)) {
|
|
141
|
-
|
|
141
|
+
T({ type: "none" }), s(), R("action");
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
H(e instanceof Error ? e.message : "Failed to create action", "error");
|
|
145
145
|
}
|
|
146
146
|
}, [
|
|
147
|
-
pt,
|
|
148
147
|
gt,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
yt,
|
|
149
|
+
H,
|
|
150
|
+
V
|
|
151
|
+
]), Ct = u(async (e) => {
|
|
152
|
+
if (w.type === "edit") try {
|
|
153
|
+
await bt({ variables: {
|
|
154
|
+
id: w.actionId,
|
|
155
155
|
input: {
|
|
156
156
|
displayName: e.displayName || null,
|
|
157
157
|
description: e.description || null,
|
|
@@ -172,33 +172,33 @@ function _() {
|
|
|
172
172
|
timeoutMs: e.timeoutMs,
|
|
173
173
|
retryCount: e.retryCount,
|
|
174
174
|
confirmationRequired: e.confirmationRequired,
|
|
175
|
-
...ge(
|
|
175
|
+
...ge(st)
|
|
176
176
|
}
|
|
177
|
-
} }),
|
|
177
|
+
} }), T({ type: "none" }), H("Action updated", "success");
|
|
178
178
|
} catch (e) {
|
|
179
|
-
|
|
179
|
+
H(e instanceof Error ? e.message : "Failed to update action", "error");
|
|
180
180
|
}
|
|
181
181
|
}, [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]),
|
|
187
|
-
if (
|
|
188
|
-
await q({ variables: { id:
|
|
182
|
+
bt,
|
|
183
|
+
w,
|
|
184
|
+
H,
|
|
185
|
+
st
|
|
186
|
+
]), wt = u(async () => {
|
|
187
|
+
if (w.type === "confirmDelete") try {
|
|
188
|
+
await q({ variables: { id: w.id } }), A === w.id && j(null), T({ type: "none" }), H("Action deleted", "success"), be() && xe("success");
|
|
189
189
|
} catch (e) {
|
|
190
|
-
|
|
190
|
+
H(e instanceof Error ? e.message : "Failed to delete action", "error"), be() && xe("error");
|
|
191
191
|
}
|
|
192
192
|
}, [
|
|
193
|
-
|
|
193
|
+
w,
|
|
194
194
|
q,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
]),
|
|
198
|
-
let t =
|
|
195
|
+
A,
|
|
196
|
+
H
|
|
197
|
+
]), Tt = async (e) => {
|
|
198
|
+
let t = W.find((t) => t.id === e);
|
|
199
199
|
if (t) {
|
|
200
200
|
if (t.confirmationRequired) {
|
|
201
|
-
|
|
201
|
+
T({
|
|
202
202
|
type: "confirmExecute",
|
|
203
203
|
actionId: e,
|
|
204
204
|
name: t.displayName || t.name
|
|
@@ -208,190 +208,199 @@ function _() {
|
|
|
208
208
|
await X(e);
|
|
209
209
|
}
|
|
210
210
|
}, X = u(async (e, t = !0) => {
|
|
211
|
-
|
|
211
|
+
et(e);
|
|
212
212
|
try {
|
|
213
213
|
let n = await J({ variables: { id: e } });
|
|
214
214
|
if (n.error && o(n.error)) {
|
|
215
|
-
s(),
|
|
215
|
+
s(), R("command-execution");
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
let r = n.data?.executeAction;
|
|
219
219
|
if (r && we(r) && r.agentId) {
|
|
220
|
-
t ?
|
|
220
|
+
t ? B({
|
|
221
221
|
actionId: e,
|
|
222
222
|
agentId: r.agentId
|
|
223
|
-
}) :
|
|
223
|
+
}) : H("Remote execution still blocked after enabling — check the agent’s Security settings.", "error", r.output || r.errorMessage);
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
-
r &&
|
|
226
|
+
r && H(r.status === "SUCCESS" || r.status === "COMPLETED" ? "Action executed successfully" : "Action execution failed", r.status === "SUCCESS" || r.status === "COMPLETED" ? "success" : "error", r.output || r.errorMessage);
|
|
227
227
|
} catch (e) {
|
|
228
228
|
if (o(e)) {
|
|
229
|
-
s(),
|
|
229
|
+
s(), R("command-execution");
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
H(e instanceof Error ? e.message : "Execution failed", "error");
|
|
233
233
|
} finally {
|
|
234
|
-
|
|
234
|
+
et(null);
|
|
235
235
|
}
|
|
236
|
-
}, [J,
|
|
237
|
-
if (
|
|
238
|
-
let e =
|
|
239
|
-
|
|
240
|
-
}, [
|
|
241
|
-
if (!
|
|
242
|
-
let { actionId: n, agentId: r } =
|
|
243
|
-
|
|
236
|
+
}, [J, H]), Et = u(async () => {
|
|
237
|
+
if (w.type !== "confirmExecute") return;
|
|
238
|
+
let e = w.actionId;
|
|
239
|
+
T({ type: "none" }), await X(e);
|
|
240
|
+
}, [w, X]), Dt = u(async ({ shell: e, file: t }) => {
|
|
241
|
+
if (!z) return;
|
|
242
|
+
let { actionId: n, agentId: r } = z;
|
|
243
|
+
rt(!0);
|
|
244
244
|
try {
|
|
245
245
|
await Ce({
|
|
246
246
|
id: r,
|
|
247
|
-
profile:
|
|
247
|
+
profile: at
|
|
248
248
|
}, {
|
|
249
249
|
shell: e,
|
|
250
250
|
file: t
|
|
251
|
-
}),
|
|
251
|
+
}), B(null), await X(n, !1);
|
|
252
252
|
} catch (e) {
|
|
253
|
-
|
|
253
|
+
H(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
|
|
254
254
|
} finally {
|
|
255
|
-
|
|
255
|
+
rt(!1);
|
|
256
256
|
}
|
|
257
257
|
}, [
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
z,
|
|
259
|
+
at,
|
|
260
260
|
X,
|
|
261
|
-
|
|
262
|
-
]),
|
|
263
|
-
let t =
|
|
261
|
+
H
|
|
262
|
+
]), Ot = u(async (e) => {
|
|
263
|
+
let t = W.find((t) => t.id === e);
|
|
264
264
|
if (t) try {
|
|
265
265
|
await Y({ variables: {
|
|
266
266
|
id: e,
|
|
267
267
|
name: `${t.name}-copy`
|
|
268
|
-
} }),
|
|
268
|
+
} }), H("Action duplicated", "success");
|
|
269
269
|
} catch (e) {
|
|
270
|
-
|
|
270
|
+
H(e instanceof Error ? e.message : "Failed to duplicate action", "error");
|
|
271
271
|
}
|
|
272
272
|
}, [
|
|
273
|
-
|
|
273
|
+
W,
|
|
274
274
|
Y,
|
|
275
|
-
|
|
276
|
-
]), Z = d(() =>
|
|
275
|
+
H
|
|
276
|
+
]), Z = d(() => w.type === "edit" && W.find((e) => e.id === w.actionId) || null, [w, W]);
|
|
277
277
|
Oe(() => {
|
|
278
|
-
if (
|
|
278
|
+
if (w.type === "edit" && Z) {
|
|
279
279
|
let e = Z;
|
|
280
|
-
|
|
280
|
+
ct({
|
|
281
281
|
vibeId: e.vibeId ?? null,
|
|
282
282
|
visibility: e.visibility ?? "PRIVATE"
|
|
283
283
|
});
|
|
284
|
-
} else
|
|
285
|
-
}, [
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
} else w.type === "create" && ot(c);
|
|
285
|
+
}, [w.type, Z]), Oe(() => {
|
|
286
|
+
let e = v.get("editAction");
|
|
287
|
+
if (!e) return;
|
|
288
|
+
T({
|
|
289
|
+
type: "edit",
|
|
290
|
+
actionId: e
|
|
291
|
+
});
|
|
292
|
+
let t = new URLSearchParams(v);
|
|
293
|
+
t.delete("editAction"), Ve(t, { replace: !0 });
|
|
294
|
+
}, [v, Ve]);
|
|
295
|
+
let Q = d(() => W.filter((e) => M.has(e.id)), [W, M]), kt = W.length > 0 && W.every((e) => M.has(e.id)), At = W.some((e) => M.has(e.id)) && !kt, jt = u((e, t) => {
|
|
296
|
+
N((n) => {
|
|
288
297
|
let r = new Set(n);
|
|
289
298
|
return t ? r.add(e) : r.delete(e), r;
|
|
290
299
|
});
|
|
291
|
-
}, []),
|
|
292
|
-
|
|
300
|
+
}, []), Mt = u((e) => {
|
|
301
|
+
N((t) => {
|
|
293
302
|
let n = new Set(t);
|
|
294
|
-
return
|
|
303
|
+
return W.forEach((t) => {
|
|
295
304
|
e ? n.add(t.id) : n.delete(t.id);
|
|
296
305
|
}), n;
|
|
297
306
|
});
|
|
298
|
-
}, [
|
|
299
|
-
|
|
300
|
-
}, []),
|
|
307
|
+
}, [W]), $ = u(() => {
|
|
308
|
+
N(/* @__PURE__ */ new Set());
|
|
309
|
+
}, []), Nt = u(async () => {
|
|
301
310
|
if (Q.length !== 0) {
|
|
302
|
-
|
|
311
|
+
I("duplicate");
|
|
303
312
|
try {
|
|
304
313
|
let e = await Promise.allSettled(Q.map((e) => Y({ variables: {
|
|
305
314
|
id: e.id,
|
|
306
315
|
name: `${e.name}-copy`
|
|
307
316
|
} }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
308
|
-
|
|
317
|
+
H(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await U();
|
|
309
318
|
} catch (e) {
|
|
310
|
-
|
|
319
|
+
H(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
|
|
311
320
|
} finally {
|
|
312
|
-
|
|
321
|
+
I(null);
|
|
313
322
|
}
|
|
314
323
|
}
|
|
315
324
|
}, [
|
|
316
325
|
Q,
|
|
317
326
|
Y,
|
|
318
|
-
|
|
327
|
+
H,
|
|
319
328
|
$,
|
|
320
|
-
|
|
321
|
-
]),
|
|
329
|
+
U
|
|
330
|
+
]), Pt = u(async () => {
|
|
322
331
|
if (Q.length !== 0) {
|
|
323
|
-
|
|
332
|
+
I("delete");
|
|
324
333
|
try {
|
|
325
334
|
let e = await Promise.allSettled(Q.map((e) => q({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
326
|
-
|
|
335
|
+
A && M.has(A) && j(null), H(`Deleted ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), P(null), await U();
|
|
327
336
|
} catch (e) {
|
|
328
|
-
|
|
337
|
+
H(e instanceof Error ? e.message : "Failed to delete actions", "error");
|
|
329
338
|
} finally {
|
|
330
|
-
|
|
339
|
+
I(null);
|
|
331
340
|
}
|
|
332
341
|
}
|
|
333
342
|
}, [
|
|
334
343
|
Q,
|
|
335
344
|
q,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
345
|
+
A,
|
|
346
|
+
M,
|
|
347
|
+
H,
|
|
339
348
|
$,
|
|
340
|
-
|
|
341
|
-
]),
|
|
349
|
+
U
|
|
350
|
+
]), Ft = u(async () => {
|
|
342
351
|
if (Q.length === 0) return;
|
|
343
|
-
|
|
352
|
+
I("execute");
|
|
344
353
|
let e = 0, t = 0, n = !1;
|
|
345
354
|
try {
|
|
346
355
|
for (let r of Q) try {
|
|
347
356
|
let i = await J({ variables: { id: r.id } });
|
|
348
357
|
if (i.error && o(i.error)) {
|
|
349
|
-
s(),
|
|
358
|
+
s(), R("command-execution"), n = !0;
|
|
350
359
|
break;
|
|
351
360
|
}
|
|
352
361
|
let ee = i.data?.executeAction;
|
|
353
362
|
ee?.status === "SUCCESS" || ee?.status === "COMPLETED" ? e += 1 : t += 1;
|
|
354
363
|
} catch (e) {
|
|
355
364
|
if (o(e)) {
|
|
356
|
-
s(),
|
|
365
|
+
s(), R("command-execution"), n = !0;
|
|
357
366
|
break;
|
|
358
367
|
}
|
|
359
368
|
t += 1;
|
|
360
369
|
}
|
|
361
|
-
n ||
|
|
370
|
+
n || H(`Executed ${e} action${e === 1 ? "" : "s"}${t > 0 ? ` • ${t} failed` : ""}`, t > 0 ? "error" : "success"), $(), P(null), A && await U();
|
|
362
371
|
} catch (e) {
|
|
363
|
-
|
|
372
|
+
H(e instanceof Error ? e.message : "Failed to execute actions", "error");
|
|
364
373
|
} finally {
|
|
365
|
-
|
|
374
|
+
I(null);
|
|
366
375
|
}
|
|
367
376
|
}, [
|
|
368
377
|
Q,
|
|
369
378
|
J,
|
|
370
|
-
|
|
379
|
+
H,
|
|
371
380
|
$,
|
|
372
|
-
|
|
373
|
-
|
|
381
|
+
A,
|
|
382
|
+
U
|
|
374
383
|
]);
|
|
375
|
-
return
|
|
376
|
-
message:
|
|
377
|
-
onRetry: () =>
|
|
384
|
+
return Ue ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : b && b.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(Re, {}) }) : dt ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : ft ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(ce, {
|
|
385
|
+
message: ft.message,
|
|
386
|
+
onRetry: () => U()
|
|
378
387
|
}) }) : /* @__PURE__ */ h(g, {
|
|
379
388
|
className: "p-4 sm:p-6 space-y-6",
|
|
380
389
|
children: [
|
|
381
390
|
/* @__PURE__ */ m(oe, {
|
|
382
|
-
title:
|
|
391
|
+
title: x("nav.actions", "Actions"),
|
|
383
392
|
description: "Automate tasks — run commands, scripts, or trigger webhooks on your agents",
|
|
384
393
|
actions: /* @__PURE__ */ h("div", {
|
|
385
394
|
className: "flex items-center gap-2",
|
|
386
395
|
children: [/* @__PURE__ */ m("button", {
|
|
387
396
|
type: "button",
|
|
388
|
-
onClick: () =>
|
|
397
|
+
onClick: () => U(),
|
|
389
398
|
className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
|
|
390
399
|
title: "Refresh",
|
|
391
400
|
children: /* @__PURE__ */ m(Ne, { size: 16 })
|
|
392
|
-
}),
|
|
401
|
+
}), Ge && /* @__PURE__ */ h("button", {
|
|
393
402
|
type: "button",
|
|
394
|
-
onClick: () =>
|
|
403
|
+
onClick: () => T({ type: "create" }),
|
|
395
404
|
className: "inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium transition-opacity",
|
|
396
405
|
children: [/* @__PURE__ */ m(Me, { size: 16 }), "Create Action"]
|
|
397
406
|
})]
|
|
@@ -402,26 +411,26 @@ function _() {
|
|
|
402
411
|
className: "flex flex-wrap items-center gap-3",
|
|
403
412
|
children: [
|
|
404
413
|
/* @__PURE__ */ m(fe, {
|
|
405
|
-
value:
|
|
406
|
-
onChange:
|
|
407
|
-
placeholder:
|
|
414
|
+
value: D,
|
|
415
|
+
onChange: Xe,
|
|
416
|
+
placeholder: x("actions.searchPlaceholder", "Search actions..."),
|
|
408
417
|
className: "w-full sm:w-64"
|
|
409
418
|
}),
|
|
410
419
|
/* @__PURE__ */ m(pe, {
|
|
411
420
|
label: "Type",
|
|
412
|
-
options:
|
|
413
|
-
value:
|
|
414
|
-
onChange:
|
|
421
|
+
options: ze,
|
|
422
|
+
value: O,
|
|
423
|
+
onChange: Ze
|
|
415
424
|
}),
|
|
416
425
|
/* @__PURE__ */ m(pe, {
|
|
417
426
|
label: "Trigger",
|
|
418
|
-
options:
|
|
419
|
-
value:
|
|
420
|
-
onChange:
|
|
427
|
+
options: Be,
|
|
428
|
+
value: k,
|
|
429
|
+
onChange: Qe
|
|
421
430
|
})
|
|
422
431
|
]
|
|
423
432
|
}),
|
|
424
|
-
|
|
433
|
+
W.length > 0 && /* @__PURE__ */ m("div", {
|
|
425
434
|
"data-tour": "actions-selection-toolbar",
|
|
426
435
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
427
436
|
children: /* @__PURE__ */ h("div", {
|
|
@@ -431,15 +440,15 @@ function _() {
|
|
|
431
440
|
children: [/* @__PURE__ */ h("div", {
|
|
432
441
|
className: "flex items-center gap-2",
|
|
433
442
|
children: [/* @__PURE__ */ m(ve, {
|
|
434
|
-
checked:
|
|
435
|
-
indeterminate:
|
|
436
|
-
onChange:
|
|
443
|
+
checked: kt,
|
|
444
|
+
indeterminate: At,
|
|
445
|
+
onChange: Mt,
|
|
437
446
|
ariaLabel: "Select all visible actions"
|
|
438
447
|
}), /* @__PURE__ */ m("span", {
|
|
439
448
|
className: "text-sm font-medium text-text-primary",
|
|
440
449
|
children: "Select all visible"
|
|
441
450
|
})]
|
|
442
|
-
}),
|
|
451
|
+
}), M.size > 0 && /* @__PURE__ */ m("button", {
|
|
443
452
|
type: "button",
|
|
444
453
|
onClick: $,
|
|
445
454
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
@@ -450,12 +459,12 @@ function _() {
|
|
|
450
459
|
children: [
|
|
451
460
|
/* @__PURE__ */ h("span", {
|
|
452
461
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
453
|
-
children: [
|
|
462
|
+
children: [M.size, " selected"]
|
|
454
463
|
}),
|
|
455
464
|
/* @__PURE__ */ m("button", {
|
|
456
465
|
type: "button",
|
|
457
|
-
onClick: () =>
|
|
458
|
-
disabled: Q.length === 0 ||
|
|
466
|
+
onClick: () => P("execute"),
|
|
467
|
+
disabled: Q.length === 0 || F !== null,
|
|
459
468
|
className: "rounded-md border border-status-success-border px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
460
469
|
children: /* @__PURE__ */ h("span", {
|
|
461
470
|
className: "inline-flex items-center gap-2",
|
|
@@ -468,8 +477,8 @@ function _() {
|
|
|
468
477
|
}),
|
|
469
478
|
/* @__PURE__ */ m("button", {
|
|
470
479
|
type: "button",
|
|
471
|
-
onClick:
|
|
472
|
-
disabled: Q.length === 0 ||
|
|
480
|
+
onClick: Nt,
|
|
481
|
+
disabled: Q.length === 0 || F !== null,
|
|
473
482
|
className: "rounded-md border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
|
|
474
483
|
children: /* @__PURE__ */ h("span", {
|
|
475
484
|
className: "inline-flex items-center gap-2",
|
|
@@ -482,8 +491,8 @@ function _() {
|
|
|
482
491
|
}),
|
|
483
492
|
/* @__PURE__ */ m("button", {
|
|
484
493
|
type: "button",
|
|
485
|
-
onClick: () =>
|
|
486
|
-
disabled: Q.length === 0 ||
|
|
494
|
+
onClick: () => P("delete"),
|
|
495
|
+
disabled: Q.length === 0 || F !== null,
|
|
487
496
|
className: "rounded-md border border-status-error-border px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
488
497
|
children: /* @__PURE__ */ h("span", {
|
|
489
498
|
className: "inline-flex items-center gap-2",
|
|
@@ -500,81 +509,81 @@ function _() {
|
|
|
500
509
|
}),
|
|
501
510
|
/* @__PURE__ */ m(p, {
|
|
502
511
|
mode: "wait",
|
|
503
|
-
children:
|
|
512
|
+
children: W.length === 0 && !dt && /* @__PURE__ */ m(de, {
|
|
504
513
|
title: "No actions yet",
|
|
505
514
|
description: "Create your first action to automate commands, scripts, and webhooks",
|
|
506
515
|
action: /* @__PURE__ */ h("div", {
|
|
507
516
|
className: "flex items-center gap-2",
|
|
508
|
-
children: [
|
|
517
|
+
children: [Ge && /* @__PURE__ */ m("button", {
|
|
509
518
|
type: "button",
|
|
510
|
-
onClick: () =>
|
|
519
|
+
onClick: () => T({ type: "create" }),
|
|
511
520
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
|
|
512
521
|
children: "Create Action"
|
|
513
522
|
}), /* @__PURE__ */ m(_e, { prompt: "What is an Action in VibeControls and how do I create one?" })]
|
|
514
523
|
})
|
|
515
524
|
})
|
|
516
525
|
}),
|
|
517
|
-
|
|
526
|
+
W.length > 0 && /* @__PURE__ */ m("div", {
|
|
518
527
|
"data-tour": "actions-list-container",
|
|
519
528
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
520
|
-
children:
|
|
529
|
+
children: W.map((e) => /* @__PURE__ */ m("div", {
|
|
521
530
|
role: "button",
|
|
522
531
|
tabIndex: 0,
|
|
523
|
-
onClick: () =>
|
|
532
|
+
onClick: () => j(e.id),
|
|
524
533
|
onKeyDown: (t) => {
|
|
525
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
534
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), j(e.id));
|
|
526
535
|
},
|
|
527
536
|
"aria-label": `Select action ${e.displayName || e.name}`,
|
|
528
537
|
children: /* @__PURE__ */ m(Se, {
|
|
529
538
|
action: e,
|
|
530
|
-
onExecute:
|
|
531
|
-
onEdit: (e) =>
|
|
539
|
+
onExecute: Tt,
|
|
540
|
+
onEdit: (e) => T({
|
|
532
541
|
type: "edit",
|
|
533
542
|
actionId: e
|
|
534
543
|
}),
|
|
535
|
-
onDuplicate:
|
|
536
|
-
onDelete: (t) =>
|
|
544
|
+
onDuplicate: Ot,
|
|
545
|
+
onDelete: (t) => T({
|
|
537
546
|
type: "confirmDelete",
|
|
538
547
|
id: t,
|
|
539
548
|
name: e.displayName || e.name
|
|
540
549
|
}),
|
|
541
550
|
onSchedule: (e) => _(`/scheduler?actionId=${encodeURIComponent(e)}`),
|
|
542
551
|
onAddToCalendar: (e) => _(`/vibecontrols/calendar?actionId=${encodeURIComponent(e)}`),
|
|
543
|
-
canUpdate:
|
|
544
|
-
canDelete:
|
|
545
|
-
canExecute:
|
|
546
|
-
isExecuting:
|
|
547
|
-
selected:
|
|
548
|
-
onToggleSelect: (t) =>
|
|
552
|
+
canUpdate: Ke,
|
|
553
|
+
canDelete: qe,
|
|
554
|
+
canExecute: Je,
|
|
555
|
+
isExecuting: $e === e.id,
|
|
556
|
+
selected: M.has(e.id),
|
|
557
|
+
onToggleSelect: (t) => jt(e.id, t)
|
|
549
558
|
})
|
|
550
559
|
}, e.id))
|
|
551
560
|
}),
|
|
552
|
-
/* @__PURE__ */ m(p, { children:
|
|
561
|
+
/* @__PURE__ */ m(p, { children: A && G && /* @__PURE__ */ h("div", {
|
|
553
562
|
className: "space-y-3",
|
|
554
|
-
children: [
|
|
555
|
-
actionId:
|
|
556
|
-
workspaceId:
|
|
557
|
-
actionName:
|
|
558
|
-
onClose: () =>
|
|
563
|
+
children: [He && /* @__PURE__ */ m(De, {
|
|
564
|
+
actionId: A,
|
|
565
|
+
workspaceId: He,
|
|
566
|
+
actionName: G.displayName || G.name,
|
|
567
|
+
onClose: () => j(null)
|
|
559
568
|
}), /* @__PURE__ */ m("div", {
|
|
560
569
|
"data-tour": "actions-execution-history",
|
|
561
570
|
children: /* @__PURE__ */ m(Ee, {
|
|
562
|
-
executions:
|
|
563
|
-
actionName:
|
|
564
|
-
onClose: () =>
|
|
571
|
+
executions: mt,
|
|
572
|
+
actionName: G.displayName || G.name,
|
|
573
|
+
onClose: () => j(null)
|
|
565
574
|
})
|
|
566
575
|
})]
|
|
567
576
|
}) }),
|
|
568
|
-
/* @__PURE__ */ m(p, { children:
|
|
577
|
+
/* @__PURE__ */ m(p, { children: Ye.length > 0 && /* @__PURE__ */ m("div", {
|
|
569
578
|
className: "fixed bottom-4 left-4 right-4 sm:left-auto sm:bottom-6 sm:right-6 z-50 flex flex-col gap-2 max-w-[calc(100vw-2rem)] sm:max-w-md",
|
|
570
|
-
children:
|
|
579
|
+
children: Ye.slice(-3).map((e) => /* @__PURE__ */ h("div", {
|
|
571
580
|
role: "button",
|
|
572
581
|
tabIndex: 0,
|
|
573
582
|
onKeyDown: (t) => {
|
|
574
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
583
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), lt(e.id));
|
|
575
584
|
},
|
|
576
585
|
className: `p-4 rounded-xl shadow-lg border cursor-pointer ${e.variant === "success" ? "bg-status-success-bg/10 border-status-success-border/30 text-status-success-text" : "bg-status-error-bg/10 border-status-error-border/30 text-status-error-text"}`,
|
|
577
|
-
onClick: () =>
|
|
586
|
+
onClick: () => lt(e.id),
|
|
578
587
|
children: [/* @__PURE__ */ m("div", {
|
|
579
588
|
className: "font-medium text-sm",
|
|
580
589
|
children: e.message
|
|
@@ -584,28 +593,28 @@ function _() {
|
|
|
584
593
|
})]
|
|
585
594
|
}, e.id))
|
|
586
595
|
}) }),
|
|
587
|
-
|
|
596
|
+
w.type === "create" && /* @__PURE__ */ m(Te, {
|
|
588
597
|
title: "Create Action",
|
|
589
|
-
agents:
|
|
590
|
-
onSubmit:
|
|
591
|
-
onCancel: () =>
|
|
592
|
-
isLoading:
|
|
598
|
+
agents: K,
|
|
599
|
+
onSubmit: St,
|
|
600
|
+
onCancel: () => T({ type: "none" }),
|
|
601
|
+
isLoading: _t,
|
|
593
602
|
extraSection: /* @__PURE__ */ h("div", {
|
|
594
603
|
className: "space-y-4",
|
|
595
604
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
596
605
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
597
|
-
children:
|
|
606
|
+
children: x("actions.tags", "Tags")
|
|
598
607
|
}), /* @__PURE__ */ m(le, {
|
|
599
608
|
entityType: "VIBECONTROLS_ACTION",
|
|
600
|
-
onDraftChange:
|
|
609
|
+
onDraftChange: vt
|
|
601
610
|
})] }), /* @__PURE__ */ m(he, {
|
|
602
|
-
value:
|
|
603
|
-
onChange:
|
|
604
|
-
disabled:
|
|
611
|
+
value: V,
|
|
612
|
+
onChange: ot,
|
|
613
|
+
disabled: _t
|
|
605
614
|
})]
|
|
606
615
|
})
|
|
607
616
|
}),
|
|
608
|
-
|
|
617
|
+
w.type === "edit" && Z && /* @__PURE__ */ m(Te, {
|
|
609
618
|
title: "Edit Action",
|
|
610
619
|
initialData: {
|
|
611
620
|
name: Z.name,
|
|
@@ -629,78 +638,78 @@ function _() {
|
|
|
629
638
|
retryCount: Z.retryCount || 0,
|
|
630
639
|
confirmationRequired: Z.confirmationRequired ?? !1
|
|
631
640
|
},
|
|
632
|
-
agents:
|
|
633
|
-
onSubmit:
|
|
634
|
-
onCancel: () =>
|
|
635
|
-
isLoading:
|
|
641
|
+
agents: K,
|
|
642
|
+
onSubmit: Ct,
|
|
643
|
+
onCancel: () => T({ type: "none" }),
|
|
644
|
+
isLoading: xt,
|
|
636
645
|
extraSection: /* @__PURE__ */ h("div", {
|
|
637
646
|
className: "space-y-4",
|
|
638
647
|
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
639
648
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
640
|
-
children:
|
|
649
|
+
children: x("actions.tags", "Tags")
|
|
641
650
|
}), /* @__PURE__ */ m(le, {
|
|
642
651
|
entityType: "VIBECONTROLS_ACTION",
|
|
643
652
|
entityId: Z.id
|
|
644
653
|
})] }), /* @__PURE__ */ m(he, {
|
|
645
|
-
value:
|
|
646
|
-
onChange:
|
|
647
|
-
disabled:
|
|
654
|
+
value: st,
|
|
655
|
+
onChange: ct,
|
|
656
|
+
disabled: xt
|
|
648
657
|
})]
|
|
649
658
|
})
|
|
650
659
|
}),
|
|
651
|
-
|
|
660
|
+
w.type === "confirmDelete" && /* @__PURE__ */ m(a, {
|
|
652
661
|
isOpen: !0,
|
|
653
662
|
title: "Delete Action",
|
|
654
|
-
message: `Are you sure you want to delete "${
|
|
663
|
+
message: `Are you sure you want to delete "${w.name}"? This cannot be undone.`,
|
|
655
664
|
confirmLabel: "Delete",
|
|
656
665
|
variant: "danger",
|
|
657
|
-
onConfirm:
|
|
658
|
-
onClose: () =>
|
|
666
|
+
onConfirm: wt,
|
|
667
|
+
onClose: () => T({ type: "none" })
|
|
659
668
|
}),
|
|
660
|
-
|
|
669
|
+
w.type === "confirmExecute" && /* @__PURE__ */ m(a, {
|
|
661
670
|
isOpen: !0,
|
|
662
|
-
title: `Execute: ${
|
|
663
|
-
message: `Are you sure you want to execute "${
|
|
671
|
+
title: `Execute: ${w.name}`,
|
|
672
|
+
message: `Are you sure you want to execute "${w.name}"?`,
|
|
664
673
|
confirmLabel: "Execute",
|
|
665
674
|
variant: "warning",
|
|
666
|
-
onConfirm:
|
|
667
|
-
onClose: () =>
|
|
675
|
+
onConfirm: Et,
|
|
676
|
+
onClose: () => T({ type: "none" })
|
|
668
677
|
}),
|
|
669
678
|
/* @__PURE__ */ m(a, {
|
|
670
|
-
isOpen:
|
|
679
|
+
isOpen: tt === "delete",
|
|
671
680
|
title: "Delete Selected Actions",
|
|
672
681
|
message: `Are you sure you want to delete ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
673
682
|
confirmLabel: "Delete Actions",
|
|
674
683
|
variant: "danger",
|
|
675
|
-
onConfirm:
|
|
676
|
-
onClose: () =>
|
|
677
|
-
isLoading:
|
|
684
|
+
onConfirm: Pt,
|
|
685
|
+
onClose: () => P(null),
|
|
686
|
+
isLoading: F === "delete"
|
|
678
687
|
}),
|
|
679
688
|
/* @__PURE__ */ m(a, {
|
|
680
|
-
isOpen:
|
|
689
|
+
isOpen: tt === "execute",
|
|
681
690
|
title: "Execute Selected Actions",
|
|
682
691
|
message: `Execute ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
|
|
683
692
|
confirmLabel: "Execute Actions",
|
|
684
693
|
variant: "warning",
|
|
685
|
-
onConfirm:
|
|
686
|
-
onClose: () =>
|
|
687
|
-
isLoading:
|
|
694
|
+
onConfirm: Ft,
|
|
695
|
+
onClose: () => P(null),
|
|
696
|
+
isLoading: F === "execute"
|
|
688
697
|
}),
|
|
689
698
|
/* @__PURE__ */ m(re, {
|
|
690
|
-
isOpen:
|
|
691
|
-
onClose: () =>
|
|
699
|
+
isOpen: L !== null,
|
|
700
|
+
onClose: () => R(null),
|
|
692
701
|
onConfirm: () => {
|
|
693
|
-
s(),
|
|
702
|
+
s(), R(null), _("/billing/plans");
|
|
694
703
|
},
|
|
695
|
-
title:
|
|
696
|
-
message:
|
|
704
|
+
title: L ? ie(L).title : void 0,
|
|
705
|
+
message: L ? ie(L).message : ""
|
|
697
706
|
}),
|
|
698
707
|
/* @__PURE__ */ m(me, {
|
|
699
|
-
isOpen:
|
|
700
|
-
agentName:
|
|
701
|
-
isLoading:
|
|
702
|
-
onClose: () =>
|
|
703
|
-
onConfirm:
|
|
708
|
+
isOpen: z !== null,
|
|
709
|
+
agentName: z ? K.find((e) => e.id === z.agentId)?.name : void 0,
|
|
710
|
+
isLoading: nt,
|
|
711
|
+
onClose: () => B(null),
|
|
712
|
+
onConfirm: Dt
|
|
704
713
|
})
|
|
705
714
|
]
|
|
706
715
|
});
|