@burdenoff/microfe-vibecontrols 2026.602.1 → 2026.602.2

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,110 +1,111 @@
1
- import { useArchiveVibeMutation as e, useAttachAgentToVibeMutation as t, useCreateVibeMutation as n, useListAgentsLazyQuery as r, useListVibesQuery as i, useUpdateVibeStatusMutation as ee } from "../generated/wspace-operations.js";
2
- import { ConfirmDialog as te } from "../components/shared/ConfirmDialog.js";
3
- import { QuotaExhaustedDialog as ne } from "../components/shared/QuotaExhaustedDialog.js";
4
- import { isQuotaExhaustedError as re, markQuotaHandledLocally as ie } from "../utils/quotaUtils.js";
5
- import { useVibeControls as ae, useVibeNavigate as oe } from "../providers/VibeControlsProvider.js";
6
- import { useVibeControlsStore as se } from "../store/vibeControlsStore.js";
7
- import ce from "../hooks/useCachedInitialData.js";
8
- import { PageHeader as le } from "../components/shared/PageHeader.js";
9
- import { LoadingState as ue } from "../components/shared/LoadingState.js";
10
- import { ErrorState as de } from "../components/shared/ErrorState.js";
11
- import { EntityTagPicker as fe } from "../components/shared/EntityTagPicker.js";
12
- import { useDraftEntityTags as pe } from "../hooks/useDraftEntityTags.js";
13
- import { EmptyState as me } from "../components/shared/EmptyState.js";
14
- import { SearchInput as he } from "../components/shared/SearchInput.js";
15
- import { FilterDropdown as ge } from "../components/shared/FilterDropdown.js";
16
- import { GetHelpButton as _e } from "../components/shared/GetHelpButton.js";
17
- import { SelectionCheckbox as ve } from "../components/shared/SelectionCheckbox.js";
1
+ import { useArchiveVibeMutation as e, useAttachAgentToVibeMutation as t, useCreateVibeMutation as n, useDeleteVibeMutation as r, useListAgentsLazyQuery as i, useListVibesQuery as ee, useUpdateVibeStatusMutation as te } from "../generated/wspace-operations.js";
2
+ import { ConfirmDialog as ne } from "../components/shared/ConfirmDialog.js";
3
+ import { QuotaExhaustedDialog as re } from "../components/shared/QuotaExhaustedDialog.js";
4
+ import { isQuotaExhaustedError as ie, markQuotaHandledLocally as ae } from "../utils/quotaUtils.js";
5
+ import { useVibeControls as oe, useVibeNavigate as se } from "../providers/VibeControlsProvider.js";
6
+ import { useVibeControlsStore as ce } from "../store/vibeControlsStore.js";
7
+ import le from "../hooks/useCachedInitialData.js";
8
+ import { PageHeader as ue } from "../components/shared/PageHeader.js";
9
+ import { LoadingState as de } from "../components/shared/LoadingState.js";
10
+ import { ErrorState as fe } from "../components/shared/ErrorState.js";
11
+ import { EntityTagPicker as pe } from "../components/shared/EntityTagPicker.js";
12
+ import { useDraftEntityTags as me } from "../hooks/useDraftEntityTags.js";
13
+ import { EmptyState as he } from "../components/shared/EmptyState.js";
14
+ import { SearchInput as ge } from "../components/shared/SearchInput.js";
15
+ import { FilterDropdown as _e } from "../components/shared/FilterDropdown.js";
16
+ import { GetHelpButton as ve } from "../components/shared/GetHelpButton.js";
17
+ import { SelectionCheckbox as ye } from "../components/shared/SelectionCheckbox.js";
18
18
  import "../components/shared/index.js";
19
19
  import { VIBE_PERMISSIONS as a } from "../constants/permissions.js";
20
- import { PageSkeleton as ye } from "../components/shared/PageSkeleton.js";
21
- import { buildProtocolUrl as be, getIdePreset as xe, resolveEffectiveIdeCommand as Se } from "../components/agents/idePresets.js";
22
- import { VibeCard as Ce } from "../components/vibes/VibeCard.js";
23
- import { VibeList as we } from "../components/vibes/VibeList.js";
20
+ import { PageSkeleton as be } from "../components/shared/PageSkeleton.js";
21
+ import { buildProtocolUrl as xe, getIdePreset as Se, resolveEffectiveIdeCommand as Ce } from "../components/agents/idePresets.js";
22
+ import { VibeCard as we } from "../components/vibes/VibeCard.js";
23
+ import { DeleteVibeDialog as Te } from "../components/vibes/DeleteVibeDialog.js";
24
+ import { VibeList as Ee } from "../components/vibes/VibeList.js";
24
25
  import "../components/vibes/index.js";
