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