@burdenoff/microfe-vibecontrols 2026.527.3 → 2026.527.4
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/vibe/VibeLlmContextTabPanel.js +315 -210
- package/dist/components/vibe/VibeLlmContextTabPanel.js.map +1 -1
- package/dist/generated/wspace-operations.js +233 -202
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.js +10 -10
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { VIBE_PERMISSIONS as e } from "../../constants/permissions.js";
|
|
2
2
|
import { VibeLlmContextAdminPanel as t } from "./VibeLlmContextAdminPanel.js";
|
|
3
3
|
import { Fragment as n, useEffect as r, useState as i } from "react";
|
|
4
|
-
import { AlertTriangle as a, Bot as o, Check as s, Clock as
|
|
4
|
+
import { AlertTriangle as a, Bot as o, Check as s, Clock as ee, Copy as te, Eye as ne, EyeOff as re, Info as c, Lock as ie, RefreshCw as ae, RotateCw as l, Trash2 as u, X as d } from "lucide-react";
|
|
5
5
|
import { gql as f } from "@apollo/client";
|
|
6
|
-
import { useMutation as p, useQuery as m } from "@apollo/client/react";
|
|
7
|
-
import { usePermissions as
|
|
8
|
-
import { Fragment as
|
|
6
|
+
import { useLazyQuery as oe, useMutation as p, useQuery as m } from "@apollo/client/react";
|
|
7
|
+
import { usePermissions as se } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
8
|
+
import { Fragment as ce, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/vibe/VibeLlmContextTabPanel.tsx
|
|
10
|
-
var
|
|
10
|
+
var _ = [
|
|
11
11
|
"core",
|
|
12
12
|
"agents",
|
|
13
13
|
"sessions",
|
|
@@ -17,7 +17,7 @@ var y = [
|
|
|
17
17
|
"config",
|
|
18
18
|
"security",
|
|
19
19
|
"plugins"
|
|
20
|
-
],
|
|
20
|
+
], le = f`
|
|
21
21
|
query MyVibeLlmContextSettings($vibeId: ID!) {
|
|
22
22
|
myVibeLlmContextSettings(vibeId: $vibeId) {
|
|
23
23
|
vibeId
|
|
@@ -33,7 +33,7 @@ var y = [
|
|
|
33
33
|
updatedAt
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`, ue = f`
|
|
37
37
|
query MyVibeLlmContextTokens($vibeId: ID!) {
|
|
38
38
|
myVibeLlmContextTokens(vibeId: $vibeId) {
|
|
39
39
|
id
|
|
@@ -52,7 +52,7 @@ var y = [
|
|
|
52
52
|
revokedReason
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
55
|
+
`, de = f`
|
|
56
56
|
mutation SetMyVibeLlmContextSettings($vibeId: ID!, $input: VibeLlmContextSettingsInput!) {
|
|
57
57
|
setMyVibeLlmContextSettings(vibeId: $vibeId, input: $input) {
|
|
58
58
|
vibeId
|
|
@@ -68,7 +68,7 @@ var y = [
|
|
|
68
68
|
updatedAt
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`,
|
|
71
|
+
`, v = f`
|
|
72
72
|
mutation GenerateVibeLlmContextUrl($vibeId: ID!, $input: VibeLlmContextMintInput) {
|
|
73
73
|
generateVibeLlmContextUrl(vibeId: $vibeId, input: $input) {
|
|
74
74
|
tokenId
|
|
@@ -82,7 +82,16 @@ var y = [
|
|
|
82
82
|
tokenFingerprint
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`, fe = f`
|
|
86
|
+
query MyVibeLlmContextPreview($vibeId: ID!, $input: VibeLlmContextMintInput) {
|
|
87
|
+
myVibeLlmContextPreview(vibeId: $vibeId, input: $input) {
|
|
88
|
+
json
|
|
89
|
+
markdown
|
|
90
|
+
includes
|
|
91
|
+
includeCredentials
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`, pe = f`
|
|
86
95
|
mutation RevokeVibeLlmContextToken($tokenId: ID!) {
|
|
87
96
|
revokeVibeLlmContextToken(tokenId: $tokenId) {
|
|
88
97
|
id
|
|
@@ -90,7 +99,7 @@ var y = [
|
|
|
90
99
|
revokedAt
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
|
-
`,
|
|
102
|
+
`, me = f`
|
|
94
103
|
mutation RotateVibeLlmContextUrl($tokenId: ID!, $input: VibeLlmContextMintInput) {
|
|
95
104
|
rotateVibeLlmContextUrl(tokenId: $tokenId, input: $input) {
|
|
96
105
|
tokenId
|
|
@@ -104,11 +113,11 @@ var y = [
|
|
|
104
113
|
tokenFingerprint
|
|
105
114
|
}
|
|
106
115
|
}
|
|
107
|
-
`,
|
|
116
|
+
`, he = f`
|
|
108
117
|
mutation RevokeAllMyVibeLlmContextTokens($vibeId: ID!) {
|
|
109
118
|
revokeAllMyVibeLlmContextTokens(vibeId: $vibeId)
|
|
110
119
|
}
|
|
111
|
-
`,
|
|
120
|
+
`, y = f`
|
|
112
121
|
query MyVibeLlmContextTokenAudits($tokenId: ID!, $limit: Int) {
|
|
113
122
|
myVibeLlmContextTokenAudits(tokenId: $tokenId, limit: $limit) {
|
|
114
123
|
id
|
|
@@ -121,7 +130,7 @@ var y = [
|
|
|
121
130
|
status
|
|
122
131
|
}
|
|
123
132
|
}
|
|
124
|
-
`,
|
|
133
|
+
`, b = [
|
|
125
134
|
{
|
|
126
135
|
label: "1 hour",
|
|
127
136
|
hours: 1
|
|
@@ -139,7 +148,7 @@ var y = [
|
|
|
139
148
|
hours: 168
|
|
140
149
|
}
|
|
141
150
|
];
|
|
142
|
-
async function
|
|
151
|
+
async function ge(e) {
|
|
143
152
|
try {
|
|
144
153
|
await navigator.clipboard.writeText(e);
|
|
145
154
|
} catch {
|
|
@@ -147,500 +156,596 @@ async function se(e) {
|
|
|
147
156
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
|
|
148
157
|
}
|
|
149
158
|
}
|
|
150
|
-
function
|
|
159
|
+
function x(e) {
|
|
151
160
|
let t = new Date(e).getTime() - Date.now();
|
|
152
161
|
if (t < 0) return "expired";
|
|
153
162
|
let n = Math.floor(t / (1e3 * 60 * 60)), r = Math.floor(t % (1e3 * 60 * 60) / (1e3 * 60));
|
|
154
163
|
return n > 24 ? `${Math.floor(n / 24)}d` : n > 0 ? `${n}h ${r}m` : `${r}m`;
|
|
155
164
|
}
|
|
156
|
-
function
|
|
157
|
-
let { hasPermission:
|
|
165
|
+
function S({ vibeId: f, attachedAgents: y = [] }) {
|
|
166
|
+
let { hasPermission: S } = se(), ve = S(e.VIBE_MANAGE), ye = m(le, {
|
|
158
167
|
variables: { vibeId: f },
|
|
159
168
|
fetchPolicy: "cache-and-network"
|
|
160
|
-
}),
|
|
169
|
+
}), C = m(ue, {
|
|
161
170
|
variables: { vibeId: f },
|
|
162
171
|
fetchPolicy: "cache-and-network"
|
|
163
|
-
}), [
|
|
172
|
+
}), [be, w] = p(de, { refetchQueries: ["MyVibeLlmContextSettings"] }), [xe, T] = p(v, { refetchQueries: ["MyVibeLlmContextTokens"] }), [E] = p(pe, { refetchQueries: ["MyVibeLlmContextTokens"] }), [D] = p(me, { refetchQueries: ["MyVibeLlmContextTokens"] }), [O] = p(he, { refetchQueries: ["MyVibeLlmContextTokens"] }), k = ye.data?.myVibeLlmContextSettings, A = C.data?.myVibeLlmContextTokens ?? [], [j, M] = i(1), [N, P] = i(!1), [F, I] = i(new Set(_)), [L, R] = i(""), [z, B] = i(""), [V, H] = i(""), [U, W] = i(null), [Se, G] = i(!1), [K, q] = i(!1), [J, Ce] = i(null), [Y, X] = i(!1), [Z, Q] = i("json"), [we, $] = oe(fe, { fetchPolicy: "network-only" }), Te = () => {
|
|
173
|
+
X(!0), we({ variables: {
|
|
174
|
+
vibeId: f,
|
|
175
|
+
input: {
|
|
176
|
+
ttlSeconds: Math.max(60, Math.min(10080 * 60, j * 60 * 60)),
|
|
177
|
+
includeCredentials: N,
|
|
178
|
+
includes: [...F],
|
|
179
|
+
defaultAgentIdOverride: z || null
|
|
180
|
+
}
|
|
181
|
+
} });
|
|
182
|
+
};
|
|
164
183
|
r(() => {
|
|
165
|
-
|
|
166
|
-
}, [
|
|
167
|
-
let
|
|
168
|
-
|
|
184
|
+
k && (M(Math.max(1, Math.round((k.ttlSeconds ?? 3600) / 3600))), P(k.includeCredentials), I(new Set(k.includes ?? _)), R(k.customContextText ?? ""), B(k.defaultAgentIdOverride ?? ""));
|
|
185
|
+
}, [k]);
|
|
186
|
+
let Ee = (e) => {
|
|
187
|
+
I((t) => {
|
|
169
188
|
let n = new Set(t);
|
|
170
189
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
171
190
|
});
|
|
172
191
|
};
|
|
173
|
-
return
|
|
192
|
+
return r(() => {
|
|
193
|
+
if (!Y) return;
|
|
194
|
+
let e = (e) => {
|
|
195
|
+
e.key === "Escape" && X(!1);
|
|
196
|
+
};
|
|
197
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
198
|
+
}, [Y]), /* @__PURE__ */ g("div", {
|
|
174
199
|
className: "space-y-6 max-w-5xl",
|
|
175
200
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ h("div", {
|
|
177
202
|
className: "rounded-lg border border-status-warning-border bg-status-warning-bg/30 p-4",
|
|
178
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ g("div", {
|
|
179
204
|
className: "flex items-start gap-3",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ h(ie, { className: "w-5 h-5 text-status-warning-text mt-0.5" }), /* @__PURE__ */ g("div", {
|
|
181
206
|
className: "text-sm text-text-primary",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ h("p", {
|
|
183
208
|
className: "font-medium mb-1",
|
|
184
209
|
children: "LLM Context — share this vibe with any LLM via a signed URL"
|
|
185
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ h("p", {
|
|
186
211
|
className: "text-text-secondary",
|
|
187
212
|
children: "Anyone with the URL can read the snapshot until it expires. When \"Include credentials\" is on, the snapshot exposes agent tunnel URLs + API keys. Default is redacted. Rotate or revoke any URL from the list below at any time."
|
|
188
213
|
})]
|
|
189
214
|
})]
|
|
190
215
|
})
|
|
191
216
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ g("section", {
|
|
193
218
|
className: "bg-bg-surface border border-border-default rounded-lg p-5 space-y-4",
|
|
194
219
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ g("header", {
|
|
196
221
|
className: "flex items-center justify-between",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
198
223
|
className: "text-base font-semibold text-text-primary",
|
|
199
224
|
children: "Saved settings"
|
|
200
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ h("p", {
|
|
201
226
|
className: "text-sm text-text-secondary",
|
|
202
227
|
children: "Defaults used when you generate a URL. Snapshotted into each minted token, so future edits don't change already-minted URLs."
|
|
203
|
-
})] }), /* @__PURE__ */
|
|
228
|
+
})] }), /* @__PURE__ */ g("button", {
|
|
204
229
|
type: "button",
|
|
205
230
|
onClick: async () => {
|
|
206
|
-
await
|
|
231
|
+
await be({ variables: {
|
|
207
232
|
vibeId: f,
|
|
208
233
|
input: {
|
|
209
|
-
ttlSeconds: Math.max(60, Math.min(10080 * 60,
|
|
210
|
-
includeCredentials:
|
|
211
|
-
includes: Array.from(
|
|
212
|
-
customContextText:
|
|
213
|
-
defaultAgentIdOverride:
|
|
234
|
+
ttlSeconds: Math.max(60, Math.min(10080 * 60, j * 60 * 60)),
|
|
235
|
+
includeCredentials: N,
|
|
236
|
+
includes: Array.from(F),
|
|
237
|
+
customContextText: L,
|
|
238
|
+
defaultAgentIdOverride: z || null
|
|
214
239
|
}
|
|
215
|
-
} }),
|
|
240
|
+
} }), q(!0), setTimeout(() => q(!1), 2e3);
|
|
216
241
|
},
|
|
217
|
-
disabled:
|
|
242
|
+
disabled: w.loading,
|
|
218
243
|
className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
219
|
-
children: [
|
|
244
|
+
children: [K && !w.loading && /* @__PURE__ */ h(s, { className: "w-4 h-4" }), w.loading ? "Saving…" : K ? "Saved" : "Save settings"]
|
|
220
245
|
})]
|
|
221
246
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
223
248
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
224
249
|
children: "URL expiry"
|
|
225
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ g("div", {
|
|
226
251
|
className: "flex flex-wrap items-center gap-2",
|
|
227
252
|
children: [
|
|
228
|
-
|
|
253
|
+
b.map((e) => /* @__PURE__ */ h("button", {
|
|
229
254
|
type: "button",
|
|
230
|
-
onClick: () =>
|
|
231
|
-
className: `px-3 py-1.5 text-sm rounded-md border ${
|
|
255
|
+
onClick: () => M(e.hours),
|
|
256
|
+
className: `px-3 py-1.5 text-sm rounded-md border ${j === e.hours ? "bg-action-primary-bg text-action-primary-text border-action-primary-bg" : "bg-bg-sunken text-text-primary border-border-default"}`,
|
|
232
257
|
children: e.label
|
|
233
258
|
}, e.hours)),
|
|
234
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ h("span", {
|
|
235
260
|
className: "text-sm text-text-secondary mx-1",
|
|
236
261
|
children: "or custom hours:"
|
|
237
262
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ h("input", {
|
|
239
264
|
type: "number",
|
|
240
265
|
min: 1,
|
|
241
266
|
max: 168,
|
|
242
|
-
value:
|
|
243
|
-
onChange: (e) =>
|
|
267
|
+
value: j,
|
|
268
|
+
onChange: (e) => M(Math.max(1, Math.min(168, Number(e.target.value) || 1))),
|
|
244
269
|
className: "w-24 px-2 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary"
|
|
245
270
|
})
|
|
246
271
|
]
|
|
247
272
|
})] }),
|
|
248
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
|
|
249
274
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
250
275
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ h("input", {
|
|
252
277
|
type: "checkbox",
|
|
253
|
-
checked:
|
|
254
|
-
onChange: (e) =>
|
|
278
|
+
checked: N,
|
|
279
|
+
onChange: (e) => P(e.target.checked),
|
|
255
280
|
className: "w-4 h-4"
|
|
256
281
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
282
|
+
/* @__PURE__ */ h("span", { children: "Include credentials (tunnel URLs + agent API keys)" }),
|
|
283
|
+
N ? /* @__PURE__ */ h(a, {
|
|
259
284
|
className: "w-4 h-4 text-status-warning-text",
|
|
260
285
|
"aria-label": "Credentials will be exposed in the snapshot"
|
|
261
|
-
}) : /* @__PURE__ */
|
|
286
|
+
}) : /* @__PURE__ */ h(re, {
|
|
262
287
|
className: "w-4 h-4 text-text-secondary",
|
|
263
288
|
"aria-label": "Credentials redacted"
|
|
264
289
|
})
|
|
265
290
|
]
|
|
266
|
-
}),
|
|
291
|
+
}), N && /* @__PURE__ */ g("p", {
|
|
267
292
|
className: "mt-1.5 text-xs text-status-warning-text flex items-start gap-1.5",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ h(a, { className: "w-3.5 h-3.5 mt-0.5 flex-shrink-0" }), /* @__PURE__ */ h("span", { children: "Anyone with a URL minted while this is on can read live agent tunnel URLs and API keys. Only enable for trusted recipients." })]
|
|
269
294
|
})] }),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
295
|
+
/* @__PURE__ */ g("div", { children: [
|
|
296
|
+
/* @__PURE__ */ h("label", {
|
|
297
|
+
className: "block text-sm font-medium text-text-primary mb-2",
|
|
298
|
+
children: "Sections to include"
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ h("div", {
|
|
301
|
+
className: "flex flex-wrap gap-2",
|
|
302
|
+
children: _.map((e) => /* @__PURE__ */ h("button", {
|
|
303
|
+
type: "button",
|
|
304
|
+
onClick: () => Ee(e),
|
|
305
|
+
className: `px-2.5 py-1 text-xs rounded-full border ${F.has(e) ? "bg-action-primary-bg/10 text-action-primary-bg border-action-primary-bg" : "bg-bg-sunken text-text-secondary border-border-default"}`,
|
|
306
|
+
children: e
|
|
307
|
+
}, e))
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ g("p", {
|
|
310
|
+
className: "text-xs text-text-secondary mt-2",
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ h("b", { children: "plugins" }),
|
|
313
|
+
" / ",
|
|
314
|
+
/* @__PURE__ */ h("b", { children: "agents" }),
|
|
315
|
+
" also pull each installed plugin's live context (graphiql, ai, session, git…) when a default agent is set."
|
|
316
|
+
]
|
|
317
|
+
})
|
|
318
|
+
] }),
|
|
319
|
+
y.length > 0 && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
283
320
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
284
321
|
children: "Default agent for context fetch"
|
|
285
|
-
}), /* @__PURE__ */
|
|
286
|
-
value:
|
|
287
|
-
onChange: (e) =>
|
|
322
|
+
}), /* @__PURE__ */ g("select", {
|
|
323
|
+
value: z,
|
|
324
|
+
onChange: (e) => B(e.target.value),
|
|
288
325
|
className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ h("option", {
|
|
290
327
|
value: "",
|
|
291
328
|
children: "(use my per-vibe default from settings)"
|
|
292
|
-
}),
|
|
329
|
+
}), y.map((e) => /* @__PURE__ */ h("option", {
|
|
293
330
|
value: e.id,
|
|
294
331
|
children: e.name
|
|
295
332
|
}, e.id))]
|
|
296
333
|
})] }),
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ g("div", { children: [
|
|
335
|
+
/* @__PURE__ */ h("label", {
|
|
299
336
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
300
337
|
children: "Custom context text"
|
|
301
338
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
value:
|
|
304
|
-
onChange: (e) =>
|
|
339
|
+
/* @__PURE__ */ h("textarea", {
|
|
340
|
+
value: L,
|
|
341
|
+
onChange: (e) => R(e.target.value.slice(0, 8192)),
|
|
305
342
|
rows: 5,
|
|
306
343
|
placeholder: "Free-form notes embedded in every snapshot you mint AFTER saving (existing tokens keep their original copy).",
|
|
307
344
|
className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
308
345
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ g("p", {
|
|
310
347
|
className: "text-xs text-text-secondary mt-1",
|
|
311
|
-
children: [
|
|
348
|
+
children: [L.length, " / 8192 chars"]
|
|
312
349
|
})
|
|
313
350
|
] })
|
|
314
351
|
]
|
|
315
352
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ g("section", {
|
|
317
354
|
className: "bg-bg-surface border border-border-default rounded-lg p-5 space-y-4",
|
|
318
355
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ g("header", { children: [/* @__PURE__ */ h("h3", {
|
|
320
357
|
className: "text-base font-semibold text-text-primary",
|
|
321
358
|
children: "Generate a new URL"
|
|
322
|
-
}), /* @__PURE__ */
|
|
359
|
+
}), /* @__PURE__ */ h("p", {
|
|
323
360
|
className: "text-sm text-text-secondary",
|
|
324
361
|
children: "Mints a fresh signed URL using your current settings. The full token is only shown once — copy it before navigating away. Use Rotate below if you lose it."
|
|
325
362
|
})] }),
|
|
326
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ g("div", {
|
|
327
364
|
className: "flex flex-wrap items-end gap-2",
|
|
328
|
-
children: [
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
365
|
+
children: [
|
|
366
|
+
/* @__PURE__ */ g("div", {
|
|
367
|
+
className: "flex-1 min-w-[200px]",
|
|
368
|
+
children: [/* @__PURE__ */ h("label", {
|
|
369
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
370
|
+
children: "Label (optional)"
|
|
371
|
+
}), /* @__PURE__ */ h("input", {
|
|
372
|
+
type: "text",
|
|
373
|
+
value: V,
|
|
374
|
+
onChange: (e) => H(e.target.value.slice(0, 120)),
|
|
375
|
+
placeholder: "e.g. Claude desktop",
|
|
376
|
+
className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
377
|
+
})]
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ g("button", {
|
|
380
|
+
type: "button",
|
|
381
|
+
onClick: Te,
|
|
382
|
+
disabled: $.loading,
|
|
383
|
+
className: "px-4 py-2 text-sm bg-bg-sunken text-text-primary border border-border-default rounded-md hover:bg-action-primary-bg-hover disabled:opacity-50 inline-flex items-center gap-1.5",
|
|
384
|
+
children: [/* @__PURE__ */ h(ne, { className: "w-4 h-4" }), $.loading ? "Loading…" : "Preview"]
|
|
385
|
+
}),
|
|
386
|
+
/* @__PURE__ */ h("button", {
|
|
387
|
+
type: "button",
|
|
388
|
+
onClick: async () => {
|
|
389
|
+
let e = await xe({ variables: {
|
|
390
|
+
vibeId: f,
|
|
391
|
+
input: {
|
|
392
|
+
label: V || null,
|
|
393
|
+
ttlSeconds: Math.max(60, Math.min(10080 * 60, j * 60 * 60)),
|
|
394
|
+
includeCredentials: N,
|
|
395
|
+
includes: Array.from(F),
|
|
396
|
+
defaultAgentIdOverride: z || null
|
|
397
|
+
}
|
|
398
|
+
} });
|
|
399
|
+
e.data && (W(e.data.generateVibeLlmContextUrl), G(!1), H(""));
|
|
400
|
+
},
|
|
401
|
+
disabled: T.loading,
|
|
402
|
+
className: "px-4 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
403
|
+
children: T.loading ? "Generating…" : "Generate URL"
|
|
404
|
+
})
|
|
405
|
+
]
|
|
358
406
|
}),
|
|
359
|
-
|
|
407
|
+
U && /* @__PURE__ */ g("div", {
|
|
360
408
|
className: "rounded-md border border-status-success-border bg-status-success-bg/20 p-3",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ g("div", {
|
|
362
410
|
className: "flex items-center gap-2 text-sm mb-2",
|
|
363
411
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ h(s, { className: "w-4 h-4 text-status-success-text" }),
|
|
413
|
+
/* @__PURE__ */ h("span", {
|
|
366
414
|
className: "font-medium text-text-primary",
|
|
367
415
|
children: "URL generated"
|
|
368
416
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ g("span", {
|
|
370
418
|
className: "text-xs text-text-secondary",
|
|
371
|
-
children: ["expires in ",
|
|
419
|
+
children: ["expires in ", x(U.expiresAt)]
|
|
372
420
|
})
|
|
373
421
|
]
|
|
374
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ g("div", {
|
|
375
423
|
className: "flex items-center gap-2",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ h("input", {
|
|
377
425
|
readOnly: !0,
|
|
378
|
-
value:
|
|
426
|
+
value: U.url,
|
|
379
427
|
className: "flex-1 px-2 py-1.5 text-xs bg-bg-sunken border border-border-default rounded font-mono text-text-primary",
|
|
380
428
|
"aria-label": "Generated LLM context URL"
|
|
381
|
-
}), /* @__PURE__ */
|
|
429
|
+
}), /* @__PURE__ */ h("button", {
|
|
382
430
|
type: "button",
|
|
383
431
|
onClick: async () => {
|
|
384
|
-
|
|
432
|
+
U && (await ge(U.url), G(!0), setTimeout(() => G(!1), 2e3));
|
|
385
433
|
},
|
|
386
434
|
className: "px-2 py-1.5 text-xs bg-bg-sunken border border-border-default rounded text-text-primary",
|
|
387
435
|
"aria-label": "Copy URL",
|
|
388
|
-
children:
|
|
436
|
+
children: Se ? /* @__PURE__ */ h(s, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ h(te, { className: "w-4 h-4" })
|
|
389
437
|
})]
|
|
390
438
|
})]
|
|
391
439
|
})
|
|
392
440
|
]
|
|
393
441
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ g("section", {
|
|
395
443
|
className: "bg-bg-surface border border-border-default rounded-lg p-5 space-y-3",
|
|
396
444
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ g("header", {
|
|
398
446
|
className: "flex items-center justify-between",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
400
448
|
className: "text-base font-semibold text-text-primary",
|
|
401
449
|
children: "Your active URLs"
|
|
402
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ h("p", {
|
|
403
451
|
className: "text-sm text-text-secondary",
|
|
404
452
|
children: "Tokens you minted for this vibe. Revoke and rotate work immediately; revoked tokens fail with 403 even if the JWT hasn't expired."
|
|
405
|
-
})] }), /* @__PURE__ */
|
|
453
|
+
})] }), /* @__PURE__ */ g("button", {
|
|
406
454
|
type: "button",
|
|
407
455
|
onClick: async () => {
|
|
408
|
-
typeof window < "u" && !window.confirm("Revoke ALL active URLs for this vibe? Every minted URL stops working immediately and cannot be un-revoked (use Rotate to issue a fresh one).") || await
|
|
456
|
+
typeof window < "u" && !window.confirm("Revoke ALL active URLs for this vibe? Every minted URL stops working immediately and cannot be un-revoked (use Rotate to issue a fresh one).") || await O({ variables: { vibeId: f } });
|
|
409
457
|
},
|
|
410
|
-
disabled:
|
|
458
|
+
disabled: A.every((e) => e.status !== "ACTIVE"),
|
|
411
459
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm bg-status-error-bg/10 text-status-error-text border border-status-error-border rounded-md hover:bg-status-error-bg/20 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ h(u, { className: "w-4 h-4" }), "Revoke all"]
|
|
413
461
|
})]
|
|
414
462
|
}),
|
|
415
|
-
|
|
463
|
+
C.loading && A.length === 0 && /* @__PURE__ */ g("div", {
|
|
416
464
|
className: "text-sm text-text-secondary py-4 flex items-center gap-2",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ h(ae, { className: "w-4 h-4 animate-spin" }), "Loading tokens…"]
|
|
418
466
|
}),
|
|
419
|
-
|
|
467
|
+
A.length === 0 && !C.loading && /* @__PURE__ */ g("div", {
|
|
420
468
|
className: "text-sm text-text-secondary py-4 flex items-center gap-2",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ h(c, { className: "w-4 h-4" }), "No URLs minted yet for this vibe."]
|
|
422
470
|
}),
|
|
423
|
-
|
|
471
|
+
A.length > 0 && /* @__PURE__ */ h("div", {
|
|
424
472
|
className: "overflow-x-auto",
|
|
425
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ g("table", {
|
|
426
474
|
className: "w-full text-sm",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
428
476
|
className: "border-b border-border-default text-left text-xs text-text-secondary",
|
|
429
477
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ h("th", {
|
|
431
479
|
className: "py-2 pr-3",
|
|
432
480
|
children: "Label"
|
|
433
481
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ h("th", {
|
|
435
483
|
className: "py-2 pr-3",
|
|
436
484
|
children: "Fingerprint"
|
|
437
485
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ h("th", {
|
|
439
487
|
className: "py-2 pr-3",
|
|
440
488
|
children: "Sections"
|
|
441
489
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ h("th", {
|
|
443
491
|
className: "py-2 pr-3",
|
|
444
492
|
children: "Creds"
|
|
445
493
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ h("th", {
|
|
447
495
|
className: "py-2 pr-3",
|
|
448
496
|
children: "Status"
|
|
449
497
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ h("th", {
|
|
451
499
|
className: "py-2 pr-3",
|
|
452
500
|
children: "Expires"
|
|
453
501
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ h("th", {
|
|
455
503
|
className: "py-2 pr-3",
|
|
456
504
|
children: "Fetches"
|
|
457
505
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ h("th", {
|
|
459
507
|
className: "py-2 pr-3",
|
|
460
508
|
children: "Actions"
|
|
461
509
|
})
|
|
462
510
|
]
|
|
463
|
-
}) }), /* @__PURE__ */
|
|
511
|
+
}) }), /* @__PURE__ */ h("tbody", { children: A.map((e) => /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ g("tr", {
|
|
464
512
|
className: "border-b border-border-subtle align-top",
|
|
465
513
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ h("td", {
|
|
467
515
|
className: "py-2 pr-3 text-text-primary",
|
|
468
516
|
children: e.label ?? "—"
|
|
469
517
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ h("td", {
|
|
471
519
|
className: "py-2 pr-3 font-mono text-xs text-text-secondary",
|
|
472
520
|
children: e.tokenFingerprint
|
|
473
521
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ h("td", {
|
|
475
523
|
className: "py-2 pr-3 text-text-secondary",
|
|
476
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ h("span", {
|
|
477
525
|
className: "text-xs",
|
|
478
526
|
children: e.includes.join(", ")
|
|
479
527
|
})
|
|
480
528
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ h("td", {
|
|
482
530
|
className: "py-2 pr-3",
|
|
483
|
-
children: e.includeCredentials ? /* @__PURE__ */
|
|
531
|
+
children: e.includeCredentials ? /* @__PURE__ */ h("span", {
|
|
484
532
|
className: "text-xs text-status-warning-text",
|
|
485
533
|
children: "on"
|
|
486
|
-
}) : /* @__PURE__ */
|
|
534
|
+
}) : /* @__PURE__ */ h("span", {
|
|
487
535
|
className: "text-xs text-text-secondary",
|
|
488
536
|
children: "off"
|
|
489
537
|
})
|
|
490
538
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ h("td", {
|
|
492
540
|
className: "py-2 pr-3",
|
|
493
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ h("span", {
|
|
494
542
|
className: `text-xs px-1.5 py-0.5 rounded ${e.status === "ACTIVE" ? "bg-status-success-bg/20 text-status-success-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
495
543
|
children: e.status
|
|
496
544
|
})
|
|
497
545
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ h("td", {
|
|
499
547
|
className: "py-2 pr-3 text-xs text-text-secondary",
|
|
500
|
-
children: /* @__PURE__ */
|
|
548
|
+
children: /* @__PURE__ */ g("span", {
|
|
501
549
|
className: "inline-flex items-center gap-1",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ h(ee, { className: "w-3 h-3" }), x(e.expiresAt)]
|
|
503
551
|
})
|
|
504
552
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ h("td", {
|
|
506
554
|
className: "py-2 pr-3 text-xs text-text-secondary",
|
|
507
555
|
children: e.fetchCount
|
|
508
556
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ h("td", {
|
|
510
558
|
className: "py-2 pr-3",
|
|
511
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ g("div", {
|
|
512
560
|
className: "flex gap-1",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
561
|
+
children: [/* @__PURE__ */ h("button", {
|
|
514
562
|
type: "button",
|
|
515
|
-
onClick: () =>
|
|
563
|
+
onClick: () => Ce(J === e.id ? null : e.id),
|
|
516
564
|
title: "Show fetch history",
|
|
517
565
|
"aria-label": "Show fetch history",
|
|
518
566
|
className: "p-1.5 text-text-secondary hover:text-text-primary",
|
|
519
|
-
children: /* @__PURE__ */
|
|
520
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ h(c, { className: "w-4 h-4" })
|
|
568
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ g(ce, { children: [/* @__PURE__ */ h("button", {
|
|
521
569
|
type: "button",
|
|
522
570
|
onClick: async () => {
|
|
523
|
-
let t = await
|
|
524
|
-
t.data && (
|
|
571
|
+
let t = await D({ variables: { tokenId: e.id } });
|
|
572
|
+
t.data && (W(t.data.rotateVibeLlmContextUrl), G(!1));
|
|
525
573
|
},
|
|
526
574
|
title: "Rotate (revoke + mint a new one with same settings)",
|
|
527
575
|
"aria-label": "Rotate URL",
|
|
528
576
|
className: "p-1.5 text-text-secondary hover:text-text-primary",
|
|
529
|
-
children: /* @__PURE__ */
|
|
530
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ h(l, { className: "w-4 h-4" })
|
|
578
|
+
}), /* @__PURE__ */ h("button", {
|
|
531
579
|
type: "button",
|
|
532
|
-
onClick: () =>
|
|
580
|
+
onClick: () => E({ variables: { tokenId: e.id } }),
|
|
533
581
|
title: "Revoke",
|
|
534
582
|
"aria-label": "Revoke URL",
|
|
535
583
|
className: "p-1.5 text-status-error-text hover:opacity-80",
|
|
536
|
-
children: /* @__PURE__ */
|
|
584
|
+
children: /* @__PURE__ */ h(u, { className: "w-4 h-4" })
|
|
537
585
|
})] })]
|
|
538
586
|
})
|
|
539
587
|
})
|
|
540
588
|
]
|
|
541
|
-
}),
|
|
589
|
+
}), J === e.id && /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h("td", {
|
|
542
590
|
colSpan: 8,
|
|
543
591
|
className: "py-2 pr-3 bg-bg-sunken/40",
|
|
544
|
-
children: /* @__PURE__ */
|
|
592
|
+
children: /* @__PURE__ */ h(_e, { tokenId: e.id })
|
|
545
593
|
}) })] }, e.id)) })]
|
|
546
594
|
})
|
|
547
595
|
})
|
|
548
596
|
]
|
|
549
597
|
}),
|
|
550
|
-
|
|
551
|
-
/* @__PURE__ */
|
|
598
|
+
ve && /* @__PURE__ */ h(t, { vibeId: f }),
|
|
599
|
+
/* @__PURE__ */ g("p", {
|
|
552
600
|
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
553
601
|
children: [
|
|
554
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ h(o, { className: "w-3 h-3" }),
|
|
555
603
|
"Tip: pipe the URL to any LLM with",
|
|
556
604
|
" ",
|
|
557
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ h("code", {
|
|
558
606
|
className: "bg-bg-sunken px-1 rounded",
|
|
559
607
|
children: "curl <url>"
|
|
560
608
|
}),
|
|
561
609
|
" or",
|
|
562
610
|
" ",
|
|
563
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ h("code", {
|
|
564
612
|
className: "bg-bg-sunken px-1 rounded",
|
|
565
613
|
children: "curl -H \"Accept: text/markdown\" <url>"
|
|
566
614
|
}),
|
|
567
615
|
" ",
|
|
568
616
|
"for a markdown snapshot."
|
|
569
617
|
]
|
|
618
|
+
}),
|
|
619
|
+
Y && /* @__PURE__ */ h("div", {
|
|
620
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4",
|
|
621
|
+
role: "dialog",
|
|
622
|
+
"aria-modal": "true",
|
|
623
|
+
"aria-label": "LLM context preview",
|
|
624
|
+
onClick: () => X(!1),
|
|
625
|
+
children: /* @__PURE__ */ g("div", {
|
|
626
|
+
className: "flex max-h-[85vh] w-full max-w-4xl flex-col rounded-lg border border-border-default bg-bg-surface shadow-xl",
|
|
627
|
+
onClick: (e) => e.stopPropagation(),
|
|
628
|
+
children: [/* @__PURE__ */ g("header", {
|
|
629
|
+
className: "flex items-center gap-3 border-b border-border-default px-5 py-3",
|
|
630
|
+
children: [
|
|
631
|
+
/* @__PURE__ */ h("h3", {
|
|
632
|
+
className: "text-base font-semibold text-text-primary",
|
|
633
|
+
children: "Context preview"
|
|
634
|
+
}),
|
|
635
|
+
/* @__PURE__ */ g("div", {
|
|
636
|
+
className: "flex gap-0.5 rounded-md bg-bg-sunken p-0.5",
|
|
637
|
+
children: [/* @__PURE__ */ h("button", {
|
|
638
|
+
type: "button",
|
|
639
|
+
onClick: () => Q("json"),
|
|
640
|
+
className: `px-3 py-1 text-xs rounded ${Z === "json" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary"}`,
|
|
641
|
+
children: "JSON"
|
|
642
|
+
}), /* @__PURE__ */ h("button", {
|
|
643
|
+
type: "button",
|
|
644
|
+
onClick: () => Q("markdown"),
|
|
645
|
+
className: `px-3 py-1 text-xs rounded ${Z === "markdown" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary"}`,
|
|
646
|
+
children: "Markdown"
|
|
647
|
+
})]
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ h("span", {
|
|
650
|
+
className: "ml-auto text-xs text-text-secondary",
|
|
651
|
+
children: "Reflects your current settings · not minted"
|
|
652
|
+
}),
|
|
653
|
+
/* @__PURE__ */ h("button", {
|
|
654
|
+
type: "button",
|
|
655
|
+
onClick: () => X(!1),
|
|
656
|
+
"aria-label": "Close preview",
|
|
657
|
+
className: "text-text-secondary hover:text-text-primary",
|
|
658
|
+
children: /* @__PURE__ */ h(d, { className: "w-4 h-4" })
|
|
659
|
+
})
|
|
660
|
+
]
|
|
661
|
+
}), /* @__PURE__ */ h("div", {
|
|
662
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
663
|
+
children: $.loading ? /* @__PURE__ */ h("p", {
|
|
664
|
+
className: "p-5 text-sm text-text-secondary",
|
|
665
|
+
children: "Assembling preview…"
|
|
666
|
+
}) : $.error ? /* @__PURE__ */ g("p", {
|
|
667
|
+
className: "p-5 text-sm text-status-error-text",
|
|
668
|
+
children: ["Failed to load preview: ", $.error.message]
|
|
669
|
+
}) : /* @__PURE__ */ h("pre", {
|
|
670
|
+
className: "m-0 whitespace-pre-wrap break-words p-5 font-mono text-xs text-text-primary",
|
|
671
|
+
children: Z === "json" ? $.data?.myVibeLlmContextPreview.json : $.data?.myVibeLlmContextPreview.markdown
|
|
672
|
+
})
|
|
673
|
+
})]
|
|
674
|
+
})
|
|
570
675
|
})
|
|
571
676
|
]
|
|
572
677
|
});
|
|
573
678
|
}
|
|
574
|
-
function
|
|
575
|
-
let { data: t, loading: n } = m(
|
|
679
|
+
function _e({ tokenId: e }) {
|
|
680
|
+
let { data: t, loading: n } = m(y, {
|
|
576
681
|
variables: {
|
|
577
682
|
tokenId: e,
|
|
578
683
|
limit: 100
|
|
579
684
|
},
|
|
580
685
|
fetchPolicy: "cache-and-network"
|
|
581
686
|
}), r = t?.myVibeLlmContextTokenAudits ?? [];
|
|
582
|
-
return /* @__PURE__ */
|
|
687
|
+
return /* @__PURE__ */ h("div", {
|
|
583
688
|
className: "text-xs",
|
|
584
|
-
children: n && r.length === 0 ? /* @__PURE__ */
|
|
689
|
+
children: n && r.length === 0 ? /* @__PURE__ */ h("span", {
|
|
585
690
|
className: "text-text-secondary",
|
|
586
691
|
children: "Loading audit log…"
|
|
587
|
-
}) : r.length === 0 ? /* @__PURE__ */
|
|
692
|
+
}) : r.length === 0 ? /* @__PURE__ */ h("span", {
|
|
588
693
|
className: "text-text-secondary",
|
|
589
694
|
children: "No fetches yet."
|
|
590
|
-
}) : /* @__PURE__ */
|
|
695
|
+
}) : /* @__PURE__ */ g("table", {
|
|
591
696
|
className: "w-full",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
593
698
|
className: "text-text-secondary",
|
|
594
699
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ h("th", {
|
|
596
701
|
className: "text-left py-1 pr-2",
|
|
597
702
|
children: "When"
|
|
598
703
|
}),
|
|
599
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ h("th", {
|
|
600
705
|
className: "text-left py-1 pr-2",
|
|
601
706
|
children: "IP"
|
|
602
707
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ h("th", {
|
|
604
709
|
className: "text-left py-1 pr-2",
|
|
605
710
|
children: "Format"
|
|
606
711
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ h("th", {
|
|
608
713
|
className: "text-left py-1 pr-2",
|
|
609
714
|
children: "Bytes"
|
|
610
715
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ h("th", {
|
|
612
717
|
className: "text-left py-1 pr-2",
|
|
613
718
|
children: "Status"
|
|
614
719
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ h("th", {
|
|
616
721
|
className: "text-left py-1 pr-2",
|
|
617
722
|
children: "UA"
|
|
618
723
|
})
|
|
619
724
|
]
|
|
620
|
-
}) }), /* @__PURE__ */
|
|
725
|
+
}) }), /* @__PURE__ */ h("tbody", { children: r.map((e) => /* @__PURE__ */ g("tr", {
|
|
621
726
|
className: "text-text-primary border-t border-border-subtle",
|
|
622
727
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ h("td", {
|
|
624
729
|
className: "py-1 pr-2",
|
|
625
730
|
children: new Date(e.fetchedAt).toLocaleString()
|
|
626
731
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ h("td", {
|
|
628
733
|
className: "py-1 pr-2 font-mono",
|
|
629
734
|
children: e.remoteIp ?? "—"
|
|
630
735
|
}),
|
|
631
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ h("td", {
|
|
632
737
|
className: "py-1 pr-2",
|
|
633
738
|
children: e.format
|
|
634
739
|
}),
|
|
635
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ h("td", {
|
|
636
741
|
className: "py-1 pr-2",
|
|
637
742
|
children: e.bytes
|
|
638
743
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ h("td", {
|
|
640
745
|
className: "py-1 pr-2",
|
|
641
746
|
children: e.status
|
|
642
747
|
}),
|
|
643
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ h("td", {
|
|
644
749
|
className: "py-1 pr-2 truncate max-w-[260px]",
|
|
645
750
|
title: e.userAgent ?? "",
|
|
646
751
|
children: e.userAgent ?? "—"
|
|
@@ -651,6 +756,6 @@ function ce({ tokenId: e }) {
|
|
|
651
756
|
});
|
|
652
757
|
}
|
|
653
758
|
//#endregion
|
|
654
|
-
export {
|
|
759
|
+
export { S as VibeLlmContextTabPanel };
|
|
655
760
|
|
|
656
761
|
//# sourceMappingURL=VibeLlmContextTabPanel.js.map
|