25
- import { useCallback as o, useEffect as Te, useMemo as s, useRef as c, useState as l } from "react";
26
- import { useI18n as Ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
27
- import { useUpgradePrompt as De } from "@burdenoff/fe-libs/shared/hooks";
28
- import { Archive as Oe, Grid as ke, List as Ae, Play as je, Plus as Me, RefreshCw as Ne, Zap as Pe } from "lucide-react";
29
- import { useSearchParams as Fe } from "react-router-dom";
30
- import { usePermissions as Ie } from "@burdenoff/fe-libs/shared/providers/shell";
31
- import { AnimatePresence as Le } from "framer-motion";
32
- import { Fragment as Re, jsx as u, jsxs as d } from "react/jsx-runtime";
33
- import { AccessDenied as ze, PermissionButton as Be, PermissionGate as Ve } from "@burdenoff/fe-libs/shared/components";
34
- import { MotionItem as He, MotionList as f, MotionPage as Ue } from "@burdenoff/fe-libs/shared/motion";
26
+ import { useCallback as o, useEffect as De, useMemo as s, useRef as c, useState as l } from "react";
27
+ import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
28
+ import { useUpgradePrompt as ke } from "@burdenoff/fe-libs/shared/hooks";
29
+ import { Archive as Ae, Grid as je, List as Me, Play as Ne, Plus as Pe, RefreshCw as Fe, Zap as Ie } from "lucide-react";
30
+ import { useSearchParams as Le } from "react-router-dom";
31
+ import { usePermissions as Re } from "@burdenoff/fe-libs/shared/providers/shell";
32
+ import { AnimatePresence as ze } from "framer-motion";
33
+ import { Fragment as Be, jsx as u, jsxs as d } from "react/jsx-runtime";
34
+ import { AccessDenied as Ve, PermissionButton as He, PermissionGate as Ue } from "@burdenoff/fe-libs/shared/components";
35
+ import { MotionItem as We, MotionList as f, MotionPage as Ge } from "@burdenoff/fe-libs/shared/motion";
35
36
  //#region src/pages/VibesPage.tsx
36
37
  function p() {
37
- let { onVibeActivate: p, workspaceId: m } = ae(), h = oe(), { hasPermission: g, isLoading: _, permissions: v } = Ie(), { t: y } = Ee(), { isFree: We, approachingLimits: Ge } = De({ resource: "vibes" }), b = Ge[0], x = o((e, t, n) => {
38
- let r = y(e, n), i = r === e ? t : r;
38
+ let { onVibeActivate: p, workspaceId: m } = oe(), Ke = se(), { hasPermission: h, isLoading: g, permissions: qe } = Re(), { t: Je } = Oe(), { isFree: Ye, approachingLimits: Xe } = ke({ resource: "vibes" }), _ = Xe[0], v = o((e, t, n) => {
39
+ let r = Je(e, n), i = r === e ? t : r;
39
40
  return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
40
- }, [y]), Ke = [
41
+ }, [Je]), Ze = [
41
42
  {
42
43
  value: "all",
43
- label: x("vibesPage.statusAll", "All Statuses")
44
+ label: v("vibesPage.statusAll", "All Statuses")
44
45
  },
45
46
  {
46
47
  value: "ACTIVE",
47
- label: x("vibesPage.statusActive", "Active")
48
+ label: v("vibesPage.statusActive", "Active")
48
49
  },
49
50
  {
50
51
  value: "INACTIVE",
51
- label: x("vibesPage.statusInactive", "Inactive")
52
+ label: v("vibesPage.statusInactive", "Inactive")
52
53
  },
53
54
  {
54
55
  value: "ARCHIVED",
55
- label: x("vibesPage.statusArchived", "Archived")
56
+ label: v("vibesPage.statusArchived", "Archived")
56
57
  },
57
58
  {
58
59
  value: "ERROR",
59
- label: x("vibesPage.statusError", "Error")
60
+ label: v("vibesPage.statusError", "Error")
60
61
  }
61
62
  ];
62
- x("vibesPage.typeAll", "All Types"), x("vibesPage.typeProject", "Project"), x("vibesPage.typeRepository", "Repository"), x("vibesPage.typeWorkspace", "Workspace"), x("vibesPage.typeMonorepo", "Monorepo"), x("vibesPage.typePackage", "Package"), x("vibesPage.typeCustom", "Custom");
63
- let qe = g(a.VIBE_LIST), Je = g(a.VIBE_UPDATE), S = _ || !qe, [C, Ye] = l(""), [w, Xe] = l("all"), [T, Ze] = l("all"), [E, Qe] = l("all"), [D, $e] = l("grid"), [et, O] = l(!1), [tt, k] = l(null), [A, nt] = l(!1), [rt, j] = l(null), [it, M] = l(!1), [N, P] = l({}), [F, I] = l(null), [L, R] = l(/* @__PURE__ */ new Set()), [at, z] = l(null), B = c(null);
64
- Te(() => () => {
65
- B.current && clearTimeout(B.current);
63
+ v("vibesPage.typeAll", "All Types"), v("vibesPage.typeProject", "Project"), v("vibesPage.typeRepository", "Repository"), v("vibesPage.typeWorkspace", "Workspace"), v("vibesPage.typeMonorepo", "Monorepo"), v("vibesPage.typePackage", "Package"), v("vibesPage.typeCustom", "Custom");
64
+ let Qe = h(a.VIBE_LIST), $e = h(a.VIBE_UPDATE), et = h(a.VIBE_DELETE), y = g || !Qe, [b, tt] = l(""), [x, nt] = l("all"), [S, rt] = l("all"), [C, it] = l("all"), [w, T] = l("grid"), [at, E] = l(!1), [ot, D] = l(null), [O, st] = l(!1), [ct, k] = l(null), [lt, A] = l(!1), [j, M] = l({}), [ut, N] = l(null), [P, F] = l(/* @__PURE__ */ new Set()), [dt, I] = l(null), L = c(null);
65
+ De(() => () => {
66
+ L.current && clearTimeout(L.current);
66
67
  }, []);
67
- let ot = o(() => {
68
- I(null), B.current &&= (clearTimeout(B.current), null);
69
- }, []), st = c(null), ct = c(null), lt = c(null), ut = c(null), [dt] = n(), [ft] = t(), { setDraftTagIds: pt, flushTags: mt } = pe("VIBECONTROLS_VIBE"), [ht] = ee(), [gt] = e(), { data: _t, loading: V, error: vt, refetch: H } = i({
68
+ let ft = o(() => {
69
+ N(null), L.current &&= (clearTimeout(L.current), null);
70
+ }, []), pt = c(null), mt = c(null), ht = c(null), gt = c(null), [_t] = n(), [vt] = t(), { setDraftTagIds: yt, flushTags: bt } = me("VIBECONTROLS_VIBE"), [xt] = te(), [St] = e(), [Ct, { loading: wt }] = r(), [R, z] = l(null), { data: Tt, loading: B, error: Et, refetch: V } = ee({
70
71
  variables: s(() => {
71
72
  let e = {};
72
- return m && (e.workspaceId = m), w !== "all" && (e.status = w), T !== "all" && (e.type = T), E !== "all" && (e.attachedAgentIds = [E]), {
73
+ return m && (e.workspaceId = m), x !== "all" && (e.status = x), S !== "all" && (e.type = S), C !== "all" && (e.attachedAgentIds = [C]), {
73
74
  filter: e,
74
75
  pagination: { limit: 50 }
75
76
  };
76
77
  }, [
77
78
  m,
78
- w,
79
- T,
80
- E
79
+ x,
80
+ S,
81
+ C
81
82
  ]),
82
- fetchPolicy: w === "all" && T === "all" && E === "all" ? "cache-first" : "cache-and-network",
83
+ fetchPolicy: x === "all" && S === "all" && C === "all" ? "cache-first" : "cache-and-network",
83
84
  nextFetchPolicy: "cache-first",
84
- skip: S,
85
+ skip: y,
85
86
  notifyOnNetworkStatusChange: !0
86
- }), { agents: yt } = ce(), [bt, { data: xt }] = r({ fetchPolicy: "cache-first" }), St = c(!1), U = o(() => {
87
- St.current || S || (St.current = !0, bt({ variables: { pagination: { limit: 100 } } }));
88
- }, [bt, S]), Ct = s(() => {
89
- let e = xt?.vibecontrolsAgents ?? null, t = e ? e.map((e) => ({
87
+ }), { agents: Dt } = le(), [Ot, { data: kt }] = i({ fetchPolicy: "cache-first" }), At = c(!1), H = o(() => {
88
+ At.current || y || (At.current = !0, Ot({ variables: { pagination: { limit: 100 } } }));
89
+ }, [Ot, y]), jt = s(() => {
90
+ let e = kt?.vibecontrolsAgents ?? null, t = e ? e.map((e) => ({
90
91
  id: e.id,
91
92
  name: e.name
92
- })) : yt.map((e) => ({
93
+ })) : Dt.map((e) => ({
93
94
  id: e.id,
94
95
  name: e.name
95
96
  }));
96
97
  return [{
97
98
  value: "all",
98
- label: x("vibesPage.allAgents", "All Agents")
99
+ label: v("vibesPage.allAgents", "All Agents")
99
100
  }, ...t.map((e) => ({
100
101
  value: e.id,
101
102
  label: e.name
102
103
  }))];
103
104
  }, [
104
- xt?.vibecontrolsAgents,
105
- yt,
106
- x
107
- ]), W = s(() => (_t?.vibes?.items ?? []).map((e) => ({
105
+ kt?.vibecontrolsAgents,
106
+ Dt,
107
+ v
108
+ ]), U = s(() => (Tt?.vibes?.items ?? []).map((e) => ({
108
109
  id: e.id,
109
110
  workspaceId: e.workspaceId,
110
111
  name: e.name,
@@ -122,17 +123,17 @@ function p() {
122
123
  createdAt: e.createdAt,
123
124
  updatedAt: e.updatedAt,
124
125
  agents: []
125
- })), [_t?.vibes?.items]), G = s(() => W.filter((e) => {
126
- if (C) {
127
- let t = C.toLowerCase();
126
+ })), [Tt?.vibes?.items]), W = s(() => U.filter((e) => {
127
+ if (b) {
128
+ let t = b.toLowerCase();
128
129
  if (!(e.name.toLowerCase().includes(t) || e.description?.toLowerCase().includes(t) || e.path?.toLowerCase().includes(t) || e.tags?.some((e) => e.toLowerCase().includes(t)))) return !1;
129
130
  }
130
131
  return !0;
131
- }), [W, C]), wt = s(() => W.filter((e) => L.has(e.id)), [W, L]), K = wt.filter((e) => e.status !== "ACTIVE"), q = wt.filter((e) => e.status !== "ARCHIVED"), J = G.length > 0 && G.every((e) => L.has(e.id)), Tt = G.some((e) => L.has(e.id)) && !J, Et = (e) => {
132
- h(`/vibes/${e.id}`);
133
- }, Dt = async (e) => {
132
+ }), [U, b]), Mt = s(() => U.filter((e) => P.has(e.id)), [U, P]), G = Mt.filter((e) => e.status !== "ACTIVE"), K = Mt.filter((e) => e.status !== "ARCHIVED"), q = W.length > 0 && W.every((e) => P.has(e.id)), Nt = W.some((e) => P.has(e.id)) && !q, Pt = (e) => {
133
+ Ke(`/vibes/${e.id}`);
134
+ }, Ft = async (e) => {
134
135
  try {
135
- (await ht({ variables: {
136
+ (await xt({ variables: {
136
137
  id: e.id,
137
138
  status: "ACTIVE"
138
139
  } })).data?.updateVibeStatus && (p?.({
@@ -140,71 +141,90 @@ function p() {
140
141
  name: e.name,
141
142
  type: e.type,
142
143
  status: "ACTIVE"
143
- }), await H());
144
+ }), await V());
144
145
  } catch (e) {
145
146
  console.error("Failed to activate vibe:", e);
146
147
  }
147
- }, Ot = async (e) => {
148
+ }, It = async (e) => {
148
149
  try {
149
- await gt({ variables: { id: e.id } }), await H();
150
+ await St({ variables: { id: e.id } }), await V();
150
151
  } catch (e) {
151
152
  console.error("Failed to archive vibe:", e);
152
153
  }
153
- }, kt = se((e) => e.preferredIdeCommand), At = se((e) => e.vibeIdeOverrides), jt = (e) => {
154
+ }, Lt = async (e) => {
155
+ if (!R) return;
156
+ let t = R.id;
157
+ try {
158
+ await Ct({
159
+ variables: {
160
+ id: t,
161
+ deleteRelatedEntities: e
162
+ },
163
+ update: (e) => {
164
+ e.evict({ id: e.identify({
165
+ __typename: "Vibe",
166
+ id: t
167
+ }) }), e.gc();
168
+ }
169
+ }), z(null), await V();
170
+ } catch (e) {
171
+ console.error("Failed to delete vibe:", e);
172
+ }
173
+ }, Rt = ce((e) => e.preferredIdeCommand), zt = ce((e) => e.vibeIdeOverrides), Bt = (e) => {
154
174
  if (!e.path) {
155
- I(x("vibesPage.openEditorPathMissing", "No path available to open in editor")), B.current = setTimeout(() => {
156
- I(null), B.current = null;
175
+ N(v("vibesPage.openEditorPathMissing", "No path available to open in editor")), L.current = setTimeout(() => {
176
+ N(null), L.current = null;
157
177
  }, 3e3);
158
178
  return;
159
179
  }
160
- let t = Se(e.id, kt, At), n = xe(t), r = n ? be(n, e.path) : `vscode://file/${e.path}`;
161
- r ? window.location.href = r : (I(x("vibesPage.openEditorNoProtocol", `${n?.label ?? t} has no URL handler — open this Vibe and use the editor menu.`)), B.current = setTimeout(() => {
162
- I(null), B.current = null;
180
+ let t = Ce(e.id, Rt, zt), n = Se(t), r = n ? xe(n, e.path) : `vscode://file/${e.path}`;
181
+ r ? window.location.href = r : (N(v("vibesPage.openEditorNoProtocol", `${n?.label ?? t} has no URL handler — open this Vibe and use the editor menu.`)), L.current = setTimeout(() => {
182
+ N(null), L.current = null;
163
183
  }, 4e3));
164
- }, Y = o(() => {
165
- k(null), O(!0), U();
166
- }, [U]), [X, Mt] = Fe();
167
- Te(() => {
168
- if (X.get("create") === "true") {
169
- Y();
170
- let e = new URLSearchParams(X);
171
- e.delete("create"), Mt(e, { replace: !0 });
184
+ }, J = o(() => {
185
+ D(null), E(!0), H();
186
+ }, [H]), [Y, Vt] = Le();
187
+ De(() => {
188
+ if (Y.get("create") === "true") {
189
+ J();
190
+ let e = new URLSearchParams(Y);
191
+ e.delete("create"), Vt(e, { replace: !0 });
172
192
  }
173
193
  }, [
174
- X,
175
- Mt,
176
- Y
194
+ Y,
195
+ Vt,
196
+ J
177
197
  ]);
178
- let Nt = (e, t) => {
179
- R((n) => {
198
+ let Ht = (e, t) => {
199
+ F((n) => {
180
200
  let r = new Set(n);
181
201
  return t ? r.add(e.id) : r.delete(e.id), r;
182
202
  });
183
- }, Pt = (e) => {
184
- R((t) => {
203
+ }, Ut = (e) => {
204
+ F((t) => {
185
205
  let n = new Set(t);
186
- return G.forEach((t) => {
206
+ return W.forEach((t) => {
187
207
  e ? n.add(t.id) : n.delete(t.id);
188
208
  }), n;
189
209
  });
190
- }, Z = () => R(/* @__PURE__ */ new Set()), Ft = async () => {
191
- if (K.length === 0) return;
192
- let e = await Promise.allSettled(K.map((e) => ht({ variables: {
210
+ }, X = () => F(/* @__PURE__ */ new Set()), Wt = async () => {
211
+ if (G.length === 0) return;
212
+ let e = await Promise.allSettled(G.map((e) => xt({ variables: {
193
213
  id: e.id,
194
214
  status: "ACTIVE"
195
215
  } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
196
- j(`Activated ${t} vibe${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => j(null), 4e3), Z(), z(null), await H();
197
- }, It = async () => {
198
- if (q.length === 0) return;
199
- let e = await Promise.allSettled(q.map((e) => gt({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
200
- j(`Archived ${t} vibe${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => j(null), 4e3), Z(), z(null), await H();
201
- }, Lt = async () => {
202
- let e = st.current?.value?.trim(), t = ct.current?.value?.trim(), n = lt.current?.value, r = ut.current?.value, i = {};
203
- if (e || (i.name = x("vibesPage.nameRequired", "Name is required")), i.name) {
204
- P(i), k(x("vibesPage.fillRequired", "Please fill in all required fields"));
216
+ k(`Activated ${t} vibe${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => k(null), 4e3), X(), I(null), await V();
217
+ }, Gt = async () => {
218
+ if (K.length === 0) return;
219
+ let e = await Promise.allSettled(K.map((e) => St({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
220
+ k(`Archived ${t} vibe${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => k(null), 4e3), X(), I(null), await V();
221
+ }, Kt = async () => {
222
+ let e = pt.current?.value?.trim(), t = mt.current?.value?.trim(), n = ht.current?.value, r = gt.current?.value, i = {};
223
+ if (e || (i.name = v("vibesPage.nameRequired", "Name is required")), i.name) {
224
+ M(i), D(v("vibesPage.fillRequired", "Please fill in all required fields"));
205
225
  return;
206
226
  }
207
- P({});
227
+ M({});
208
228
  let ee = [
209
229
  "PROJECT",
210
230
  "REPOSITORY",
@@ -213,85 +233,85 @@ function p() {
213
233
  "PACKAGE",
214
234
  "CUSTOM"
215
235
  ].includes(r) ? r : "PROJECT";
216
- nt(!0), k(null);
236
+ st(!0), D(null);
217
237
  try {
218
- let r = await dt({ variables: { input: {
238
+ let r = await _t({ variables: { input: {
219
239
  name: e,
220
240
  path: t ?? "",
221
241
  type: ee
222
242
  } } });
223
- if (!r.data?.createVibe?.id) throw Error(x("vibesPage.failedCreate", "Failed to create vibe"));
243
+ if (!r.data?.createVibe?.id) throw Error(v("vibesPage.failedCreate", "Failed to create vibe"));
224
244
  let i = r.data.createVibe.id;
225
245
  if (n) try {
226
- await ft({ variables: { input: {
246
+ await vt({ variables: { input: {
227
247
  vibeId: i,
228
248
  agentId: n
229
249
  } } });
230
250
  } catch {}
231
- O(!1), j(x("vibesPage.createdSuccess", "Vibe created successfully")), await mt(i), await H(), setTimeout(() => j(null), 3e3);
251
+ E(!1), k(v("vibesPage.createdSuccess", "Vibe created successfully")), await bt(i), await V(), setTimeout(() => k(null), 3e3);
232
252
  } catch (e) {
233
- if (re(e)) {
234
- O(!1), k(null), P({}), ie(), M(!0);
253
+ if (ie(e)) {
254
+ E(!1), D(null), M({}), ae(), A(!0);
235
255
  return;
236
256
  }
237
- k(e instanceof Error ? e.message : x("vibesPage.failedCreate", "Failed to create vibe"));
257
+ D(e instanceof Error ? e.message : v("vibesPage.failedCreate", "Failed to create vibe"));
238
258
  } finally {
239
- nt(!1);
259
+ st(!1);
240
260
  }
241
- }, Rt = {
242
- total: W.length,
243
- active: W.filter((e) => e.status === "ACTIVE").length,
244
- inactive: W.filter((e) => e.status === "INACTIVE").length
245
- }, Q = _, $ = !_ && !!v && (v.permissionStrings?.length ?? 0) > 0 && !qe, zt = !Q && !$ && V && W.length === 0, Bt = !Q && !$ && !!vt && W.length === 0, Vt = !Q && !$ && !Bt;
246
- return /* @__PURE__ */ d(Ue, {
261
+ }, qt = {
262
+ total: U.length,
263
+ active: U.filter((e) => e.status === "ACTIVE").length,
264
+ inactive: U.filter((e) => e.status === "INACTIVE").length
265
+ }, Z = g, Q = !g && !!qe && (qe.permissionStrings?.length ?? 0) > 0 && !Qe, Jt = !Z && !Q && B && U.length === 0, $ = !Z && !Q && !!Et && U.length === 0, Yt = !Z && !Q && !$;
266
+ return /* @__PURE__ */ d(Ge, {
247
267
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
248
268
  children: [
249
- Q && /* @__PURE__ */ u(ue, { message: x("vibesPage.loadingPermissions", "Loading permissions...") }),
250
- $ && /* @__PURE__ */ u(ze, {
251
- title: x("vibesPage.accessDeniedTitle", "Access Denied"),
252
- description: x("vibesPage.accessDeniedDescription", "You don't have permission to view vibes. Contact your workspace administrator for access.")
269
+ Z && /* @__PURE__ */ u(de, { message: v("vibesPage.loadingPermissions", "Loading permissions...") }),
270
+ Q && /* @__PURE__ */ u(Ve, {
271
+ title: v("vibesPage.accessDeniedTitle", "Access Denied"),
272
+ description: v("vibesPage.accessDeniedDescription", "You don't have permission to view vibes. Contact your workspace administrator for access.")
253
273
  }),
254
- Bt && /* @__PURE__ */ u(de, {
255
- title: x("vibesPage.failedLoad", "Failed to load vibes"),
256
- message: vt?.message ?? "",
257
- onRetry: () => H()
274
+ $ && /* @__PURE__ */ u(fe, {
275
+ title: v("vibesPage.failedLoad", "Failed to load vibes"),
276
+ message: Et?.message ?? "",
277
+ onRetry: () => V()
258
278
  }),
259
- Vt && /* @__PURE__ */ d(Re, { children: [
260
- /* @__PURE__ */ u(le, {
261
- title: x("vibesPage.title", "Vibes"),
262
- description: x("vibesPage.descriptionActive", "{{active}} of {{total}} vibes active", {
263
- active: Rt.active,
264
- total: Rt.total
279
+ Yt && /* @__PURE__ */ d(Be, { children: [
280
+ /* @__PURE__ */ u(ue, {
281
+ title: v("vibesPage.title", "Vibes"),
282
+ description: v("vibesPage.descriptionActive", "{{active}} of {{total}} vibes active", {
283
+ active: qt.active,
284
+ total: qt.total
265
285
  }),
266
286
  actions: /* @__PURE__ */ d("div", {
267
287
  className: "flex items-center gap-2",
268
288
  children: [
269
- We && b && typeof b.limit == "number" && /* @__PURE__ */ u("a", {
289
+ Ye && _ && typeof _.limit == "number" && /* @__PURE__ */ u("a", {
270
290
  href: "/billing/plans",
271
- className: `inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-md border ${b.current >= b.limit ? "border-status-error-border bg-status-error-bg-subtle text-status-error-text" : "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"}`,
272
- title: x("vibesPage.upgradeChipTooltip", "Free plan limit — upgrade for more vibes"),
273
- children: x("vibesPage.usageChip", "{{current}} of {{limit}} vibes used", {
274
- current: b.current,
275
- limit: b.limit
291
+ className: `inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-md border ${_.current >= _.limit ? "border-status-error-border bg-status-error-bg-subtle text-status-error-text" : "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"}`,
292
+ title: v("vibesPage.upgradeChipTooltip", "Free plan limit — upgrade for more vibes"),
293
+ children: v("vibesPage.usageChip", "{{current}} of {{limit}} vibes used", {
294
+ current: _.current,
295
+ limit: _.limit
276
296
  })
277
297
  }),
278
298
  /* @__PURE__ */ u("button", {
279
299
  type: "button",
280
- onClick: () => H(),
281
- disabled: V,
300
+ onClick: () => V(),
301
+ disabled: B,
282
302
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
283
- title: x("vibesPage.refreshTitle", "Refresh vibes"),
284
- children: /* @__PURE__ */ u(Ne, { className: `size-4 ${V ? "animate-spin" : ""}` })
303
+ title: v("vibesPage.refreshTitle", "Refresh vibes"),
304
+ children: /* @__PURE__ */ u(Fe, { className: `size-4 ${B ? "animate-spin" : ""}` })
285
305
  }),
286
- /* @__PURE__ */ u(Be, {
306
+ /* @__PURE__ */ u(He, {
287
307
  permission: a.VIBE_CREATE,
288
308
  deniedBehavior: "disable",
289
- deniedTooltip: x("vibesPage.deniedCreateTooltip", "You don't have permission to create vibes"),
309
+ deniedTooltip: v("vibesPage.deniedCreateTooltip", "You don't have permission to create vibes"),
290
310
  children: /* @__PURE__ */ d("button", {
291
311
  type: "button",
292
- onClick: Y,
312
+ onClick: J,
293
313
  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 disabled:opacity-50 disabled:cursor-not-allowed",
294
- children: [/* @__PURE__ */ u(Me, { className: "size-4" }), x("vibesPage.addVibe", "Add Vibe")]
314
+ children: [/* @__PURE__ */ u(Pe, { className: "size-4" }), v("vibesPage.addVibe", "Add Vibe")]
295
315
  })
296
316
  })
297
317
  ]
@@ -301,57 +321,57 @@ function p() {
301
321
  className: "space-y-3",
302
322
  children: [/* @__PURE__ */ d("div", {
303
323
  className: "flex items-center gap-2",
304
- children: [/* @__PURE__ */ u(he, {
305
- value: C,
306
- onChange: Ye,
307
- placeholder: x("vibesPage.searchPlaceholder", "Search vibes..."),
324
+ children: [/* @__PURE__ */ u(ge, {
325
+ value: b,
326
+ onChange: tt,
327
+ placeholder: v("vibesPage.searchPlaceholder", "Search vibes..."),
308
328
  className: "flex-1 sm:w-64 sm:flex-none"
309
329
  }), /* @__PURE__ */ d("div", {
310
330
  className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
311
331
  children: [/* @__PURE__ */ u("button", {
312
332
  type: "button",
313
- onClick: () => $e("grid"),
314
- className: `p-1.5 sm:p-2 rounded ${D === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
315
- title: x("vibesPage.gridViewTitle", "Grid view"),
316
- children: /* @__PURE__ */ u(ke, { className: "size-4 text-text-secondary" })
333
+ onClick: () => T("grid"),
334
+ className: `p-1.5 sm:p-2 rounded ${w === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
335
+ title: v("vibesPage.gridViewTitle", "Grid view"),
336
+ children: /* @__PURE__ */ u(je, { className: "size-4 text-text-secondary" })
317
337
  }), /* @__PURE__ */ u("button", {
318
338
  type: "button",
319
- onClick: () => $e("list"),
320
- className: `p-1.5 sm:p-2 rounded ${D === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
321
- title: x("vibesPage.listViewTitle", "List view"),
322
- children: /* @__PURE__ */ u(Ae, { className: "size-4 text-text-secondary" })
339
+ onClick: () => T("list"),
340
+ className: `p-1.5 sm:p-2 rounded ${w === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
341
+ title: v("vibesPage.listViewTitle", "List view"),
342
+ children: /* @__PURE__ */ u(Me, { className: "size-4 text-text-secondary" })
323
343
  })]
324
344
  })]
325
345
  }), /* @__PURE__ */ d("div", {
326
346
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
327
- children: [/* @__PURE__ */ u(ge, {
328
- label: x("vibesPage.filterStatus", "Status"),
329
- value: w,
330
- options: Ke,
331
- onChange: Xe
347
+ children: [/* @__PURE__ */ u(_e, {
348
+ label: v("vibesPage.filterStatus", "Status"),
349
+ value: x,
350
+ options: Ze,
351
+ onChange: nt
332
352
  }), /* @__PURE__ */ u("div", {
333
- onMouseDown: U,
334
- onFocus: U,
335
- children: /* @__PURE__ */ u(ge, {
336
- label: x("vibesPage.filterAgent", "Agent"),
337
- value: E,
338
- options: Ct,
339
- onChange: Qe
353
+ onMouseDown: H,
354
+ onFocus: H,
355
+ children: /* @__PURE__ */ u(_e, {
356
+ label: v("vibesPage.filterAgent", "Agent"),
357
+ value: C,
358
+ options: jt,
359
+ onChange: it
340
360
  })
341
361
  })]
342
362
  })]
343
363
  }),
344
- C || w !== "all" || T !== "all" || E !== "all" ? /* @__PURE__ */ d("p", {
364
+ b || x !== "all" || S !== "all" || C !== "all" ? /* @__PURE__ */ d("p", {
345
365
  className: "text-sm text-text-secondary",
346
- children: [x("vibesPage.showingResults", "Showing {{filtered}} of {{total}} vibes", {
347
- filtered: G.length,
348
- total: W.length
349
- }), V && /* @__PURE__ */ u("span", {
366
+ children: [v("vibesPage.showingResults", "Showing {{filtered}} of {{total}} vibes", {
367
+ filtered: W.length,
368
+ total: U.length
369
+ }), B && /* @__PURE__ */ u("span", {
350
370
  className: "ml-2 text-text-muted",
351
- children: x("vibesPage.refreshing", "(refreshing...)")
371
+ children: v("vibesPage.refreshing", "(refreshing...)")
352
372
  })]
353
373
  }) : null,
354
- G.length > 0 && /* @__PURE__ */ u("div", {
374
+ W.length > 0 && /* @__PURE__ */ u("div", {
355
375
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
356
376
  children: /* @__PURE__ */ d("div", {
357
377
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
@@ -359,18 +379,18 @@ function p() {
359
379
  className: "flex flex-wrap items-center gap-3",
360
380
  children: [/* @__PURE__ */ d("div", {
361
381
  className: "flex items-center gap-2",
362
- children: [/* @__PURE__ */ u(ve, {
363
- checked: J,
364
- indeterminate: Tt,
365
- onChange: Pt,
382
+ children: [/* @__PURE__ */ u(ye, {
383
+ checked: q,
384
+ indeterminate: Nt,
385
+ onChange: Ut,
366
386
  ariaLabel: "Select all visible vibes"
367
387
  }), /* @__PURE__ */ u("span", {
368
388
  className: "text-sm font-medium text-text-primary",
369
389
  children: "Select all visible"
370
390
  })]
371
- }), L.size > 0 && /* @__PURE__ */ u("button", {
391
+ }), P.size > 0 && /* @__PURE__ */ u("button", {
372
392
  type: "button",
373
- onClick: Z,
393
+ onClick: X,
374
394
  className: "text-sm text-text-secondary hover:text-text-primary",
375
395
  children: "Clear selection"
376
396
  })]
@@ -379,34 +399,34 @@ function p() {
379
399
  children: [
380
400
  /* @__PURE__ */ d("span", {
381
401
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
382
- children: [L.size, " selected"]
402
+ children: [P.size, " selected"]
383
403
  }),
384
404
  /* @__PURE__ */ u("button", {
385
405
  type: "button",
386
- onClick: () => z("activate"),
387
- disabled: K.length === 0,
406
+ onClick: () => I("activate"),
407
+ disabled: G.length === 0,
388
408
  title: "Mark selected vibes as ACTIVE so they appear in the default vibe list and can run sessions/tunnels via their attached agent(s).",
389
409
  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",
390
410
  children: /* @__PURE__ */ d("span", {
391
411
  className: "inline-flex items-center gap-2",
392
412
  children: [
393
- /* @__PURE__ */ u(je, { className: "size-4" }),
413
+ /* @__PURE__ */ u(Ne, { className: "size-4" }),
394
414
  "Activate Selected",
395
- K.length > 0 ? ` (${K.length})` : ""
415
+ G.length > 0 ? ` (${G.length})` : ""
396
416
  ]
397
417
  })
398
418
  }),
399
419
  /* @__PURE__ */ u("button", {
400
420
  type: "button",
401
- onClick: () => z("archive"),
402
- disabled: q.length === 0,
421
+ onClick: () => I("archive"),
422
+ disabled: K.length === 0,
403
423
  className: "rounded-md border border-status-warning-border px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg disabled:cursor-not-allowed disabled:opacity-50",
404
424
  children: /* @__PURE__ */ d("span", {
405
425
  className: "inline-flex items-center gap-2",
406
426
  children: [
407
- /* @__PURE__ */ u(Oe, { className: "size-4" }),
427
+ /* @__PURE__ */ u(Ae, { className: "size-4" }),
408
428
  "Archive Selected",
409
- q.length > 0 ? ` (${q.length})` : ""
429
+ K.length > 0 ? ` (${K.length})` : ""
410
430
  ]
411
431
  })
412
432
  })
@@ -414,162 +434,164 @@ function p() {
414
434
  })]
415
435
  })
416
436
  }),
417
- zt ? /* @__PURE__ */ u(ye, {
437
+ Jt ? /* @__PURE__ */ u(be, {
418
438
  variant: "cards",
419
439
  count: 6
420
- }) : G.length > 0 ? /* @__PURE__ */ u(Le, {
440
+ }) : W.length > 0 ? /* @__PURE__ */ u(ze, {
421
441
  mode: "wait",
422
- children: D === "grid" ? /* @__PURE__ */ u(f, {
442
+ children: w === "grid" ? /* @__PURE__ */ u(f, {
423
443
  "data-tour": "vibes-page-grid-view",
424
444
  stagger: .04,
425
445
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
426
- children: G.map((e) => /* @__PURE__ */ u(He, { children: /* @__PURE__ */ u(Ce, {
446
+ children: W.map((e) => /* @__PURE__ */ u(We, { children: /* @__PURE__ */ u(we, {
427
447
  vibe: e,
428
- onOpen: Et,
429
- onActivate: Je ? Dt : void 0,
430
- onArchive: Je ? Ot : void 0,
431
- onOpenInEditor: jt,
432
- selected: L.has(e.id),
433
- onToggleSelect: (t) => Nt(e, t)
448
+ onOpen: Pt,
449
+ onActivate: $e ? Ft : void 0,
450
+ onArchive: $e ? It : void 0,
451
+ onDelete: et ? z : void 0,
452
+ onOpenInEditor: Bt,
453
+ selected: P.has(e.id),
454
+ onToggleSelect: (t) => Ht(e, t)
434
455
  }) }, e.id))
435
- }, "grid") : /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(we, {
436
- vibes: G,
437
- onOpen: Et,
438
- onActivate: Dt,
439
- onArchive: Ot,
440
- onOpenInEditor: jt,
441
- selectedVibeIds: L,
442
- onToggleSelect: Nt,
443
- onToggleAllVisible: Pt,
444
- allVisibleSelected: J,
445
- partiallySelected: Tt
456
+ }, "grid") : /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(Ee, {
457
+ vibes: W,
458
+ onOpen: Pt,
459
+ onActivate: Ft,
460
+ onArchive: It,
461
+ onDelete: et ? z : void 0,
462
+ onOpenInEditor: Bt,
463
+ selectedVibeIds: P,
464
+ onToggleSelect: Ht,
465
+ onToggleAllVisible: Ut,
466
+ allVisibleSelected: q,
467
+ partiallySelected: Nt
446
468
  }) }, "list")
447
- }) : /* @__PURE__ */ u(me, {
448
- icon: /* @__PURE__ */ u(Pe, { className: "size-8 text-text-secondary" }),
449
- title: C || w !== "all" || T !== "all" || E !== "all" ? x("vibesPage.emptyNoVibesFound", "No vibes found") : x("vibesPage.emptyNoVibesConfigured", "No vibes configured"),
450
- description: C || w !== "all" || T !== "all" || E !== "all" ? x("vibesPage.emptyAdjustSearch", "Try adjusting your search or filters") : x("vibesPage.emptyNoVibesDescription", "Add your first vibe to start managing your development projects"),
451
- action: !C && w === "all" && T === "all" && E === "all" ? /* @__PURE__ */ d("div", {
469
+ }) : /* @__PURE__ */ u(he, {
470
+ icon: /* @__PURE__ */ u(Ie, { className: "size-8 text-text-secondary" }),
471
+ title: b || x !== "all" || S !== "all" || C !== "all" ? v("vibesPage.emptyNoVibesFound", "No vibes found") : v("vibesPage.emptyNoVibesConfigured", "No vibes configured"),
472
+ description: b || x !== "all" || S !== "all" || C !== "all" ? v("vibesPage.emptyAdjustSearch", "Try adjusting your search or filters") : v("vibesPage.emptyNoVibesDescription", "Add your first vibe to start managing your development projects"),
473
+ action: !b && x === "all" && S === "all" && C === "all" ? /* @__PURE__ */ d("div", {
452
474
  className: "flex items-center gap-2",
453
- children: [/* @__PURE__ */ u(Ve, {
475
+ children: [/* @__PURE__ */ u(Ue, {
454
476
  permission: a.VIBE_CREATE,
455
477
  children: /* @__PURE__ */ d("button", {
456
478
  type: "button",
457
- onClick: Y,
479
+ onClick: J,
458
480
  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",
459
- children: [/* @__PURE__ */ u(Me, { className: "size-4" }), x("vibesPage.addVibe", "Add Vibe")]
481
+ children: [/* @__PURE__ */ u(Pe, { className: "size-4" }), v("vibesPage.addVibe", "Add Vibe")]
460
482
  })
461
- }), /* @__PURE__ */ u(_e, { prompt: "What is a Vibe in VibeControls and how do I create one?" })]
483
+ }), /* @__PURE__ */ u(ve, { prompt: "What is a Vibe in VibeControls and how do I create one?" })]
462
484
  }) : void 0
463
485
  }),
464
- rt && /* @__PURE__ */ u("div", {
486
+ ct && /* @__PURE__ */ u("div", {
465
487
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
466
- children: rt
488
+ children: ct
467
489
  }),
468
- /* @__PURE__ */ u(te, {
469
- isOpen: at === "activate",
470
- onClose: () => z(null),
471
- onConfirm: Ft,
490
+ /* @__PURE__ */ u(ne, {
491
+ isOpen: dt === "activate",
492
+ onClose: () => I(null),
493
+ onConfirm: Wt,
472
494
  title: "Activate selected vibes",
473
- message: `Activate ${K.length} selected vibe${K.length === 1 ? "" : "s"}?`,
495
+ message: `Activate ${G.length} selected vibe${G.length === 1 ? "" : "s"}?`,
474
496
  confirmLabel: "Activate",
475
497
  variant: "default"
476
498
  }),
477
- /* @__PURE__ */ u(te, {
478
- isOpen: at === "archive",
479
- onClose: () => z(null),
480
- onConfirm: It,
499
+ /* @__PURE__ */ u(ne, {
500
+ isOpen: dt === "archive",
501
+ onClose: () => I(null),
502
+ onConfirm: Gt,
481
503
  title: "Archive selected vibes",
482
- message: `Archive ${q.length} selected vibe${q.length === 1 ? "" : "s"}? Archived vibes will be hidden from active workflows.`,
504
+ message: `Archive ${K.length} selected vibe${K.length === 1 ? "" : "s"}? Archived vibes will be hidden from active workflows.`,
483
505
  confirmLabel: "Archive",
484
506
  variant: "warning"
485
507
  }),
486
- F && /* @__PURE__ */ d("div", {
508
+ ut && /* @__PURE__ */ d("div", {
487
509
  role: "alert",
488
510
  className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-error-bg text-status-error-text rounded-md shadow-lg text-sm",
489
- children: [F, /* @__PURE__ */ u("button", {
511
+ children: [ut, /* @__PURE__ */ u("button", {
490
512
  type: "button",
491
- onClick: ot,
513
+ onClick: ft,
492
514
  className: "ml-3 text-xs underline opacity-80 hover:opacity-100",
493
- children: x("vibesPage.dismiss", "Dismiss")
515
+ children: v("vibesPage.dismiss", "Dismiss")
494
516
  })]
495
517
  }),
496
- et && /* @__PURE__ */ u("div", {
518
+ at && /* @__PURE__ */ u("div", {
497
519
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
498
520
  children: /* @__PURE__ */ d("div", {
499
521
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-lg",
500
522
  children: [
501
523
  /* @__PURE__ */ u("h2", {
502
524
  className: "text-lg font-semibold text-text-primary mb-4",
503
- children: x("vibesPage.addNewVibe", "Add New Vibe")
525
+ children: v("vibesPage.addNewVibe", "Add New Vibe")
504
526
  }),
505
527
  /* @__PURE__ */ d("div", {
506
528
  className: "space-y-4",
507
529
  children: [
508
- tt && /* @__PURE__ */ u("div", {
530
+ ot && /* @__PURE__ */ u("div", {
509
531
  className: "p-3 bg-status-error-bg text-status-error-text text-sm rounded-md",
510
- children: tt
532
+ children: ot
511
533
  }),
512
534
  /* @__PURE__ */ d("div", { children: [
513
535
  /* @__PURE__ */ u("label", {
514
536
  className: "block text-sm font-medium text-text-primary mb-1",
515
- children: x("vibesPage.nameLabel", "Name *")
537
+ children: v("vibesPage.nameLabel", "Name *")
516
538
  }),
517
539
  /* @__PURE__ */ u("input", {
518
540
  "aria-label": "control",
519
- ref: st,
541
+ ref: pt,
520
542
  type: "text",
521
- placeholder: x("vibesPage.namePlaceholder", "My Project"),
522
- onChange: () => N.name && P((e) => ({
543
+ placeholder: v("vibesPage.namePlaceholder", "My Project"),
544
+ onChange: () => j.name && M((e) => ({
523
545
  ...e,
524
546
  name: void 0
525
547
  })),
526
- className: `w-full px-3 py-2 bg-bg-sunken border rounded-md text-text-primary placeholder:text-text-placeholder ${N.name ? "border-status-error-border" : "border-border-default"}`
548
+ className: `w-full px-3 py-2 bg-bg-sunken border rounded-md text-text-primary placeholder:text-text-placeholder ${j.name ? "border-status-error-border" : "border-border-default"}`
527
549
  }),
528
- N.name && /* @__PURE__ */ u("p", {
550
+ j.name && /* @__PURE__ */ u("p", {
529
551
  className: "mt-1 text-xs text-status-error-text",
530
- children: N.name
552
+ children: j.name
531
553
  })
532
554
  ] }),
533
555
  /* @__PURE__ */ d("div", { children: [
534
556
  /* @__PURE__ */ d("label", {
535
557
  className: "block text-sm font-medium text-text-primary mb-1",
536
- children: [x("vibesPage.pathLabel", "Path"), /* @__PURE__ */ u("span", {
558
+ children: [v("vibesPage.pathLabel", "Path"), /* @__PURE__ */ u("span", {
537
559
  className: "ml-1 text-xs text-text-tertiary font-normal",
538
- children: x("vibesPage.pathOptional", "(optional)")
560
+ children: v("vibesPage.pathOptional", "(optional)")
539
561
  })]
540
562
  }),
541
563
  /* @__PURE__ */ u("input", {
542
564
  "aria-label": "control",
543
- ref: ct,
565
+ ref: mt,
544
566
  type: "text",
545
- placeholder: x("vibesPage.pathPlaceholder", "/path/to/project"),
546
- onChange: () => N.path && P((e) => ({
567
+ placeholder: v("vibesPage.pathPlaceholder", "/path/to/project"),
568
+ onChange: () => j.path && M((e) => ({
547
569
  ...e,
548
570
  path: void 0
549
571
  })),
550
- className: `w-full px-3 py-2 bg-bg-sunken border rounded-md text-text-primary placeholder:text-text-placeholder ${N.path ? "border-status-error-border" : "border-border-default"}`
572
+ className: `w-full px-3 py-2 bg-bg-sunken border rounded-md text-text-primary placeholder:text-text-placeholder ${j.path ? "border-status-error-border" : "border-border-default"}`
551
573
  }),
552
- N.path && /* @__PURE__ */ u("p", {
574
+ j.path && /* @__PURE__ */ u("p", {
553
575
  className: "mt-1 text-xs text-status-error-text",
554
- children: N.path
576
+ children: j.path
555
577
  })
556
578
  ] }),
557
579
  /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
558
580
  className: "block text-sm font-medium text-text-primary mb-1",
559
- children: x("vibesPage.agentLabel", "Agent")
581
+ children: v("vibesPage.agentLabel", "Agent")
560
582
  }), /* @__PURE__ */ d("select", {
561
- ref: lt,
583
+ ref: ht,
562
584
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary",
563
585
  children: [/* @__PURE__ */ u("option", {
564
586
  value: "",
565
- children: x("vibesPage.selectAgent", "Select an agent")
566
- }), Ct.filter((e) => e.value !== "all").map((e) => /* @__PURE__ */ u("option", {
587
+ children: v("vibesPage.selectAgent", "Select an agent")
588
+ }), jt.filter((e) => e.value !== "all").map((e) => /* @__PURE__ */ u("option", {
567
589
  value: e.value,
568
590
  children: e.label
569
591
  }, e.value))]
570
592
  })] }),
571
593
  /* @__PURE__ */ u("input", {
572
- ref: ut,
594
+ ref: gt,
573
595
  type: "hidden",
574
596
  value: "PROJECT"
575
597
  })
@@ -579,41 +601,50 @@ function p() {
579
601
  className: "mt-4 border-t border-border-default pt-4",
580
602
  children: [/* @__PURE__ */ u("h3", {
581
603
  className: "text-sm font-medium text-text-secondary mb-2",
582
- children: x("vibesPage.tags", "Tags")
583
- }), /* @__PURE__ */ u(fe, {
604
+ children: v("vibesPage.tags", "Tags")
605
+ }), /* @__PURE__ */ u(pe, {
584
606
  entityType: "VIBECONTROLS_VIBE",
585
- onDraftChange: pt
607
+ onDraftChange: yt
586
608
  })]
587
609
  }),
588
610
  /* @__PURE__ */ d("div", {
589
611
  className: "flex flex-col sm:flex-row justify-end gap-3 mt-6",
590
612
  children: [/* @__PURE__ */ u("button", {
591
613
  type: "button",
592
- onClick: () => O(!1),
593
- disabled: A,
614
+ onClick: () => E(!1),
615
+ disabled: O,
594
616
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
595
- children: x("vibesPage.cancel", "Cancel")
617
+ children: v("vibesPage.cancel", "Cancel")
596
618
  }), /* @__PURE__ */ u("button", {
597
619
  type: "button",
598
- onClick: Lt,
599
- disabled: A,
620
+ onClick: Kt,
621
+ disabled: O,
600
622
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
601
- children: A ? x("vibesPage.creating", "Creating...") : x("vibesPage.createVibe", "Create Vibe")
623
+ children: O ? v("vibesPage.creating", "Creating...") : v("vibesPage.createVibe", "Create Vibe")
602
624
  })]
603
625
  })
604
626
  ]
605
627
  })
606
628
  }),
607
- /* @__PURE__ */ u(ne, {
608
- isOpen: it,
609
- onClose: () => M(!1),
629
+ /* @__PURE__ */ u(re, {
630
+ isOpen: lt,
631
+ onClose: () => A(!1),
610
632
  onConfirm: () => {
611
- M(!1), h("/billing/plans");
633
+ A(!1), Ke("/billing/plans");
612
634
  },
613
635
  title: "Vibe Quota Reached",
614
636
  message: "You've used all available vibe creation quota on your current plan. Upgrade your plan to create more vibes."
615
637
  })
616
- ] })
638
+ ] }),
639
+ R && /* @__PURE__ */ u(Te, {
640
+ vibe: {
641
+ id: R.id,
642
+ name: R.name
643
+ },
644
+ deleting: wt,
645
+ onConfirm: Lt,
646
+ onCancel: () => z(null)
647
+ })
617
648
  ]
618
649
  });
619
650
  }