@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/components/actions/ActionCard.js +77 -66
  2. package/dist/components/actions/ActionCard.js.map +1 -1
  3. package/dist/components/ai/AIContextsTab.js +186 -173
  4. package/dist/components/ai/AIContextsTab.js.map +1 -1
  5. package/dist/components/ai/AITemplatesTab.js +135 -125
  6. package/dist/components/ai/AITemplatesTab.js.map +1 -1
  7. package/dist/components/ai/InstructionFilesManager.js +151 -137
  8. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  9. package/dist/components/notes/NotesTabPanel.js +8 -8
  10. package/dist/components/sharing/EntityShareButton.js +58 -0
  11. package/dist/components/sharing/EntityShareButton.js.map +1 -0
  12. package/dist/components/sharing/entityShareOps.js +277 -0
  13. package/dist/components/sharing/entityShareOps.js.map +1 -0
  14. package/dist/components/sharing/index.js +3 -0
  15. package/dist/components/sharing/shareRegistry.js +25 -0
  16. package/dist/components/sharing/shareRegistry.js.map +1 -1
  17. package/dist/components/sharing/useEntityShareController.js +88 -0
  18. package/dist/components/sharing/useEntityShareController.js.map +1 -0
  19. package/dist/constants/permissions.js +5 -0
  20. package/dist/constants/permissions.js.map +1 -1
  21. package/dist/pages/ActionsPage.js +162 -162
  22. package/dist/pages/ActionsPage.js.map +1 -1
  23. package/dist/pages/VibeDeckPage.js +1 -1
  24. package/dist/pages/VibeDetailsPage.js +484 -484
  25. package/dist/pages/VibeDetailsPage.js.map +1 -1
  26. package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
  27. package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
  28. package/package.json +1 -1
@@ -6,9 +6,11 @@ import { EmptyState as i } from "../shared/EmptyState.js";
6
6
  import { Card as a } from "../shared/Card.js";
7
7
  import { SelectionCheckbox as o } from "../shared/SelectionCheckbox.js";
8
8
  import "../shared/index.js";
9
- import { createTemplate as ee, deleteTemplate as te, fetchTemplates as ne, renderTemplate as re, updateTemplate as ie } from "../../services/aiApi.js";
10
- import { useCallback as ae, useEffect as oe, useMemo as s, useState as c } from "react";
11
- import { Code as se, Eye as ce, Pencil as le, Plus as l, Search as u, Trash2 as d, X as f } from "lucide-react";
9
+ import { EntityShareButton as ee } from "../sharing/EntityShareButton.js";
10
+ import "../sharing/index.js";
11
+ import { createTemplate as te, deleteTemplate as ne, fetchTemplates as re, renderTemplate as ie, updateTemplate as ae } from "../../services/aiApi.js";
12
+ import { useCallback as oe, useEffect as s, useMemo as se, useState as c } from "react";
13
+ import { Code as ce, Eye as le, Pencil as ue, Plus as l, Search as u, Trash2 as d, X as f } from "lucide-react";
12
14
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
13
15
  //#region src/components/ai/AITemplatesTab.tsx
