@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.22
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/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +277 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +25 -0
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +5 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { useCreateActionMutation as e, useDeleteActionMutation as t, useDuplicateActionMutation as n, useExecuteActionMutation as r, useGetActionQuery as i, useListActionsQuery as
|
|
2
|
-
import { ConfirmDialog as
|
|
3
|
-
import { QuotaExhaustedDialog as
|
|
4
|
-
import { getQuotaDialogContent as
|
|
5
|
-
import { useVibeControls as
|
|
6
|
-
import { PageHeader as
|
|
7
|
-
import { LoadingState as
|
|
8
|
-
import { ErrorState as
|
|
9
|
-
import { EntityTagPicker as
|
|
10
|
-
import { useDraftEntityTags as
|
|
11
|
-
import { EmptyState as
|
|
12
|
-
import { SearchInput as
|
|
13
|
-
import { FilterDropdown as
|
|
14
|
-
import { EnableRemoteTaskDialog as
|
|
15
|
-
import { LINK_TO_VIBE_DEFAULT as
|
|
16
|
-
import { GetHelpButton as
|
|
17
|
-
import { SelectionCheckbox as
|
|
18
|
-
import { useActiveAgentProfile as
|
|
1
|
+
import { useCreateActionMutation as e, useDeleteActionMutation as t, useDuplicateActionMutation as n, useExecuteActionMutation as r, useGetActionQuery as i, useListActionsQuery as ee, useListAgentsQuery as te, useUpdateActionMutation as ne } from "../generated/wspace-operations.js";
|
|
2
|
+
import { ConfirmDialog as a } from "../components/shared/ConfirmDialog.js";
|
|
3
|
+
import { QuotaExhaustedDialog as re } from "../components/shared/QuotaExhaustedDialog.js";
|
|
4
|
+
import { getQuotaDialogContent as ie, isQuotaExhaustedError as o, markQuotaHandledLocally as s } from "../utils/quotaUtils.js";
|
|
5
|
+
import { useVibeControls as ae } from "../providers/VibeControlsProvider.js";
|
|
6
|
+
import { PageHeader as oe } from "../components/shared/PageHeader.js";
|
|
7
|
+
import { LoadingState as se } from "../components/shared/LoadingState.js";
|
|
8
|
+
import { ErrorState as ce } from "../components/shared/ErrorState.js";
|
|
9
|
+
import { EntityTagPicker as le } from "../components/shared/EntityTagPicker.js";
|
|
10
|
+
import { useDraftEntityTags as ue } from "../hooks/useDraftEntityTags.js";
|
|
11
|
+
import { EmptyState as de } from "../components/shared/EmptyState.js";
|
|
12
|
+
import { SearchInput as fe } from "../components/shared/SearchInput.js";
|
|
13
|
+
import { FilterDropdown as pe } from "../components/shared/FilterDropdown.js";
|
|
14
|
+
import { EnableRemoteTaskDialog as me } from "../components/shared/EnableRemoteTaskDialog.js";
|
|
15
|
+
import { LINK_TO_VIBE_DEFAULT as c, LinkToVibePanel as he, linkToVibeInput as ge } from "../components/shared/LinkToVibePanel.js";
|
|
16
|
+
import { GetHelpButton as _e } from "../components/shared/GetHelpButton.js";
|
|
17
|
+
import { SelectionCheckbox as ve } from "../components/shared/SelectionCheckbox.js";
|
|
18
|
+
import { useActiveAgentProfile as ye } from "../hooks/useActiveAgentProfile.js";
|
|
19
19
|
import "../components/shared/index.js";
|
|
20
|
-
import { isNative as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
20
|
+
import { isNative as be, nativeNotify as xe } from "../utils/nativeBridge.js";
|
|
21
|
+
import { VIBE_PERMISSIONS as l } from "../constants/permissions.js";
|
|
22
|
+
import { ActionCard as Se } from "../components/actions/ActionCard.js";
|
|
23
|
+
import { enableRemoteTaskExecution as Ce, isRemoteTaskDeniedError as we } from "../services/agentRemoteTaskGates.js";
|
|
24
|
+
import { ActionForm as Te } from "../components/actions/ActionForm.js";
|
|
25
|
+
import { ExecutionHistory as Ee } from "../components/actions/ExecutionHistory.js";
|
|
26
|
+
import { ActionSchedulesList as De } from "../components/actions/ActionSchedulesList.js";
|
|
26
27
|
import "../components/actions/index.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
|
|
28
|
+
import { useCallback as u, useEffect as Oe, useMemo as d, useState as f } from "react";
|
|
29
|
+
import { useI18n as ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
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 Ie } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
33
|
+
import { AnimatePresence as p } from "framer-motion";
|
|
34
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
35
|
+
import { AccessDenied as Le } from "@burdenoff/fe-libs/shared/components";
|
|
36
|
+
import { MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
|
|
37
37
|
//#region src/pages/ActionsPage.tsx
|
|
38
|
-
var
|
|
38
|
+
var Re = [
|
|
39
39
|
{
|
|
40
40
|
value: "COMMAND",
|
|
41
41
|
label: "Command"
|
|
@@ -52,7 +52,7 @@ var Le = [
|
|
|
52
52
|
value: "WORKFLOW",
|
|
53
53
|
label: "Workflow"
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], ze = [
|
|
56
56
|
{
|
|
57
57
|
value: "MANUAL",
|
|
58
58
|
label: "Manual"
|
|
@@ -70,11 +70,11 @@ var Le = [
|
|
|
70
70
|
label: "On Demand"
|
|
71
71
|
}
|
|
72
72
|
];
|
|
73
|
-
function
|
|
74
|
-
let
|
|
73
|
+
function _() {
|
|
74
|
+
let _ = Fe(), { workspaceId: Be } = ae(), { hasPermission: v, isLoading: Ve, permissions: y } = Ie(), b = ((e) => (t, n) => {
|
|
75
75
|
let r = e.t(t);
|
|
76
76
|
return r === t ? n : r;
|
|
77
|
-
})(
|
|
77
|
+
})(ke()), x = (Array.isArray(y) ? y : y?.permissionStrings)?.some?.((e) => e.startsWith("action:")), He = x ? v(l.ACTION_LIST) : !0, Ue = x ? v(l.ACTION_CREATE) : !0, We = x ? v(l.ACTION_UPDATE) : !0, Ge = x ? v(l.ACTION_DELETE) : !0, Ke = x ? v(l.ACTION_EXECUTE) : !0, S = Ve, [C, w] = f({ type: "none" }), [qe, T] = f([]), [E, Je] = f(""), [D, Ye] = f(null), [O, Xe] = f(null), [k, A] = f(null), [j, M] = f(/* @__PURE__ */ new Set()), [Ze, Qe] = f(null), [$e, N] = f(null), [P, F] = f(null), [I, L] = f(null), [R, z] = f(null), [et, tt] = f(!1), { profiles: nt } = ye(R?.agentId ?? null), rt = nt.find((e) => e.isDefault)?.name ?? "default", [B, V] = f(c), [H, it] = f(c), U = u((e, t, n, r = 1e4) => {
|
|
78
78
|
let i = Date.now() + Math.random();
|
|
79
79
|
T((r) => [...r, {
|
|
80
80
|
message: e,
|
|
@@ -82,9 +82,9 @@ function v() {
|
|
|
82
82
|
detail: n,
|
|
83
83
|
id: i
|
|
84
84
|
}]), t === "success" && setTimeout(() => T((e) => e.filter((e) => e.id !== i)), r);
|
|
85
|
-
}, []), at =
|
|
85
|
+
}, []), at = u((e) => {
|
|
86
86
|
T((t) => t.filter((t) => t.id !== e));
|
|
87
|
-
}, []), { data: ot, loading: st, error: ct, refetch: W } =
|
|
87
|
+
}, []), { data: ot, loading: st, error: ct, refetch: W } = ee({
|
|
88
88
|
variables: {
|
|
89
89
|
filter: {
|
|
90
90
|
...D && D !== "all" ? { actionType: D } : {},
|
|
@@ -93,19 +93,19 @@ function v() {
|
|
|
93
93
|
},
|
|
94
94
|
pagination: { limit: 50 }
|
|
95
95
|
},
|
|
96
|
-
skip:
|
|
97
|
-
}), G =
|
|
96
|
+
skip: S
|
|
97
|
+
}), G = d(() => ot?.actions?.items || [], [ot]), { data: lt } = i({
|
|
98
98
|
variables: { id: k },
|
|
99
|
-
skip: !k ||
|
|
100
|
-
}), K = lt?.action, ut = K?.recentExecutions || [], { data: dt } =
|
|
99
|
+
skip: !k || S
|
|
100
|
+
}), K = lt?.action, ut = K?.recentExecutions || [], { data: dt } = te({
|
|
101
101
|
variables: { pagination: { limit: 100 } },
|
|
102
102
|
fetchPolicy: "cache-and-network",
|
|
103
|
-
skip:
|
|
104
|
-
}), ft =
|
|
103
|
+
skip: S
|
|
104
|
+
}), ft = d(() => (dt?.vibecontrolsAgents ?? []).map((e) => ({
|
|
105
105
|
id: e.id,
|
|
106
106
|
name: e.name,
|
|
107
107
|
isActive: e.isActive
|
|
108
|
-
})), [dt]), [pt, { loading: mt }] = e({ refetchQueries: ["ListActions"] }), { setDraftTagIds: ht, flushTags: gt } =
|
|
108
|
+
})), [dt]), [pt, { loading: mt }] = e({ refetchQueries: ["ListActions"] }), { setDraftTagIds: ht, flushTags: gt } = ue("VIBECONTROLS_ACTION"), [_t, { loading: vt }] = ne({ refetchQueries: ["ListActions", "GetAction"] }), [q] = t({ refetchQueries: ["ListActions"] }), [J] = r({ refetchQueries: ["GetAction"] }), [Y] = n({ refetchQueries: ["ListActions"] }), yt = u(async (e) => {
|
|
109
109
|
try {
|
|
110
110
|
let t = await pt({ variables: { input: {
|
|
111
111
|
name: e.name,
|
|
@@ -128,17 +128,17 @@ function v() {
|
|
|
128
128
|
timeoutMs: e.timeoutMs,
|
|
129
129
|
retryCount: e.retryCount,
|
|
130
130
|
confirmationRequired: e.confirmationRequired,
|
|
131
|
-
...
|
|
131
|
+
...ge(B)
|
|
132
132
|
} } });
|
|
133
|
-
if (t.error &&
|
|
134
|
-
w({ type: "none" }),
|
|
133
|
+
if (t.error && o(t.error)) {
|
|
134
|
+
w({ type: "none" }), s(), L("action");
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
let n = t.data?.createAction?.id;
|
|
138
|
-
w({ type: "none" }), U("Action created", "success"), V(
|
|
138
|
+
w({ type: "none" }), U("Action created", "success"), V(c), n && await gt(n);
|
|
139
139
|
} catch (e) {
|
|
140
|
-
if (
|
|
141
|
-
w({ type: "none" }),
|
|
140
|
+
if (o(e)) {
|
|
141
|
+
w({ type: "none" }), s(), L("action");
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
U(e instanceof Error ? e.message : "Failed to create action", "error");
|
|
@@ -148,7 +148,7 @@ function v() {
|
|
|
148
148
|
gt,
|
|
149
149
|
U,
|
|
150
150
|
B
|
|
151
|
-
]), bt =
|
|
151
|
+
]), bt = u(async (e) => {
|
|
152
152
|
if (C.type === "edit") try {
|
|
153
153
|
await _t({ variables: {
|
|
154
154
|
id: C.actionId,
|
|
@@ -172,7 +172,7 @@ function v() {
|
|
|
172
172
|
timeoutMs: e.timeoutMs,
|
|
173
173
|
retryCount: e.retryCount,
|
|
174
174
|
confirmationRequired: e.confirmationRequired,
|
|
175
|
-
...
|
|
175
|
+
...ge(H)
|
|
176
176
|
}
|
|
177
177
|
} }), w({ type: "none" }), U("Action updated", "success");
|
|
178
178
|
} catch (e) {
|
|
@@ -183,11 +183,11 @@ function v() {
|
|
|
183
183
|
C,
|
|
184
184
|
U,
|
|
185
185
|
H
|
|
186
|
-
]), xt =
|
|
186
|
+
]), xt = u(async () => {
|
|
187
187
|
if (C.type === "confirmDelete") try {
|
|
188
|
-
await q({ variables: { id: C.id } }), k === C.id && A(null), w({ type: "none" }), U("Action deleted", "success"),
|
|
188
|
+
await q({ variables: { id: C.id } }), k === C.id && A(null), w({ type: "none" }), U("Action deleted", "success"), be() && xe("success");
|
|
189
189
|
} catch (e) {
|
|
190
|
-
U(e instanceof Error ? e.message : "Failed to delete action", "error"),
|
|
190
|
+
U(e instanceof Error ? e.message : "Failed to delete action", "error"), be() && xe("error");
|
|
191
191
|
}
|
|
192
192
|
}, [
|
|
193
193
|
C,
|
|
@@ -207,16 +207,16 @@ function v() {
|
|
|
207
207
|
}
|
|
208
208
|
await X(e);
|
|
209
209
|
}
|
|
210
|
-
}, X =
|
|
210
|
+
}, X = u(async (e, t = !0) => {
|
|
211
211
|
Qe(e);
|
|
212
212
|
try {
|
|
213
213
|
let n = await J({ variables: { id: e } });
|
|
214
|
-
if (n.error &&
|
|
215
|
-
|
|
214
|
+
if (n.error && o(n.error)) {
|
|
215
|
+
s(), L("command-execution");
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
let r = n.data?.executeAction;
|
|
219
|
-
if (r &&
|
|
219
|
+
if (r && we(r) && r.agentId) {
|
|
220
220
|
t ? z({
|
|
221
221
|
actionId: e,
|
|
222
222
|
agentId: r.agentId
|
|
@@ -225,24 +225,24 @@ function v() {
|
|
|
225
225
|
}
|
|
226
226
|
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
227
|
} catch (e) {
|
|
228
|
-
if (
|
|
229
|
-
|
|
228
|
+
if (o(e)) {
|
|
229
|
+
s(), L("command-execution");
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
U(e instanceof Error ? e.message : "Execution failed", "error");
|
|
233
233
|
} finally {
|
|
234
234
|
Qe(null);
|
|
235
235
|
}
|
|
236
|
-
}, [J, U]), Ct =
|
|
236
|
+
}, [J, U]), Ct = u(async () => {
|
|
237
237
|
if (C.type !== "confirmExecute") return;
|
|
238
238
|
let e = C.actionId;
|
|
239
239
|
w({ type: "none" }), await X(e);
|
|
240
|
-
}, [C, X]), wt =
|
|
240
|
+
}, [C, X]), wt = u(async ({ shell: e, file: t }) => {
|
|
241
241
|
if (!R) return;
|
|
242
242
|
let { actionId: n, agentId: r } = R;
|
|
243
243
|
tt(!0);
|
|
244
244
|
try {
|
|
245
|
-
await
|
|
245
|
+
await Ce({
|
|
246
246
|
id: r,
|
|
247
247
|
profile: rt
|
|
248
248
|
}, {
|
|
@@ -259,7 +259,7 @@ function v() {
|
|
|
259
259
|
rt,
|
|
260
260
|
X,
|
|
261
261
|
U
|
|
262
|
-
]), Tt =
|
|
262
|
+
]), Tt = u(async (e) => {
|
|
263
263
|
let t = G.find((t) => t.id === e);
|
|
264
264
|
if (t) try {
|
|
265
265
|
await Y({ variables: {
|
|
@@ -273,31 +273,31 @@ function v() {
|
|
|
273
273
|
G,
|
|
274
274
|
Y,
|
|
275
275
|
U
|
|
276
|
-
]), Z =
|
|
277
|
-
|
|
276
|
+
]), Z = d(() => C.type === "edit" && G.find((e) => e.id === C.actionId) || null, [C, G]);
|
|
277
|
+
Oe(() => {
|
|
278
278
|
if (C.type === "edit" && Z) {
|
|
279
279
|
let e = Z;
|
|
280
280
|
it({
|
|
281
281
|
vibeId: e.vibeId ?? null,
|
|
282
282
|
visibility: e.visibility ?? "PRIVATE"
|
|
283
283
|
});
|
|
284
|
-
} else C.type === "create" && V(
|
|
284
|
+
} else C.type === "create" && V(c);
|
|
285
285
|
}, [C.type, Z]);
|
|
286
|
-
let Q =
|
|
286
|
+
let Q = d(() => G.filter((e) => j.has(e.id)), [G, j]), Et = G.length > 0 && G.every((e) => j.has(e.id)), Dt = G.some((e) => j.has(e.id)) && !Et, Ot = u((e, t) => {
|
|
287
287
|
M((n) => {
|
|
288
288
|
let r = new Set(n);
|
|
289
289
|
return t ? r.add(e) : r.delete(e), r;
|
|
290
290
|
});
|
|
291
|
-
}, []), kt =
|
|
291
|
+
}, []), kt = u((e) => {
|
|
292
292
|
M((t) => {
|
|
293
293
|
let n = new Set(t);
|
|
294
294
|
return G.forEach((t) => {
|
|
295
295
|
e ? n.add(t.id) : n.delete(t.id);
|
|
296
296
|
}), n;
|
|
297
297
|
});
|
|
298
|
-
}, [G]), $ =
|
|
298
|
+
}, [G]), $ = u(() => {
|
|
299
299
|
M(/* @__PURE__ */ new Set());
|
|
300
|
-
}, []), At =
|
|
300
|
+
}, []), At = u(async () => {
|
|
301
301
|
if (Q.length !== 0) {
|
|
302
302
|
F("duplicate");
|
|
303
303
|
try {
|
|
@@ -318,7 +318,7 @@ function v() {
|
|
|
318
318
|
U,
|
|
319
319
|
$,
|
|
320
320
|
W
|
|
321
|
-
]), jt =
|
|
321
|
+
]), jt = u(async () => {
|
|
322
322
|
if (Q.length !== 0) {
|
|
323
323
|
F("delete");
|
|
324
324
|
try {
|
|
@@ -338,22 +338,22 @@ function v() {
|
|
|
338
338
|
U,
|
|
339
339
|
$,
|
|
340
340
|
W
|
|
341
|
-
]), Mt =
|
|
341
|
+
]), Mt = u(async () => {
|
|
342
342
|
if (Q.length === 0) return;
|
|
343
343
|
F("execute");
|
|
344
344
|
let e = 0, t = 0, n = !1;
|
|
345
345
|
try {
|
|
346
346
|
for (let r of Q) try {
|
|
347
347
|
let i = await J({ variables: { id: r.id } });
|
|
348
|
-
if (i.error &&
|
|
349
|
-
|
|
348
|
+
if (i.error && o(i.error)) {
|
|
349
|
+
s(), L("command-execution"), n = !0;
|
|
350
350
|
break;
|
|
351
351
|
}
|
|
352
|
-
let
|
|
353
|
-
|
|
352
|
+
let ee = i.data?.executeAction;
|
|
353
|
+
ee?.status === "SUCCESS" || ee?.status === "COMPLETED" ? e += 1 : t += 1;
|
|
354
354
|
} catch (e) {
|
|
355
|
-
if (
|
|
356
|
-
|
|
355
|
+
if (o(e)) {
|
|
356
|
+
s(), L("command-execution"), n = !0;
|
|
357
357
|
break;
|
|
358
358
|
}
|
|
359
359
|
t += 1;
|
|
@@ -372,123 +372,123 @@ function v() {
|
|
|
372
372
|
k,
|
|
373
373
|
W
|
|
374
374
|
]);
|
|
375
|
-
return
|
|
375
|
+
return Ve ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : y && y.permissionStrings?.length > 0 && !He ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(Le, {}) }) : st ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : ct ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(ce, {
|
|
376
376
|
message: ct.message,
|
|
377
377
|
onRetry: () => W()
|
|
378
|
-
}) }) : /* @__PURE__ */ g
|
|
378
|
+
}) }) : /* @__PURE__ */ h(g, {
|
|
379
379
|
className: "p-4 sm:p-6 space-y-6",
|
|
380
380
|
children: [
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
title:
|
|
381
|
+
/* @__PURE__ */ m(oe, {
|
|
382
|
+
title: b("nav.actions", "Actions"),
|
|
383
383
|
description: "Automate tasks — run commands, scripts, or trigger webhooks on your agents",
|
|
384
|
-
actions: /* @__PURE__ */
|
|
384
|
+
actions: /* @__PURE__ */ h("div", {
|
|
385
385
|
className: "flex items-center gap-2",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ m("button", {
|
|
387
387
|
type: "button",
|
|
388
388
|
onClick: () => W(),
|
|
389
389
|
className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
|
|
390
390
|
title: "Refresh",
|
|
391
|
-
children: /* @__PURE__ */
|
|
392
|
-
}),
|
|
391
|
+
children: /* @__PURE__ */ m(Ne, { size: 16 })
|
|
392
|
+
}), Ue && /* @__PURE__ */ h("button", {
|
|
393
393
|
type: "button",
|
|
394
394
|
onClick: () => w({ type: "create" }),
|
|
395
395
|
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
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ m(Me, { size: 16 }), "Create Action"]
|
|
397
397
|
})]
|
|
398
398
|
})
|
|
399
399
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ h("div", {
|
|
401
401
|
"data-tour": "actions-filter-section",
|
|
402
402
|
className: "flex flex-wrap items-center gap-3",
|
|
403
403
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ m(fe, {
|
|
405
405
|
value: E,
|
|
406
406
|
onChange: Je,
|
|
407
|
-
placeholder:
|
|
407
|
+
placeholder: b("actions.searchPlaceholder", "Search actions..."),
|
|
408
408
|
className: "w-full sm:w-64"
|
|
409
409
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ m(pe, {
|
|
411
411
|
label: "Type",
|
|
412
|
-
options:
|
|
412
|
+
options: Re,
|
|
413
413
|
value: D,
|
|
414
414
|
onChange: Ye
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ m(pe, {
|
|
417
417
|
label: "Trigger",
|
|
418
|
-
options:
|
|
418
|
+
options: ze,
|
|
419
419
|
value: O,
|
|
420
420
|
onChange: Xe
|
|
421
421
|
})
|
|
422
422
|
]
|
|
423
423
|
}),
|
|
424
|
-
G.length > 0 && /* @__PURE__ */
|
|
424
|
+
G.length > 0 && /* @__PURE__ */ m("div", {
|
|
425
425
|
"data-tour": "actions-selection-toolbar",
|
|
426
426
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
427
|
-
children: /* @__PURE__ */
|
|
427
|
+
children: /* @__PURE__ */ h("div", {
|
|
428
428
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ h("div", {
|
|
430
430
|
className: "flex flex-wrap items-center gap-3",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ h("div", {
|
|
432
432
|
className: "flex items-center gap-2",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
433
|
+
children: [/* @__PURE__ */ m(ve, {
|
|
434
434
|
checked: Et,
|
|
435
435
|
indeterminate: Dt,
|
|
436
436
|
onChange: kt,
|
|
437
437
|
ariaLabel: "Select all visible actions"
|
|
438
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ m("span", {
|
|
439
439
|
className: "text-sm font-medium text-text-primary",
|
|
440
440
|
children: "Select all visible"
|
|
441
441
|
})]
|
|
442
|
-
}), j.size > 0 && /* @__PURE__ */
|
|
442
|
+
}), j.size > 0 && /* @__PURE__ */ m("button", {
|
|
443
443
|
type: "button",
|
|
444
444
|
onClick: $,
|
|
445
445
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
446
446
|
children: "Clear selection"
|
|
447
447
|
})]
|
|
448
|
-
}), /* @__PURE__ */
|
|
448
|
+
}), /* @__PURE__ */ h("div", {
|
|
449
449
|
className: "flex flex-wrap items-center gap-2",
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ h("span", {
|
|
452
452
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
453
453
|
children: [j.size, " selected"]
|
|
454
454
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ m("button", {
|
|
456
456
|
type: "button",
|
|
457
457
|
onClick: () => N("execute"),
|
|
458
458
|
disabled: Q.length === 0 || P !== null,
|
|
459
459
|
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
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ h("span", {
|
|
461
461
|
className: "inline-flex items-center gap-2",
|
|
462
462
|
children: [
|
|
463
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ m(je, { size: 14 }),
|
|
464
464
|
"Execute Selected",
|
|
465
465
|
Q.length > 0 ? ` (${Q.length})` : ""
|
|
466
466
|
]
|
|
467
467
|
})
|
|
468
468
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ m("button", {
|
|
470
470
|
type: "button",
|
|
471
471
|
onClick: At,
|
|
472
472
|
disabled: Q.length === 0 || P !== null,
|
|
473
473
|
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
|
-
children: /* @__PURE__ */
|
|
474
|
+
children: /* @__PURE__ */ h("span", {
|
|
475
475
|
className: "inline-flex items-center gap-2",
|
|
476
476
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ m(Ae, { size: 14 }),
|
|
478
478
|
"Duplicate Selected",
|
|
479
479
|
Q.length > 0 ? ` (${Q.length})` : ""
|
|
480
480
|
]
|
|
481
481
|
})
|
|
482
482
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ m("button", {
|
|
484
484
|
type: "button",
|
|
485
485
|
onClick: () => N("delete"),
|
|
486
486
|
disabled: Q.length === 0 || P !== null,
|
|
487
487
|
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
|
-
children: /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ h("span", {
|
|
489
489
|
className: "inline-flex items-center gap-2",
|
|
490
490
|
children: [
|
|
491
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ m(Pe, { size: 14 }),
|
|
492
492
|
"Delete Selected",
|
|
493
493
|
Q.length > 0 ? ` (${Q.length})` : ""
|
|
494
494
|
]
|
|
@@ -498,26 +498,26 @@ function v() {
|
|
|
498
498
|
})]
|
|
499
499
|
})
|
|
500
500
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ m(p, {
|
|
502
502
|
mode: "wait",
|
|
503
|
-
children: G.length === 0 && !st && /* @__PURE__ */
|
|
503
|
+
children: G.length === 0 && !st && /* @__PURE__ */ m(de, {
|
|
504
504
|
title: "No actions yet",
|
|
505
505
|
description: "Create your first action to automate commands, scripts, and webhooks",
|
|
506
|
-
action: /* @__PURE__ */
|
|
506
|
+
action: /* @__PURE__ */ h("div", {
|
|
507
507
|
className: "flex items-center gap-2",
|
|
508
|
-
children: [
|
|
508
|
+
children: [Ue && /* @__PURE__ */ m("button", {
|
|
509
509
|
type: "button",
|
|
510
510
|
onClick: () => w({ type: "create" }),
|
|
511
511
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
|
|
512
512
|
children: "Create Action"
|
|
513
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ m(_e, { prompt: "What is an Action in VibeControls and how do I create one?" })]
|
|
514
514
|
})
|
|
515
515
|
})
|
|
516
516
|
}),
|
|
517
|
-
G.length > 0 && /* @__PURE__ */
|
|
517
|
+
G.length > 0 && /* @__PURE__ */ m("div", {
|
|
518
518
|
"data-tour": "actions-list-container",
|
|
519
519
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
520
|
-
children: G.map((e) => /* @__PURE__ */
|
|
520
|
+
children: G.map((e) => /* @__PURE__ */ m("div", {
|
|
521
521
|
role: "button",
|
|
522
522
|
tabIndex: 0,
|
|
523
523
|
onClick: () => A(e.id),
|
|
@@ -525,7 +525,7 @@ function v() {
|
|
|
525
525
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), A(e.id));
|
|
526
526
|
},
|
|
527
527
|
"aria-label": `Select action ${e.displayName || e.name}`,
|
|
528
|
-
children: /* @__PURE__ */
|
|
528
|
+
children: /* @__PURE__ */ m(Se, {
|
|
529
529
|
action: e,
|
|
530
530
|
onExecute: St,
|
|
531
531
|
onEdit: (e) => w({
|
|
@@ -538,36 +538,36 @@ function v() {
|
|
|
538
538
|
id: t,
|
|
539
539
|
name: e.displayName || e.name
|
|
540
540
|
}),
|
|
541
|
-
onSchedule: (e) =>
|
|
542
|
-
onAddToCalendar: (e) =>
|
|
543
|
-
canUpdate:
|
|
544
|
-
canDelete:
|
|
545
|
-
canExecute:
|
|
541
|
+
onSchedule: (e) => _(`/scheduler?actionId=${encodeURIComponent(e)}`),
|
|
542
|
+
onAddToCalendar: (e) => _(`/vibecontrols/calendar?actionId=${encodeURIComponent(e)}`),
|
|
543
|
+
canUpdate: We,
|
|
544
|
+
canDelete: Ge,
|
|
545
|
+
canExecute: Ke,
|
|
546
546
|
isExecuting: Ze === e.id,
|
|
547
547
|
selected: j.has(e.id),
|
|
548
548
|
onToggleSelect: (t) => Ot(e.id, t)
|
|
549
549
|
})
|
|
550
550
|
}, e.id))
|
|
551
551
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ m(p, { children: k && K && /* @__PURE__ */ h("div", {
|
|
553
553
|
className: "space-y-3",
|
|
554
|
-
children: [
|
|
554
|
+
children: [Be && /* @__PURE__ */ m(De, {
|
|
555
555
|
actionId: k,
|
|
556
|
-
workspaceId:
|
|
556
|
+
workspaceId: Be,
|
|
557
557
|
actionName: K.displayName || K.name,
|
|
558
558
|
onClose: () => A(null)
|
|
559
|
-
}), /* @__PURE__ */
|
|
559
|
+
}), /* @__PURE__ */ m("div", {
|
|
560
560
|
"data-tour": "actions-execution-history",
|
|
561
|
-
children: /* @__PURE__ */
|
|
561
|
+
children: /* @__PURE__ */ m(Ee, {
|
|
562
562
|
executions: ut,
|
|
563
563
|
actionName: K.displayName || K.name,
|
|
564
564
|
onClose: () => A(null)
|
|
565
565
|
})
|
|
566
566
|
})]
|
|
567
567
|
}) }),
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ m(p, { children: qe.length > 0 && /* @__PURE__ */ m("div", {
|
|
569
569
|
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: qe.slice(-3).map((e) => /* @__PURE__ */
|
|
570
|
+
children: qe.slice(-3).map((e) => /* @__PURE__ */ h("div", {
|
|
571
571
|
role: "button",
|
|
572
572
|
tabIndex: 0,
|
|
573
573
|
onKeyDown: (t) => {
|
|
@@ -575,37 +575,37 @@ function v() {
|
|
|
575
575
|
},
|
|
576
576
|
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
577
|
onClick: () => at(e.id),
|
|
578
|
-
children: [/* @__PURE__ */
|
|
578
|
+
children: [/* @__PURE__ */ m("div", {
|
|
579
579
|
className: "font-medium text-sm",
|
|
580
580
|
children: e.message
|
|
581
|
-
}), e.detail && /* @__PURE__ */
|
|
581
|
+
}), e.detail && /* @__PURE__ */ m("pre", {
|
|
582
582
|
className: "text-xs font-mono opacity-80 mt-1 max-h-20 overflow-y-auto whitespace-pre-wrap",
|
|
583
583
|
children: e.detail
|
|
584
584
|
})]
|
|
585
585
|
}, e.id))
|
|
586
586
|
}) }),
|
|
587
|
-
C.type === "create" && /* @__PURE__ */
|
|
587
|
+
C.type === "create" && /* @__PURE__ */ m(Te, {
|
|
588
588
|
title: "Create Action",
|
|
589
589
|
agents: ft,
|
|
590
590
|
onSubmit: yt,
|
|
591
591
|
onCancel: () => w({ type: "none" }),
|
|
592
592
|
isLoading: mt,
|
|
593
|
-
extraSection: /* @__PURE__ */
|
|
593
|
+
extraSection: /* @__PURE__ */ h("div", {
|
|
594
594
|
className: "space-y-4",
|
|
595
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
596
596
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
597
|
-
children:
|
|
598
|
-
}), /* @__PURE__ */
|
|
597
|
+
children: b("actions.tags", "Tags")
|
|
598
|
+
}), /* @__PURE__ */ m(le, {
|
|
599
599
|
entityType: "VIBECONTROLS_ACTION",
|
|
600
600
|
onDraftChange: ht
|
|
601
|
-
})] }), /* @__PURE__ */
|
|
601
|
+
})] }), /* @__PURE__ */ m(he, {
|
|
602
602
|
value: B,
|
|
603
603
|
onChange: V,
|
|
604
604
|
disabled: mt
|
|
605
605
|
})]
|
|
606
606
|
})
|
|
607
607
|
}),
|
|
608
|
-
C.type === "edit" && Z && /* @__PURE__ */
|
|
608
|
+
C.type === "edit" && Z && /* @__PURE__ */ m(Te, {
|
|
609
609
|
title: "Edit Action",
|
|
610
610
|
initialData: {
|
|
611
611
|
name: Z.name,
|
|
@@ -633,22 +633,22 @@ function v() {
|
|
|
633
633
|
onSubmit: bt,
|
|
634
634
|
onCancel: () => w({ type: "none" }),
|
|
635
635
|
isLoading: vt,
|
|
636
|
-
extraSection: /* @__PURE__ */
|
|
636
|
+
extraSection: /* @__PURE__ */ h("div", {
|
|
637
637
|
className: "space-y-4",
|
|
638
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
639
639
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
640
|
-
children:
|
|
641
|
-
}), /* @__PURE__ */
|
|
640
|
+
children: b("actions.tags", "Tags")
|
|
641
|
+
}), /* @__PURE__ */ m(le, {
|
|
642
642
|
entityType: "VIBECONTROLS_ACTION",
|
|
643
643
|
entityId: Z.id
|
|
644
|
-
})] }), /* @__PURE__ */
|
|
644
|
+
})] }), /* @__PURE__ */ m(he, {
|
|
645
645
|
value: H,
|
|
646
646
|
onChange: it,
|
|
647
647
|
disabled: vt
|
|
648
648
|
})]
|
|
649
649
|
})
|
|
650
650
|
}),
|
|
651
|
-
C.type === "confirmDelete" && /* @__PURE__ */
|
|
651
|
+
C.type === "confirmDelete" && /* @__PURE__ */ m(a, {
|
|
652
652
|
isOpen: !0,
|
|
653
653
|
title: "Delete Action",
|
|
654
654
|
message: `Are you sure you want to delete "${C.name}"? This cannot be undone.`,
|
|
@@ -657,7 +657,7 @@ function v() {
|
|
|
657
657
|
onConfirm: xt,
|
|
658
658
|
onClose: () => w({ type: "none" })
|
|
659
659
|
}),
|
|
660
|
-
C.type === "confirmExecute" && /* @__PURE__ */
|
|
660
|
+
C.type === "confirmExecute" && /* @__PURE__ */ m(a, {
|
|
661
661
|
isOpen: !0,
|
|
662
662
|
title: `Execute: ${C.name}`,
|
|
663
663
|
message: `Are you sure you want to execute "${C.name}"?`,
|
|
@@ -666,7 +666,7 @@ function v() {
|
|
|
666
666
|
onConfirm: Ct,
|
|
667
667
|
onClose: () => w({ type: "none" })
|
|
668
668
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ m(a, {
|
|
670
670
|
isOpen: $e === "delete",
|
|
671
671
|
title: "Delete Selected Actions",
|
|
672
672
|
message: `Are you sure you want to delete ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
@@ -676,7 +676,7 @@ function v() {
|
|
|
676
676
|
onClose: () => N(null),
|
|
677
677
|
isLoading: P === "delete"
|
|
678
678
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ m(a, {
|
|
680
680
|
isOpen: $e === "execute",
|
|
681
681
|
title: "Execute Selected Actions",
|
|
682
682
|
message: `Execute ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
|
|
@@ -686,16 +686,16 @@ function v() {
|
|
|
686
686
|
onClose: () => N(null),
|
|
687
687
|
isLoading: P === "execute"
|
|
688
688
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ m(re, {
|
|
690
690
|
isOpen: I !== null,
|
|
691
691
|
onClose: () => L(null),
|
|
692
692
|
onConfirm: () => {
|
|
693
|
-
|
|
693
|
+
s(), L(null), _("/billing/plans");
|
|
694
694
|
},
|
|
695
|
-
title: I ?
|
|
696
|
-
message: I ?
|
|
695
|
+
title: I ? ie(I).title : void 0,
|
|
696
|
+
message: I ? ie(I).message : ""
|
|
697
697
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ m(me, {
|
|
699
699
|
isOpen: R !== null,
|
|
700
700
|
agentName: R ? ft.find((e) => e.id === R.agentId)?.name : void 0,
|
|
701
701
|
isLoading: et,
|
|
@@ -706,6 +706,6 @@ function v() {
|
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
//#endregion
|
|
709
|
-
export {
|
|
709
|
+
export { _ as ActionsPage };
|
|
710
710
|
|
|
711
711
|
//# sourceMappingURL=ActionsPage.js.map
|