@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.
@@ -1,42 +1,44 @@
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";
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 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";
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 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";
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";
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 He = [
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
- ], Ue = [
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 g() {
75
- let g = Fe(), [_, We] = Ie(), { workspaceId: Ge } = ae(), { hasPermission: v, isLoading: Ke, permissions: y } = Le(), b = ((e) => (t, n) => {
76
- let r = e.t(t);
77
- return r === t ? n : r;
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) => {
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
- T((r) => [...r, {
112
+ O((r) => [...r, {
81
113
  message: e,
82
114
  variant: t,
83
115
  detail: n,
84
116
  id: i
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({
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
- ...D && D !== "all" ? { actionType: D } : {},
92
- ...O && O !== "all" ? { triggerType: O } : {},
93
- ...E ? { search: E } : {}
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: 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({
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: S
105
- }), K = d(() => (_t?.vibecontrolsAgents ?? []).map((e) => ({
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
- })), [_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) => {
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 vt({ variables: { input: {
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
- ...ge(z)
164
+ ...he(dt)
133
165
  } } });
134
- if (t.error && o(t.error)) {
135
- w({ type: "none" }), s(), I("action");
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
- w({ type: "none" }), H("Action created", "success"), B(c), n && await xt(n);
171
+ D({ type: "none" }), U("Action created", "success"), ft(l), n && await Et(n);
140
172
  } catch (e) {
141
- if (o(e)) {
142
- w({ type: "none" }), s(), I("action");
173
+ if (s(e)) {
174
+ D({ type: "none" }), c(), B("action");
143
175
  return;
144
176
  }
145
- H(e instanceof Error ? e.message : "Failed to create action", "error");
177
+ U(e instanceof Error ? e.message : "Failed to create action", "error");
146
178
  }
147
179
  }, [
148
- vt,
149
- xt,
150
- H,
151
- z
152
- ]), Tt = u(async (e) => {
153
- if (C.type === "edit") try {
154
- await St({ variables: {
155
- id: C.actionId,
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
- ...ge(V)
208
+ ...he(pt)
177
209
  }
178
- } }), w({ type: "none" }), H("Action updated", "success");
210
+ } }), D({ type: "none" }), U("Action updated", "success");
179
211
  } catch (e) {
180
- H(e instanceof Error ? e.message : "Failed to update action", "error");
212
+ U(e instanceof Error ? e.message : "Failed to update action", "error");
181
213
  }
182
214
  }, [
183
- St,
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");
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
- H(e instanceof Error ? e.message : "Failed to delete action", "error"), be() && xe("error");
223
+ U(e instanceof Error ? e.message : "Failed to delete action", "error"), ye() && be("error");
192
224
  }
193
225
  }, [
194
- C,
226
+ E,
195
227
  q,
196
- k,
197
- H
198
- ]), Dt = async (e) => {
199
- let t = W.find((t) => t.id === e);
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
- w({
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 = u(async (e, t = !0) => {
212
- it(e);
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 && o(n.error)) {
216
- s(), I("command-execution");
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 && we(r) && r.agentId) {
221
- t ? R({
252
+ if (r && Ce(r) && r.agentId) {
253
+ t ? H({
222
254
  actionId: e,
223
255
  agentId: r.agentId
224
- }) : H("Remote execution still blocked after enabling — check the agent’s Security settings.", "error", r.output || r.errorMessage);
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 && 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);
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 (o(e)) {
230
- s(), I("command-execution");
261
+ if (s(e)) {
262
+ c(), B("command-execution");
231
263
  return;
232
264
  }
233
- H(e instanceof Error ? e.message : "Execution failed", "error");
265
+ U(e instanceof Error ? e.message : "Execution failed", "error");
234
266
  } finally {
235
- it(null);
267
+ at(null);
236
268
  }
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);
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 Ce({
278
+ await Se({
247
279
  id: r,
248
- profile: lt
280
+ profile: ut
249
281
  }, {
250
282
  shell: e,
251
283
  file: t
252
- }), R(null), await X(n, !1);
284
+ }), H(null), await X(n, !1);
253
285
  } catch (e) {
254
- H(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
286
+ U(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
255
287
  } finally {
256
- st(!1);
288
+ ct(!1);
257
289
  }
258
290
  }, [
259
- L,
260
- lt,
291
+ V,
292
+ ut,
261
293
  X,
262
- H
263
- ]), At = u(async (e) => {
264
- let t = W.find((t) => t.id === e);
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
- } }), H("Action duplicated", "success");
301
+ } }), U("Action duplicated", "success");
270
302
  } catch (e) {
271
- H(e instanceof Error ? e.message : "Failed to duplicate action", "error");
303
+ U(e instanceof Error ? e.message : "Failed to duplicate action", "error");
272
304
  }
273
305
  }, [
274
- W,
306
+ G,
275
307
  Y,
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) {
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
- ut({
313
+ mt({
282
314
  vibeId: e.vibeId ?? null,
283
315
  visibility: e.visibility ?? "PRIVATE"
284
316
  });
285
- } else C.type === "create" && B(c);
286
- }, [C.type, Z]), Oe(() => {
287
- let e = _.get("editAction");
317
+ } else E.type === "create" && ft(l);
318
+ }, [E.type, Z]), De(() => {
319
+ let e = y.get("editAction");
288
320
  if (!e) return;
289
- w({
321
+ D({
290
322
  type: "edit",
291
323
  actionId: e
292
324
  });
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) => {
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
- }, []), Pt = u((e) => {
302
- nt((t) => {
333
+ }, []), zt = d((e) => {
334
+ F((t) => {
303
335
  let n = new Set(t);
304
- return W.forEach((t) => {
336
+ return G.forEach((t) => {
305
337
  e ? n.add(t.id) : n.delete(t.id);
306
338
  }), n;
307
339
  });
308
- }, [W]), $ = u(() => {
309
- nt(/* @__PURE__ */ new Set());
310
- }, []), Ft = u(async () => {
340
+ }, [G]), $ = d(() => {
341
+ F(/* @__PURE__ */ new Set());
342
+ }, []), Bt = d(async () => {
311
343
  if (Q.length !== 0) {
312
- P("duplicate");
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
- H(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await U();
350
+ U(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await W();
319
351
  } catch (e) {
320
- H(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
352
+ U(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
321
353
  } finally {
322
- P(null);
354
+ R(null);
323
355
  }
324
356
  }
325
357
  }, [
326
358
  Q,
327
359
  Y,
328
- H,
360
+ U,
329
361
  $,
330
- U
331
- ]), It = u(async () => {
362
+ W
363
+ ]), Vt = d(async () => {
332
364
  if (Q.length !== 0) {
333
- P("delete");
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
- 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();
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
- H(e instanceof Error ? e.message : "Failed to delete actions", "error");
370
+ U(e instanceof Error ? e.message : "Failed to delete actions", "error");
339
371
  } finally {
340
- P(null);
372
+ R(null);
341
373
  }
342
374
  }
343
375
  }, [
344
376
  Q,
345
377
  q,
346
- k,
347
- j,
348
- H,
378
+ M,
379
+ P,
380
+ U,
349
381
  $,
350
- U
351
- ]), Lt = u(async () => {
382
+ W
383
+ ]), Ht = d(async () => {
352
384
  if (Q.length === 0) return;
353
- P("execute");
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 && o(i.error)) {
359
- s(), I("command-execution"), n = !0;
390
+ if (i.error && s(i.error)) {
391
+ c(), B("command-execution"), n = !0;
360
392
  break;
361
393
  }
362
- let ee = i.data?.executeAction;
363
- ee?.status === "SUCCESS" || ee?.status === "COMPLETED" ? e += 1 : t += 1;
394
+ let a = i.data?.executeAction;
395
+ a?.status === "SUCCESS" || a?.status === "COMPLETED" ? e += 1 : t += 1;
364
396
  } catch (e) {
365
- if (o(e)) {
366
- s(), I("command-execution"), n = !0;
397
+ if (s(e)) {
398
+ c(), B("command-execution"), n = !0;
367
399
  break;
368
400
  }
369
401
  t += 1;
370
402
  }
371
- n || H(`Executed ${e} action${e === 1 ? "" : "s"}${t > 0 ? ` • ${t} failed` : ""}`, t > 0 ? "error" : "success"), $(), M(null), k && await U();
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
- H(e instanceof Error ? e.message : "Failed to execute actions", "error");
405
+ U(e instanceof Error ? e.message : "Failed to execute actions", "error");
374
406
  } finally {
375
- P(null);
407
+ R(null);
376
408
  }
377
409
  }, [
378
410
  Q,
379
411
  J,
380
- H,
412
+ U,
381
413
  $,
382
- k,
383
- U
414
+ M,
415
+ W
384
416
  ]);
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, {
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__ */ p(oe, {
392
- title: b("nav.actions", "Actions"),
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__ */ p(ze, {
395
- primary: Je ? {
396
- label: b("actions.createAction", "Create Action"),
397
- onSelect: () => w({ type: "create" }),
398
- icon: /* @__PURE__ */ p(Me, { size: 16 })
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: b("common.refresh", "Refresh"),
402
- onSelect: () => void U(),
403
- icon: /* @__PURE__ */ p(Ne, { size: 16 })
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__ */ 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.")
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__ */ m("div", {
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__ */ p(fe, {
416
- value: E,
417
- onChange: $e,
418
- placeholder: b("actions.searchPlaceholder", "Search actions..."),
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__ */ p(pe, {
453
+ /* @__PURE__ */ h(fe, {
422
454
  label: "Type",
423
- options: He,
424
- value: D,
425
- onChange: et
455
+ options: We,
456
+ value: A,
457
+ onChange: nt
426
458
  }),
427
- /* @__PURE__ */ p(pe, {
459
+ /* @__PURE__ */ h(fe, {
428
460
  label: "Trigger",
429
- options: Ue,
430
- value: O,
431
- onChange: tt
461
+ options: Ge,
462
+ value: j,
463
+ onChange: rt
432
464
  })
433
465
  ]
434
466
  }),
435
- W.length > 0 && /* @__PURE__ */ p("div", {
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__ */ m("div", {
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__ */ m("div", {
472
+ children: [/* @__PURE__ */ g("div", {
441
473
  className: "flex flex-wrap items-center gap-3",
442
- children: [/* @__PURE__ */ m("div", {
474
+ children: [/* @__PURE__ */ g("div", {
443
475
  className: "flex items-center gap-2",
444
- children: [/* @__PURE__ */ p(ve, {
445
- checked: jt,
446
- indeterminate: Mt,
447
- onChange: Pt,
476
+ children: [/* @__PURE__ */ h(_e, {
477
+ checked: It,
478
+ indeterminate: Lt,
479
+ onChange: zt,
448
480
  ariaLabel: "Select all visible actions"
449
- }), /* @__PURE__ */ p("span", {
481
+ }), /* @__PURE__ */ h("span", {
450
482
  className: "text-sm font-medium text-text-primary",
451
483
  children: "Select all visible"
452
484
  })]
453
- }), j.size > 0 && /* @__PURE__ */ p("button", {
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__ */ m("div", {
491
+ }), /* @__PURE__ */ g("div", {
460
492
  className: "flex flex-wrap items-center gap-2",
461
493
  children: [
462
- /* @__PURE__ */ m("span", {
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: [j.size, " selected"]
496
+ children: [P.size, " selected"]
465
497
  }),
466
- Ze && /* @__PURE__ */ p("button", {
498
+ $e && /* @__PURE__ */ h("button", {
467
499
  type: "button",
468
- onClick: () => M("execute"),
469
- disabled: Q.length === 0 || N !== null,
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__ */ m("span", {
503
+ children: /* @__PURE__ */ g("span", {
472
504
  className: "inline-flex items-center gap-2",
473
505
  children: [
474
- /* @__PURE__ */ p(je, { size: 14 }),
506
+ /* @__PURE__ */ h(Ae, { size: 14 }),
475
507
  "Execute Selected",
476
508
  Q.length > 0 ? ` (${Q.length})` : ""
477
509
  ]
478
510
  })
479
511
  }),
480
- Je && /* @__PURE__ */ p("button", {
512
+ w && /* @__PURE__ */ h("button", {
481
513
  type: "button",
482
- onClick: Ft,
483
- disabled: Q.length === 0 || N !== null,
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__ */ m("span", {
517
+ children: /* @__PURE__ */ g("span", {
486
518
  className: "inline-flex items-center gap-2",
487
519
  children: [
488
- /* @__PURE__ */ p(Ae, { size: 14 }),
520
+ /* @__PURE__ */ h(ke, { size: 14 }),
489
521
  "Duplicate Selected",
490
522
  Q.length > 0 ? ` (${Q.length})` : ""
491
523
  ]
492
524
  })
493
525
  }),
494
- Xe && /* @__PURE__ */ p("button", {
526
+ Qe && /* @__PURE__ */ h("button", {
495
527
  type: "button",
496
- onClick: () => M("delete"),
497
- disabled: Q.length === 0 || N !== null,
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__ */ m("span", {
531
+ children: /* @__PURE__ */ g("span", {
500
532
  className: "inline-flex items-center gap-2",
501
533
  children: [
502
- /* @__PURE__ */ p(Pe, { size: 14 }),
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__ */ p(Re, {
544
+ /* @__PURE__ */ h(m, {
513
545
  mode: "wait",
514
- children: W.length === 0 && !pt && /* @__PURE__ */ p(de, {
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__ */ m("div", {
550
+ action: /* @__PURE__ */ g("div", {
519
551
  className: "flex items-center gap-2",
520
- children: [Je && /* @__PURE__ */ p("button", {
552
+ children: [w && /* @__PURE__ */ h("button", {
521
553
  type: "button",
522
- onClick: () => w({ type: "create" }),
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__ */ p(_e, { prompt: "What is an Action in VibeControls and how do I create one?" })]
557
+ }), /* @__PURE__ */ h(ge, { prompt: "What is an Action in VibeControls and how do I create one?" })]
526
558
  })
527
559
  })
528
560
  }),
529
- W.length > 0 && /* @__PURE__ */ p("div", {
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: W.map((e) => /* @__PURE__ */ p("div", {
564
+ children: G.map((e) => /* @__PURE__ */ h("div", {
533
565
  role: "button",
534
566
  tabIndex: 0,
535
- onClick: () => A(e.id),
567
+ onClick: () => N(e.id),
536
568
  onKeyDown: (t) => {
537
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), A(e.id));
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__ */ p(Se, {
572
+ children: /* @__PURE__ */ h(xe, {
541
573
  action: e,
542
- onExecute: Dt,
543
- onEdit: (e) => w({
574
+ onExecute: Mt,
575
+ onEdit: (e) => D({
544
576
  type: "edit",
545
577
  actionId: e
546
578
  }),
547
- onDuplicate: At,
548
- onDelete: (t) => w({
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) => 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
- onToggleSelect: (t) => Nt(e.id, 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__ */ p(Re, { children: k && G && /* @__PURE__ */ m("div", {
596
+ /* @__PURE__ */ h(m, { children: M && K && /* @__PURE__ */ g("div", {
565
597
  className: "space-y-3",
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", {
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__ */ p(Ee, {
574
- executions: gt,
575
- actionName: G.displayName || G.name,
576
- onClose: () => A(null)
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__ */ p(Re, { children: Qe.length > 0 && /* @__PURE__ */ p("div", {
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: Qe.slice(-3).map((e) => /* @__PURE__ */ m("div", {
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(), dt(e.id));
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: () => dt(e.id),
590
- children: [/* @__PURE__ */ p("div", {
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__ */ p("pre", {
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
- C.type === "create" && /* @__PURE__ */ p(Te, {
631
+ E.type === "create" && /* @__PURE__ */ h(we, {
600
632
  title: "Create Action",
601
- agents: K,
602
- onSubmit: wt,
603
- onCancel: () => w({ type: "none" }),
604
- isLoading: yt,
605
- extraSection: /* @__PURE__ */ m("div", {
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__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
639
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
608
640
  className: "text-sm font-medium text-text-secondary mb-2",
609
- children: b("actions.tags", "Tags")
610
- }), /* @__PURE__ */ p(le, {
641
+ children: S("actions.tags", "Tags")
642
+ }), /* @__PURE__ */ h(ce, {
611
643
  entityType: "VIBECONTROLS_ACTION",
612
- onDraftChange: bt
613
- })] }), /* @__PURE__ */ p(he, {
614
- value: z,
615
- onChange: B,
616
- disabled: yt
644
+ onDraftChange: Tt
645
+ })] }), /* @__PURE__ */ h(me, {
646
+ value: dt,
647
+ onChange: ft,
648
+ disabled: wt
617
649
  })]
618
650
  })
619
651
  }),
620
- C.type === "edit" && Z && /* @__PURE__ */ p(Te, {
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: K,
645
- onSubmit: Tt,
646
- onCancel: () => w({ type: "none" }),
647
- isLoading: Ct,
648
- extraSection: /* @__PURE__ */ m("div", {
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__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
682
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
651
683
  className: "text-sm font-medium text-text-secondary mb-2",
652
- children: b("actions.tags", "Tags")
653
- }), /* @__PURE__ */ p(le, {
684
+ children: S("actions.tags", "Tags")
685
+ }), /* @__PURE__ */ h(ce, {
654
686
  entityType: "VIBECONTROLS_ACTION",
655
687
  entityId: Z.id
656
- })] }), /* @__PURE__ */ p(he, {
657
- value: V,
658
- onChange: ut,
659
- disabled: Ct
688
+ })] }), /* @__PURE__ */ h(me, {
689
+ value: pt,
690
+ onChange: mt,
691
+ disabled: Ot
660
692
  })]
661
693
  })
662
694
  }),
663
- C.type === "confirmDelete" && /* @__PURE__ */ p(a, {
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 "${C.name}"? This cannot be undone.`,
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: Et,
670
- onClose: () => w({ type: "none" })
701
+ onConfirm: jt,
702
+ onClose: () => D({ type: "none" })
671
703
  }),
672
- C.type === "confirmExecute" && /* @__PURE__ */ p(a, {
704
+ E.type === "confirmExecute" && /* @__PURE__ */ h(o, {
673
705
  isOpen: !0,
674
- title: `Execute: ${C.name}`,
675
- message: `Are you sure you want to execute "${C.name}"?`,
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: Ot,
679
- onClose: () => w({ type: "none" })
710
+ onConfirm: Nt,
711
+ onClose: () => D({ type: "none" })
680
712
  }),
681
- /* @__PURE__ */ p(a, {
682
- isOpen: at === "delete",
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: It,
688
- onClose: () => M(null),
689
- isLoading: N === "delete"
719
+ onConfirm: Vt,
720
+ onClose: () => I(null),
721
+ isLoading: L === "delete"
690
722
  }),
691
- /* @__PURE__ */ p(a, {
692
- isOpen: at === "execute",
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: Lt,
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
- s(), I(null), g("/billing/plans");
737
+ c(), B(null), v("/billing/plans");
706
738
  },
707
- title: F ? ie(F).title : void 0,
708
- message: F ? ie(F).message : ""
739
+ title: z ? re(z).title : void 0,
740
+ message: z ? re(z).message : ""
709
741
  }),
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
- onConfirm: kt
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 { g as ActionsPage };
753
+ export { v as ActionsPage };