14
16
  var h = {
@@ -19,115 +21,115 @@ var h = {
19
21
  tags: []
20
22
  };
21
23
  function g({ agentId: g }) {
22
- let _ = e(), [v, ue] = c([]), [de, y] = c(!0), [b, x] = c(null), [S, C] = c(""), [fe, w] = c(!1), [T, E] = c(null), [D, O] = c(h), [k, A] = c("form"), [j, M] = c("{}"), [N, P] = c(!1), [F, I] = c([]), [L, R] = c(!1), [z, B] = c(/* @__PURE__ */ new Set()), [V, H] = c(null), [U, W] = c({}), [G, K] = c(null), [q, J] = c(!1), Y = ae(async () => {
24
+ let _ = e(), [v, de] = c([]), [fe, y] = c(!0), [b, x] = c(null), [S, pe] = c(""), [me, C] = c(!1), [w, T] = c(null), [E, D] = c(h), [O, k] = c("form"), [A, j] = c("{}"), [M, N] = c(!1), [P, F] = c([]), [I, L] = c(!1), [R, z] = c(/* @__PURE__ */ new Set()), [B, V] = c(null), [H, U] = c({}), [W, G] = c(null), [K, q] = c(!1), J = oe(async () => {
23
25
  y(!0), x(null);
24
26
  try {
25
- ue(await ne(g));
27
+ de(await re(g));
26
28
  } catch (e) {
27
29
  x(e instanceof Error ? e.message : "Failed to load templates");
28
30
  } finally {
29
31
  y(!1);
30
32
  }
31
33
  }, [g]);
32
- oe(() => {
33
- Y();
34
- }, [Y]);
35
- let X = v.filter((e) => {
34
+ s(() => {
35
+ J();
36
+ }, [J]);
37
+ let Y = v.filter((e) => {
36
38
  if (!S) return !0;
37
39
  let t = S.toLowerCase();
38
40
  return e.name.toLowerCase().includes(t) || e.description?.toLowerCase().includes(t) || e.tags?.some((e) => e.toLowerCase().includes(t));
39
- }), Z = s(() => v.filter((e) => z.has(e.id)), [v, z]), Q = X.length > 0 && X.every((e) => z.has(e.id)), pe = X.some((e) => z.has(e.id)) && !Q, $ = () => {
40
- E(null), O(h), M("{}"), w(!0);
41
- }, me = (e) => {
42
- E(e.id), O({
41
+ }), X = se(() => v.filter((e) => R.has(e.id)), [v, R]), Z = Y.length > 0 && Y.every((e) => R.has(e.id)), he = Y.some((e) => R.has(e.id)) && !Z, Q = () => {
42
+ T(null), D(h), j("{}"), C(!0);
43
+ }, ge = (e) => {
44
+ T(e.id), D({
43
45
  name: e.name,
44
46
  content: e.content,
45
47
  description: e.description ?? "",
46
48
  variables: e.variables ?? {},
47
49
  tags: e.tags ?? []
48
- }), M(JSON.stringify(e.variables ?? {}, null, 2)), w(!0);
49
- }, he = async () => {
50
- P(!0);
50
+ }), j(JSON.stringify(e.variables ?? {}, null, 2)), C(!0);
51
+ }, _e = async () => {
52
+ N(!0);
51
53
  try {
52
- let e = k === "json" ? JSON.parse(j) : D.variables, t = {
53
- ...D,
54
+ let e = O === "json" ? JSON.parse(A) : E.variables, t = {
55
+ ...E,
54
56
  variables: e
55
57
  };
56
- T ? await ie(g, T, t) : await ee(g, t), w(!1), await Y();
58
+ w ? await ae(g, w, t) : await te(g, t), C(!1), await J();
57
59
  } catch (e) {
58
60
  console.error("Failed to save template:", e);
59
61
  } finally {
60
- P(!1);
62
+ N(!1);
61
63
  }
62
- }, ge = async () => {
63
- if (F.length !== 0) {
64
- R(!0);
64
+ }, ve = async () => {
65
+ if (P.length !== 0) {
66
+ L(!0);
65
67
  try {
66
- await Promise.allSettled(F.map((e) => te(g, e))), B((e) => {
68
+ await Promise.allSettled(P.map((e) => ne(g, e))), z((e) => {
67
69
  let t = new Set(e);
68
- return F.forEach((e) => t.delete(e)), t;
69
- }), I([]), await Y();
70
+ return P.forEach((e) => t.delete(e)), t;
71
+ }), F([]), await J();
70
72
  } catch (e) {
71
73
  console.error("Failed to delete template:", e);
72
74
  } finally {
73
- R(!1);
75
+ L(!1);
74
76
  }
75
77
  }
76
- }, _e = async () => {
77
- if (V) {
78
- J(!0);
78
+ }, ye = async () => {
79
+ if (B) {
80
+ q(!0);
79
81
  try {
80
- K((await re(g, V, U)).rendered);
82
+ G((await ie(g, B, H)).rendered);
81
83
  } catch (e) {
82
- K(`Error: ${e instanceof Error ? e.message : "Failed to render template"}`);
84
+ G(`Error: ${e instanceof Error ? e.message : "Failed to render template"}`);
83
85
  } finally {
84
- J(!1);
86
+ q(!1);
85
87
  }
86
88
  }
87
- }, ve = (e) => {
88
- H(e.id);
89
+ }, $ = (e) => {
90
+ V(e.id);
89
91
  let t = {};
90
92
  if (e.variables) for (let n of Object.keys(e.variables)) t[n] = "";
91
- W(t), K(null);
92
- }, ye = () => {
93
- O((e) => ({
93
+ U(t), G(null);
94
+ }, be = () => {
95
+ D((e) => ({
94
96
  ...e,
95
97
  variables: {
96
98
  ...e.variables,
97
99
  "": ""
98
100
  }
99
101
  }));
100
- }, be = (e, t) => {
101
- let n = Object.entries(D.variables), r = {};
102
+ }, xe = (e, t) => {
103
+ let n = Object.entries(E.variables), r = {};
102
104
  for (let [i, a] of n) r[i === e ? t : i] = a;
103
- O((e) => ({
105
+ D((e) => ({
104
106
  ...e,
105
107
  variables: r
106
108
  }));
107
- }, xe = (e, t) => {
108
- O((n) => ({
109
+ }, Se = (e, t) => {
110
+ D((n) => ({
109
111
  ...n,
110
112
  variables: {
111
113
  ...n.variables,
112
114
  [e]: t
113
115
  }
114
116
  }));
115
- }, Se = (e) => {
116
- let t = { ...D.variables };
117
- delete t[e], O((e) => ({
117
+ }, Ce = (e) => {
118
+ let t = { ...E.variables };
119
+ delete t[e], D((e) => ({
118
120
  ...e,
119
121
  variables: t
120
122
  }));
121
- }, Ce = (e, t) => {
122
- B((n) => {
123
+ }, we = (e, t) => {
124
+ z((n) => {
123
125
  let r = new Set(n);
124
126
  return t ? r.add(e) : r.delete(e), r;
125
127
  });
126
128
  };
127
- return de ? /* @__PURE__ */ p(n, { message: _("vibecontrols.ai.templates.loading", "Loading templates...") }) : b ? /* @__PURE__ */ p(r, {
129
+ return fe ? /* @__PURE__ */ p(n, { message: _("vibecontrols.ai.templates.loading", "Loading templates...") }) : b ? /* @__PURE__ */ p(r, {
128
130
  title: _("vibecontrols.ai.templates.loadFailed", "Failed to load templates"),
129
131
  message: b,
130
- onRetry: Y
132
+ onRetry: J
131
133
  }) : /* @__PURE__ */ m("div", {
132
134
  className: "space-y-4",
133
135
  children: [
@@ -139,18 +141,18 @@ function g({ agentId: g }) {
139
141
  "aria-label": "control",
140
142
  type: "text",
141
143
  value: S,
142
- onChange: (e) => C(e.target.value),
144
+ onChange: (e) => pe(e.target.value),
143
145
  placeholder: _("vibecontrols.ai.templates.searchPlaceholder", "Search templates..."),
144
146
  className: "w-full pl-9 pr-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm placeholder:text-text-placeholder focus:outline-none focus:border-border-strong"
145
147
  })]
146
148
  }), /* @__PURE__ */ m("button", {
147
149
  type: "button",
148
- onClick: $,
150
+ onClick: Q,
149
151
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors text-sm",
150
152
  children: [/* @__PURE__ */ p(l, { className: "size-4" }), _("vibecontrols.ai.templates.newTemplate", "New Template")]
151
153
  })]
152
154
  }),
153
- X.length > 0 && /* @__PURE__ */ p("div", {
155
+ Y.length > 0 && /* @__PURE__ */ p("div", {
154
156
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
155
157
  children: /* @__PURE__ */ m("div", {
156
158
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
@@ -159,12 +161,12 @@ function g({ agentId: g }) {
159
161
  children: [/* @__PURE__ */ m("div", {
160
162
  className: "flex items-center gap-2",
161
163
  children: [/* @__PURE__ */ p(o, {
162
- checked: Q,
163
- indeterminate: pe,
164
+ checked: Z,
165
+ indeterminate: he,
164
166
  onChange: (e) => {
165
- B((t) => {
167
+ z((t) => {
166
168
  let n = new Set(t);
167
- return X.forEach((t) => {
169
+ return Y.forEach((t) => {
168
170
  e ? n.add(t.id) : n.delete(t.id);
169
171
  }), n;
170
172
  });
@@ -174,9 +176,9 @@ function g({ agentId: g }) {
174
176
  className: "text-sm font-medium text-text-primary",
175
177
  children: "Select all visible"
176
178
  })]
177
- }), z.size > 0 && /* @__PURE__ */ p("button", {
179
+ }), R.size > 0 && /* @__PURE__ */ p("button", {
178
180
  type: "button",
179
- onClick: () => B(/* @__PURE__ */ new Set()),
181
+ onClick: () => z(/* @__PURE__ */ new Set()),
180
182
  className: "text-sm text-text-secondary hover:text-text-primary",
181
183
  children: "Clear selection"
182
184
  })]
@@ -184,31 +186,31 @@ function g({ agentId: g }) {
184
186
  className: "flex flex-wrap items-center gap-2",
185
187
  children: [/* @__PURE__ */ m("span", {
186
188
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
187
- children: [z.size, " selected"]
189
+ children: [R.size, " selected"]
188
190
  }), /* @__PURE__ */ m("button", {
189
191
  type: "button",
190
- onClick: () => I(Z.map((e) => e.id)),
191
- disabled: Z.length === 0,
192
+ onClick: () => F(X.map((e) => e.id)),
193
+ disabled: X.length === 0,
192
194
  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",
193
- children: ["Delete Selected", Z.length > 0 ? ` (${Z.length})` : ""]
195
+ children: ["Delete Selected", X.length > 0 ? ` (${X.length})` : ""]
194
196
  })]
195
197
  })]
196
198
  })
197
199
  }),
198
- X.length === 0 ? /* @__PURE__ */ p(i, {
199
- icon: /* @__PURE__ */ p(se, { className: "size-8 text-text-secondary" }),
200
+ Y.length === 0 ? /* @__PURE__ */ p(i, {
201
+ icon: /* @__PURE__ */ p(ce, { className: "size-8 text-text-secondary" }),
200
202
  title: S ? _("vibecontrols.ai.templates.noMatch", "No templates match your search") : _("vibecontrols.ai.templates.emptyTitle", "No templates yet"),
201
203
  description: S ? _("vibecontrols.ai.templates.adjustSearch", "Try adjusting your search query") : _("vibecontrols.ai.templates.emptyDescription", "Create your first prompt template to get started"),
202
204
  action: S ? void 0 : /* @__PURE__ */ m("button", {
203
205
  type: "button",
204
- onClick: $,
206
+ onClick: Q,
205
207
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
206
208
  children: [/* @__PURE__ */ p(l, { className: "size-4" }), "New Template"]
207
209
  })
208
210
  }) : /* @__PURE__ */ p("div", {
209
211
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
210
- children: X.map((e) => /* @__PURE__ */ m(a, {
211
- className: `p-4 ${z.has(e.id) ? "border-action-primary-bg ring-1 ring-action-primary-bg/25" : ""}`,
212
+ children: Y.map((e) => /* @__PURE__ */ m(a, {
213
+ className: `p-4 ${R.has(e.id) ? "border-action-primary-bg ring-1 ring-action-primary-bg/25" : ""}`,
212
214
  children: [
213
215
  /* @__PURE__ */ m("div", {
214
216
  className: "flex items-start justify-between gap-2",
@@ -217,8 +219,8 @@ function g({ agentId: g }) {
217
219
  children: [/* @__PURE__ */ p("div", {
218
220
  onClick: (e) => e.stopPropagation(),
219
221
  children: /* @__PURE__ */ p(o, {
220
- checked: z.has(e.id),
221
- onChange: (t) => Ce(e.id, t),
222
+ checked: R.has(e.id),
223
+ onChange: (t) => we(e.id, t),
222
224
  ariaLabel: `Select template ${e.name}`
223
225
  })
224
226
  }), /* @__PURE__ */ m("div", {
@@ -236,21 +238,29 @@ function g({ agentId: g }) {
236
238
  children: [
237
239
  /* @__PURE__ */ p("button", {
238
240
  type: "button",
239
- onClick: () => ve(e),
241
+ onClick: () => $(e),
240
242
  className: "p-1.5 hover:bg-bg-sunken rounded-md transition-colors",
241
243
  title: "Preview",
242
- children: /* @__PURE__ */ p(ce, { className: "size-3.5 text-text-secondary" })
244
+ children: /* @__PURE__ */ p(le, { className: "size-3.5 text-text-secondary" })
243
245
  }),
244
246
  /* @__PURE__ */ p("button", {
245
247
  type: "button",
246
- onClick: () => me(e),
248
+ onClick: () => ge(e),
247
249
  className: "p-1.5 hover:bg-bg-sunken rounded-md transition-colors",
248
250
  title: "Edit",
249
- children: /* @__PURE__ */ p(le, { className: "size-3.5 text-text-secondary" })
251
+ children: /* @__PURE__ */ p(ue, { className: "size-3.5 text-text-secondary" })
252
+ }),
253
+ /* @__PURE__ */ p(ee, {
254
+ entity: "aiprompt",
255
+ resource: {
256
+ id: e.id,
257
+ name: e.name
258
+ },
259
+ label: _("vibecontrols.ai.templates.share", "Share")
250
260
  }),
251
261
  /* @__PURE__ */ p("button", {
252
262
  type: "button",
253
- onClick: () => I([e.id]),
263
+ onClick: () => F([e.id]),
254
264
  className: "p-1.5 hover:bg-status-error-bg rounded-md transition-colors",
255
265
  title: "Delete",
256
266
  children: /* @__PURE__ */ p(d, { className: "size-3.5 text-status-error-text" })
@@ -272,14 +282,14 @@ function g({ agentId: g }) {
272
282
  ]
273
283
  }, e.id))
274
284
  }),
275
- fe && /* @__PURE__ */ p("div", {
285
+ me && /* @__PURE__ */ p("div", {
276
286
  role: "button",
277
287
  tabIndex: 0,
278
288
  onKeyDown: (e) => {
279
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w(!1));
289
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C(!1));
280
290
  },
281
291
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
282
- onClick: () => w(!1),
292
+ onClick: () => C(!1),
283
293
  children: /* @__PURE__ */ m("div", {
284
294
  className: "bg-bg-surface border border-border-default rounded-lg shadow-xl w-full max-w-lg max-h-[90vh] overflow-y-auto p-6",
285
295
  onClick: (e) => e.stopPropagation(),
@@ -288,10 +298,10 @@ function g({ agentId: g }) {
288
298
  className: "flex items-center justify-between mb-4",
289
299
  children: [/* @__PURE__ */ p("h3", {
290
300
  className: "text-lg font-semibold text-text-primary",
291
- children: T ? _("vibecontrols.ai.templates.editTemplate", "Edit Template") : _("vibecontrols.ai.templates.newTemplate", "New Template")
301
+ children: w ? _("vibecontrols.ai.templates.editTemplate", "Edit Template") : _("vibecontrols.ai.templates.newTemplate", "New Template")
292
302
  }), /* @__PURE__ */ p("button", {
293
303
  type: "button",
294
- onClick: () => w(!1),
304
+ onClick: () => C(!1),
295
305
  className: "p-1 hover:bg-bg-sunken rounded-md",
296
306
  children: /* @__PURE__ */ p(f, { className: "size-4 text-text-secondary" })
297
307
  })]
@@ -307,9 +317,9 @@ function g({ agentId: g }) {
307
317
  id: "aitemplatestab-11",
308
318
  "aria-label": "Template name",
309
319
  type: "text",
310
- value: D.name,
311
- onChange: (e) => O({
312
- ...D,
320
+ value: E.name,
321
+ onChange: (e) => D({
322
+ ...E,
313
323
  name: e.target.value
314
324
  }),
315
325
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm focus:outline-none focus:border-border-strong",
@@ -323,9 +333,9 @@ function g({ agentId: g }) {
323
333
  id: "aitemplatestab-10",
324
334
  "aria-label": "Brief description",
325
335
  type: "text",
326
- value: D.description,
327
- onChange: (e) => O({
328
- ...D,
336
+ value: E.description,
337
+ onChange: (e) => D({
338
+ ...E,
329
339
  description: e.target.value
330
340
  }),
331
341
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm focus:outline-none focus:border-border-strong",
@@ -338,9 +348,9 @@ function g({ agentId: g }) {
338
348
  }), /* @__PURE__ */ p("textarea", {
339
349
  id: "aitemplatestab-9",
340
350
  "aria-label": "Use {{variable}} for template variables",
341
- value: D.content,
342
- onChange: (e) => O({
343
- ...D,
351
+ value: E.content,
352
+ onChange: (e) => D({
353
+ ...E,
344
354
  content: e.target.value
345
355
  }),
346
356
  rows: 6,
@@ -358,28 +368,28 @@ function g({ agentId: g }) {
358
368
  children: [/* @__PURE__ */ p("button", {
359
369
  type: "button",
360
370
  onClick: () => {
361
- A("form");
371
+ k("form");
362
372
  try {
363
- O((e) => ({
373
+ D((e) => ({
364
374
  ...e,
365
- variables: JSON.parse(j)
375
+ variables: JSON.parse(A)
366
376
  }));
367
377
  } catch {}
368
378
  },
369
- className: `px-2 py-1 text-xs rounded ${k === "form" ? "bg-bg-surface shadow-sm" : ""}`,
379
+ className: `px-2 py-1 text-xs rounded ${O === "form" ? "bg-bg-surface shadow-sm" : ""}`,
370
380
  children: "Form"
371
381
  }), /* @__PURE__ */ p("button", {
372
382
  type: "button",
373
383
  onClick: () => {
374
- A("json"), M(JSON.stringify(D.variables, null, 2));
384
+ k("json"), j(JSON.stringify(E.variables, null, 2));
375
385
  },
376
- className: `px-2 py-1 text-xs rounded ${k === "json" ? "bg-bg-surface shadow-sm" : ""}`,
386
+ className: `px-2 py-1 text-xs rounded ${O === "json" ? "bg-bg-surface shadow-sm" : ""}`,
377
387
  children: "JSON"
378
388
  })]
379
389
  })]
380
- }), k === "form" ? /* @__PURE__ */ m("div", {
390
+ }), O === "form" ? /* @__PURE__ */ m("div", {
381
391
  className: "space-y-2",
382
- children: [Object.entries(D.variables).map(([e, t], n) => /* @__PURE__ */ m("div", {
392
+ children: [Object.entries(E.variables).map(([e, t], n) => /* @__PURE__ */ m("div", {
383
393
  className: "flex items-center gap-2",
384
394
  children: [
385
395
  /* @__PURE__ */ p("input", {
@@ -387,7 +397,7 @@ function g({ agentId: g }) {
387
397
  "aria-label": "Key",
388
398
  type: "text",
389
399
  value: e,
390
- onChange: (t) => be(e, t.target.value),
400
+ onChange: (t) => xe(e, t.target.value),
391
401
  className: "flex-1 px-2 py-1.5 bg-bg-sunken border border-border-default rounded text-sm text-text-primary focus:outline-none focus:border-border-strong",
392
402
  placeholder: "Key"
393
403
  }),
@@ -395,27 +405,27 @@ function g({ agentId: g }) {
395
405
  "aria-label": "Default value",
396
406
  type: "text",
397
407
  value: String(t ?? ""),
398
- onChange: (t) => xe(e, t.target.value),
408
+ onChange: (t) => Se(e, t.target.value),
399
409
  className: "flex-1 px-2 py-1.5 bg-bg-sunken border border-border-default rounded text-sm text-text-primary focus:outline-none focus:border-border-strong",
400
410
  placeholder: "Default value"
401
411
  }),
402
412
  /* @__PURE__ */ p("button", {
403
413
  type: "button",
404
- onClick: () => Se(e),
414
+ onClick: () => Ce(e),
405
415
  className: "p-1 hover:bg-status-error-bg rounded",
406
416
  children: /* @__PURE__ */ p(f, { className: "size-3.5 text-status-error-text" })
407
417
  })
408
418
  ]
409
419
  }, n)), /* @__PURE__ */ p("button", {
410
420
  type: "button",
411
- onClick: ye,
421
+ onClick: be,
412
422
  className: "text-xs text-action-primary-bg hover:underline",
413
423
  children: "+ Add variable"
414
424
  })]
415
425
  }) : /* @__PURE__ */ p("textarea", {
416
426
  "aria-label": "control",
417
- value: j,
418
- onChange: (e) => M(e.target.value),
427
+ value: A,
428
+ onChange: (e) => j(e.target.value),
419
429
  rows: 4,
420
430
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm font-mono focus:outline-none focus:border-border-strong"
421
431
  })] })
@@ -425,28 +435,28 @@ function g({ agentId: g }) {
425
435
  className: "flex justify-end gap-2 mt-6",
426
436
  children: [/* @__PURE__ */ p("button", {
427
437
  type: "button",
428
- onClick: () => w(!1),
438
+ onClick: () => C(!1),
429
439
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
430
440
  children: "Cancel"
431
441
  }), /* @__PURE__ */ p("button", {
432
442
  type: "button",
433
- onClick: he,
434
- disabled: N || !D.name || !D.content,
443
+ onClick: _e,
444
+ disabled: M || !E.name || !E.content,
435
445
  className: "px-4 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
436
- children: N ? "Saving..." : T ? "Update" : "Create"
446
+ children: M ? "Saving..." : w ? "Update" : "Create"
437
447
  })]
438
448
  })
439
449
  ]
440
450
  })
441
451
  }),
442
- V && /* @__PURE__ */ p("div", {
452
+ B && /* @__PURE__ */ p("div", {
443
453
  role: "button",
444
454
  tabIndex: 0,
445
455
  onKeyDown: (e) => {
446
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), H(null));
456
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), V(null));
447
457
  },
448
458
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
449
- onClick: () => H(null),
459
+ onClick: () => V(null),
450
460
  children: /* @__PURE__ */ m("div", {
451
461
  className: "bg-bg-surface border border-border-default rounded-lg shadow-xl w-full max-w-md max-h-[80vh] overflow-y-auto p-6",
452
462
  onClick: (e) => e.stopPropagation(),
@@ -458,14 +468,14 @@ function g({ agentId: g }) {
458
468
  /* @__PURE__ */ m("div", {
459
469
  className: "space-y-3",
460
470
  children: [
461
- Object.keys(U).map((e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
471
+ Object.keys(H).map((e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
462
472
  className: "block text-xs font-medium text-text-secondary mb-1",
463
473
  children: e
464
474
  }), /* @__PURE__ */ p("input", {
465
475
  "aria-label": "control",
466
476
  type: "text",
467
- value: U[e],
468
- onChange: (t) => W((n) => ({
477
+ value: H[e],
478
+ onChange: (t) => U((n) => ({
469
479
  ...n,
470
480
  [e]: t.target.value
471
481
  })),
@@ -473,14 +483,14 @@ function g({ agentId: g }) {
473
483
  })] }, e)),
474
484
  /* @__PURE__ */ p("button", {
475
485
  type: "button",
476
- onClick: _e,
477
- disabled: q,
486
+ onClick: ye,
487
+ disabled: K,
478
488
  className: "w-full px-4 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
479
- children: q ? _("vibecontrols.ai.templates.rendering", "Rendering...") : _("vibecontrols.ai.templates.render", "Render")
489
+ children: K ? _("vibecontrols.ai.templates.rendering", "Rendering...") : _("vibecontrols.ai.templates.render", "Render")
480
490
  }),
481
- G !== null && /* @__PURE__ */ p("pre", {
491
+ W !== null && /* @__PURE__ */ p("pre", {
482
492
  className: "mt-2 text-sm text-text-primary bg-bg-sunken rounded p-3 whitespace-pre-wrap max-h-48 overflow-auto",
483
- children: G
493
+ children: W
484
494
  })
485
495
  ]
486
496
  }),
@@ -488,7 +498,7 @@ function g({ agentId: g }) {
488
498
  className: "flex justify-end mt-4",
489
499
  children: /* @__PURE__ */ p("button", {
490
500
  type: "button",
491
- onClick: () => H(null),
501
+ onClick: () => V(null),
492
502
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
493
503
  children: "Close"
494
504
  })
@@ -497,13 +507,13 @@ function g({ agentId: g }) {
497
507
  })
498
508
  }),
499
509
  /* @__PURE__ */ p(t, {
500
- isOpen: F.length > 0,
501
- title: F.length > 1 ? "Delete Templates" : "Delete Template",
502
- message: F.length > 1 ? `Are you sure you want to delete ${F.length} selected templates? This action cannot be undone.` : "Are you sure you want to delete this template? This action cannot be undone.",
503
- confirmLabel: L ? "Deleting..." : "Delete",
510
+ isOpen: P.length > 0,
511
+ title: P.length > 1 ? "Delete Templates" : "Delete Template",
512
+ message: P.length > 1 ? `Are you sure you want to delete ${P.length} selected templates? This action cannot be undone.` : "Are you sure you want to delete this template? This action cannot be undone.",
513
+ confirmLabel: I ? "Deleting..." : "Delete",
504
514
  variant: "danger",
505
- onConfirm: ge,
506
- onClose: () => I([])
515
+ onConfirm: ve,
516
+ onClose: () => F([])
507
517
  })
508
518
  ]
509
519
  });