@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.
- package/dist/components/actions/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +17 -16
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPreviewPanel.js +25 -24
- package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +110 -94
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/scorecard/ScorecardPanel.js +271 -257
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +603 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +37 -12
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +11 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +264 -250
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +124 -113
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +139 -126
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +78 -67
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- 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 {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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
|
|
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
|
-
],
|
|
41
|
+
], C = {
|
|
40
42
|
name: "",
|
|
41
43
|
type: "custom",
|
|
42
44
|
content: "",
|
|
43
45
|
tags: []
|
|
44
46
|
};
|
|
45
|
-
function
|
|
46
|
-
let
|
|
47
|
-
|
|
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
|
-
|
|
52
|
+
j !== "all" && (e.type = j), te(await l(w, e));
|
|
51
53
|
} catch (e) {
|
|
52
|
-
|
|
54
|
+
A(e instanceof Error ? e.message : "Failed to load contexts");
|
|
53
55
|
} finally {
|
|
54
|
-
|
|
56
|
+
O(!1);
|
|
55
57
|
}
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
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
|
-
}),
|
|
69
|
-
},
|
|
70
|
-
|
|
70
|
+
}), B(""), P(!0);
|
|
71
|
+
}, ie = async () => {
|
|
72
|
+
H(!0);
|
|
71
73
|
try {
|
|
72
|
-
|
|
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
|
-
|
|
78
|
+
H(!1);
|
|
77
79
|
}
|
|
78
|
-
},
|
|
79
|
-
if (
|
|
80
|
-
|
|
80
|
+
}, ae = async () => {
|
|
81
|
+
if (U.length !== 0) {
|
|
82
|
+
K(!0);
|
|
81
83
|
try {
|
|
82
|
-
await Promise.allSettled(
|
|
84
|
+
await Promise.allSettled(U.map((e) => c(w, e))), J((e) => {
|
|
83
85
|
let t = new Set(e);
|
|
84
|
-
return
|
|
85
|
-
}),
|
|
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
|
-
|
|
91
|
+
K(!1);
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
}, $ = () => {
|
|
93
|
-
let e =
|
|
94
|
-
e && !
|
|
95
|
+
let e = z.trim();
|
|
96
|
+
e && !L.tags.includes(e) && R((t) => ({
|
|
95
97
|
...t,
|
|
96
98
|
tags: [...t.tags, e]
|
|
97
|
-
})),
|
|
98
|
-
},
|
|
99
|
-
|
|
99
|
+
})), B("");
|
|
100
|
+
}, oe = (e) => {
|
|
101
|
+
R((t) => ({
|
|
100
102
|
...t,
|
|
101
103
|
tags: t.tags.filter((t) => t !== e)
|
|
102
104
|
}));
|
|
103
|
-
},
|
|
104
|
-
|
|
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
|
|
110
|
-
title:
|
|
111
|
-
message:
|
|
112
|
-
onRetry:
|
|
113
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
120
|
-
value:
|
|
121
|
-
onChange: (e) =>
|
|
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:
|
|
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__ */
|
|
129
|
-
/* @__PURE__ */
|
|
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__ */
|
|
135
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), T("vibecontrols.ai.contexts.newContext", "New Context")]
|
|
134
136
|
})
|
|
135
137
|
]
|
|
136
138
|
}),
|
|
137
|
-
|
|
139
|
+
E.length > 0 && /* @__PURE__ */ b("div", {
|
|
138
140
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
139
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
143
|
+
children: [/* @__PURE__ */ x("div", {
|
|
142
144
|
className: "flex flex-wrap items-center gap-3",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ x("div", {
|
|
144
146
|
className: "flex items-center gap-2",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
146
|
-
checked:
|
|
147
|
-
indeterminate:
|
|
147
|
+
children: [/* @__PURE__ */ b(o, {
|
|
148
|
+
checked: Z,
|
|
149
|
+
indeterminate: ne,
|
|
148
150
|
onChange: (e) => {
|
|
149
|
-
|
|
151
|
+
J((t) => {
|
|
150
152
|
let n = new Set(t);
|
|
151
|
-
return
|
|
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__ */
|
|
159
|
+
}), /* @__PURE__ */ b("span", {
|
|
158
160
|
className: "text-sm font-medium text-text-primary",
|
|
159
|
-
children:
|
|
161
|
+
children: T("vibecontrols.ai.contexts.selectAllVisible", "Select all visible")
|
|
160
162
|
})]
|
|
161
|
-
}),
|
|
163
|
+
}), q.size > 0 && /* @__PURE__ */ b("button", {
|
|
162
164
|
type: "button",
|
|
163
|
-
onClick: () =>
|
|
165
|
+
onClick: () => J(/* @__PURE__ */ new Set()),
|
|
164
166
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
165
|
-
children:
|
|
167
|
+
children: T("vibecontrols.ai.contexts.clearSelection", "Clear selection")
|
|
166
168
|
})]
|
|
167
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ x("div", {
|
|
168
170
|
className: "flex flex-wrap items-center gap-2",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
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
|
-
|
|
174
|
+
q.size,
|
|
173
175
|
" ",
|
|
174
|
-
|
|
176
|
+
T("vibecontrols.ai.contexts.selected", "selected")
|
|
175
177
|
]
|
|
176
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ x("button", {
|
|
177
179
|
type: "button",
|
|
178
|
-
onClick: () =>
|
|
179
|
-
disabled:
|
|
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: [
|
|
183
|
+
children: [T("vibecontrols.ai.contexts.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
|
|
182
184
|
})]
|
|
183
185
|
})]
|
|
184
186
|
})
|
|
185
187
|
}),
|
|
186
|
-
|
|
187
|
-
icon: /* @__PURE__ */
|
|
188
|
-
title:
|
|
189
|
-
description:
|
|
190
|
-
action: /* @__PURE__ */
|
|
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__ */
|
|
196
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), T("vibecontrols.ai.contexts.newContext", "New Context")]
|
|
195
197
|
})
|
|
196
|
-
}) : /* @__PURE__ */
|
|
198
|
+
}) : /* @__PURE__ */ b("div", {
|
|
197
199
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
198
|
-
children:
|
|
199
|
-
className: `p-4 ${
|
|
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__ */
|
|
203
|
+
/* @__PURE__ */ x("div", {
|
|
202
204
|
className: "flex items-start justify-between gap-2",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ x("div", {
|
|
204
206
|
className: "flex items-start gap-3 min-w-0 flex-1",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ b("div", {
|
|
206
208
|
onClick: (e) => e.stopPropagation(),
|
|
207
|
-
children: /* @__PURE__ */
|
|
208
|
-
checked:
|
|
209
|
-
onChange: (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__ */
|
|
214
|
+
}), /* @__PURE__ */ b("div", {
|
|
213
215
|
className: "min-w-0 flex-1",
|
|
214
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ x("div", {
|
|
215
217
|
className: "flex items-center gap-2",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ b("h4", {
|
|
217
219
|
className: "font-semibold text-text-primary truncate",
|
|
218
220
|
children: e.name
|
|
219
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
227
|
+
}), /* @__PURE__ */ x("div", {
|
|
226
228
|
className: "flex items-center gap-1 flex-shrink-0",
|
|
227
|
-
children: [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
-
|
|
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(),
|
|
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: () =>
|
|
264
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
281
|
+
/* @__PURE__ */ x("div", {
|
|
269
282
|
className: "flex items-center justify-between mb-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
271
284
|
className: "text-lg font-semibold text-text-primary",
|
|
272
|
-
children:
|
|
273
|
-
}), /* @__PURE__ */
|
|
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: () =>
|
|
288
|
+
onClick: () => P(!1),
|
|
276
289
|
className: "p-1 hover:bg-bg-sunken rounded-md",
|
|
277
|
-
children: /* @__PURE__ */ y
|
|
290
|
+
children: /* @__PURE__ */ b(y, { className: "size-4 text-text-secondary" })
|
|
278
291
|
})]
|
|
279
292
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ x("div", {
|
|
281
294
|
className: "space-y-4",
|
|
282
295
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
284
297
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
285
|
-
children:
|
|
286
|
-
}), /* @__PURE__ */
|
|
298
|
+
children: T("vibecontrols.ai.contexts.name", "Name")
|
|
299
|
+
}), /* @__PURE__ */ b("input", {
|
|
287
300
|
"aria-label": "control",
|
|
288
301
|
type: "text",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
291
|
-
...
|
|
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:
|
|
308
|
+
placeholder: T("vibecontrols.ai.contexts.namePlaceholder", "Context name")
|
|
296
309
|
})] }),
|
|
297
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
298
311
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
299
|
-
children:
|
|
300
|
-
}), /* @__PURE__ */
|
|
301
|
-
value:
|
|
302
|
-
onChange: (e) =>
|
|
303
|
-
...
|
|
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:
|
|
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__ */
|
|
325
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
313
326
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
314
|
-
children:
|
|
315
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: T("vibecontrols.ai.contexts.content", "Content")
|
|
328
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
316
329
|
"aria-label": "control",
|
|
317
|
-
value:
|
|
318
|
-
onChange: (e) =>
|
|
319
|
-
...
|
|
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:
|
|
337
|
+
placeholder: T("vibecontrols.ai.contexts.contentPlaceholder", "Context content...")
|
|
325
338
|
})] }),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ x("div", { children: [
|
|
340
|
+
/* @__PURE__ */ b("label", {
|
|
328
341
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
329
|
-
children:
|
|
342
|
+
children: T("vibecontrols.ai.contexts.tags", "Tags")
|
|
330
343
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ b("div", {
|
|
332
345
|
className: "flex flex-wrap gap-1 mb-2",
|
|
333
|
-
children:
|
|
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__ */
|
|
348
|
+
children: [e, /* @__PURE__ */ b("button", {
|
|
336
349
|
type: "button",
|
|
337
|
-
onClick: () =>
|
|
338
|
-
children: /* @__PURE__ */ y
|
|
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__ */
|
|
355
|
+
/* @__PURE__ */ x("div", {
|
|
343
356
|
className: "flex gap-2",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ b("input", {
|
|
345
358
|
"aria-label": "control",
|
|
346
359
|
type: "text",
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
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:
|
|
354
|
-
}), /* @__PURE__ */
|
|
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:
|
|
371
|
+
children: T("vibecontrols.ai.contexts.add", "Add")
|
|
359
372
|
})]
|
|
360
373
|
})
|
|
361
374
|
] })
|
|
362
375
|
]
|
|
363
376
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ x("div", {
|
|
365
378
|
className: "flex justify-end gap-2 mt-6",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ b("button", {
|
|
367
380
|
type: "button",
|
|
368
|
-
onClick: () =>
|
|
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:
|
|
371
|
-
}), /* @__PURE__ */
|
|
383
|
+
children: T("vibecontrols.ai.contexts.cancel", "Cancel")
|
|
384
|
+
}), /* @__PURE__ */ b("button", {
|
|
372
385
|
type: "button",
|
|
373
|
-
onClick:
|
|
374
|
-
disabled:
|
|
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:
|
|
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__ */
|
|
383
|
-
isOpen:
|
|
384
|
-
title:
|
|
385
|
-
message:
|
|
386
|
-
confirmLabel:
|
|
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:
|
|
389
|
-
onClose: () =>
|
|
401
|
+
onConfirm: ae,
|
|
402
|
+
onClose: () => W([])
|
|
390
403
|
})
|
|
391
404
|
]
|
|
392
405
|
});
|
|
393
406
|
}
|
|
394
407
|
//#endregion
|
|
395
|
-
export {
|
|
408
|
+
export { w as AIContextsTab };
|
|
396
409
|
|
|
397
410
|
//# sourceMappingURL=AIContextsTab.js.map
|