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