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