@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.23

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 (44) 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/docs/DocsEditPanel.js +17 -16
  10. package/dist/components/docs/DocsEditPanel.js.map +1 -1
  11. package/dist/components/docs/DocsPreviewPanel.js +25 -24
  12. package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
  13. package/dist/components/docs/DocsTabPanel.js +110 -94
  14. package/dist/components/docs/DocsTabPanel.js.map +1 -1
  15. package/dist/components/notes/NotesTabPanel.js +8 -8
  16. package/dist/components/scorecard/ScorecardPanel.js +271 -257
  17. package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
  18. package/dist/components/sharing/EntityShareButton.js +58 -0
  19. package/dist/components/sharing/EntityShareButton.js.map +1 -0
  20. package/dist/components/sharing/entityShareOps.js +603 -0
  21. package/dist/components/sharing/entityShareOps.js.map +1 -0
  22. package/dist/components/sharing/index.js +3 -0
  23. package/dist/components/sharing/shareRegistry.js +37 -12
  24. package/dist/components/sharing/shareRegistry.js.map +1 -1
  25. package/dist/components/sharing/useEntityShareController.js +88 -0
  26. package/dist/components/sharing/useEntityShareController.js.map +1 -0
  27. package/dist/constants/permissions.js +11 -0
  28. package/dist/constants/permissions.js.map +1 -1
  29. package/dist/pages/ActionsPage.js +162 -162
  30. package/dist/pages/ActionsPage.js.map +1 -1
  31. package/dist/pages/CatalogDetailPage.js +264 -250
  32. package/dist/pages/CatalogDetailPage.js.map +1 -1
  33. package/dist/pages/ComponentDetailPage.js +124 -113
  34. package/dist/pages/ComponentDetailPage.js.map +1 -1
  35. package/dist/pages/TargetDetailsPage.js +139 -126
  36. package/dist/pages/TargetDetailsPage.js.map +1 -1
  37. package/dist/pages/TemplateDetailPage.js +78 -67
  38. package/dist/pages/TemplateDetailPage.js.map +1 -1
  39. package/dist/pages/VibeDeckPage.js +1 -1
  40. package/dist/pages/VibeDetailsPage.js +484 -484
  41. package/dist/pages/VibeDetailsPage.js.map +1 -1
  42. package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
  43. package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
  44. package/package.json +1 -1
@@ -6,12 +6,14 @@ 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 { createContext as s, deleteContext as c, fetchContexts as l, updateContext as ee } from "../../services/aiApi.js";
10
- import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
11
- import { FileText as m, Pencil as h, Plus as g, Trash2 as _, X as v } from "lucide-react";
12
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { EntityShareButton as ee } from "../sharing/EntityShareButton.js";
10
+ import "../sharing/index.js";
11
+ import { createContext as s, deleteContext as c, fetchContexts as l, updateContext as u } from "../../services/aiApi.js";
12
+ import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
13
+ import { FileText as h, Pencil as g, Plus as _, Trash2 as v, X as y } from "lucide-react";
14
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
13
15
  //#region src/components/ai/AIContextsTab.tsx
