@burdenoff/microfe-vibecontrols 2026.519.2 → 2026.519.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/ActionForm.js +138 -134
- package/dist/components/actions/ActionForm.js.map +1 -1
- package/dist/components/docs/DocsPageEditor.js +83 -69
- package/dist/components/docs/DocsPageEditor.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +4 -5
- package/dist/components/notes/NotesTabPanel.js.map +1 -1
- package/dist/components/shared/EntityTagPicker.js +110 -81
- package/dist/components/shared/EntityTagPicker.js.map +1 -1
- package/dist/components/shared/TagFilter.js +4 -4
- package/dist/components/shared/index.js +1 -1
- package/dist/components/tunnels/TunnelCreateWizard.js +208 -187
- package/dist/components/tunnels/TunnelCreateWizard.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckForm.js +41 -37
- package/dist/components/vibedeck/VibeDeckForm.js.map +1 -1
- package/dist/pages/ActionsPage.js +225 -217
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +13 -13
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +248 -234
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/CatalogDocsPage.js +119 -105
- package/dist/pages/CatalogDocsPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +257 -243
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/ComponentDocsPage.js +119 -105
- package/dist/pages/ComponentDocsPage.js.map +1 -1
- package/dist/pages/SessionDetailsPage.js +4 -4
- package/dist/pages/TargetDetailsPage.js +136 -119
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +47 -33
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +161 -153
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +407 -407
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibeDocsPage.js +119 -105
- package/dist/pages/VibeDocsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +95 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,30 +6,31 @@ import { ErrorState as ae } from "../components/shared/ErrorState.js";
|
|
|
6
6
|
import { ConfirmDialog as o } from "../components/shared/ConfirmDialog.js";
|
|
7
7
|
import { QuotaExhaustedDialog as oe } from "../components/shared/QuotaExhaustedDialog.js";
|
|
8
8
|
import { getQuotaDialogContent as s, isQuotaExhaustedError as c } from "../utils/quotaUtils.js";
|
|
9
|
+
import { EntityTagPicker as se } from "../components/shared/EntityTagPicker.js";
|
|
9
10
|
import { isNative as l, nativeNotify as u } from "../utils/nativeBridge.js";
|
|
10
|
-
import { EmptyState as
|
|
11
|
-
import { SearchInput as
|
|
12
|
-
import { FilterDropdown as
|
|
13
|
-
import { GetHelpButton as
|
|
14
|
-
import { SelectionCheckbox as
|
|
11
|
+
import { EmptyState as ce } from "../components/shared/EmptyState.js";
|
|
12
|
+
import { SearchInput as le } from "../components/shared/SearchInput.js";
|
|
13
|
+
import { FilterDropdown as ue } from "../components/shared/FilterDropdown.js";
|
|
14
|
+
import { GetHelpButton as de } from "../components/shared/GetHelpButton.js";
|
|
15
|
+
import { SelectionCheckbox as fe } from "../components/shared/SelectionCheckbox.js";
|
|
15
16
|
import "../components/shared/index.js";
|
|
16
|
-
import { ActionCard as
|
|
17
|
-
import { ActionForm as
|
|
18
|
-
import { ExecutionHistory as
|
|
19
|
-
import { ActionSchedulesList as
|
|
17
|
+
import { ActionCard as pe } from "../components/actions/ActionCard.js";
|
|
18
|
+
import { ActionForm as me } from "../components/actions/ActionForm.js";
|
|
19
|
+
import { ExecutionHistory as he } from "../components/actions/ExecutionHistory.js";
|
|
20
|
+
import { ActionSchedulesList as ge } from "../components/actions/ActionSchedulesList.js";
|
|
20
21
|
import "../components/actions/index.js";
|
|
21
22
|
import { VIBE_PERMISSIONS as d } from "../constants/permissions.js";
|
|
22
23
|
import { useCallback as f, useMemo as p, useState as m } from "react";
|
|
23
|
-
import { useI18n as
|
|
24
|
-
import { Copy as
|
|
25
|
-
import { useNavigate as
|
|
26
|
-
import { usePermissions as
|
|
24
|
+
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
25
|
+
import { Copy as ve, Play as ye, Plus as be, RefreshCw as xe, Trash2 as Se } from "lucide-react";
|
|
26
|
+
import { useNavigate as Ce } from "react-router-dom";
|
|
27
|
+
import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
27
28
|
import { AnimatePresence as h } from "framer-motion";
|
|
28
29
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
29
30
|
import { MotionPage as v } from "@burdenoff/fe-libs/shared/motion";
|
|
30
|
-
import { AccessDenied as
|
|
31
|
+
import { AccessDenied as Te } from "@burdenoff/fe-libs/shared/components";
|
|
31
32
|
//#region src/pages/ActionsPage.tsx
|
|
32
|
-
var
|
|
33
|
+
var Ee = [
|
|
33
34
|
{
|
|
34
35
|
value: "COMMAND",
|
|
35
36
|
label: "Command"
|
|
@@ -46,7 +47,7 @@ var Te = [
|
|
|
46
47
|
value: "WORKFLOW",
|
|
47
48
|
label: "Workflow"
|
|
48
49
|
}
|
|
49
|
-
],
|
|
50
|
+
], De = [
|
|
50
51
|
{
|
|
51
52
|
value: "MANUAL",
|
|
52
53
|
label: "Manual"
|
|
@@ -65,41 +66,41 @@ var Te = [
|
|
|
65
66
|
}
|
|
66
67
|
];
|
|
67
68
|
function y() {
|
|
68
|
-
let y =
|
|
69
|
+
let y = Ce(), { workspaceId: b } = ne(), { hasPermission: x, isLoading: S, permissions: C } = we(), w = ((e) => (t, n) => {
|
|
69
70
|
let r = e.t(t);
|
|
70
71
|
return r === t ? n : r;
|
|
71
|
-
})(
|
|
72
|
+
})(_e()), T = (Array.isArray(C) ? C : C?.permissionStrings)?.some?.((e) => e.startsWith("action:")), Oe = T ? x(d.ACTION_LIST) : !0, E = T ? x(d.ACTION_CREATE) : !0, ke = T ? x(d.ACTION_UPDATE) : !0, Ae = T ? x(d.ACTION_DELETE) : !0, je = T ? x(d.ACTION_EXECUTE) : !0, D = S, [O, k] = m({ type: "none" }), [Me, A] = m([]), [j, Ne] = m(""), [M, Pe] = m(null), [N, Fe] = m(null), [P, F] = m(null), [I, L] = m(/* @__PURE__ */ new Set()), [Ie, Le] = m(null), [Re, R] = m(null), [z, B] = m(null), [V, H] = m(null), U = f((e, t, n, r = 1e4) => {
|
|
72
73
|
let i = Date.now() + Math.random();
|
|
73
|
-
|
|
74
|
+
A((r) => [...r, {
|
|
74
75
|
message: e,
|
|
75
76
|
variant: t,
|
|
76
77
|
detail: n,
|
|
77
78
|
id: i
|
|
78
|
-
}]), t === "success" && setTimeout(() =>
|
|
79
|
+
}]), t === "success" && setTimeout(() => A((e) => e.filter((e) => e.id !== i)), r);
|
|
79
80
|
}, []), ze = f((e) => {
|
|
80
|
-
|
|
81
|
-
}, []), { data: Be, loading: Ve, error: He, refetch:
|
|
81
|
+
A((t) => t.filter((t) => t.id !== e));
|
|
82
|
+
}, []), { data: Be, loading: Ve, error: He, refetch: W } = a({
|
|
82
83
|
variables: {
|
|
83
84
|
filter: {
|
|
84
|
-
...
|
|
85
|
-
...
|
|
86
|
-
...
|
|
85
|
+
...M && M !== "all" ? { actionType: M } : {},
|
|
86
|
+
...N && N !== "all" ? { triggerType: N } : {},
|
|
87
|
+
...j ? { search: j } : {}
|
|
87
88
|
},
|
|
88
89
|
pagination: { limit: 50 }
|
|
89
90
|
},
|
|
90
|
-
skip:
|
|
91
|
-
}),
|
|
92
|
-
variables: { id:
|
|
93
|
-
skip: !
|
|
94
|
-
}),
|
|
91
|
+
skip: D
|
|
92
|
+
}), G = p(() => Be?.actions?.items || [], [Be]), { data: Ue } = i({
|
|
93
|
+
variables: { id: P },
|
|
94
|
+
skip: !P || D
|
|
95
|
+
}), K = Ue?.action, We = K?.recentExecutions || [], { data: Ge } = ee({
|
|
95
96
|
variables: { pagination: { limit: 100 } },
|
|
96
97
|
fetchPolicy: "cache-and-network",
|
|
97
|
-
skip:
|
|
98
|
+
skip: D
|
|
98
99
|
}), Ke = p(() => (Ge?.vibecontrolsAgents ?? []).map((e) => ({
|
|
99
100
|
id: e.id,
|
|
100
101
|
name: e.name,
|
|
101
102
|
isActive: e.isActive
|
|
102
|
-
})), [Ge]), [qe, { loading: Je }] = e({ refetchQueries: ["ListActions"] }), [Ye, { loading: Xe }] = te({ refetchQueries: ["ListActions", "GetAction"] }), [
|
|
103
|
+
})), [Ge]), [qe, { loading: Je }] = e({ refetchQueries: ["ListActions"] }), [Ye, { loading: Xe }] = te({ refetchQueries: ["ListActions", "GetAction"] }), [q] = t({ refetchQueries: ["ListActions"] }), [J] = r({ refetchQueries: ["GetAction"] }), [Y] = n({ refetchQueries: ["ListActions"] }), Ze = f(async (e) => {
|
|
103
104
|
try {
|
|
104
105
|
let t = await qe({ variables: { input: {
|
|
105
106
|
name: e.name,
|
|
@@ -124,21 +125,21 @@ function y() {
|
|
|
124
125
|
confirmationRequired: e.confirmationRequired
|
|
125
126
|
} } });
|
|
126
127
|
if (t.error && c(t.error)) {
|
|
127
|
-
|
|
128
|
+
k({ type: "none" }), H("action");
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
+
k({ type: "none" }), U("Action created", "success");
|
|
131
132
|
} catch (e) {
|
|
132
133
|
if (c(e)) {
|
|
133
|
-
|
|
134
|
+
k({ type: "none" }), H("action");
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
|
|
137
|
+
U(e instanceof Error ? e.message : "Failed to create action", "error");
|
|
137
138
|
}
|
|
138
|
-
}, [qe,
|
|
139
|
-
if (
|
|
139
|
+
}, [qe, U]), Qe = f(async (e) => {
|
|
140
|
+
if (O.type === "edit") try {
|
|
140
141
|
await Ye({ variables: {
|
|
141
|
-
id:
|
|
142
|
+
id: O.actionId,
|
|
142
143
|
input: {
|
|
143
144
|
displayName: e.displayName || null,
|
|
144
145
|
description: e.description || null,
|
|
@@ -160,167 +161,167 @@ function y() {
|
|
|
160
161
|
retryCount: e.retryCount,
|
|
161
162
|
confirmationRequired: e.confirmationRequired
|
|
162
163
|
}
|
|
163
|
-
} }),
|
|
164
|
+
} }), k({ type: "none" }), U("Action updated", "success");
|
|
164
165
|
} catch (e) {
|
|
165
|
-
|
|
166
|
+
U(e instanceof Error ? e.message : "Failed to update action", "error");
|
|
166
167
|
}
|
|
167
168
|
}, [
|
|
168
169
|
Ye,
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
O,
|
|
171
|
+
U
|
|
171
172
|
]), $e = f(async () => {
|
|
172
|
-
if (
|
|
173
|
-
await
|
|
173
|
+
if (O.type === "confirmDelete") try {
|
|
174
|
+
await q({ variables: { id: O.id } }), P === O.id && F(null), k({ type: "none" }), U("Action deleted", "success"), l() && u("success");
|
|
174
175
|
} catch (e) {
|
|
175
|
-
|
|
176
|
+
U(e instanceof Error ? e.message : "Failed to delete action", "error"), l() && u("error");
|
|
176
177
|
}
|
|
177
178
|
}, [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
O,
|
|
180
|
+
q,
|
|
181
|
+
P,
|
|
182
|
+
U
|
|
182
183
|
]), et = async (e) => {
|
|
183
|
-
let t =
|
|
184
|
+
let t = G.find((t) => t.id === e);
|
|
184
185
|
if (t) {
|
|
185
186
|
if (t.confirmationRequired) {
|
|
186
|
-
|
|
187
|
+
k({
|
|
187
188
|
type: "confirmExecute",
|
|
188
189
|
actionId: e,
|
|
189
190
|
name: t.displayName || t.name
|
|
190
191
|
});
|
|
191
192
|
return;
|
|
192
193
|
}
|
|
193
|
-
await
|
|
194
|
+
await X(e);
|
|
194
195
|
}
|
|
195
|
-
},
|
|
196
|
+
}, X = f(async (e) => {
|
|
196
197
|
Le(e);
|
|
197
198
|
try {
|
|
198
|
-
let t = await
|
|
199
|
+
let t = await J({ variables: { id: e } });
|
|
199
200
|
if (t.error && c(t.error)) {
|
|
200
|
-
|
|
201
|
+
H("command-execution");
|
|
201
202
|
return;
|
|
202
203
|
}
|
|
203
204
|
let n = t.data?.executeAction;
|
|
204
|
-
n &&
|
|
205
|
+
n && U(n.status === "SUCCESS" || n.status === "COMPLETED" ? "Action executed successfully" : "Action execution failed", n.status === "SUCCESS" || n.status === "COMPLETED" ? "success" : "error", n.output || n.errorMessage);
|
|
205
206
|
} catch (e) {
|
|
206
207
|
if (c(e)) {
|
|
207
|
-
|
|
208
|
+
H("command-execution");
|
|
208
209
|
return;
|
|
209
210
|
}
|
|
210
|
-
|
|
211
|
+
U(e instanceof Error ? e.message : "Execution failed", "error");
|
|
211
212
|
} finally {
|
|
212
213
|
Le(null);
|
|
213
214
|
}
|
|
214
|
-
}, [
|
|
215
|
-
if (
|
|
216
|
-
let e =
|
|
217
|
-
|
|
218
|
-
}, [
|
|
219
|
-
let t =
|
|
215
|
+
}, [J, U]), tt = f(async () => {
|
|
216
|
+
if (O.type !== "confirmExecute") return;
|
|
217
|
+
let e = O.actionId;
|
|
218
|
+
k({ type: "none" }), await X(e);
|
|
219
|
+
}, [O, X]), nt = f(async (e) => {
|
|
220
|
+
let t = G.find((t) => t.id === e);
|
|
220
221
|
if (t) try {
|
|
221
|
-
await
|
|
222
|
+
await Y({ variables: {
|
|
222
223
|
id: e,
|
|
223
224
|
name: `${t.name}-copy`
|
|
224
|
-
} }),
|
|
225
|
+
} }), U("Action duplicated", "success");
|
|
225
226
|
} catch (e) {
|
|
226
|
-
|
|
227
|
+
U(e instanceof Error ? e.message : "Failed to duplicate action", "error");
|
|
227
228
|
}
|
|
228
229
|
}, [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
]),
|
|
233
|
-
|
|
230
|
+
G,
|
|
231
|
+
Y,
|
|
232
|
+
U
|
|
233
|
+
]), Z = p(() => O.type === "edit" && G.find((e) => e.id === O.actionId) || null, [O, G]), Q = p(() => G.filter((e) => I.has(e.id)), [G, I]), rt = G.length > 0 && G.every((e) => I.has(e.id)), it = G.some((e) => I.has(e.id)) && !rt, at = f((e, t) => {
|
|
234
|
+
L((n) => {
|
|
234
235
|
let r = new Set(n);
|
|
235
236
|
return t ? r.add(e) : r.delete(e), r;
|
|
236
237
|
});
|
|
237
|
-
}, []),
|
|
238
|
-
|
|
238
|
+
}, []), ot = f((e) => {
|
|
239
|
+
L((t) => {
|
|
239
240
|
let n = new Set(t);
|
|
240
|
-
return
|
|
241
|
+
return G.forEach((t) => {
|
|
241
242
|
e ? n.add(t.id) : n.delete(t.id);
|
|
242
243
|
}), n;
|
|
243
244
|
});
|
|
244
|
-
}, [
|
|
245
|
-
|
|
246
|
-
}, []),
|
|
247
|
-
if (
|
|
248
|
-
|
|
245
|
+
}, [G]), $ = f(() => {
|
|
246
|
+
L(/* @__PURE__ */ new Set());
|
|
247
|
+
}, []), st = f(async () => {
|
|
248
|
+
if (Q.length !== 0) {
|
|
249
|
+
B("duplicate");
|
|
249
250
|
try {
|
|
250
|
-
let e = await Promise.allSettled(
|
|
251
|
+
let e = await Promise.allSettled(Q.map((e) => Y({ variables: {
|
|
251
252
|
id: e.id,
|
|
252
253
|
name: `${e.name}-copy`
|
|
253
254
|
} }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
254
|
-
|
|
255
|
+
U(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await W();
|
|
255
256
|
} catch (e) {
|
|
256
|
-
|
|
257
|
+
U(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
|
|
257
258
|
} finally {
|
|
258
|
-
|
|
259
|
+
B(null);
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
}, [
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
Q,
|
|
264
|
+
Y,
|
|
265
|
+
U,
|
|
265
266
|
$,
|
|
266
|
-
|
|
267
|
-
]),
|
|
268
|
-
if (
|
|
269
|
-
|
|
267
|
+
W
|
|
268
|
+
]), ct = f(async () => {
|
|
269
|
+
if (Q.length !== 0) {
|
|
270
|
+
B("delete");
|
|
270
271
|
try {
|
|
271
|
-
let e = await Promise.allSettled(
|
|
272
|
-
|
|
272
|
+
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;
|
|
273
|
+
P && I.has(P) && F(null), U(`Deleted ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), R(null), await W();
|
|
273
274
|
} catch (e) {
|
|
274
|
-
|
|
275
|
+
U(e instanceof Error ? e.message : "Failed to delete actions", "error");
|
|
275
276
|
} finally {
|
|
276
|
-
|
|
277
|
+
B(null);
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
}, [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
Q,
|
|
282
|
+
q,
|
|
283
|
+
P,
|
|
284
|
+
I,
|
|
285
|
+
U,
|
|
285
286
|
$,
|
|
286
|
-
|
|
287
|
-
]),
|
|
288
|
-
if (
|
|
289
|
-
|
|
287
|
+
W
|
|
288
|
+
]), lt = f(async () => {
|
|
289
|
+
if (Q.length === 0) return;
|
|
290
|
+
B("execute");
|
|
290
291
|
let e = 0, t = 0, n = !1;
|
|
291
292
|
try {
|
|
292
|
-
for (let r of
|
|
293
|
-
let i = await
|
|
293
|
+
for (let r of Q) try {
|
|
294
|
+
let i = await J({ variables: { id: r.id } });
|
|
294
295
|
if (i.error && c(i.error)) {
|
|
295
|
-
|
|
296
|
+
H("command-execution"), n = !0;
|
|
296
297
|
break;
|
|
297
298
|
}
|
|
298
299
|
let a = i.data?.executeAction;
|
|
299
300
|
a?.status === "SUCCESS" || a?.status === "COMPLETED" ? e += 1 : t += 1;
|
|
300
301
|
} catch (e) {
|
|
301
302
|
if (c(e)) {
|
|
302
|
-
|
|
303
|
+
H("command-execution"), n = !0;
|
|
303
304
|
break;
|
|
304
305
|
}
|
|
305
306
|
t += 1;
|
|
306
307
|
}
|
|
307
|
-
n ||
|
|
308
|
+
n || U(`Executed ${e} action${e === 1 ? "" : "s"}${t > 0 ? ` • ${t} failed` : ""}`, t > 0 ? "error" : "success"), $(), R(null), P && await W();
|
|
308
309
|
} catch (e) {
|
|
309
|
-
|
|
310
|
+
U(e instanceof Error ? e.message : "Failed to execute actions", "error");
|
|
310
311
|
} finally {
|
|
311
|
-
|
|
312
|
+
B(null);
|
|
312
313
|
}
|
|
313
314
|
}, [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
Q,
|
|
316
|
+
J,
|
|
317
|
+
U,
|
|
317
318
|
$,
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
P,
|
|
320
|
+
W
|
|
320
321
|
]);
|
|
321
|
-
return !S && C && C.permissionStrings?.length > 0 && !
|
|
322
|
+
return !S && C && C.permissionStrings?.length > 0 && !Oe ? /* @__PURE__ */ g(v, { children: /* @__PURE__ */ g(Te, {}) }) : Ve ? /* @__PURE__ */ g(v, { children: /* @__PURE__ */ g(ie, { message: "Loading Actions..." }) }) : He ? /* @__PURE__ */ g(v, { children: /* @__PURE__ */ g(ae, {
|
|
322
323
|
message: He.message,
|
|
323
|
-
onRetry: () =>
|
|
324
|
+
onRetry: () => W()
|
|
324
325
|
}) }) : /* @__PURE__ */ _(v, {
|
|
325
326
|
className: "p-4 sm:p-6 space-y-6",
|
|
326
327
|
children: [
|
|
@@ -330,41 +331,41 @@ function y() {
|
|
|
330
331
|
actions: /* @__PURE__ */ _("div", {
|
|
331
332
|
className: "flex items-center gap-2",
|
|
332
333
|
children: [/* @__PURE__ */ g("button", {
|
|
333
|
-
onClick: () =>
|
|
334
|
+
onClick: () => W(),
|
|
334
335
|
className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
|
|
335
336
|
title: "Refresh",
|
|
336
|
-
children: /* @__PURE__ */ g(
|
|
337
|
-
}),
|
|
338
|
-
onClick: () =>
|
|
337
|
+
children: /* @__PURE__ */ g(xe, { size: 16 })
|
|
338
|
+
}), E && /* @__PURE__ */ _("button", {
|
|
339
|
+
onClick: () => k({ type: "create" }),
|
|
339
340
|
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",
|
|
340
|
-
children: [/* @__PURE__ */ g(
|
|
341
|
+
children: [/* @__PURE__ */ g(be, { size: 16 }), "Create Action"]
|
|
341
342
|
})]
|
|
342
343
|
})
|
|
343
344
|
}),
|
|
344
345
|
/* @__PURE__ */ _("div", {
|
|
345
346
|
className: "flex flex-wrap items-center gap-3",
|
|
346
347
|
children: [
|
|
347
|
-
/* @__PURE__ */ g(
|
|
348
|
-
value:
|
|
348
|
+
/* @__PURE__ */ g(le, {
|
|
349
|
+
value: j,
|
|
349
350
|
onChange: Ne,
|
|
350
351
|
placeholder: w("actions.searchPlaceholder", "Search actions..."),
|
|
351
352
|
className: "w-full sm:w-64"
|
|
352
353
|
}),
|
|
353
|
-
/* @__PURE__ */ g(
|
|
354
|
+
/* @__PURE__ */ g(ue, {
|
|
354
355
|
label: "Type",
|
|
355
|
-
options:
|
|
356
|
-
value:
|
|
356
|
+
options: Ee,
|
|
357
|
+
value: M,
|
|
357
358
|
onChange: Pe
|
|
358
359
|
}),
|
|
359
|
-
/* @__PURE__ */ g(
|
|
360
|
+
/* @__PURE__ */ g(ue, {
|
|
360
361
|
label: "Trigger",
|
|
361
|
-
options:
|
|
362
|
-
value:
|
|
362
|
+
options: De,
|
|
363
|
+
value: N,
|
|
363
364
|
onChange: Fe
|
|
364
365
|
})
|
|
365
366
|
]
|
|
366
367
|
}),
|
|
367
|
-
|
|
368
|
+
G.length > 0 && /* @__PURE__ */ g("div", {
|
|
368
369
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
369
370
|
children: /* @__PURE__ */ _("div", {
|
|
370
371
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
@@ -372,16 +373,16 @@ function y() {
|
|
|
372
373
|
className: "flex flex-wrap items-center gap-3",
|
|
373
374
|
children: [/* @__PURE__ */ _("div", {
|
|
374
375
|
className: "flex items-center gap-2",
|
|
375
|
-
children: [/* @__PURE__ */ g(
|
|
376
|
-
checked:
|
|
377
|
-
indeterminate:
|
|
378
|
-
onChange:
|
|
376
|
+
children: [/* @__PURE__ */ g(fe, {
|
|
377
|
+
checked: rt,
|
|
378
|
+
indeterminate: it,
|
|
379
|
+
onChange: ot,
|
|
379
380
|
ariaLabel: "Select all visible actions"
|
|
380
381
|
}), /* @__PURE__ */ g("span", {
|
|
381
382
|
className: "text-sm font-medium text-text-primary",
|
|
382
383
|
children: "Select all visible"
|
|
383
384
|
})]
|
|
384
|
-
}),
|
|
385
|
+
}), I.size > 0 && /* @__PURE__ */ g("button", {
|
|
385
386
|
onClick: $,
|
|
386
387
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
387
388
|
children: "Clear selection"
|
|
@@ -391,44 +392,44 @@ function y() {
|
|
|
391
392
|
children: [
|
|
392
393
|
/* @__PURE__ */ _("span", {
|
|
393
394
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
394
|
-
children: [
|
|
395
|
+
children: [I.size, " selected"]
|
|
395
396
|
}),
|
|
396
397
|
/* @__PURE__ */ g("button", {
|
|
397
|
-
onClick: () =>
|
|
398
|
-
disabled:
|
|
398
|
+
onClick: () => R("execute"),
|
|
399
|
+
disabled: Q.length === 0 || z !== null,
|
|
399
400
|
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",
|
|
400
401
|
children: /* @__PURE__ */ _("span", {
|
|
401
402
|
className: "inline-flex items-center gap-2",
|
|
402
403
|
children: [
|
|
403
|
-
/* @__PURE__ */ g(
|
|
404
|
+
/* @__PURE__ */ g(ye, { size: 14 }),
|
|
404
405
|
"Execute Selected",
|
|
405
|
-
|
|
406
|
+
Q.length > 0 ? ` (${Q.length})` : ""
|
|
406
407
|
]
|
|
407
408
|
})
|
|
408
409
|
}),
|
|
409
410
|
/* @__PURE__ */ g("button", {
|
|
410
|
-
onClick:
|
|
411
|
-
disabled:
|
|
411
|
+
onClick: st,
|
|
412
|
+
disabled: Q.length === 0 || z !== null,
|
|
412
413
|
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",
|
|
413
414
|
children: /* @__PURE__ */ _("span", {
|
|
414
415
|
className: "inline-flex items-center gap-2",
|
|
415
416
|
children: [
|
|
416
|
-
/* @__PURE__ */ g(
|
|
417
|
+
/* @__PURE__ */ g(ve, { size: 14 }),
|
|
417
418
|
"Duplicate Selected",
|
|
418
|
-
|
|
419
|
+
Q.length > 0 ? ` (${Q.length})` : ""
|
|
419
420
|
]
|
|
420
421
|
})
|
|
421
422
|
}),
|
|
422
423
|
/* @__PURE__ */ g("button", {
|
|
423
|
-
onClick: () =>
|
|
424
|
-
disabled:
|
|
424
|
+
onClick: () => R("delete"),
|
|
425
|
+
disabled: Q.length === 0 || z !== null,
|
|
425
426
|
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",
|
|
426
427
|
children: /* @__PURE__ */ _("span", {
|
|
427
428
|
className: "inline-flex items-center gap-2",
|
|
428
429
|
children: [
|
|
429
|
-
/* @__PURE__ */ g(
|
|
430
|
+
/* @__PURE__ */ g(Se, { size: 14 }),
|
|
430
431
|
"Delete Selected",
|
|
431
|
-
|
|
432
|
+
Q.length > 0 ? ` (${Q.length})` : ""
|
|
432
433
|
]
|
|
433
434
|
})
|
|
434
435
|
})
|
|
@@ -438,38 +439,38 @@ function y() {
|
|
|
438
439
|
}),
|
|
439
440
|
/* @__PURE__ */ g(h, {
|
|
440
441
|
mode: "wait",
|
|
441
|
-
children:
|
|
442
|
+
children: G.length === 0 && !Ve && /* @__PURE__ */ g(ce, {
|
|
442
443
|
title: "No actions yet",
|
|
443
444
|
description: "Create your first action to automate commands, scripts, and webhooks",
|
|
444
445
|
action: /* @__PURE__ */ _("div", {
|
|
445
446
|
className: "flex items-center gap-2",
|
|
446
|
-
children: [
|
|
447
|
-
onClick: () =>
|
|
447
|
+
children: [E && /* @__PURE__ */ g("button", {
|
|
448
|
+
onClick: () => k({ type: "create" }),
|
|
448
449
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
|
|
449
450
|
children: "Create Action"
|
|
450
|
-
}), /* @__PURE__ */ g(
|
|
451
|
+
}), /* @__PURE__ */ g(de, { prompt: "What is an Action in VibeControls and how do I create one?" })]
|
|
451
452
|
})
|
|
452
453
|
})
|
|
453
454
|
}),
|
|
454
|
-
|
|
455
|
+
G.length > 0 && /* @__PURE__ */ g("div", {
|
|
455
456
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
456
|
-
children:
|
|
457
|
+
children: G.map((e) => /* @__PURE__ */ g("div", {
|
|
457
458
|
role: "button",
|
|
458
459
|
tabIndex: 0,
|
|
459
|
-
onClick: () =>
|
|
460
|
+
onClick: () => F(e.id),
|
|
460
461
|
onKeyDown: (t) => {
|
|
461
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
462
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), F(e.id));
|
|
462
463
|
},
|
|
463
464
|
"aria-label": `Select action ${e.displayName || e.name}`,
|
|
464
|
-
children: /* @__PURE__ */ g(
|
|
465
|
+
children: /* @__PURE__ */ g(pe, {
|
|
465
466
|
action: e,
|
|
466
467
|
onExecute: et,
|
|
467
|
-
onEdit: (e) =>
|
|
468
|
+
onEdit: (e) => k({
|
|
468
469
|
type: "edit",
|
|
469
470
|
actionId: e
|
|
470
471
|
}),
|
|
471
472
|
onDuplicate: nt,
|
|
472
|
-
onDelete: (t) =>
|
|
473
|
+
onDelete: (t) => k({
|
|
473
474
|
type: "confirmDelete",
|
|
474
475
|
id: t,
|
|
475
476
|
name: e.displayName || e.name
|
|
@@ -480,22 +481,22 @@ function y() {
|
|
|
480
481
|
canDelete: Ae,
|
|
481
482
|
canExecute: je,
|
|
482
483
|
isExecuting: Ie === e.id,
|
|
483
|
-
selected:
|
|
484
|
-
onToggleSelect: (t) =>
|
|
484
|
+
selected: I.has(e.id),
|
|
485
|
+
onToggleSelect: (t) => at(e.id, t)
|
|
485
486
|
})
|
|
486
487
|
}, e.id))
|
|
487
488
|
}),
|
|
488
|
-
/* @__PURE__ */ g(h, { children:
|
|
489
|
+
/* @__PURE__ */ g(h, { children: P && K && /* @__PURE__ */ _("div", {
|
|
489
490
|
className: "space-y-3",
|
|
490
|
-
children: [b && /* @__PURE__ */ g(
|
|
491
|
-
actionId:
|
|
491
|
+
children: [b && /* @__PURE__ */ g(ge, {
|
|
492
|
+
actionId: P,
|
|
492
493
|
workspaceId: b,
|
|
493
|
-
actionName:
|
|
494
|
-
onClose: () =>
|
|
495
|
-
}), /* @__PURE__ */ g(
|
|
494
|
+
actionName: K.displayName || K.name,
|
|
495
|
+
onClose: () => F(null)
|
|
496
|
+
}), /* @__PURE__ */ g(he, {
|
|
496
497
|
executions: We,
|
|
497
|
-
actionName:
|
|
498
|
-
onClose: () =>
|
|
498
|
+
actionName: K.displayName || K.name,
|
|
499
|
+
onClose: () => F(null)
|
|
499
500
|
})]
|
|
500
501
|
}) }),
|
|
501
502
|
/* @__PURE__ */ g(h, { children: Me.length > 0 && /* @__PURE__ */ g("div", {
|
|
@@ -512,88 +513,95 @@ function y() {
|
|
|
512
513
|
})]
|
|
513
514
|
}, e.id))
|
|
514
515
|
}) }),
|
|
515
|
-
|
|
516
|
+
O.type === "create" && /* @__PURE__ */ g(me, {
|
|
516
517
|
title: "Create Action",
|
|
517
518
|
agents: Ke,
|
|
518
519
|
onSubmit: Ze,
|
|
519
|
-
onCancel: () =>
|
|
520
|
+
onCancel: () => k({ type: "none" }),
|
|
520
521
|
isLoading: Je
|
|
521
522
|
}),
|
|
522
|
-
|
|
523
|
+
O.type === "edit" && Z && /* @__PURE__ */ g(me, {
|
|
523
524
|
title: "Edit Action",
|
|
524
525
|
initialData: {
|
|
525
|
-
name:
|
|
526
|
-
displayName:
|
|
527
|
-
description:
|
|
528
|
-
actionType:
|
|
529
|
-
triggerType:
|
|
530
|
-
schedule:
|
|
531
|
-
category:
|
|
532
|
-
tags:
|
|
533
|
-
command:
|
|
534
|
-
workingDirectory:
|
|
535
|
-
targetAgentId:
|
|
536
|
-
script:
|
|
537
|
-
scriptInterpreter:
|
|
538
|
-
webhookUrl:
|
|
539
|
-
webhookMethod:
|
|
540
|
-
webhookBody:
|
|
541
|
-
webhookAuthType:
|
|
542
|
-
timeoutMs:
|
|
543
|
-
retryCount:
|
|
544
|
-
confirmationRequired:
|
|
526
|
+
name: Z.name,
|
|
527
|
+
displayName: Z.displayName || "",
|
|
528
|
+
description: Z.description || "",
|
|
529
|
+
actionType: Z.actionType || "COMMAND",
|
|
530
|
+
triggerType: Z.triggerType || "MANUAL",
|
|
531
|
+
schedule: Z.schedule || "",
|
|
532
|
+
category: Z.category || "",
|
|
533
|
+
tags: Z.tags || [],
|
|
534
|
+
command: Z.command || "",
|
|
535
|
+
workingDirectory: Z.workingDirectory || "",
|
|
536
|
+
targetAgentId: Z.targetAgentId || "",
|
|
537
|
+
script: Z.script || "",
|
|
538
|
+
scriptInterpreter: Z.scriptInterpreter || "bash",
|
|
539
|
+
webhookUrl: Z.webhookUrl || "",
|
|
540
|
+
webhookMethod: Z.webhookMethod || "POST",
|
|
541
|
+
webhookBody: Z.webhookBody || "",
|
|
542
|
+
webhookAuthType: Z.webhookAuthType || "",
|
|
543
|
+
timeoutMs: Z.timeoutMs || 3e4,
|
|
544
|
+
retryCount: Z.retryCount || 0,
|
|
545
|
+
confirmationRequired: Z.confirmationRequired ?? !1
|
|
545
546
|
},
|
|
546
547
|
agents: Ke,
|
|
547
548
|
onSubmit: Qe,
|
|
548
|
-
onCancel: () =>
|
|
549
|
-
isLoading: Xe
|
|
549
|
+
onCancel: () => k({ type: "none" }),
|
|
550
|
+
isLoading: Xe,
|
|
551
|
+
extraSection: /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
|
|
552
|
+
className: "text-sm font-medium text-text-secondary mb-2",
|
|
553
|
+
children: "Tags"
|
|
554
|
+
}), /* @__PURE__ */ g(se, {
|
|
555
|
+
entityType: "VIBECONTROLS_ACTION",
|
|
556
|
+
entityId: Z.id
|
|
557
|
+
})] })
|
|
550
558
|
}),
|
|
551
|
-
|
|
559
|
+
O.type === "confirmDelete" && /* @__PURE__ */ g(o, {
|
|
552
560
|
isOpen: !0,
|
|
553
561
|
title: "Delete Action",
|
|
554
|
-
message: `Are you sure you want to delete "${
|
|
562
|
+
message: `Are you sure you want to delete "${O.name}"? This cannot be undone.`,
|
|
555
563
|
confirmLabel: "Delete",
|
|
556
564
|
variant: "danger",
|
|
557
565
|
onConfirm: $e,
|
|
558
|
-
onClose: () =>
|
|
566
|
+
onClose: () => k({ type: "none" })
|
|
559
567
|
}),
|
|
560
|
-
|
|
568
|
+
O.type === "confirmExecute" && /* @__PURE__ */ g(o, {
|
|
561
569
|
isOpen: !0,
|
|
562
|
-
title: `Execute: ${
|
|
563
|
-
message: `Are you sure you want to execute "${
|
|
570
|
+
title: `Execute: ${O.name}`,
|
|
571
|
+
message: `Are you sure you want to execute "${O.name}"?`,
|
|
564
572
|
confirmLabel: "Execute",
|
|
565
573
|
variant: "warning",
|
|
566
574
|
onConfirm: tt,
|
|
567
|
-
onClose: () =>
|
|
575
|
+
onClose: () => k({ type: "none" })
|
|
568
576
|
}),
|
|
569
577
|
/* @__PURE__ */ g(o, {
|
|
570
578
|
isOpen: Re === "delete",
|
|
571
579
|
title: "Delete Selected Actions",
|
|
572
|
-
message: `Are you sure you want to delete ${
|
|
580
|
+
message: `Are you sure you want to delete ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
573
581
|
confirmLabel: "Delete Actions",
|
|
574
582
|
variant: "danger",
|
|
575
|
-
onConfirm:
|
|
576
|
-
onClose: () =>
|
|
577
|
-
isLoading:
|
|
583
|
+
onConfirm: ct,
|
|
584
|
+
onClose: () => R(null),
|
|
585
|
+
isLoading: z === "delete"
|
|
578
586
|
}),
|
|
579
587
|
/* @__PURE__ */ g(o, {
|
|
580
588
|
isOpen: Re === "execute",
|
|
581
589
|
title: "Execute Selected Actions",
|
|
582
|
-
message: `Execute ${
|
|
590
|
+
message: `Execute ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
|
|
583
591
|
confirmLabel: "Execute Actions",
|
|
584
592
|
variant: "warning",
|
|
585
|
-
onConfirm:
|
|
586
|
-
onClose: () =>
|
|
587
|
-
isLoading:
|
|
593
|
+
onConfirm: lt,
|
|
594
|
+
onClose: () => R(null),
|
|
595
|
+
isLoading: z === "execute"
|
|
588
596
|
}),
|
|
589
597
|
/* @__PURE__ */ g(oe, {
|
|
590
|
-
isOpen:
|
|
591
|
-
onClose: () =>
|
|
598
|
+
isOpen: V !== null,
|
|
599
|
+
onClose: () => H(null),
|
|
592
600
|
onConfirm: () => {
|
|
593
|
-
|
|
601
|
+
H(null), y("/billing");
|
|
594
602
|
},
|
|
595
|
-
title:
|
|
596
|
-
message:
|
|
603
|
+
title: V ? s(V).title : void 0,
|
|
604
|
+
message: V ? s(V).message : ""
|
|
597
605
|
})
|
|
598
606
|
]
|
|
599
607
|
});
|