14
- var x = [
16
+ var S = [
15
17
  {
16
18
  value: "all",
17
19
  label: "All Types"
@@ -36,216 +38,227 @@ var x = [
36
38
  value: "custom",
37
39
  label: "Custom"
38
40
  }
39
- ], S = {
41
+ ], C = {
40
42
  name: "",
41
43
  type: "custom",
42
44
  content: "",
43
45
  tags: []
44
46
  };
45
- function C({ agent: C }) {
46
- let w = e(), [T, E] = p([]), [te, D] = p(!0), [O, k] = p(null), [A, j] = p("all"), [M, N] = p(!1), [P, F] = p(null), [I, L] = p(S), [R, z] = p(""), [B, V] = p(!1), [H, U] = p([]), [W, G] = p(!1), [K, q] = p(/* @__PURE__ */ new Set()), J = u(async () => {
47
- D(!0), k(null);
47
+ function w({ agent: w }) {
48
+ let T = e(), [E, te] = m([]), [D, O] = m(!0), [k, A] = m(null), [j, M] = m("all"), [N, P] = m(!1), [F, I] = m(null), [L, R] = m(C), [z, B] = m(""), [V, H] = m(!1), [U, W] = m([]), [G, K] = m(!1), [q, J] = m(/* @__PURE__ */ new Set()), Y = d(async () => {
49
+ O(!0), A(null);
48
50
  try {
49
51
  let e = {};
50
- A !== "all" && (e.type = A), E(await l(C, e));
52
+ j !== "all" && (e.type = j), te(await l(w, e));
51
53
  } catch (e) {
52
- k(e instanceof Error ? e.message : "Failed to load contexts");
54
+ A(e instanceof Error ? e.message : "Failed to load contexts");
53
55
  } finally {
54
- D(!1);
56
+ O(!1);
55
57
  }
56
- }, [C, A]);
57
- d(() => {
58
- J();
59
- }, [J]);
60
- let Y = f(() => T.filter((e) => K.has(e.id)), [T, K]), X = T.length > 0 && T.every((e) => K.has(e.id)), Z = T.some((e) => K.has(e.id)) && !X, Q = () => {
61
- F(null), L(S), z(""), N(!0);
62
- }, ne = (e) => {
63
- F(e.id), L({
58
+ }, [w, j]);
59
+ f(() => {
60
+ Y();
61
+ }, [Y]);
62
+ let X = p(() => E.filter((e) => q.has(e.id)), [E, q]), Z = E.length > 0 && E.every((e) => q.has(e.id)), ne = E.some((e) => q.has(e.id)) && !Z, Q = () => {
63
+ I(null), R(C), B(""), P(!0);
64
+ }, re = (e) => {
65
+ I(e.id), R({
64
66
  name: e.name,
65
67
  type: e.type,
66
68
  content: e.content,
67
69
  tags: e.tags ?? []
68
- }), z(""), N(!0);
69
- }, re = async () => {
70
- V(!0);
70
+ }), B(""), P(!0);
71
+ }, ie = async () => {
72
+ H(!0);
71
73
  try {
72
- P ? await ee(C, P, I) : await s(C, I), N(!1), await J();
74
+ F ? await u(w, F, L) : await s(w, L), P(!1), await Y();
73
75
  } catch (e) {
74
76
  console.error("Failed to save context:", e);
75
77
  } finally {
76
- V(!1);
78
+ H(!1);
77
79
  }
78
- }, ie = async () => {
79
- if (H.length !== 0) {
80
- G(!0);
80
+ }, ae = async () => {
81
+ if (U.length !== 0) {
82
+ K(!0);
81
83
  try {
82
- await Promise.allSettled(H.map((e) => c(C, e))), q((e) => {
84
+ await Promise.allSettled(U.map((e) => c(w, e))), J((e) => {
83
85
  let t = new Set(e);
84
- return H.forEach((e) => t.delete(e)), t;
85
- }), U([]), await J();
86
+ return U.forEach((e) => t.delete(e)), t;
87
+ }), W([]), await Y();
86
88
  } catch (e) {
87
89
  console.error("Failed to delete context:", e);
88
90
  } finally {
89
- G(!1);
91
+ K(!1);
90
92
  }
91
93
  }
92
94
  }, $ = () => {
93
- let e = R.trim();
94
- e && !I.tags.includes(e) && L((t) => ({
95
+ let e = z.trim();
96
+ e && !L.tags.includes(e) && R((t) => ({
95
97
  ...t,
96
98
  tags: [...t.tags, e]
97
- })), z("");
98
- }, ae = (e) => {
99
- L((t) => ({
99
+ })), B("");
100
+ }, oe = (e) => {
101
+ R((t) => ({
100
102
  ...t,
101
103
  tags: t.tags.filter((t) => t !== e)
102
104
  }));
103
- }, oe = (e, t) => {
104
- q((n) => {
105
+ }, se = (e, t) => {
106
+ J((n) => {
105
107
  let r = new Set(n);
106
108
  return t ? r.add(e) : r.delete(e), r;
107
109
  });
108
110
  };
109
- return te ? /* @__PURE__ */ y(n, { message: w("vibecontrols.ai.contexts.loading", "Loading contexts...") }) : O ? /* @__PURE__ */ y(r, {
110
- title: w("vibecontrols.ai.contexts.loadFailed", "Failed to load contexts"),
111
- message: O,
112
- onRetry: J
113
- }) : /* @__PURE__ */ b("div", {
111
+ return D ? /* @__PURE__ */ b(n, { message: T("vibecontrols.ai.contexts.loading", "Loading contexts...") }) : k ? /* @__PURE__ */ b(r, {
112
+ title: T("vibecontrols.ai.contexts.loadFailed", "Failed to load contexts"),
113
+ message: k,
114
+ onRetry: Y
115
+ }) : /* @__PURE__ */ x("div", {
114
116
  className: "space-y-4",
115
117
  children: [
116
- /* @__PURE__ */ b("div", {
118
+ /* @__PURE__ */ x("div", {
117
119
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
118
120
  children: [
119
- /* @__PURE__ */ y("select", {
120
- value: A,
121
- onChange: (e) => j(e.target.value),
121
+ /* @__PURE__ */ b("select", {
122
+ value: j,
123
+ onChange: (e) => M(e.target.value),
122
124
  className: "px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm",
123
- children: x.map((e) => /* @__PURE__ */ y("option", {
125
+ children: S.map((e) => /* @__PURE__ */ b("option", {
124
126
  value: e.value,
125
127
  children: e.label
126
128
  }, e.value))
127
129
  }),
128
- /* @__PURE__ */ y("div", { className: "flex-1" }),
129
- /* @__PURE__ */ b("button", {
130
+ /* @__PURE__ */ b("div", { className: "flex-1" }),
131
+ /* @__PURE__ */ x("button", {
130
132
  type: "button",
131
133
  onClick: Q,
132
134
  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",
133
- children: [/* @__PURE__ */ y(g, { className: "size-4" }), w("vibecontrols.ai.contexts.newContext", "New Context")]
135
+ children: [/* @__PURE__ */ b(_, { className: "size-4" }), T("vibecontrols.ai.contexts.newContext", "New Context")]
134
136
  })
135
137
  ]
136
138
  }),
137
- T.length > 0 && /* @__PURE__ */ y("div", {
139
+ E.length > 0 && /* @__PURE__ */ b("div", {
138
140
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
139
- children: /* @__PURE__ */ b("div", {
141
+ children: /* @__PURE__ */ x("div", {
140
142
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
141
- children: [/* @__PURE__ */ b("div", {
143
+ children: [/* @__PURE__ */ x("div", {
142
144
  className: "flex flex-wrap items-center gap-3",
143
- children: [/* @__PURE__ */ b("div", {
145
+ children: [/* @__PURE__ */ x("div", {
144
146
  className: "flex items-center gap-2",
145
- children: [/* @__PURE__ */ y(o, {
146
- checked: X,
147
- indeterminate: Z,
147
+ children: [/* @__PURE__ */ b(o, {
148
+ checked: Z,
149
+ indeterminate: ne,
148
150
  onChange: (e) => {
149
- q((t) => {
151
+ J((t) => {
150
152
  let n = new Set(t);
151
- return T.forEach((t) => {
153
+ return E.forEach((t) => {
152
154
  e ? n.add(t.id) : n.delete(t.id);
153
155
  }), n;
154
156
  });
155
157
  },
156
158
  ariaLabel: "Select all visible contexts"
157
- }), /* @__PURE__ */ y("span", {
159
+ }), /* @__PURE__ */ b("span", {
158
160
  className: "text-sm font-medium text-text-primary",
159
- children: w("vibecontrols.ai.contexts.selectAllVisible", "Select all visible")
161
+ children: T("vibecontrols.ai.contexts.selectAllVisible", "Select all visible")
160
162
  })]
161
- }), K.size > 0 && /* @__PURE__ */ y("button", {
163
+ }), q.size > 0 && /* @__PURE__ */ b("button", {
162
164
  type: "button",
163
- onClick: () => q(/* @__PURE__ */ new Set()),
165
+ onClick: () => J(/* @__PURE__ */ new Set()),
164
166
  className: "text-sm text-text-secondary hover:text-text-primary",
165
- children: w("vibecontrols.ai.contexts.clearSelection", "Clear selection")
167
+ children: T("vibecontrols.ai.contexts.clearSelection", "Clear selection")
166
168
  })]
167
- }), /* @__PURE__ */ b("div", {
169
+ }), /* @__PURE__ */ x("div", {
168
170
  className: "flex flex-wrap items-center gap-2",
169
- children: [/* @__PURE__ */ b("span", {
171
+ children: [/* @__PURE__ */ x("span", {
170
172
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
171
173
  children: [
172
- K.size,
174
+ q.size,
173
175
  " ",
174
- w("vibecontrols.ai.contexts.selected", "selected")
176
+ T("vibecontrols.ai.contexts.selected", "selected")
175
177
  ]
176
- }), /* @__PURE__ */ b("button", {
178
+ }), /* @__PURE__ */ x("button", {
177
179
  type: "button",
178
- onClick: () => U(Y.map((e) => e.id)),
179
- disabled: Y.length === 0,
180
+ onClick: () => W(X.map((e) => e.id)),
181
+ disabled: X.length === 0,
180
182
  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",
181
- children: [w("vibecontrols.ai.contexts.deleteSelected", "Delete Selected"), Y.length > 0 ? ` (${Y.length})` : ""]
183
+ children: [T("vibecontrols.ai.contexts.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
182
184
  })]
183
185
  })]
184
186
  })
185
187
  }),
186
- T.length === 0 ? /* @__PURE__ */ y(i, {
187
- icon: /* @__PURE__ */ y(m, { className: "size-8 text-text-secondary" }),
188
- title: w("vibecontrols.ai.contexts.emptyTitle", "No contexts yet"),
189
- description: w("vibecontrols.ai.contexts.emptyDescription", "Create contexts to provide additional information to your AI sessions"),
190
- action: /* @__PURE__ */ b("button", {
188
+ E.length === 0 ? /* @__PURE__ */ b(i, {
189
+ icon: /* @__PURE__ */ b(h, { className: "size-8 text-text-secondary" }),
190
+ title: T("vibecontrols.ai.contexts.emptyTitle", "No contexts yet"),
191
+ description: T("vibecontrols.ai.contexts.emptyDescription", "Create contexts to provide additional information to your AI sessions"),
192
+ action: /* @__PURE__ */ x("button", {
191
193
  type: "button",
192
194
  onClick: Q,
193
195
  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",
194
- children: [/* @__PURE__ */ y(g, { className: "size-4" }), w("vibecontrols.ai.contexts.newContext", "New Context")]
196
+ children: [/* @__PURE__ */ b(_, { className: "size-4" }), T("vibecontrols.ai.contexts.newContext", "New Context")]
195
197
  })
196
- }) : /* @__PURE__ */ y("div", {
198
+ }) : /* @__PURE__ */ b("div", {
197
199
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
198
- children: T.map((e) => /* @__PURE__ */ b(a, {
199
- className: `p-4 ${K.has(e.id) ? "border-action-primary-bg ring-1 ring-action-primary-bg/25" : ""}`,
200
+ children: E.map((e) => /* @__PURE__ */ x(a, {
201
+ className: `p-4 ${q.has(e.id) ? "border-action-primary-bg ring-1 ring-action-primary-bg/25" : ""}`,
200
202
  children: [
201
- /* @__PURE__ */ b("div", {
203
+ /* @__PURE__ */ x("div", {
202
204
  className: "flex items-start justify-between gap-2",
203
- children: [/* @__PURE__ */ b("div", {
205
+ children: [/* @__PURE__ */ x("div", {
204
206
  className: "flex items-start gap-3 min-w-0 flex-1",
205
- children: [/* @__PURE__ */ y("div", {
207
+ children: [/* @__PURE__ */ b("div", {
206
208
  onClick: (e) => e.stopPropagation(),
207
- children: /* @__PURE__ */ y(o, {
208
- checked: K.has(e.id),
209
- onChange: (t) => oe(e.id, t),
209
+ children: /* @__PURE__ */ b(o, {
210
+ checked: q.has(e.id),
211
+ onChange: (t) => se(e.id, t),
210
212
  ariaLabel: `Select context ${e.name}`
211
213
  })
212
- }), /* @__PURE__ */ y("div", {
214
+ }), /* @__PURE__ */ b("div", {
213
215
  className: "min-w-0 flex-1",
214
- children: /* @__PURE__ */ b("div", {
216
+ children: /* @__PURE__ */ x("div", {
215
217
  className: "flex items-center gap-2",
216
- children: [/* @__PURE__ */ y("h4", {
218
+ children: [/* @__PURE__ */ b("h4", {
217
219
  className: "font-semibold text-text-primary truncate",
218
220
  children: e.name
219
- }), /* @__PURE__ */ y("span", {
221
+ }), /* @__PURE__ */ b("span", {
220
222
  className: "px-1.5 py-0.5 text-xs bg-action-primary-bg/10 text-action-primary-bg rounded",
221
223
  children: e.type
222
224
  })]
223
225
  })
224
226
  })]
225
- }), /* @__PURE__ */ b("div", {
227
+ }), /* @__PURE__ */ x("div", {
226
228
  className: "flex items-center gap-1 flex-shrink-0",
227
- children: [/* @__PURE__ */ y("button", {
228
- type: "button",
229
- onClick: () => ne(e),
230
- className: "p-1.5 hover:bg-bg-sunken rounded-md transition-colors",
231
- title: "Edit",
232
- children: /* @__PURE__ */ y(h, { className: "size-3.5 text-text-secondary" })
233
- }), /* @__PURE__ */ y("button", {
234
- type: "button",
235
- onClick: () => U([e.id]),
236
- className: "p-1.5 hover:bg-status-error-bg rounded-md transition-colors",
237
- title: "Delete",
238
- children: /* @__PURE__ */ y(_, { className: "size-3.5 text-status-error-text" })
239
- })]
229
+ children: [
230
+ /* @__PURE__ */ b("button", {
231
+ type: "button",
232
+ onClick: () => re(e),
233
+ className: "p-1.5 hover:bg-bg-sunken rounded-md transition-colors",
234
+ title: "Edit",
235
+ children: /* @__PURE__ */ b(g, { className: "size-3.5 text-text-secondary" })
236
+ }),
237
+ /* @__PURE__ */ b(ee, {
238
+ entity: "aicontext",
239
+ resource: {
240
+ id: e.id,
241
+ name: e.name
242
+ },
243
+ label: T("vibecontrols.ai.contexts.share", "Share")
244
+ }),
245
+ /* @__PURE__ */ b("button", {
246
+ type: "button",
247
+ onClick: () => W([e.id]),
248
+ className: "p-1.5 hover:bg-status-error-bg rounded-md transition-colors",
249
+ title: "Delete",
250
+ children: /* @__PURE__ */ b(v, { className: "size-3.5 text-status-error-text" })
251
+ })
252
+ ]
240
253
  })]
241
254
  }),
242
- /* @__PURE__ */ y("pre", {
255
+ /* @__PURE__ */ b("pre", {
243
256
  className: "mt-2 text-xs text-text-secondary bg-bg-sunken rounded p-2 max-h-20 overflow-auto whitespace-pre-wrap",
244
257
  children: e.content
245
258
  }),
246
- e.tags.length > 0 && /* @__PURE__ */ y("div", {
259
+ e.tags.length > 0 && /* @__PURE__ */ b("div", {
247
260
  className: "mt-2 flex flex-wrap gap-1",
248
- children: e.tags.map((e) => /* @__PURE__ */ y("span", {
261
+ children: e.tags.map((e) => /* @__PURE__ */ b("span", {
249
262
  className: "px-1.5 py-0.5 text-xs bg-bg-sunken text-text-secondary rounded",
250
263
  children: e
251
264
  }, e))
@@ -253,145 +266,145 @@ function C({ agent: C }) {
253
266
  ]
254
267
  }, e.id))
255
268
  }),
256
- M && /* @__PURE__ */ y("div", {
269
+ N && /* @__PURE__ */ b("div", {
257
270
  role: "button",
258
271
  tabIndex: 0,
259
272
  onKeyDown: (e) => {
260
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), N(!1));
273
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), P(!1));
261
274
  },
262
275
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
263
- onClick: () => N(!1),
264
- children: /* @__PURE__ */ b("div", {
276
+ onClick: () => P(!1),
277
+ children: /* @__PURE__ */ x("div", {
265
278
  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",
266
279
  onClick: (e) => e.stopPropagation(),
267
280
  children: [
268
- /* @__PURE__ */ b("div", {
281
+ /* @__PURE__ */ x("div", {
269
282
  className: "flex items-center justify-between mb-4",
270
- children: [/* @__PURE__ */ y("h3", {
283
+ children: [/* @__PURE__ */ b("h3", {
271
284
  className: "text-lg font-semibold text-text-primary",
272
- children: P ? w("vibecontrols.ai.contexts.editContext", "Edit Context") : w("vibecontrols.ai.contexts.newContext", "New Context")
273
- }), /* @__PURE__ */ y("button", {
285
+ children: F ? T("vibecontrols.ai.contexts.editContext", "Edit Context") : T("vibecontrols.ai.contexts.newContext", "New Context")
286
+ }), /* @__PURE__ */ b("button", {
274
287
  type: "button",
275
- onClick: () => N(!1),
288
+ onClick: () => P(!1),
276
289
  className: "p-1 hover:bg-bg-sunken rounded-md",
277
- children: /* @__PURE__ */ y(v, { className: "size-4 text-text-secondary" })
290
+ children: /* @__PURE__ */ b(y, { className: "size-4 text-text-secondary" })
278
291
  })]
279
292
  }),
280
- /* @__PURE__ */ b("div", {
293
+ /* @__PURE__ */ x("div", {
281
294
  className: "space-y-4",
282
295
  children: [
283
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
296
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
284
297
  className: "block text-sm font-medium text-text-primary mb-1",
285
- children: w("vibecontrols.ai.contexts.name", "Name")
286
- }), /* @__PURE__ */ y("input", {
298
+ children: T("vibecontrols.ai.contexts.name", "Name")
299
+ }), /* @__PURE__ */ b("input", {
287
300
  "aria-label": "control",
288
301
  type: "text",
289
- value: I.name,
290
- onChange: (e) => L({
291
- ...I,
302
+ value: L.name,
303
+ onChange: (e) => R({
304
+ ...L,
292
305
  name: e.target.value
293
306
  }),
294
307
  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",
295
- placeholder: w("vibecontrols.ai.contexts.namePlaceholder", "Context name")
308
+ placeholder: T("vibecontrols.ai.contexts.namePlaceholder", "Context name")
296
309
  })] }),
297
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
310
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
298
311
  className: "block text-sm font-medium text-text-primary mb-1",
299
- children: w("vibecontrols.ai.contexts.type", "Type")
300
- }), /* @__PURE__ */ y("select", {
301
- value: I.type,
302
- onChange: (e) => L({
303
- ...I,
312
+ children: T("vibecontrols.ai.contexts.type", "Type")
313
+ }), /* @__PURE__ */ b("select", {
314
+ value: L.type,
315
+ onChange: (e) => R({
316
+ ...L,
304
317
  type: e.target.value
305
318
  }),
306
319
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm",
307
- children: x.filter((e) => e.value !== "all").map((e) => /* @__PURE__ */ y("option", {
320
+ children: S.filter((e) => e.value !== "all").map((e) => /* @__PURE__ */ b("option", {
308
321
  value: e.value,
309
322
  children: e.label
310
323
  }, e.value))
311
324
  })] }),
312
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
325
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
313
326
  className: "block text-sm font-medium text-text-primary mb-1",
314
- children: w("vibecontrols.ai.contexts.content", "Content")
315
- }), /* @__PURE__ */ y("textarea", {
327
+ children: T("vibecontrols.ai.contexts.content", "Content")
328
+ }), /* @__PURE__ */ b("textarea", {
316
329
  "aria-label": "control",
317
- value: I.content,
318
- onChange: (e) => L({
319
- ...I,
330
+ value: L.content,
331
+ onChange: (e) => R({
332
+ ...L,
320
333
  content: e.target.value
321
334
  }),
322
335
  rows: 8,
323
336
  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",
324
- placeholder: w("vibecontrols.ai.contexts.contentPlaceholder", "Context content...")
337
+ placeholder: T("vibecontrols.ai.contexts.contentPlaceholder", "Context content...")
325
338
  })] }),
326
- /* @__PURE__ */ b("div", { children: [
327
- /* @__PURE__ */ y("label", {
339
+ /* @__PURE__ */ x("div", { children: [
340
+ /* @__PURE__ */ b("label", {
328
341
  className: "block text-sm font-medium text-text-primary mb-1",
329
- children: w("vibecontrols.ai.contexts.tags", "Tags")
342
+ children: T("vibecontrols.ai.contexts.tags", "Tags")
330
343
  }),
331
- /* @__PURE__ */ y("div", {
344
+ /* @__PURE__ */ b("div", {
332
345
  className: "flex flex-wrap gap-1 mb-2",
333
- children: I.tags.map((e) => /* @__PURE__ */ b("span", {
346
+ children: L.tags.map((e) => /* @__PURE__ */ x("span", {
334
347
  className: "flex items-center gap-1 px-2 py-0.5 text-xs bg-bg-sunken text-text-primary rounded",
335
- children: [e, /* @__PURE__ */ y("button", {
348
+ children: [e, /* @__PURE__ */ b("button", {
336
349
  type: "button",
337
- onClick: () => ae(e),
338
- children: /* @__PURE__ */ y(v, { className: "size-3 text-text-secondary hover:text-status-error-text" })
350
+ onClick: () => oe(e),
351
+ children: /* @__PURE__ */ b(y, { className: "size-3 text-text-secondary hover:text-status-error-text" })
339
352
  })]
340
353
  }, e))
341
354
  }),
342
- /* @__PURE__ */ b("div", {
355
+ /* @__PURE__ */ x("div", {
343
356
  className: "flex gap-2",
344
- children: [/* @__PURE__ */ y("input", {
357
+ children: [/* @__PURE__ */ b("input", {
345
358
  "aria-label": "control",
346
359
  type: "text",
347
- value: R,
348
- onChange: (e) => z(e.target.value),
360
+ value: z,
361
+ onChange: (e) => B(e.target.value),
349
362
  onKeyDown: (e) => {
350
363
  e.key === "Enter" && (e.preventDefault(), $());
351
364
  },
352
365
  className: "flex-1 px-3 py-1.5 bg-bg-sunken border border-border-default rounded text-sm text-text-primary focus:outline-none focus:border-border-strong",
353
- placeholder: w("vibecontrols.ai.contexts.addTagPlaceholder", "Add a tag...")
354
- }), /* @__PURE__ */ y("button", {
366
+ placeholder: T("vibecontrols.ai.contexts.addTagPlaceholder", "Add a tag...")
367
+ }), /* @__PURE__ */ b("button", {
355
368
  type: "button",
356
369
  onClick: $,
357
370
  className: "px-3 py-1.5 text-xs bg-bg-sunken border border-border-default rounded hover:bg-bg-surface transition-colors",
358
- children: w("vibecontrols.ai.contexts.add", "Add")
371
+ children: T("vibecontrols.ai.contexts.add", "Add")
359
372
  })]
360
373
  })
361
374
  ] })
362
375
  ]
363
376
  }),
364
- /* @__PURE__ */ b("div", {
377
+ /* @__PURE__ */ x("div", {
365
378
  className: "flex justify-end gap-2 mt-6",
366
- children: [/* @__PURE__ */ y("button", {
379
+ children: [/* @__PURE__ */ b("button", {
367
380
  type: "button",
368
- onClick: () => N(!1),
381
+ onClick: () => P(!1),
369
382
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
370
- children: w("vibecontrols.ai.contexts.cancel", "Cancel")
371
- }), /* @__PURE__ */ y("button", {
383
+ children: T("vibecontrols.ai.contexts.cancel", "Cancel")
384
+ }), /* @__PURE__ */ b("button", {
372
385
  type: "button",
373
- onClick: re,
374
- disabled: B || !I.name || !I.content,
386
+ onClick: ie,
387
+ disabled: V || !L.name || !L.content,
375
388
  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",
376
- children: B ? w("vibecontrols.ai.contexts.saving", "Saving...") : P ? w("vibecontrols.ai.contexts.update", "Update") : w("vibecontrols.ai.contexts.create", "Create")
389
+ children: V ? T("vibecontrols.ai.contexts.saving", "Saving...") : F ? T("vibecontrols.ai.contexts.update", "Update") : T("vibecontrols.ai.contexts.create", "Create")
377
390
  })]
378
391
  })
379
392
  ]
380
393
  })
381
394
  }),
382
- /* @__PURE__ */ y(t, {
383
- isOpen: H.length > 0,
384
- title: H.length > 1 ? "Delete Contexts" : "Delete Context",
385
- message: H.length > 1 ? `Are you sure you want to delete ${H.length} selected contexts? This action cannot be undone.` : "Are you sure you want to delete this context? This action cannot be undone.",
386
- confirmLabel: W ? "Deleting..." : "Delete",
395
+ /* @__PURE__ */ b(t, {
396
+ isOpen: U.length > 0,
397
+ title: U.length > 1 ? "Delete Contexts" : "Delete Context",
398
+ message: U.length > 1 ? `Are you sure you want to delete ${U.length} selected contexts? This action cannot be undone.` : "Are you sure you want to delete this context? This action cannot be undone.",
399
+ confirmLabel: G ? "Deleting..." : "Delete",
387
400
  variant: "danger",
388
- onConfirm: ie,
389
- onClose: () => U([])
401
+ onConfirm: ae,
402
+ onClose: () => W([])
390
403
  })
391
404
  ]
392
405
  });
393
406
  }
394
407
  //#endregion
395
- export { C as AIContextsTab };
408
+ export { w as AIContextsTab };
396
409
 
397
410
  //# sourceMappingURL=AIContextsTab.js.map