@burdenoff/microfe-vibecontrols 2026.522.6 → 2026.522.8
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/agent-manager/AgentManagerChatPane.js +78 -56
- package/dist/components/agent-manager/AgentManagerChatPane.js.map +1 -1
- package/dist/components/agents/OpenInBrowserEditorButton.js +65 -66
- package/dist/components/agents/OpenInBrowserEditorButton.js.map +1 -1
- package/dist/components/ai/AIProviderCredentialsCard.js +76 -53
- package/dist/components/ai/AIProviderCredentialsCard.js.map +1 -1
- package/dist/components/security/SecurityProviderDrawer.js +106 -31
- package/dist/components/security/SecurityProviderDrawer.js.map +1 -1
- package/dist/components/vibe/VibeAgentEmptyState.js +4 -1
- package/dist/components/vibe/VibeAgentEmptyState.js.map +1 -1
- package/dist/components/vibe/VibeAgentSwitcher.js +237 -0
- package/dist/components/vibe/VibeAgentSwitcher.js.map +1 -0
- package/dist/components/vibes/VibeCard.js +2 -2
- package/dist/components/vibes/VibeCard.js.map +1 -1
- package/dist/components/vibes/VibeList.js +12 -30
- package/dist/components/vibes/VibeList.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +172 -123
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +383 -397
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibesPage.js +155 -190
- package/dist/pages/VibesPage.js.map +1 -1
- package/dist/services/aiApi.js +1 -1
- package/dist/services/aiApi.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import { useAddVibeToCatalogMutation as e, useArchiveVibeMutation as t, useCreateSessionMutation as n, useGetVibeCatalogsQuery as r, useGetVibeFeatureCatalogQuery as i, useGetVibeFeatureFlagsQuery as a, useGetVibeQuery as o, useRemoveVibeFromCatalogMutation as s, useSetVibeFeatureFlagMutation as c, useUpdateVibeStatusMutation as l } from "../generated/wspace-operations.js";
|
|
2
|
-
import { useVibeControls as u, useVibeNavigate as
|
|
3
|
-
import { useVibeControlsStore as
|
|
4
|
-
import { PageHeader as
|
|
5
|
-
import { ErrorState as
|
|
6
|
-
import { EntityTagPicker as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import { StatusBadge as
|
|
9
|
-
import { Card as
|
|
10
|
-
import { SESSION_PROVIDER_PACKAGES as
|
|
11
|
-
import { PluginGate as
|
|
12
|
-
import { useActiveAgentProfile as
|
|
2
|
+
import { useVibeControls as u, useVibeNavigate as ee } from "../providers/VibeControlsProvider.js";
|
|
3
|
+
import { useVibeControlsStore as d } from "../store/vibeControlsStore.js";
|
|
4
|
+
import { PageHeader as f } from "../components/shared/PageHeader.js";
|
|
5
|
+
import { ErrorState as p } from "../components/shared/ErrorState.js";
|
|
6
|
+
import { EntityTagPicker as m } from "../components/shared/EntityTagPicker.js";
|
|
7
|
+
import { EmptyState as h } from "../components/shared/EmptyState.js";
|
|
8
|
+
import { StatusBadge as g } from "../components/shared/StatusBadge.js";
|
|
9
|
+
import { Card as _ } from "../components/shared/Card.js";
|
|
10
|
+
import { SESSION_PROVIDER_PACKAGES as te } from "../constants/pluginCatalog.js";
|
|
11
|
+
import { PluginGate as ne } from "../components/shared/PluginGate.js";
|
|
12
|
+
import { useActiveAgentProfile as re } from "../hooks/useActiveAgentProfile.js";
|
|
13
13
|
import "../components/shared/index.js";
|
|
14
|
-
import { VIBE_PERMISSIONS as
|
|
15
|
-
import { PageSkeleton as
|
|
16
|
-
import { VibeOpenInEditorMenu as
|
|
14
|
+
import { VIBE_PERMISSIONS as v } from "../constants/permissions.js";
|
|
15
|
+
import { PageSkeleton as ie } from "../components/shared/PageSkeleton.js";
|
|
16
|
+
import { VibeOpenInEditorMenu as ae } from "../components/agents/VibeOpenInEditorMenu.js";
|
|
17
17
|
import "../components/agents/index.js";
|
|
18
|
-
import { NotesTabPanel as
|
|
18
|
+
import { NotesTabPanel as y } from "../components/notes/NotesTabPanel.js";
|
|
19
19
|
import "../components/notes/index.js";
|
|
20
|
-
import { useQueryBackedTab as
|
|
21
|
-
import { appendIframeTokenParam as
|
|
22
|
-
import { AddTabDialog as
|
|
23
|
-
import { PluginIframeMount as
|
|
24
|
-
import { ScorecardPanel as
|
|
20
|
+
import { useQueryBackedTab as b } from "../hooks/useQueryBackedTab.js";
|
|
21
|
+
import { appendIframeTokenParam as oe, mintIframeToken as x, mintScopedIframeToken as se, scheduleIframeTokenRefresh as S } from "../services/iframeToken.js";
|
|
22
|
+
import { AddTabDialog as ce } from "../components/plugins/AddTabDialog.js";
|
|
23
|
+
import { PluginIframeMount as le } from "../components/plugins/PluginIframeMount.js";
|
|
24
|
+
import { ScorecardPanel as ue } from "../components/scorecard/ScorecardPanel.js";
|
|
25
25
|
import "../components/scorecard/index.js";
|
|
26
|
-
import { DocsTabPanel as
|
|
26
|
+
import { DocsTabPanel as de } from "../components/docs/DocsTabPanel.js";
|
|
27
27
|
import "../components/docs/index.js";
|
|
28
|
-
import { VibeGitOpsTab as
|
|
29
|
-
import { VibeAgentEmptyState as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
28
|
+
import { VibeGitOpsTab as fe } from "../components/gitops/VibeGitOpsTab.js";
|
|
29
|
+
import { VibeAgentEmptyState as pe } from "../components/vibe/VibeAgentEmptyState.js";
|
|
30
|
+
import { VibeAgentSwitcher as me } from "../components/vibe/VibeAgentSwitcher.js";
|
|
31
|
+
import { DEFAULT_VIBE_FEATURE_CATALOG as he, isVibeFeatureEnabled as ge } from "../lib/vibeFeatures.js";
|
|
32
|
+
import { SecurityTabPanel as _e } from "../components/security/SecurityTabPanel.js";
|
|
32
33
|
import "../components/security/index.js";
|
|
33
|
-
import { useCallback as
|
|
34
|
-
import { useI18n as
|
|
35
|
-
import { Archive as
|
|
36
|
-
import { useParams as
|
|
37
|
-
import { AnimatePresence as
|
|
34
|
+
import { useCallback as ve, useEffect as C, useMemo as ye, useRef as w, useState as T } from "react";
|
|
35
|
+
import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
36
|
+
import { Archive as xe, ArrowLeft as E, BarChart3 as Se, BookOpen as Ce, Check as we, Clock as Te, ExternalLink as Ee, FileText as De, Folder as Oe, GitBranch as ke, GitMerge as Ae, Globe as je, Info as Me, Library as D, Link2 as Ne, Loader2 as Pe, MoreVertical as Fe, Network as Ie, Pause as Le, Play as Re, Plus as O, RefreshCw as ze, Server as Be, Settings as Ve, Shield as He, Tag as Ue, Terminal as k, Variable as We, X as Ge, Zap as A } from "lucide-react";
|
|
37
|
+
import { useParams as Ke } from "react-router-dom";
|
|
38
|
+
import { AnimatePresence as qe, motion as j } from "framer-motion";
|
|
38
39
|
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
39
40
|
import { useFeatureFlagDetails as F } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
40
|
-
import { MotionItem as I, MotionList as
|
|
41
|
-
import { PermissionButton as
|
|
42
|
-
import { usePluginContributions as
|
|
41
|
+
import { MotionItem as I, MotionList as Je, MotionPage as L } from "@burdenoff/fe-libs/shared/motion";
|
|
42
|
+
import { PermissionButton as Ye } from "@burdenoff/fe-libs/shared/components";
|
|
43
|
+
import { usePluginContributions as Xe } from "@burdenoff/fe-libs/shared/plugins";
|
|
43
44
|
//#region src/pages/VibeDetailsPage.tsx
|
|
44
|
-
var
|
|
45
|
+
var Ze = [
|
|
45
46
|
"overview",
|
|
46
47
|
"config",
|
|
47
48
|
"git",
|
|
@@ -54,7 +55,7 @@ var Xe = [
|
|
|
54
55
|
"gitops",
|
|
55
56
|
"security",
|
|
56
57
|
"related"
|
|
57
|
-
],
|
|
58
|
+
], Qe = new Set(["overview", "config"]), $e = new Set(["apiPlayground"]), et = new Set([
|
|
58
59
|
"sessions",
|
|
59
60
|
"gitops",
|
|
60
61
|
"graphqlPlayground",
|
|
@@ -62,58 +63,58 @@ var Xe = [
|
|
|
62
63
|
"security"
|
|
63
64
|
]);
|
|
64
65
|
function R() {
|
|
65
|
-
let { t: e } =
|
|
66
|
+
let { t: e } = be(), { id: r } = Ke(), { basePath: s } = u(), oe = s || "", x = ee(), S = ve((t, n) => {
|
|
66
67
|
let r = e(t);
|
|
67
68
|
return r === t ? n : r;
|
|
68
|
-
}, [e]), [
|
|
69
|
+
}, [e]), [we] = l({ refetchQueries: ["GetVibe"] }), [Ee] = t({ refetchQueries: ["GetVibe"] }), [je] = n({ refetchQueries: ["GetVibe", "ListSessions"] }), { data: Pe } = i({
|
|
69
70
|
fetchPolicy: "cache-first",
|
|
70
71
|
errorPolicy: "ignore"
|
|
71
|
-
}),
|
|
72
|
-
let e = new Map(
|
|
73
|
-
for (let t of
|
|
72
|
+
}), Ge = ye(() => {
|
|
73
|
+
let e = new Map(he.map((e) => [e.id, e]));
|
|
74
|
+
for (let t of Pe?.vibeFeatureCatalog ?? []) e.set(t.id, t);
|
|
74
75
|
return Array.from(e.values());
|
|
75
|
-
}, [
|
|
76
|
+
}, [Pe?.vibeFeatureCatalog]), R = ye(() => Ge.filter((e) => !$e.has(e.id)), [Ge]), [rt, { loading: it }] = c({ refetchQueries: ["GetVibe"] }), [at, ot] = T(!1), [st, z] = T(null), [ct, lt] = T(!1), [ut, dt] = T(null), ft = w(null), pt = w(null), mt = w(null), ht = w(null), { data: gt, loading: B, error: _t, refetch: vt } = o({
|
|
76
77
|
variables: { id: r || "" },
|
|
77
78
|
skip: !r,
|
|
78
79
|
fetchPolicy: "cache-and-network"
|
|
79
|
-
}), V =
|
|
80
|
+
}), V = gt?.vibe, { data: yt } = a({
|
|
80
81
|
variables: { id: r || "" },
|
|
81
82
|
skip: !r,
|
|
82
83
|
fetchPolicy: "cache-first",
|
|
83
84
|
errorPolicy: "ignore"
|
|
84
|
-
}),
|
|
85
|
+
}), bt = V, H = yt?.vibe ?? bt, U = ve((e) => ge(H ?? null, e, R), [H, R]), xt = F("vibes.tabs.git"), St = F("vibes.tabs.scorecard"), Ct = F("vibes.tabs.graphql-playground"), wt = F("vibes.tabs.git-iframe"), Tt = F("vibes.tabs.graphiql-iframe"), Et = F("vibes.tabs.gitops-iframe"), Dt = ve((e) => {
|
|
85
86
|
switch (e) {
|
|
86
|
-
case "git": return
|
|
87
|
-
case "scorecard": return
|
|
88
|
-
case "graphqlPlayground": return
|
|
87
|
+
case "git": return xt ? !!xt.value : !0;
|
|
88
|
+
case "scorecard": return St ? !!St.value : !0;
|
|
89
|
+
case "graphqlPlayground": return Ct ? !!Ct.value : !0;
|
|
89
90
|
default: return !0;
|
|
90
91
|
}
|
|
91
92
|
}, [
|
|
92
|
-
bt,
|
|
93
93
|
xt,
|
|
94
|
-
St
|
|
95
|
-
|
|
94
|
+
St,
|
|
95
|
+
Ct
|
|
96
|
+
]), W = V?.agents ?? [], G = V?.sessions || [], Ot = V?.children || [], kt = V?.parent || null, At = d((e) => r ? e.defaultAgentForVibe?.[r] : void 0), K = (At ? W.find((e) => e.id === At) ?? null : null) ?? (W.length === 1 ? W[0] : W.find((e) => !!e.tunnelUrl) ?? W[0] ?? null), q = K, jt = K?.tunnelUrl ?? null, Mt = K?.agentApiKey ?? null, { active: J } = re(K?.id ?? null), Y = F("vibes.tabs.iframe-host")?.value === !0, Nt = ye(() => {
|
|
96
97
|
if (!Y || !K?.tunnelUrl) return [];
|
|
97
98
|
let e = K.id, t = J ?? "default";
|
|
98
99
|
return [{
|
|
99
100
|
tunnelUrl: K.tunnelUrl,
|
|
100
101
|
profile: t,
|
|
101
102
|
label: K.name ?? K.id,
|
|
102
|
-
mintIframeToken: async ({ pathPrefixes: n }) =>
|
|
103
|
+
mintIframeToken: async ({ pathPrefixes: n }) => se(e, t, n)
|
|
103
104
|
}];
|
|
104
105
|
}, [
|
|
105
106
|
Y,
|
|
106
107
|
K,
|
|
107
108
|
J
|
|
108
|
-
]), X =
|
|
109
|
+
]), X = Xe(Nt, {
|
|
109
110
|
mountPoint: "vibe.detailTab",
|
|
110
|
-
enabled: Y &&
|
|
111
|
-
}), [Z, Q] =
|
|
111
|
+
enabled: Y && Nt.length > 0
|
|
112
|
+
}), [Z, Q] = b(ye(() => {
|
|
112
113
|
let e = X.data.filter((e) => e.contribution.mountPoint === "vibe.detailTab").map((e) => e.contribution.id);
|
|
113
|
-
return [...
|
|
114
|
-
}, [X.data]), "overview"), [
|
|
115
|
-
|
|
116
|
-
V &&
|
|
114
|
+
return [...Ze, ...e];
|
|
115
|
+
}, [X.data]), "overview"), [Pt, Ft] = T(!1);
|
|
116
|
+
C(() => {
|
|
117
|
+
V && d.setState({
|
|
117
118
|
activeAgentId: K?.id ?? null,
|
|
118
119
|
selectedAgentId: K?.id ?? null,
|
|
119
120
|
activeVibeId: V.id,
|
|
@@ -122,95 +123,93 @@ function R() {
|
|
|
122
123
|
selectedSessionId: null
|
|
123
124
|
});
|
|
124
125
|
}, [V?.id, K?.id]);
|
|
125
|
-
let
|
|
126
|
-
|
|
127
|
-
if (!
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
!Ft && $e.has(Z) && Q("overview");
|
|
126
|
+
let It = W.length > 0;
|
|
127
|
+
C(() => {
|
|
128
|
+
if (!B && !Qe.has(Z) && (!U(Z) || !Dt(Z))) {
|
|
129
|
+
Q("overview");
|
|
130
|
+
return;
|
|
133
131
|
}
|
|
134
132
|
}, [
|
|
135
133
|
Z,
|
|
136
134
|
U,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Q
|
|
135
|
+
Dt,
|
|
136
|
+
It,
|
|
137
|
+
Q,
|
|
138
|
+
B
|
|
140
139
|
]);
|
|
141
140
|
let $ = () => {
|
|
142
|
-
|
|
143
|
-
},
|
|
141
|
+
x("/vibes");
|
|
142
|
+
}, Lt = async () => {
|
|
144
143
|
if (V?.id) try {
|
|
145
|
-
await
|
|
144
|
+
await we({ variables: {
|
|
146
145
|
id: V.id,
|
|
147
146
|
status: "ACTIVE"
|
|
148
147
|
} });
|
|
149
148
|
} catch (e) {
|
|
150
149
|
console.error("Failed to activate vibe:", e);
|
|
151
150
|
}
|
|
152
|
-
},
|
|
151
|
+
}, Rt = async () => {
|
|
153
152
|
if (V?.id) try {
|
|
154
|
-
await
|
|
153
|
+
await we({ variables: {
|
|
155
154
|
id: V.id,
|
|
156
155
|
status: "INACTIVE"
|
|
157
156
|
} });
|
|
158
157
|
} catch (e) {
|
|
159
158
|
console.error("Failed to deactivate vibe:", e);
|
|
160
159
|
}
|
|
161
|
-
}, [
|
|
162
|
-
|
|
163
|
-
if (!
|
|
160
|
+
}, [zt, Bt] = T(!1), [Vt, Ht] = T(!1), Ut = w(null);
|
|
161
|
+
C(() => {
|
|
162
|
+
if (!Vt) return;
|
|
164
163
|
let e = (e) => {
|
|
165
|
-
|
|
164
|
+
Ut.current?.contains(e.target) || Ht(!1);
|
|
166
165
|
};
|
|
167
166
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
168
|
-
}, [
|
|
169
|
-
let
|
|
167
|
+
}, [Vt]);
|
|
168
|
+
let Wt = async () => {
|
|
170
169
|
if (V?.id) try {
|
|
171
|
-
await
|
|
170
|
+
await Ee({ variables: { id: V.id } }), Bt(!1);
|
|
172
171
|
} catch (e) {
|
|
173
172
|
console.error("Failed to archive vibe:", e);
|
|
174
173
|
}
|
|
175
|
-
},
|
|
176
|
-
z(null),
|
|
177
|
-
},
|
|
178
|
-
let e =
|
|
174
|
+
}, Gt = () => {
|
|
175
|
+
z(null), ot(!0);
|
|
176
|
+
}, Kt = async () => {
|
|
177
|
+
let e = ft.current?.value?.trim(), t = pt.current?.value, n = mt.current?.value?.trim() || void 0, r = ht.current?.value?.trim() || void 0;
|
|
179
178
|
if (!e) {
|
|
180
|
-
z(
|
|
179
|
+
z(S("vibeDetails.sessionNameRequired", "Session name is required"));
|
|
181
180
|
return;
|
|
182
181
|
}
|
|
183
182
|
let i = V?.agentId;
|
|
184
183
|
if (!i) {
|
|
185
|
-
z(
|
|
184
|
+
z(S("vibeDetails.noAgentAttached", "This vibe has no agent attached. Connect an agent to this vibe before creating a session."));
|
|
186
185
|
return;
|
|
187
186
|
}
|
|
188
|
-
|
|
187
|
+
lt(!0), z(null);
|
|
189
188
|
try {
|
|
190
|
-
await
|
|
189
|
+
await je({ variables: { input: {
|
|
191
190
|
name: e,
|
|
192
191
|
type: t || "TERMINAL",
|
|
193
192
|
agentId: i,
|
|
194
193
|
vibeId: V?.id,
|
|
195
194
|
command: n,
|
|
196
195
|
workingDirectory: r || V?.path || void 0
|
|
197
|
-
} } }),
|
|
196
|
+
} } }), ot(!1), ft.current && (ft.current.value = ""), pt.current && (pt.current.selectedIndex = 0), mt.current && (mt.current.value = ""), ht.current && (ht.current.value = ""), dt(S("sessions.createdSuccess", "Session created successfully")), setTimeout(() => dt(null), 3e3);
|
|
198
197
|
} catch (e) {
|
|
199
|
-
z(e instanceof Error ? e.message :
|
|
198
|
+
z(e instanceof Error ? e.message : S("sessions.failedCreate", "Failed to create session"));
|
|
200
199
|
} finally {
|
|
201
|
-
|
|
200
|
+
lt(!1);
|
|
202
201
|
}
|
|
203
|
-
},
|
|
204
|
-
q &&
|
|
205
|
-
}, qt = (e) => {
|
|
206
|
-
S(`/sessions/${e}`);
|
|
202
|
+
}, qt = () => {
|
|
203
|
+
q && x(`/agents/${q.id}`);
|
|
207
204
|
}, Jt = (e) => {
|
|
208
|
-
|
|
205
|
+
x(`/sessions/${e}`);
|
|
209
206
|
}, Yt = (e) => {
|
|
210
|
-
|
|
211
|
-
let t = Date.now() - new Date(e).getTime();
|
|
212
|
-
return t < 6e4 ? C("health.justNow", "Just now") : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : new Date(e).toLocaleDateString();
|
|
207
|
+
x(`/vibes/${e}`);
|
|
213
208
|
}, Xt = (e) => {
|
|
209
|
+
if (!e) return S("health.never", "Never");
|
|
210
|
+
let t = Date.now() - new Date(e).getTime();
|
|
211
|
+
return t < 6e4 ? S("health.justNow", "Just now") : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : new Date(e).toLocaleDateString();
|
|
212
|
+
}, Zt = (e) => {
|
|
214
213
|
switch (e) {
|
|
215
214
|
case "clean": return "text-status-success-text";
|
|
216
215
|
case "modified": return "text-status-warning-text";
|
|
@@ -218,24 +217,24 @@ function R() {
|
|
|
218
217
|
default: return "text-text-secondary";
|
|
219
218
|
}
|
|
220
219
|
};
|
|
221
|
-
if (
|
|
220
|
+
if (B && !V) return /* @__PURE__ */ P(L, {
|
|
222
221
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
223
222
|
children: [/* @__PURE__ */ P("button", {
|
|
224
223
|
onClick: $,
|
|
225
224
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
226
|
-
children: [/* @__PURE__ */ N(
|
|
227
|
-
}), /* @__PURE__ */ N(
|
|
225
|
+
children: [/* @__PURE__ */ N(E, { className: "w-4 h-4" }), S("vibeDetails.backToVibes", "Back to Vibes")]
|
|
226
|
+
}), /* @__PURE__ */ N(ie, { variant: "detail" })]
|
|
228
227
|
});
|
|
229
|
-
if (
|
|
228
|
+
if (_t && !V) return /* @__PURE__ */ P(L, {
|
|
230
229
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
231
230
|
children: [/* @__PURE__ */ P("button", {
|
|
232
231
|
onClick: $,
|
|
233
232
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
234
|
-
children: [/* @__PURE__ */ N(
|
|
235
|
-
}), /* @__PURE__ */ N(
|
|
236
|
-
title:
|
|
237
|
-
message:
|
|
238
|
-
onRetry: () =>
|
|
233
|
+
children: [/* @__PURE__ */ N(E, { className: "w-4 h-4" }), S("vibeDetails.backToVibes", "Back to Vibes")]
|
|
234
|
+
}), /* @__PURE__ */ N(p, {
|
|
235
|
+
title: S("vibeDetails.failedLoad", "Failed to load vibe"),
|
|
236
|
+
message: _t.message,
|
|
237
|
+
onRetry: () => vt()
|
|
239
238
|
})]
|
|
240
239
|
});
|
|
241
240
|
if (!V) return /* @__PURE__ */ P(L, {
|
|
@@ -243,176 +242,176 @@ function R() {
|
|
|
243
242
|
children: [/* @__PURE__ */ P("button", {
|
|
244
243
|
onClick: $,
|
|
245
244
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
246
|
-
children: [/* @__PURE__ */ N(
|
|
247
|
-
}), /* @__PURE__ */ N(
|
|
245
|
+
children: [/* @__PURE__ */ N(E, { className: "w-4 h-4" }), S("vibeDetails.backToVibes", "Back to Vibes")]
|
|
246
|
+
}), /* @__PURE__ */ N(h, {
|
|
248
247
|
icon: /* @__PURE__ */ N(A, { className: "w-8 h-8 text-text-secondary" }),
|
|
249
|
-
title:
|
|
250
|
-
description: `${
|
|
248
|
+
title: S("vibeDetails.notFound", "Vibe not found"),
|
|
249
|
+
description: `${S("vibeDetails.notFoundDescriptionPrefix", "No vibe with ID")} "${r}" ${S("vibeDetails.notFoundDescriptionSuffix", "exists")}`,
|
|
251
250
|
action: /* @__PURE__ */ N("button", {
|
|
252
251
|
onClick: $,
|
|
253
252
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
254
|
-
children:
|
|
253
|
+
children: S("vibeDetails.backToVibes", "Back to Vibes")
|
|
255
254
|
})
|
|
256
255
|
})]
|
|
257
256
|
});
|
|
258
|
-
let
|
|
257
|
+
let Qt = V.status === "ACTIVE" || V.status === "RUNNING", $t = G.filter((e) => e.status === "RUNNING").length, en = Ot.length + +!!kt + +!!q, tn = !!(V.gitBranch || V.gitRemote), nn = [
|
|
259
258
|
{
|
|
260
259
|
id: "overview",
|
|
261
|
-
label:
|
|
262
|
-
icon:
|
|
260
|
+
label: S("nav.overview", "Overview"),
|
|
261
|
+
icon: Me
|
|
263
262
|
},
|
|
264
263
|
{
|
|
265
264
|
id: "config",
|
|
266
|
-
label:
|
|
267
|
-
icon:
|
|
265
|
+
label: S("vibeDetails.config", "Config"),
|
|
266
|
+
icon: Ve
|
|
268
267
|
},
|
|
269
268
|
{
|
|
270
269
|
id: "git",
|
|
271
|
-
label:
|
|
272
|
-
icon:
|
|
273
|
-
badge:
|
|
270
|
+
label: S("vibeDetails.git", "Git"),
|
|
271
|
+
icon: ke,
|
|
272
|
+
badge: tn && V.gitBranch || void 0
|
|
274
273
|
},
|
|
275
274
|
{
|
|
276
275
|
id: "sessions",
|
|
277
|
-
label:
|
|
278
|
-
icon:
|
|
276
|
+
label: S("nav.sessions", "Sessions"),
|
|
277
|
+
icon: k,
|
|
279
278
|
badge: `${G.length}`
|
|
280
279
|
},
|
|
281
280
|
{
|
|
282
281
|
id: "notes",
|
|
283
|
-
label:
|
|
284
|
-
icon:
|
|
282
|
+
label: S("vibeDetails.notes", "Notes"),
|
|
283
|
+
icon: De
|
|
285
284
|
},
|
|
286
285
|
{
|
|
287
286
|
id: "docs",
|
|
288
|
-
label:
|
|
289
|
-
icon:
|
|
287
|
+
label: S("vibeDetails.docs", "Docs"),
|
|
288
|
+
icon: Ce
|
|
290
289
|
},
|
|
291
290
|
{
|
|
292
291
|
id: "scorecard",
|
|
293
|
-
label:
|
|
294
|
-
icon:
|
|
292
|
+
label: S("vibeDetails.scorecard", "Scorecard"),
|
|
293
|
+
icon: Se
|
|
295
294
|
},
|
|
296
295
|
{
|
|
297
296
|
id: "catalogs",
|
|
298
|
-
label:
|
|
299
|
-
icon:
|
|
297
|
+
label: S("vibeDetails.catalogs", "Catalogs"),
|
|
298
|
+
icon: D
|
|
300
299
|
},
|
|
301
300
|
{
|
|
302
301
|
id: "graphqlPlayground",
|
|
303
|
-
label:
|
|
304
|
-
icon:
|
|
302
|
+
label: S("vibeDetails.graphqlPlayground", "GraphQL"),
|
|
303
|
+
icon: Ie
|
|
305
304
|
},
|
|
306
305
|
{
|
|
307
306
|
id: "gitops",
|
|
308
|
-
label:
|
|
309
|
-
icon:
|
|
307
|
+
label: S("vibeDetails.gitops", "GitOps"),
|
|
308
|
+
icon: Ae
|
|
310
309
|
},
|
|
311
310
|
{
|
|
312
311
|
id: "security",
|
|
313
|
-
label:
|
|
314
|
-
icon:
|
|
312
|
+
label: S("vibeDetails.security", "Security"),
|
|
313
|
+
icon: He
|
|
315
314
|
},
|
|
316
315
|
{
|
|
317
316
|
id: "related",
|
|
318
|
-
label:
|
|
319
|
-
icon:
|
|
320
|
-
badge:
|
|
317
|
+
label: S("vibeDetails.related", "Related"),
|
|
318
|
+
icon: Ne,
|
|
319
|
+
badge: en > 0 ? `${en}` : void 0
|
|
321
320
|
}
|
|
322
|
-
].filter((e) =>
|
|
321
|
+
].filter((e) => Qe.has(e.id) ? !0 : !(!U(e.id) || !Dt(e.id) || !It && et.has(e.id) || e.id === "git" && wt?.value === !0 || e.id === "graphqlPlayground" && Tt?.value === !0 || e.id === "gitops" && Et?.value === !0));
|
|
323
322
|
return /* @__PURE__ */ P(L, {
|
|
324
323
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
325
324
|
children: [
|
|
326
|
-
|
|
325
|
+
ut && /* @__PURE__ */ N("div", {
|
|
327
326
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-success-bg text-status-success-text px-4 py-3 rounded-md shadow-lg",
|
|
328
|
-
children:
|
|
327
|
+
children: ut
|
|
329
328
|
}),
|
|
330
329
|
/* @__PURE__ */ P("button", {
|
|
331
330
|
onClick: $,
|
|
332
331
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
333
|
-
children: [/* @__PURE__ */ N(
|
|
332
|
+
children: [/* @__PURE__ */ N(E, { className: "w-4 h-4" }), S("vibeDetails.backToVibes", "Back to Vibes")]
|
|
334
333
|
}),
|
|
335
|
-
/* @__PURE__ */ N(
|
|
334
|
+
/* @__PURE__ */ N(f, {
|
|
336
335
|
title: V.name,
|
|
337
|
-
description: V.description ||
|
|
336
|
+
description: V.description || S("vibeDetails.noDescription", "No description"),
|
|
338
337
|
breadcrumb: [{
|
|
339
|
-
label:
|
|
340
|
-
path:
|
|
338
|
+
label: S("nav.vibes", "Vibes"),
|
|
339
|
+
path: oe ? `${oe}/vibes` : "/vibes"
|
|
341
340
|
}, { label: V.name }],
|
|
342
341
|
actions: /* @__PURE__ */ P("div", {
|
|
343
342
|
className: "flex items-center gap-2 flex-wrap",
|
|
344
343
|
children: [
|
|
345
344
|
/* @__PURE__ */ N("button", {
|
|
346
|
-
onClick: () =>
|
|
347
|
-
disabled:
|
|
345
|
+
onClick: () => vt(),
|
|
346
|
+
disabled: B,
|
|
348
347
|
className: "flex items-center justify-center p-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
|
|
349
|
-
title:
|
|
350
|
-
children: /* @__PURE__ */ N(
|
|
348
|
+
title: S("common.refresh", "Refresh"),
|
|
349
|
+
children: /* @__PURE__ */ N(ze, { className: `w-4 h-4 ${B ? "animate-spin" : ""}` })
|
|
351
350
|
}),
|
|
352
|
-
/* @__PURE__ */ N(
|
|
351
|
+
/* @__PURE__ */ N(ae, {
|
|
353
352
|
vibeId: V.id,
|
|
354
353
|
workspacePath: V.path,
|
|
355
|
-
tunnelUrl:
|
|
356
|
-
agentApiKey:
|
|
354
|
+
tunnelUrl: jt,
|
|
355
|
+
agentApiKey: Mt,
|
|
357
356
|
profile: J ?? "default",
|
|
358
357
|
browserEditorEnabled: U("browserEditor")
|
|
359
358
|
}),
|
|
360
|
-
/* @__PURE__ */ N(
|
|
361
|
-
permission:
|
|
359
|
+
/* @__PURE__ */ N(Ye, {
|
|
360
|
+
permission: v.SESSION_CREATE,
|
|
362
361
|
deniedBehavior: "disable",
|
|
363
362
|
deniedTooltip: "You don't have permission to create sessions",
|
|
364
363
|
children: /* @__PURE__ */ P("button", {
|
|
365
|
-
onClick:
|
|
364
|
+
onClick: Gt,
|
|
366
365
|
className: "flex items-center gap-1.5 px-2.5 py-1.5 sm:px-3 sm:py-2 text-xs sm:text-sm 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",
|
|
367
366
|
children: [
|
|
368
|
-
/* @__PURE__ */ N(
|
|
367
|
+
/* @__PURE__ */ N(O, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4" }),
|
|
369
368
|
/* @__PURE__ */ N("span", {
|
|
370
369
|
className: "hidden sm:inline",
|
|
371
|
-
children:
|
|
370
|
+
children: S("vibeDetails.new", "New")
|
|
372
371
|
}),
|
|
373
372
|
/* @__PURE__ */ N("span", {
|
|
374
373
|
className: "hidden sm:inline",
|
|
375
|
-
children:
|
|
374
|
+
children: S("nav.sessions", "Session")
|
|
376
375
|
})
|
|
377
376
|
]
|
|
378
377
|
})
|
|
379
378
|
}),
|
|
380
|
-
/* @__PURE__ */ N(
|
|
381
|
-
permission:
|
|
379
|
+
/* @__PURE__ */ N(Ye, {
|
|
380
|
+
permission: v.VIBE_UPDATE,
|
|
382
381
|
deniedBehavior: "disable",
|
|
383
382
|
deniedTooltip: "You don't have permission to manage this vibe",
|
|
384
383
|
children: /* @__PURE__ */ P("div", {
|
|
385
384
|
className: "relative",
|
|
386
|
-
ref:
|
|
385
|
+
ref: Ut,
|
|
387
386
|
children: [/* @__PURE__ */ N("button", {
|
|
388
387
|
type: "button",
|
|
389
|
-
onClick: () =>
|
|
388
|
+
onClick: () => Ht((e) => !e),
|
|
390
389
|
"aria-haspopup": "menu",
|
|
391
|
-
"aria-expanded":
|
|
392
|
-
"aria-label":
|
|
393
|
-
title:
|
|
390
|
+
"aria-expanded": Vt,
|
|
391
|
+
"aria-label": S("common.moreActions", "More actions"),
|
|
392
|
+
title: S("common.moreActions", "More actions"),
|
|
394
393
|
className: "flex items-center justify-center p-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
395
|
-
children: /* @__PURE__ */ N(
|
|
396
|
-
}),
|
|
394
|
+
children: /* @__PURE__ */ N(Fe, { className: "w-4 h-4" })
|
|
395
|
+
}), Vt && /* @__PURE__ */ P("div", {
|
|
397
396
|
role: "menu",
|
|
398
397
|
className: "absolute right-0 mt-2 min-w-[12rem] bg-bg-elevated border border-border-default rounded-md shadow-lg z-20 py-1",
|
|
399
398
|
children: [
|
|
400
399
|
/* @__PURE__ */ N("button", {
|
|
401
400
|
role: "menuitem",
|
|
402
401
|
onClick: () => {
|
|
403
|
-
|
|
402
|
+
Ht(!1), Qt ? Rt() : Lt();
|
|
404
403
|
},
|
|
405
404
|
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-action-ghost-bg-hover text-left",
|
|
406
|
-
children:
|
|
405
|
+
children: Qt ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(Le, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ N("span", { children: S("vibeDetails.pauseVibe", "Pause vibe (stop scheduled runs)") })] }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(Re, { className: "w-4 h-4 text-status-success-text" }), /* @__PURE__ */ N("span", { children: S("vibeDetails.resumeVibe", "Resume vibe (re-enable scheduled runs)") })] })
|
|
407
406
|
}),
|
|
408
407
|
/* @__PURE__ */ N("div", { className: "border-t border-border-subtle my-1" }),
|
|
409
408
|
/* @__PURE__ */ P("button", {
|
|
410
409
|
role: "menuitem",
|
|
411
410
|
onClick: () => {
|
|
412
|
-
|
|
411
|
+
Ht(!1), Bt(!0);
|
|
413
412
|
},
|
|
414
413
|
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-status-warning-text hover:bg-action-ghost-bg-hover text-left",
|
|
415
|
-
children: [/* @__PURE__ */ N(
|
|
414
|
+
children: [/* @__PURE__ */ N(xe, { className: "w-4 h-4" }), /* @__PURE__ */ N("span", { children: S("vibeDetails.archive", "Archive vibe…") })]
|
|
416
415
|
})
|
|
417
416
|
]
|
|
418
417
|
})]
|
|
@@ -421,13 +420,13 @@ function R() {
|
|
|
421
420
|
]
|
|
422
421
|
})
|
|
423
422
|
}),
|
|
424
|
-
|
|
423
|
+
zt && /* @__PURE__ */ N("div", {
|
|
425
424
|
role: "dialog",
|
|
426
425
|
"aria-modal": "true",
|
|
427
426
|
"aria-labelledby": "archive-vibe-title",
|
|
428
427
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
429
428
|
onClick: (e) => {
|
|
430
|
-
e.target === e.currentTarget &&
|
|
429
|
+
e.target === e.currentTarget && Bt(!1);
|
|
431
430
|
},
|
|
432
431
|
children: /* @__PURE__ */ P("div", {
|
|
433
432
|
className: "w-full max-w-md rounded-lg bg-bg-elevated border border-border-default shadow-xl p-5",
|
|
@@ -435,34 +434,34 @@ function R() {
|
|
|
435
434
|
/* @__PURE__ */ N("h2", {
|
|
436
435
|
id: "archive-vibe-title",
|
|
437
436
|
className: "text-base font-semibold text-text-primary mb-2",
|
|
438
|
-
children:
|
|
437
|
+
children: S("vibeDetails.archiveConfirmTitle", "Archive this vibe?")
|
|
439
438
|
}),
|
|
440
439
|
/* @__PURE__ */ N("p", {
|
|
441
440
|
className: "text-sm text-text-secondary mb-4",
|
|
442
|
-
children:
|
|
441
|
+
children: S("vibeDetails.archiveConfirmBody", "Archived vibes are hidden from the active list and their scheduled actions stop firing. You can restore the vibe later from the archived view. Existing sessions, tunnels, and audit history are preserved.")
|
|
443
442
|
}),
|
|
444
443
|
/* @__PURE__ */ P("div", {
|
|
445
444
|
className: "flex justify-end gap-2",
|
|
446
445
|
children: [/* @__PURE__ */ N("button", {
|
|
447
446
|
type: "button",
|
|
448
|
-
onClick: () =>
|
|
447
|
+
onClick: () => Bt(!1),
|
|
449
448
|
className: "text-sm px-3 py-1.5 rounded-md border border-border-default text-text-primary hover:bg-action-ghost-bg-hover",
|
|
450
|
-
children:
|
|
449
|
+
children: S("common.cancel", "Cancel")
|
|
451
450
|
}), /* @__PURE__ */ N("button", {
|
|
452
451
|
type: "button",
|
|
453
|
-
onClick:
|
|
452
|
+
onClick: Wt,
|
|
454
453
|
className: "text-sm px-3 py-1.5 rounded-md bg-status-warning-bg text-status-warning-text hover:opacity-80",
|
|
455
|
-
children:
|
|
454
|
+
children: S("vibeDetails.archive", "Archive")
|
|
456
455
|
})]
|
|
457
456
|
})
|
|
458
457
|
]
|
|
459
458
|
})
|
|
460
459
|
}),
|
|
461
|
-
/* @__PURE__ */ P(
|
|
460
|
+
/* @__PURE__ */ P(Je, {
|
|
462
461
|
stagger: .04,
|
|
463
462
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4",
|
|
464
463
|
children: [
|
|
465
|
-
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(
|
|
464
|
+
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(_, {
|
|
466
465
|
className: "p-3 sm:p-4",
|
|
467
466
|
children: /* @__PURE__ */ P("div", {
|
|
468
467
|
className: "flex items-center gap-2 sm:gap-3",
|
|
@@ -473,70 +472,52 @@ function R() {
|
|
|
473
472
|
className: "min-w-0",
|
|
474
473
|
children: [/* @__PURE__ */ N("p", {
|
|
475
474
|
className: "text-xs sm:text-sm text-text-secondary",
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
title: S("vibeDetails.statusTooltip", "ACTIVE: vibe is in your default working set and can run sessions, tunnels and GitOps via its attached agent(s). INACTIVE: vibe is parked — still visible, no sessions auto-resume. RUNNING: at least one session is live. ARCHIVED: hidden from default lists; can be restored."),
|
|
476
|
+
children: S("sessions.filterStatus", "Status")
|
|
477
|
+
}), /* @__PURE__ */ N(g, {
|
|
478
478
|
status: V.status,
|
|
479
479
|
size: "md"
|
|
480
480
|
})]
|
|
481
481
|
})]
|
|
482
482
|
})
|
|
483
483
|
}) }),
|
|
484
|
-
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(
|
|
484
|
+
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(_, {
|
|
485
485
|
className: "p-3 sm:p-4",
|
|
486
486
|
children: /* @__PURE__ */ P("div", {
|
|
487
487
|
className: "flex items-center gap-2 sm:gap-3",
|
|
488
488
|
children: [/* @__PURE__ */ N("div", {
|
|
489
489
|
className: "w-8 h-8 sm:w-10 sm:h-10 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
|
|
490
|
-
children: /* @__PURE__ */ N(
|
|
491
|
-
}), /* @__PURE__ */ P("div", {
|
|
492
|
-
className: "min-w-0",
|
|
493
|
-
children: [/* @__PURE__ */ N("p", {
|
|
494
|
-
className: "text-xs sm:text-sm text-text-secondary",
|
|
495
|
-
children: C("sessions.filterType", "Type")
|
|
496
|
-
}), /* @__PURE__ */ N("p", {
|
|
497
|
-
className: "font-semibold text-text-primary text-sm sm:text-base truncate",
|
|
498
|
-
children: V.type
|
|
499
|
-
})]
|
|
500
|
-
})]
|
|
501
|
-
})
|
|
502
|
-
}) }),
|
|
503
|
-
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(v, {
|
|
504
|
-
className: "p-3 sm:p-4",
|
|
505
|
-
children: /* @__PURE__ */ P("div", {
|
|
506
|
-
className: "flex items-center gap-2 sm:gap-3",
|
|
507
|
-
children: [/* @__PURE__ */ N("div", {
|
|
508
|
-
className: "w-8 h-8 sm:w-10 sm:h-10 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
|
|
509
|
-
children: /* @__PURE__ */ N(Re, { className: "w-4 h-4 sm:w-5 sm:h-5 text-text-secondary" })
|
|
490
|
+
children: /* @__PURE__ */ N(Be, { className: "w-4 h-4 sm:w-5 sm:h-5 text-text-secondary" })
|
|
510
491
|
}), /* @__PURE__ */ P("div", {
|
|
511
492
|
className: "min-w-0 flex-1",
|
|
512
493
|
children: [/* @__PURE__ */ N("p", {
|
|
513
494
|
className: "text-xs sm:text-sm text-text-secondary",
|
|
514
|
-
children:
|
|
495
|
+
children: S("sessions.filterAgent", "Agent")
|
|
515
496
|
}), /* @__PURE__ */ N("p", {
|
|
516
497
|
className: "font-semibold text-text-primary text-sm sm:text-base truncate",
|
|
517
|
-
children: q?.name ||
|
|
498
|
+
children: q?.name || S("targets.unknown", "Unknown")
|
|
518
499
|
})]
|
|
519
500
|
})]
|
|
520
501
|
})
|
|
521
502
|
}) }),
|
|
522
|
-
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(
|
|
503
|
+
/* @__PURE__ */ N(I, { children: /* @__PURE__ */ N(_, {
|
|
523
504
|
className: "p-3 sm:p-4",
|
|
524
505
|
children: /* @__PURE__ */ P("div", {
|
|
525
506
|
className: "flex items-center gap-2 sm:gap-3",
|
|
526
507
|
children: [/* @__PURE__ */ N("div", {
|
|
527
508
|
className: "w-8 h-8 sm:w-10 sm:h-10 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
|
|
528
|
-
children: /* @__PURE__ */ N(
|
|
509
|
+
children: /* @__PURE__ */ N(k, { className: "w-4 h-4 sm:w-5 sm:h-5 text-text-secondary" })
|
|
529
510
|
}), /* @__PURE__ */ P("div", {
|
|
530
511
|
className: "min-w-0",
|
|
531
512
|
children: [/* @__PURE__ */ N("p", {
|
|
532
513
|
className: "text-xs sm:text-sm text-text-secondary",
|
|
533
|
-
children:
|
|
514
|
+
children: S("nav.sessions", "Sessions")
|
|
534
515
|
}), /* @__PURE__ */ P("p", {
|
|
535
516
|
className: "font-semibold text-text-primary text-sm sm:text-base",
|
|
536
517
|
children: [
|
|
537
|
-
|
|
518
|
+
$t,
|
|
538
519
|
" ",
|
|
539
|
-
|
|
520
|
+
S("health.active", "active")
|
|
540
521
|
]
|
|
541
522
|
})]
|
|
542
523
|
})]
|
|
@@ -548,9 +529,9 @@ function R() {
|
|
|
548
529
|
className: "border-b border-border-default",
|
|
549
530
|
children: /* @__PURE__ */ P("nav", {
|
|
550
531
|
className: "flex gap-1 -mb-px overflow-x-auto pb-1",
|
|
551
|
-
"aria-label":
|
|
532
|
+
"aria-label": S("vibeDetails.tabsAriaLabel", "Vibe tabs"),
|
|
552
533
|
children: [
|
|
553
|
-
|
|
534
|
+
nn.map((e) => {
|
|
554
535
|
let t = e.icon, n = Z === e.id;
|
|
555
536
|
return /* @__PURE__ */ P("button", {
|
|
556
537
|
onClick: () => Q(e.id),
|
|
@@ -580,7 +561,7 @@ function R() {
|
|
|
580
561
|
}),
|
|
581
562
|
Y && K && /* @__PURE__ */ P("button", {
|
|
582
563
|
type: "button",
|
|
583
|
-
onClick: () =>
|
|
564
|
+
onClick: () => Ft(!0),
|
|
584
565
|
className: "flex shrink-0 items-center gap-1 px-2 py-2 text-xs sm:text-sm border-b-2 border-transparent text-text-secondary hover:text-text-primary hover:border-border-default",
|
|
585
566
|
title: "Install a UI plugin tab",
|
|
586
567
|
"aria-label": "Add tab",
|
|
@@ -595,7 +576,7 @@ function R() {
|
|
|
595
576
|
]
|
|
596
577
|
})
|
|
597
578
|
}),
|
|
598
|
-
/* @__PURE__ */ P(
|
|
579
|
+
/* @__PURE__ */ P(qe, {
|
|
599
580
|
mode: "wait",
|
|
600
581
|
children: [
|
|
601
582
|
Z === "overview" && /* @__PURE__ */ P(j.div, {
|
|
@@ -614,23 +595,28 @@ function R() {
|
|
|
614
595
|
transition: { duration: .2 },
|
|
615
596
|
className: "space-y-6",
|
|
616
597
|
children: [
|
|
617
|
-
V.description && /* @__PURE__ */ N(
|
|
598
|
+
V.description && /* @__PURE__ */ N(_, { children: /* @__PURE__ */ N("div", {
|
|
618
599
|
className: "p-4",
|
|
619
600
|
children: /* @__PURE__ */ N("p", {
|
|
620
601
|
className: "text-text-primary",
|
|
621
602
|
children: V.description
|
|
622
603
|
})
|
|
623
604
|
}) }),
|
|
624
|
-
!
|
|
605
|
+
!It && /* @__PURE__ */ N(pe, {
|
|
625
606
|
vibeId: V.id,
|
|
626
|
-
tr:
|
|
627
|
-
onAttached: () =>
|
|
607
|
+
tr: S,
|
|
608
|
+
onAttached: () => vt()
|
|
628
609
|
}),
|
|
629
|
-
|
|
610
|
+
It && /* @__PURE__ */ N(me, {
|
|
611
|
+
vibeId: V.id,
|
|
612
|
+
attachedAgents: W,
|
|
613
|
+
effectiveAgentId: K?.id ?? null
|
|
614
|
+
}),
|
|
615
|
+
/* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
630
616
|
className: "p-3 sm:p-4 border-b border-border-default",
|
|
631
617
|
children: /* @__PURE__ */ P("h3", {
|
|
632
618
|
className: "font-semibold text-text-primary flex items-center gap-2 text-sm sm:text-base",
|
|
633
|
-
children: [/* @__PURE__ */ N(
|
|
619
|
+
children: [/* @__PURE__ */ N(Oe, { className: "w-4 h-4 sm:w-5 sm:h-5" }), S("vibeDetails.path", "Path")]
|
|
634
620
|
})
|
|
635
621
|
}), /* @__PURE__ */ N("div", {
|
|
636
622
|
className: "p-3 sm:p-4",
|
|
@@ -639,11 +625,11 @@ function R() {
|
|
|
639
625
|
children: V.path
|
|
640
626
|
})
|
|
641
627
|
})] }),
|
|
642
|
-
/* @__PURE__ */ P(
|
|
628
|
+
/* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
643
629
|
className: "p-4 border-b border-border-default",
|
|
644
630
|
children: /* @__PURE__ */ P("h3", {
|
|
645
631
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
646
|
-
children: [/* @__PURE__ */ N(
|
|
632
|
+
children: [/* @__PURE__ */ N(Te, { className: "w-5 h-5" }), S("vibeDetails.timeline", "Timeline")]
|
|
647
633
|
})
|
|
648
634
|
}), /* @__PURE__ */ N("div", {
|
|
649
635
|
className: "p-4",
|
|
@@ -651,16 +637,16 @@ function R() {
|
|
|
651
637
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
|
|
652
638
|
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
653
639
|
className: "text-text-secondary",
|
|
654
|
-
children:
|
|
640
|
+
children: S("vibeDetails.created", "Created")
|
|
655
641
|
}), /* @__PURE__ */ N("p", {
|
|
656
642
|
className: "font-medium text-text-primary",
|
|
657
|
-
children:
|
|
643
|
+
children: Xt(V.createdAt)
|
|
658
644
|
})] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
659
645
|
className: "text-text-secondary",
|
|
660
|
-
children:
|
|
646
|
+
children: S("vibeDetails.updated", "Updated")
|
|
661
647
|
}), /* @__PURE__ */ N("p", {
|
|
662
648
|
className: "font-medium text-text-primary",
|
|
663
|
-
children:
|
|
649
|
+
children: Xt(V.updatedAt)
|
|
664
650
|
})] })]
|
|
665
651
|
})
|
|
666
652
|
})] })
|
|
@@ -682,11 +668,11 @@ function R() {
|
|
|
682
668
|
transition: { duration: .2 },
|
|
683
669
|
className: "space-y-6",
|
|
684
670
|
children: [
|
|
685
|
-
/* @__PURE__ */ P(
|
|
671
|
+
/* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
686
672
|
className: "p-4 border-b border-border-default",
|
|
687
673
|
children: /* @__PURE__ */ P("h3", {
|
|
688
674
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
689
|
-
children: [/* @__PURE__ */ N(
|
|
675
|
+
children: [/* @__PURE__ */ N(We, { className: "w-5 h-5" }), S("vibeDetails.environmentVariables", "Environment Variables")]
|
|
690
676
|
})
|
|
691
677
|
}), /* @__PURE__ */ N("div", {
|
|
692
678
|
className: "p-4",
|
|
@@ -702,30 +688,30 @@ function R() {
|
|
|
702
688
|
}, e))
|
|
703
689
|
}) : /* @__PURE__ */ N("p", {
|
|
704
690
|
className: "text-text-secondary",
|
|
705
|
-
children:
|
|
691
|
+
children: S("vibeDetails.noEnvironmentVariables", "No environment variables configured")
|
|
706
692
|
})
|
|
707
693
|
})] }),
|
|
708
|
-
/* @__PURE__ */ P(
|
|
694
|
+
/* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
709
695
|
className: "p-4 border-b border-border-default",
|
|
710
696
|
children: /* @__PURE__ */ P("h3", {
|
|
711
697
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
712
|
-
children: [/* @__PURE__ */ N(
|
|
698
|
+
children: [/* @__PURE__ */ N(Ue, { className: "w-5 h-5" }), S("vibeDetails.tags", "Tags")]
|
|
713
699
|
})
|
|
714
700
|
}), /* @__PURE__ */ N("div", {
|
|
715
701
|
className: "p-4",
|
|
716
|
-
children: /* @__PURE__ */ N(
|
|
702
|
+
children: /* @__PURE__ */ N(m, {
|
|
717
703
|
entityType: "VIBECONTROLS_VIBE",
|
|
718
704
|
entityId: V.id
|
|
719
705
|
})
|
|
720
706
|
})] }),
|
|
721
|
-
/* @__PURE__ */ P(
|
|
707
|
+
/* @__PURE__ */ P(_, { children: [/* @__PURE__ */ P("div", {
|
|
722
708
|
className: "p-4 border-b border-border-default",
|
|
723
709
|
children: [/* @__PURE__ */ P("h3", {
|
|
724
710
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
725
|
-
children: [/* @__PURE__ */ N(
|
|
711
|
+
children: [/* @__PURE__ */ N(Ve, { className: "w-5 h-5" }), S("vibeDetails.features", "Features")]
|
|
726
712
|
}), /* @__PURE__ */ N("p", {
|
|
727
713
|
className: "text-sm text-text-secondary mt-1",
|
|
728
|
-
children:
|
|
714
|
+
children: S("vibeDetails.featuresDescription", "Toggle which sections show up on this vibe. Changes apply to everyone viewing the vibe.")
|
|
729
715
|
})]
|
|
730
716
|
}), /* @__PURE__ */ N("div", {
|
|
731
717
|
className: "p-4 space-y-2",
|
|
@@ -741,11 +727,11 @@ function R() {
|
|
|
741
727
|
role: "switch",
|
|
742
728
|
"aria-label": e.label,
|
|
743
729
|
checked: t,
|
|
744
|
-
disabled:
|
|
730
|
+
disabled: it || !V.id,
|
|
745
731
|
onChange: async (t) => {
|
|
746
732
|
let n = t.target.checked;
|
|
747
733
|
try {
|
|
748
|
-
await
|
|
734
|
+
await rt({
|
|
749
735
|
variables: {
|
|
750
736
|
id: V.id,
|
|
751
737
|
featureId: e.id,
|
|
@@ -790,18 +776,18 @@ function R() {
|
|
|
790
776
|
},
|
|
791
777
|
transition: { duration: .2 },
|
|
792
778
|
className: "space-y-6",
|
|
793
|
-
children: /* @__PURE__ */ N(
|
|
779
|
+
children: /* @__PURE__ */ N(ne, {
|
|
794
780
|
agentId: K?.id ?? null,
|
|
795
781
|
required: ["@vibecontrols/vibe-plugin-tool-git"],
|
|
796
782
|
mode: "all",
|
|
797
|
-
eyebrow:
|
|
798
|
-
title:
|
|
799
|
-
description:
|
|
800
|
-
children:
|
|
783
|
+
eyebrow: S("vibeDetails.gitPluginEyebrow", "Git plugin required"),
|
|
784
|
+
title: S("vibeDetails.gitPluginTitle", "Install the git plugin"),
|
|
785
|
+
description: S("vibeDetails.gitPluginDescription", "Live git branch, status, and remote data for this vibe are served by the vibe-plugin-tool-git agent plugin."),
|
|
786
|
+
children: tn ? /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
801
787
|
className: "p-4 border-b border-border-default",
|
|
802
788
|
children: /* @__PURE__ */ P("h3", {
|
|
803
789
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
804
|
-
children: [/* @__PURE__ */ N(
|
|
790
|
+
children: [/* @__PURE__ */ N(ke, { className: "w-5 h-5" }), S("vibeDetails.gitInformation", "Git Information")]
|
|
805
791
|
})
|
|
806
792
|
}), /* @__PURE__ */ P("div", {
|
|
807
793
|
className: "p-4 space-y-3",
|
|
@@ -811,7 +797,7 @@ function R() {
|
|
|
811
797
|
className: "flex items-center gap-2",
|
|
812
798
|
children: [/* @__PURE__ */ P("span", {
|
|
813
799
|
className: "text-sm text-text-secondary",
|
|
814
|
-
children: [
|
|
800
|
+
children: [S("vibeDetails.branch", "Branch"), ":"]
|
|
815
801
|
}), /* @__PURE__ */ N("span", {
|
|
816
802
|
className: "px-2 py-1 bg-bg-sunken text-text-primary text-sm rounded font-mono",
|
|
817
803
|
children: V.gitBranch
|
|
@@ -820,23 +806,23 @@ function R() {
|
|
|
820
806
|
className: "flex items-center gap-2",
|
|
821
807
|
children: [/* @__PURE__ */ P("span", {
|
|
822
808
|
className: "text-sm text-text-secondary",
|
|
823
|
-
children: [
|
|
809
|
+
children: [S("sessions.filterStatus", "Status"), ":"]
|
|
824
810
|
}), /* @__PURE__ */ N("span", {
|
|
825
|
-
className: `font-medium ${
|
|
811
|
+
className: `font-medium ${Zt(V.gitStatus)}`,
|
|
826
812
|
children: V.gitStatus
|
|
827
813
|
})]
|
|
828
814
|
})]
|
|
829
815
|
}), V.gitRemote && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("span", {
|
|
830
816
|
className: "text-sm text-text-secondary",
|
|
831
|
-
children: [
|
|
817
|
+
children: [S("vibeDetails.remote", "Remote"), ":"]
|
|
832
818
|
}), /* @__PURE__ */ N("p", {
|
|
833
819
|
className: "font-mono text-sm text-text-primary mt-1 break-all",
|
|
834
820
|
children: V.gitRemote
|
|
835
821
|
})] })]
|
|
836
|
-
})] }) : /* @__PURE__ */ N(
|
|
837
|
-
icon: /* @__PURE__ */ N(
|
|
838
|
-
title:
|
|
839
|
-
description:
|
|
822
|
+
})] }) : /* @__PURE__ */ N(h, {
|
|
823
|
+
icon: /* @__PURE__ */ N(ke, { className: "w-8 h-8 text-text-secondary" }),
|
|
824
|
+
title: S("vibeDetails.noGitInformation", "No git information"),
|
|
825
|
+
description: S("vibeDetails.noGitInformationDescription", "This vibe does not have any git repository linked")
|
|
840
826
|
})
|
|
841
827
|
})
|
|
842
828
|
}, "git"),
|
|
@@ -854,47 +840,47 @@ function R() {
|
|
|
854
840
|
y: -8
|
|
855
841
|
},
|
|
856
842
|
transition: { duration: .2 },
|
|
857
|
-
children: /* @__PURE__ */ N(
|
|
843
|
+
children: /* @__PURE__ */ N(ne, {
|
|
858
844
|
agentId: K?.id ?? null,
|
|
859
845
|
requirements: [{
|
|
860
846
|
packages: ["@vibecontrols/vibe-plugin-session-manager"],
|
|
861
847
|
mode: "all",
|
|
862
|
-
eyebrow:
|
|
863
|
-
title:
|
|
864
|
-
description:
|
|
848
|
+
eyebrow: S("vibeDetails.sessionsManagerEyebrow", "Session manager required"),
|
|
849
|
+
title: S("vibeDetails.sessionsManagerTitle", "Install the session manager"),
|
|
850
|
+
description: S("vibeDetails.sessionsManagerDescription", "Sessions are orchestrated by the unified session manager plugin. Install it to continue.")
|
|
865
851
|
}, {
|
|
866
|
-
packages:
|
|
852
|
+
packages: te,
|
|
867
853
|
mode: "any",
|
|
868
|
-
eyebrow:
|
|
869
|
-
title:
|
|
870
|
-
description:
|
|
854
|
+
eyebrow: S("vibeDetails.sessionProviderEyebrow", "Session provider required"),
|
|
855
|
+
title: S("vibeDetails.sessionProviderTitle", "Pick a session provider"),
|
|
856
|
+
description: S("vibeDetails.sessionProviderDescription", "Choose the terminal multiplexer your sessions should run on. You can install more providers later.")
|
|
871
857
|
}],
|
|
872
|
-
children: /* @__PURE__ */ P(
|
|
858
|
+
children: /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ P("div", {
|
|
873
859
|
className: "p-4 border-b border-border-default flex items-center justify-between",
|
|
874
860
|
children: [/* @__PURE__ */ P("h3", {
|
|
875
861
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
876
862
|
children: [
|
|
877
|
-
/* @__PURE__ */ N(
|
|
878
|
-
|
|
863
|
+
/* @__PURE__ */ N(k, { className: "w-5 h-5" }),
|
|
864
|
+
S("nav.sessions", "Sessions"),
|
|
879
865
|
" (",
|
|
880
866
|
G.length,
|
|
881
867
|
")"
|
|
882
868
|
]
|
|
883
869
|
}), /* @__PURE__ */ P("button", {
|
|
884
|
-
onClick:
|
|
870
|
+
onClick: Gt,
|
|
885
871
|
className: "flex items-center gap-1 px-2 py-1 text-sm bg-bg-sunken text-text-primary rounded hover:bg-bg-sunken/80 transition-colors",
|
|
886
|
-
children: [/* @__PURE__ */ N(
|
|
872
|
+
children: [/* @__PURE__ */ N(O, { className: "w-4 h-4" }), S("vibeDetails.new", "New")]
|
|
887
873
|
})]
|
|
888
|
-
}), G.length > 0 ? /* @__PURE__ */ N(
|
|
874
|
+
}), G.length > 0 ? /* @__PURE__ */ N(Je, {
|
|
889
875
|
className: "divide-y divide-border-primary",
|
|
890
876
|
children: G.map((e) => /* @__PURE__ */ N(I, {
|
|
891
877
|
variant: "fadeRight",
|
|
892
878
|
children: /* @__PURE__ */ P("div", {
|
|
893
|
-
onClick: () =>
|
|
879
|
+
onClick: () => Jt(e.id),
|
|
894
880
|
className: "p-4 flex items-center justify-between cursor-pointer hover:bg-bg-sunken/50 transition-colors",
|
|
895
881
|
children: [/* @__PURE__ */ P("div", {
|
|
896
882
|
className: "flex items-center gap-3 min-w-0",
|
|
897
|
-
children: [/* @__PURE__ */ N(
|
|
883
|
+
children: [/* @__PURE__ */ N(k, { className: "w-5 h-5 text-text-secondary flex-shrink-0" }), /* @__PURE__ */ P("div", {
|
|
898
884
|
className: "min-w-0",
|
|
899
885
|
children: [/* @__PURE__ */ N("p", {
|
|
900
886
|
className: "font-medium text-text-primary truncate",
|
|
@@ -904,12 +890,12 @@ function R() {
|
|
|
904
890
|
children: e.type
|
|
905
891
|
})]
|
|
906
892
|
})]
|
|
907
|
-
}), /* @__PURE__ */ N(
|
|
893
|
+
}), /* @__PURE__ */ N(g, { status: e.status })]
|
|
908
894
|
})
|
|
909
895
|
}, e.id))
|
|
910
896
|
}) : /* @__PURE__ */ N("div", {
|
|
911
897
|
className: "p-6 text-center text-text-secondary",
|
|
912
|
-
children:
|
|
898
|
+
children: S("vibeDetails.noSessionsForVibe", "No sessions for this vibe")
|
|
913
899
|
})] })
|
|
914
900
|
})
|
|
915
901
|
}, "sessions"),
|
|
@@ -928,7 +914,7 @@ function R() {
|
|
|
928
914
|
},
|
|
929
915
|
transition: { duration: .2 },
|
|
930
916
|
className: "space-y-6",
|
|
931
|
-
children: /* @__PURE__ */ N(
|
|
917
|
+
children: /* @__PURE__ */ N(y, {
|
|
932
918
|
context: "vibe",
|
|
933
919
|
vibeId: V.id
|
|
934
920
|
})
|
|
@@ -948,7 +934,7 @@ function R() {
|
|
|
948
934
|
},
|
|
949
935
|
transition: { duration: .2 },
|
|
950
936
|
className: "space-y-6",
|
|
951
|
-
children: /* @__PURE__ */ N(
|
|
937
|
+
children: /* @__PURE__ */ N(de, { vibeId: V.id })
|
|
952
938
|
}, "docs"),
|
|
953
939
|
Z === "scorecard" && U("scorecard") && /* @__PURE__ */ N(j.div, {
|
|
954
940
|
initial: {
|
|
@@ -965,7 +951,7 @@ function R() {
|
|
|
965
951
|
},
|
|
966
952
|
transition: { duration: .2 },
|
|
967
953
|
className: "space-y-6",
|
|
968
|
-
children: /* @__PURE__ */ N(
|
|
954
|
+
children: /* @__PURE__ */ N(ue, {
|
|
969
955
|
ownerType: "VIBE",
|
|
970
956
|
ownerId: V.id
|
|
971
957
|
})
|
|
@@ -985,10 +971,10 @@ function R() {
|
|
|
985
971
|
},
|
|
986
972
|
transition: { duration: .2 },
|
|
987
973
|
className: "space-y-6",
|
|
988
|
-
children: /* @__PURE__ */ N(
|
|
974
|
+
children: /* @__PURE__ */ N(tt, {
|
|
989
975
|
vibeId: V.id,
|
|
990
|
-
tr:
|
|
991
|
-
navigate:
|
|
976
|
+
tr: S,
|
|
977
|
+
navigate: x
|
|
992
978
|
})
|
|
993
979
|
}, "catalogs"),
|
|
994
980
|
Z === "graphqlPlayground" && U("graphqlPlayground") && /* @__PURE__ */ N(j.div, {
|
|
@@ -1006,35 +992,35 @@ function R() {
|
|
|
1006
992
|
},
|
|
1007
993
|
transition: { duration: .2 },
|
|
1008
994
|
className: "space-y-6",
|
|
1009
|
-
children: /* @__PURE__ */ N(
|
|
995
|
+
children: /* @__PURE__ */ N(ne, {
|
|
1010
996
|
agentId: K?.id ?? null,
|
|
1011
997
|
required: ["@vibecontrols/vibe-plugin-tool-graphiql"],
|
|
1012
998
|
mode: "all",
|
|
1013
|
-
eyebrow:
|
|
1014
|
-
title:
|
|
1015
|
-
description:
|
|
1016
|
-
children:
|
|
999
|
+
eyebrow: S("vibeDetails.graphqlPluginEyebrow", "GraphQL playground plugin required"),
|
|
1000
|
+
title: S("vibeDetails.graphqlPluginTitle", "Install the GraphQL playground"),
|
|
1001
|
+
description: S("vibeDetails.graphqlPluginDescription", "The GraphQL Playground is served by the graphiql agent plugin. Install it to continue."),
|
|
1002
|
+
children: jt ? /* @__PURE__ */ N(nt, {
|
|
1017
1003
|
vibeId: V.id,
|
|
1018
1004
|
agentId: K?.id ?? null,
|
|
1019
1005
|
profile: J,
|
|
1020
|
-
tunnelUrl:
|
|
1021
|
-
apiKey:
|
|
1006
|
+
tunnelUrl: jt,
|
|
1007
|
+
apiKey: Mt,
|
|
1022
1008
|
type: "graphql",
|
|
1023
|
-
tr:
|
|
1024
|
-
}) : /* @__PURE__ */ N(
|
|
1025
|
-
icon: /* @__PURE__ */ N(
|
|
1026
|
-
title:
|
|
1027
|
-
description:
|
|
1009
|
+
tr: S
|
|
1010
|
+
}) : /* @__PURE__ */ N(h, {
|
|
1011
|
+
icon: /* @__PURE__ */ N(Ie, { className: "w-8 h-8 text-text-secondary" }),
|
|
1012
|
+
title: S("vibeDetails.noAgentTunnel", "No agent tunnel available"),
|
|
1013
|
+
description: S("vibeDetails.noAgentTunnelDesc2", "The GraphQL playground requires an active agent with a tunnel URL.")
|
|
1028
1014
|
})
|
|
1029
1015
|
})
|
|
1030
1016
|
}, "graphqlPlayground"),
|
|
1031
|
-
Z === "gitops" && U("gitops") && /* @__PURE__ */ N(
|
|
1017
|
+
Z === "gitops" && U("gitops") && /* @__PURE__ */ N(fe, {
|
|
1032
1018
|
vibeId: r || "",
|
|
1033
1019
|
agentId: K?.id ?? "",
|
|
1034
1020
|
profile: J,
|
|
1035
|
-
tunnelUrl:
|
|
1036
|
-
apiKey:
|
|
1037
|
-
tr:
|
|
1021
|
+
tunnelUrl: jt,
|
|
1022
|
+
apiKey: Mt,
|
|
1023
|
+
tr: S
|
|
1038
1024
|
}),
|
|
1039
1025
|
Z === "security" && U("security") && /* @__PURE__ */ N(j.div, {
|
|
1040
1026
|
initial: {
|
|
@@ -1051,7 +1037,7 @@ function R() {
|
|
|
1051
1037
|
},
|
|
1052
1038
|
transition: { duration: .2 },
|
|
1053
1039
|
className: "space-y-6",
|
|
1054
|
-
children: /* @__PURE__ */ N(
|
|
1040
|
+
children: /* @__PURE__ */ N(_e, { vibeId: r || "" })
|
|
1055
1041
|
}, "security"),
|
|
1056
1042
|
Z === "related" && U("related") && /* @__PURE__ */ N(j.div, {
|
|
1057
1043
|
initial: {
|
|
@@ -1068,25 +1054,25 @@ function R() {
|
|
|
1068
1054
|
},
|
|
1069
1055
|
transition: { duration: .2 },
|
|
1070
1056
|
className: "space-y-6",
|
|
1071
|
-
children:
|
|
1072
|
-
|
|
1057
|
+
children: en > 0 ? /* @__PURE__ */ P(M, { children: [
|
|
1058
|
+
Ot.length > 0 && /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N("div", {
|
|
1073
1059
|
className: "p-4 border-b border-border-default",
|
|
1074
1060
|
children: /* @__PURE__ */ P("h3", {
|
|
1075
1061
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
1076
1062
|
children: [
|
|
1077
1063
|
/* @__PURE__ */ N(A, { className: "w-5 h-5" }),
|
|
1078
|
-
|
|
1064
|
+
S("vibeDetails.childVibes", "Child Vibes"),
|
|
1079
1065
|
" (",
|
|
1080
|
-
|
|
1066
|
+
Ot.length,
|
|
1081
1067
|
")"
|
|
1082
1068
|
]
|
|
1083
1069
|
})
|
|
1084
|
-
}), /* @__PURE__ */ N(
|
|
1070
|
+
}), /* @__PURE__ */ N(Je, {
|
|
1085
1071
|
className: "divide-y divide-border-primary",
|
|
1086
|
-
children:
|
|
1072
|
+
children: Ot.map((e) => /* @__PURE__ */ N(I, {
|
|
1087
1073
|
variant: "fadeRight",
|
|
1088
1074
|
children: /* @__PURE__ */ P("div", {
|
|
1089
|
-
onClick: () =>
|
|
1075
|
+
onClick: () => Yt(e.id),
|
|
1090
1076
|
className: "p-4 flex items-center justify-between cursor-pointer hover:bg-bg-sunken/50 transition-colors",
|
|
1091
1077
|
children: [/* @__PURE__ */ P("div", {
|
|
1092
1078
|
className: "flex items-center gap-3 min-w-0",
|
|
@@ -1100,12 +1086,12 @@ function R() {
|
|
|
1100
1086
|
children: e.type
|
|
1101
1087
|
})]
|
|
1102
1088
|
})]
|
|
1103
|
-
}), /* @__PURE__ */ N(
|
|
1089
|
+
}), /* @__PURE__ */ N(g, { status: e.status })]
|
|
1104
1090
|
})
|
|
1105
1091
|
}, e.id))
|
|
1106
1092
|
})] }),
|
|
1107
|
-
|
|
1108
|
-
onClick: () =>
|
|
1093
|
+
kt && /* @__PURE__ */ N(_, {
|
|
1094
|
+
onClick: () => Yt(kt.id),
|
|
1109
1095
|
hoverable: !0,
|
|
1110
1096
|
children: /* @__PURE__ */ P("div", {
|
|
1111
1097
|
className: "p-4 flex items-center gap-3",
|
|
@@ -1114,15 +1100,15 @@ function R() {
|
|
|
1114
1100
|
children: /* @__PURE__ */ N(A, { className: "w-5 h-5 text-text-secondary" })
|
|
1115
1101
|
}), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
1116
1102
|
className: "text-sm text-text-secondary",
|
|
1117
|
-
children:
|
|
1103
|
+
children: S("vibeDetails.parentVibe", "Parent Vibe")
|
|
1118
1104
|
}), /* @__PURE__ */ N("p", {
|
|
1119
1105
|
className: "font-medium text-text-primary",
|
|
1120
|
-
children:
|
|
1106
|
+
children: kt.name
|
|
1121
1107
|
})] })]
|
|
1122
1108
|
})
|
|
1123
1109
|
}),
|
|
1124
|
-
q && /* @__PURE__ */ N(
|
|
1125
|
-
onClick:
|
|
1110
|
+
q && /* @__PURE__ */ N(_, {
|
|
1111
|
+
onClick: qt,
|
|
1126
1112
|
hoverable: !0,
|
|
1127
1113
|
children: /* @__PURE__ */ P("div", {
|
|
1128
1114
|
className: "p-4 flex items-center justify-between",
|
|
@@ -1130,11 +1116,11 @@ function R() {
|
|
|
1130
1116
|
className: "flex items-center gap-3",
|
|
1131
1117
|
children: [/* @__PURE__ */ N("div", {
|
|
1132
1118
|
className: "w-10 h-10 rounded-lg bg-bg-sunken flex items-center justify-center",
|
|
1133
|
-
children: /* @__PURE__ */ N(
|
|
1119
|
+
children: /* @__PURE__ */ N(Be, { className: "w-5 h-5 text-text-secondary" })
|
|
1134
1120
|
}), /* @__PURE__ */ P("div", { children: [
|
|
1135
1121
|
/* @__PURE__ */ N("p", {
|
|
1136
1122
|
className: "text-sm text-text-secondary",
|
|
1137
|
-
children:
|
|
1123
|
+
children: S("vibeDetails.runningOnAgent", "Running on Agent")
|
|
1138
1124
|
}),
|
|
1139
1125
|
/* @__PURE__ */ N("p", {
|
|
1140
1126
|
className: "font-medium text-text-primary",
|
|
@@ -1145,13 +1131,13 @@ function R() {
|
|
|
1145
1131
|
children: q.hostname
|
|
1146
1132
|
})
|
|
1147
1133
|
] })]
|
|
1148
|
-
}), /* @__PURE__ */ N(
|
|
1134
|
+
}), /* @__PURE__ */ N(g, { status: q.isActive ? "ACTIVE" : "OFFLINE" })]
|
|
1149
1135
|
})
|
|
1150
1136
|
})
|
|
1151
|
-
] }) : /* @__PURE__ */ N(
|
|
1152
|
-
icon: /* @__PURE__ */ N(
|
|
1153
|
-
title:
|
|
1154
|
-
description:
|
|
1137
|
+
] }) : /* @__PURE__ */ N(h, {
|
|
1138
|
+
icon: /* @__PURE__ */ N(Ne, { className: "w-8 h-8 text-text-secondary" }),
|
|
1139
|
+
title: S("vibeDetails.noRelatedEntities", "No related entities"),
|
|
1140
|
+
description: S("vibeDetails.noRelatedEntitiesDescription", "This vibe has no child vibes, parent vibe, or linked agent")
|
|
1155
1141
|
})
|
|
1156
1142
|
}, "related"),
|
|
1157
1143
|
Y && (() => {
|
|
@@ -1173,9 +1159,9 @@ function R() {
|
|
|
1173
1159
|
},
|
|
1174
1160
|
transition: { duration: .2 },
|
|
1175
1161
|
className: "space-y-6",
|
|
1176
|
-
children: /* @__PURE__ */ N(
|
|
1162
|
+
children: /* @__PURE__ */ N(_, { children: /* @__PURE__ */ N("div", {
|
|
1177
1163
|
className: "p-0 h-[600px]",
|
|
1178
|
-
children: /* @__PURE__ */ N(
|
|
1164
|
+
children: /* @__PURE__ */ N(le, {
|
|
1179
1165
|
contribution: e,
|
|
1180
1166
|
tunnel: t,
|
|
1181
1167
|
restPaths: n,
|
|
@@ -1195,9 +1181,9 @@ function R() {
|
|
|
1195
1181
|
})()
|
|
1196
1182
|
]
|
|
1197
1183
|
}),
|
|
1198
|
-
Y && K && /* @__PURE__ */ N(
|
|
1199
|
-
isOpen:
|
|
1200
|
-
onClose: () =>
|
|
1184
|
+
Y && K && /* @__PURE__ */ N(ce, {
|
|
1185
|
+
isOpen: Pt,
|
|
1186
|
+
onClose: () => Ft(!1),
|
|
1201
1187
|
mountPoint: "vibe.detailTab",
|
|
1202
1188
|
agentId: K.id,
|
|
1203
1189
|
profile: J ?? "default",
|
|
@@ -1205,7 +1191,7 @@ function R() {
|
|
|
1205
1191
|
X.refetch();
|
|
1206
1192
|
}
|
|
1207
1193
|
}),
|
|
1208
|
-
|
|
1194
|
+
at && /* @__PURE__ */ N("div", {
|
|
1209
1195
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
|
|
1210
1196
|
children: /* @__PURE__ */ P("div", {
|
|
1211
1197
|
className: "bg-bg-surface rounded-lg p-6 w-full max-w-lg",
|
|
@@ -1213,70 +1199,70 @@ function R() {
|
|
|
1213
1199
|
/* @__PURE__ */ P("h2", {
|
|
1214
1200
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
1215
1201
|
children: [
|
|
1216
|
-
|
|
1202
|
+
S("vibeDetails.newSessionFor", "New Session for"),
|
|
1217
1203
|
" ",
|
|
1218
1204
|
V.name
|
|
1219
1205
|
]
|
|
1220
1206
|
}),
|
|
1221
|
-
|
|
1207
|
+
st && /* @__PURE__ */ N("div", {
|
|
1222
1208
|
className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
|
|
1223
|
-
children:
|
|
1209
|
+
children: st
|
|
1224
1210
|
}),
|
|
1225
1211
|
/* @__PURE__ */ P("div", {
|
|
1226
1212
|
className: "space-y-4",
|
|
1227
1213
|
children: [
|
|
1228
1214
|
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
1229
1215
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1230
|
-
children:
|
|
1216
|
+
children: S("vibeDetails.sessionName", "Session Name")
|
|
1231
1217
|
}), /* @__PURE__ */ N("input", {
|
|
1232
|
-
ref:
|
|
1218
|
+
ref: ft,
|
|
1233
1219
|
type: "text",
|
|
1234
|
-
placeholder:
|
|
1220
|
+
placeholder: S("vibeDetails.sessionNamePlaceholder", "dev-terminal"),
|
|
1235
1221
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
1236
1222
|
})] }),
|
|
1237
1223
|
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
1238
1224
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1239
|
-
children:
|
|
1225
|
+
children: S("sessions.filterType", "Type")
|
|
1240
1226
|
}), /* @__PURE__ */ P("select", {
|
|
1241
|
-
ref:
|
|
1227
|
+
ref: pt,
|
|
1242
1228
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary",
|
|
1243
1229
|
children: [
|
|
1244
1230
|
/* @__PURE__ */ N("option", {
|
|
1245
1231
|
value: "TERMINAL",
|
|
1246
|
-
children:
|
|
1232
|
+
children: S("sessions.typeTerminal", "Terminal")
|
|
1247
1233
|
}),
|
|
1248
1234
|
/* @__PURE__ */ N("option", {
|
|
1249
1235
|
value: "TMUX",
|
|
1250
|
-
children:
|
|
1236
|
+
children: S("sessions.typeTmux", "TMUX")
|
|
1251
1237
|
}),
|
|
1252
1238
|
/* @__PURE__ */ N("option", {
|
|
1253
1239
|
value: "SSH",
|
|
1254
|
-
children:
|
|
1240
|
+
children: S("sessions.typeSsh", "SSH")
|
|
1255
1241
|
}),
|
|
1256
1242
|
/* @__PURE__ */ N("option", {
|
|
1257
1243
|
value: "SCRIPT",
|
|
1258
|
-
children:
|
|
1244
|
+
children: S("sessions.typeScript", "Script")
|
|
1259
1245
|
}),
|
|
1260
1246
|
/* @__PURE__ */ N("option", {
|
|
1261
1247
|
value: "CUSTOM",
|
|
1262
|
-
children:
|
|
1248
|
+
children: S("sessions.typeCustom", "Custom")
|
|
1263
1249
|
})
|
|
1264
1250
|
]
|
|
1265
1251
|
})] }),
|
|
1266
1252
|
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
1267
1253
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1268
|
-
children:
|
|
1254
|
+
children: S("sessions.command", "Command")
|
|
1269
1255
|
}), /* @__PURE__ */ N("input", {
|
|
1270
|
-
ref:
|
|
1256
|
+
ref: mt,
|
|
1271
1257
|
type: "text",
|
|
1272
|
-
placeholder:
|
|
1258
|
+
placeholder: S("vibeDetails.sessionCommandPlaceholder", "bash"),
|
|
1273
1259
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
1274
1260
|
})] }),
|
|
1275
1261
|
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
1276
1262
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
1277
|
-
children:
|
|
1263
|
+
children: S("vibeDetails.workingDirectory", "Working Directory")
|
|
1278
1264
|
}), /* @__PURE__ */ N("input", {
|
|
1279
|
-
ref:
|
|
1265
|
+
ref: ht,
|
|
1280
1266
|
type: "text",
|
|
1281
1267
|
defaultValue: V.path || "",
|
|
1282
1268
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary"
|
|
@@ -1286,15 +1272,15 @@ function R() {
|
|
|
1286
1272
|
/* @__PURE__ */ P("div", {
|
|
1287
1273
|
className: "flex flex-col sm:flex-row justify-end gap-3 mt-6",
|
|
1288
1274
|
children: [/* @__PURE__ */ N("button", {
|
|
1289
|
-
onClick: () =>
|
|
1290
|
-
disabled:
|
|
1275
|
+
onClick: () => ot(!1),
|
|
1276
|
+
disabled: ct,
|
|
1291
1277
|
className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
1292
|
-
children:
|
|
1278
|
+
children: S("common.cancel", "Cancel")
|
|
1293
1279
|
}), /* @__PURE__ */ N("button", {
|
|
1294
|
-
onClick:
|
|
1295
|
-
disabled:
|
|
1280
|
+
onClick: Kt,
|
|
1281
|
+
disabled: ct,
|
|
1296
1282
|
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",
|
|
1297
|
-
children:
|
|
1283
|
+
children: ct ? S("sessions.creating", "Creating...") : S("sessions.createSession", "Create Session")
|
|
1298
1284
|
})]
|
|
1299
1285
|
})
|
|
1300
1286
|
]
|
|
@@ -1303,31 +1289,31 @@ function R() {
|
|
|
1303
1289
|
]
|
|
1304
1290
|
});
|
|
1305
1291
|
}
|
|
1306
|
-
function
|
|
1307
|
-
let [a, o] =
|
|
1308
|
-
await
|
|
1292
|
+
function tt({ vibeId: t, tr: n, navigate: i }) {
|
|
1293
|
+
let [a, o] = T(!1), { data: c, loading: l, refetch: u } = r({ fetchPolicy: "cache-and-network" }), [ee] = e({ refetchQueries: ["GetVibeCatalogs"] }), [d] = s({ refetchQueries: ["GetVibeCatalogs"] }), f = c?.vibecontrolsCatalogs?.items ?? [], p = f.filter((e) => e.vibes?.some((e) => e.vibeId === t)), m = f.filter((e) => !e.vibes?.some((e) => e.vibeId === t)), g = async (e) => {
|
|
1294
|
+
await ee({ variables: {
|
|
1309
1295
|
catalogId: e,
|
|
1310
1296
|
vibeId: t
|
|
1311
1297
|
} }), await u(), o(!1);
|
|
1312
|
-
},
|
|
1313
|
-
await
|
|
1298
|
+
}, te = async (e) => {
|
|
1299
|
+
await d({ variables: {
|
|
1314
1300
|
catalogId: e,
|
|
1315
1301
|
vibeId: t
|
|
1316
1302
|
} }), await u();
|
|
1317
1303
|
};
|
|
1318
|
-
return l &&
|
|
1304
|
+
return l && f.length === 0 ? /* @__PURE__ */ N(ie, { variant: "detail" }) : /* @__PURE__ */ P(M, { children: [
|
|
1319
1305
|
/* @__PURE__ */ P("div", {
|
|
1320
1306
|
className: "flex items-center justify-between",
|
|
1321
1307
|
children: [/* @__PURE__ */ P("h3", {
|
|
1322
1308
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
1323
1309
|
children: [
|
|
1324
|
-
/* @__PURE__ */ N(
|
|
1310
|
+
/* @__PURE__ */ N(D, { className: "w-5 h-5" }),
|
|
1325
1311
|
n("vibeDetails.catalogsTitle", "Catalogs"),
|
|
1326
1312
|
/* @__PURE__ */ P("span", {
|
|
1327
1313
|
className: "text-sm font-normal text-text-secondary",
|
|
1328
1314
|
children: [
|
|
1329
1315
|
"(",
|
|
1330
|
-
|
|
1316
|
+
p.length,
|
|
1331
1317
|
")"
|
|
1332
1318
|
]
|
|
1333
1319
|
})
|
|
@@ -1335,17 +1321,17 @@ function et({ vibeId: t, tr: n, navigate: i }) {
|
|
|
1335
1321
|
}), /* @__PURE__ */ P("button", {
|
|
1336
1322
|
onClick: () => o(!0),
|
|
1337
1323
|
className: "flex items-center gap-2 px-3 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
1338
|
-
children: [/* @__PURE__ */ N(
|
|
1324
|
+
children: [/* @__PURE__ */ N(O, { className: "w-4 h-4" }), n("vibeDetails.addToCatalog", "Add to Catalog")]
|
|
1339
1325
|
})]
|
|
1340
1326
|
}),
|
|
1341
|
-
|
|
1327
|
+
p.length > 0 ? /* @__PURE__ */ N("div", {
|
|
1342
1328
|
className: "space-y-2",
|
|
1343
|
-
children:
|
|
1329
|
+
children: p.map((e) => /* @__PURE__ */ N(_, { children: /* @__PURE__ */ P("div", {
|
|
1344
1330
|
className: "p-3 flex items-center justify-between",
|
|
1345
1331
|
children: [/* @__PURE__ */ P("button", {
|
|
1346
1332
|
onClick: () => i(`/catalogs/${e.id}`),
|
|
1347
1333
|
className: "flex items-center gap-3 text-left hover:opacity-80 transition-opacity",
|
|
1348
|
-
children: [/* @__PURE__ */ N(
|
|
1334
|
+
children: [/* @__PURE__ */ N(D, { className: "w-5 h-5 text-action-primary-bg flex-shrink-0" }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
1349
1335
|
className: "font-medium text-text-primary text-sm",
|
|
1350
1336
|
children: e.name
|
|
1351
1337
|
}), /* @__PURE__ */ N("p", {
|
|
@@ -1353,14 +1339,14 @@ function et({ vibeId: t, tr: n, navigate: i }) {
|
|
|
1353
1339
|
children: e.visibility
|
|
1354
1340
|
})] })]
|
|
1355
1341
|
}), /* @__PURE__ */ N("button", {
|
|
1356
|
-
onClick: () =>
|
|
1342
|
+
onClick: () => te(e.id),
|
|
1357
1343
|
className: "p-1.5 text-text-muted hover:text-status-error-text hover:bg-status-error-bg rounded-md transition-colors",
|
|
1358
1344
|
title: n("vibeDetails.removeFromCatalog", "Remove from catalog"),
|
|
1359
|
-
children: /* @__PURE__ */ N(
|
|
1345
|
+
children: /* @__PURE__ */ N(Ge, { className: "w-4 h-4" })
|
|
1360
1346
|
})]
|
|
1361
1347
|
}) }, e.id))
|
|
1362
|
-
}) : /* @__PURE__ */ N(
|
|
1363
|
-
icon: /* @__PURE__ */ N(
|
|
1348
|
+
}) : /* @__PURE__ */ N(h, {
|
|
1349
|
+
icon: /* @__PURE__ */ N(D, { className: "w-8 h-8 text-text-secondary" }),
|
|
1364
1350
|
title: n("vibeDetails.noCatalogs", "Not in any catalogs"),
|
|
1365
1351
|
description: n("vibeDetails.noCatalogsDesc", "Add this vibe to catalogs to organize and track it alongside other components")
|
|
1366
1352
|
}),
|
|
@@ -1386,11 +1372,11 @@ function et({ vibeId: t, tr: n, navigate: i }) {
|
|
|
1386
1372
|
}),
|
|
1387
1373
|
/* @__PURE__ */ N("div", {
|
|
1388
1374
|
className: "flex-1 overflow-y-auto p-2",
|
|
1389
|
-
children:
|
|
1375
|
+
children: m.length === 0 ? /* @__PURE__ */ N("div", {
|
|
1390
1376
|
className: "p-4 text-center text-text-secondary text-sm",
|
|
1391
1377
|
children: n("vibeDetails.noAvailableCatalogs", "No available catalogs. This vibe is already in all catalogs.")
|
|
1392
|
-
}) :
|
|
1393
|
-
onClick: () =>
|
|
1378
|
+
}) : m.map((e) => /* @__PURE__ */ P("button", {
|
|
1379
|
+
onClick: () => g(e.id),
|
|
1394
1380
|
className: "w-full flex items-center justify-between p-3 rounded-md hover:bg-bg-sunken transition-colors text-left",
|
|
1395
1381
|
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
1396
1382
|
className: "font-medium text-text-primary text-sm",
|
|
@@ -1398,7 +1384,7 @@ function et({ vibeId: t, tr: n, navigate: i }) {
|
|
|
1398
1384
|
}), /* @__PURE__ */ N("p", {
|
|
1399
1385
|
className: "text-xs text-text-secondary",
|
|
1400
1386
|
children: e.visibility
|
|
1401
|
-
})] }), /* @__PURE__ */ N(
|
|
1387
|
+
})] }), /* @__PURE__ */ N(O, { className: "w-4 h-4 text-text-secondary" })]
|
|
1402
1388
|
}, e.id))
|
|
1403
1389
|
}),
|
|
1404
1390
|
/* @__PURE__ */ N("div", {
|
|
@@ -1414,25 +1400,25 @@ function et({ vibeId: t, tr: n, navigate: i }) {
|
|
|
1414
1400
|
})
|
|
1415
1401
|
] });
|
|
1416
1402
|
}
|
|
1417
|
-
function
|
|
1418
|
-
let s = a === "rest", c = "graphiql", l = `${r}/api/profiles/${encodeURIComponent(n)}/${c}/config/${e}`, [u,
|
|
1419
|
-
|
|
1403
|
+
function nt({ vibeId: e, agentId: t, profile: n, tunnelUrl: r, apiKey: i, type: a, tr: o }) {
|
|
1404
|
+
let s = a === "rest", c = "graphiql", l = `${r}/api/profiles/${encodeURIComponent(n)}/${c}/config/${e}`, [u, ee] = T(""), [d, f] = T(!1), [p, m] = T(!1), [h, g] = T(!1), [te, ne] = T(0);
|
|
1405
|
+
C(() => {
|
|
1420
1406
|
let e = { "Content-Type": "application/json" };
|
|
1421
1407
|
i && (e["x-agent-api-key"] = i), fetch(l, { headers: e }).then((e) => e.ok ? e.json() : null).then((e) => {
|
|
1422
1408
|
if (e) {
|
|
1423
1409
|
let t = s ? e.openapiUrl || e.url : e.graphqlUrl || e.url;
|
|
1424
|
-
t &&
|
|
1410
|
+
t && ee(t);
|
|
1425
1411
|
}
|
|
1426
|
-
|
|
1427
|
-
}).catch(() =>
|
|
1412
|
+
f(!0);
|
|
1413
|
+
}).catch(() => f(!0));
|
|
1428
1414
|
}, [
|
|
1429
1415
|
l,
|
|
1430
1416
|
i,
|
|
1431
1417
|
s
|
|
1432
1418
|
]);
|
|
1433
|
-
let
|
|
1419
|
+
let re = async () => {
|
|
1434
1420
|
if (u.trim()) {
|
|
1435
|
-
|
|
1421
|
+
m(!0), g(!1);
|
|
1436
1422
|
try {
|
|
1437
1423
|
let e = { "Content-Type": "application/json" };
|
|
1438
1424
|
i && (e["x-agent-api-key"] = i);
|
|
@@ -1441,38 +1427,38 @@ function tt({ vibeId: e, agentId: t, profile: n, tunnelUrl: r, apiKey: i, type:
|
|
|
1441
1427
|
method: "PUT",
|
|
1442
1428
|
headers: e,
|
|
1443
1429
|
body: JSON.stringify(t)
|
|
1444
|
-
}),
|
|
1430
|
+
}), g(!0), ne((e) => e + 1), setTimeout(() => g(!1), 3e3);
|
|
1445
1431
|
} catch {} finally {
|
|
1446
|
-
|
|
1432
|
+
m(!1);
|
|
1447
1433
|
}
|
|
1448
1434
|
}
|
|
1449
|
-
}, [
|
|
1450
|
-
|
|
1435
|
+
}, [v, ie] = T(null), [ae, y] = T(null), b = `/ui/${c}`;
|
|
1436
|
+
C(() => {
|
|
1451
1437
|
if (!t) return;
|
|
1452
1438
|
let e = !1, r = null, i = (a) => {
|
|
1453
|
-
e || (
|
|
1439
|
+
e || (ie(a), r = S(t, n, b, a, i, (e) => y(e.message)));
|
|
1454
1440
|
};
|
|
1455
|
-
return
|
|
1456
|
-
e || (
|
|
1441
|
+
return x(t, n, b).then((a) => {
|
|
1442
|
+
e || (ie(a), r = S(t, n, b, a, i, (e) => y(e.message)));
|
|
1457
1443
|
}).catch((t) => {
|
|
1458
|
-
e ||
|
|
1444
|
+
e || y(t instanceof Error ? t.message : String(t));
|
|
1459
1445
|
}), () => {
|
|
1460
1446
|
e = !0, r?.cancel();
|
|
1461
1447
|
};
|
|
1462
1448
|
}, [
|
|
1463
1449
|
t,
|
|
1464
1450
|
n,
|
|
1465
|
-
|
|
1451
|
+
b
|
|
1466
1452
|
]);
|
|
1467
|
-
let
|
|
1453
|
+
let se = `${r}/ui/${c}?vibeId=${e}`, ce = v ? oe(se, v.token) : se;
|
|
1468
1454
|
return /* @__PURE__ */ P("div", {
|
|
1469
1455
|
className: "space-y-4",
|
|
1470
|
-
children: [/* @__PURE__ */ N(
|
|
1456
|
+
children: [/* @__PURE__ */ N(_, { children: /* @__PURE__ */ P("div", {
|
|
1471
1457
|
className: "p-4",
|
|
1472
1458
|
children: [
|
|
1473
1459
|
/* @__PURE__ */ P("div", {
|
|
1474
1460
|
className: "flex items-center gap-2 mb-2",
|
|
1475
|
-
children: [N(s ?
|
|
1461
|
+
children: [N(s ? je : Ie, { className: "w-5 h-5 text-text-secondary" }), /* @__PURE__ */ N("h3", {
|
|
1476
1462
|
className: "font-semibold text-text-primary",
|
|
1477
1463
|
children: s ? o("vibeDetails.restPlaygroundTitle", "REST API Playground") : o("vibeDetails.graphqlPlaygroundTitle", "GraphQL Playground")
|
|
1478
1464
|
})]
|
|
@@ -1482,32 +1468,32 @@ function tt({ vibeId: e, agentId: t, profile: n, tunnelUrl: r, apiKey: i, type:
|
|
|
1482
1468
|
children: [/* @__PURE__ */ N("input", {
|
|
1483
1469
|
type: "url",
|
|
1484
1470
|
value: u,
|
|
1485
|
-
onChange: (e) =>
|
|
1471
|
+
onChange: (e) => ee(e.target.value),
|
|
1486
1472
|
placeholder: s ? o("vibeDetails.enterSwaggerUrl", "Enter OpenAPI/Swagger URL (e.g. https://petstore3.swagger.io/api/v3/openapi.json)") : o("vibeDetails.enterGraphqlUrl", "Enter GraphQL endpoint URL (e.g. https://countries.trevorblades.com/graphql)"),
|
|
1487
1473
|
className: "flex-1 px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder text-sm",
|
|
1488
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
1474
|
+
onKeyDown: (e) => e.key === "Enter" && re()
|
|
1489
1475
|
}), /* @__PURE__ */ P("button", {
|
|
1490
|
-
onClick:
|
|
1491
|
-
disabled:
|
|
1476
|
+
onClick: re,
|
|
1477
|
+
disabled: p || !u.trim(),
|
|
1492
1478
|
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 text-sm whitespace-nowrap",
|
|
1493
|
-
children: [
|
|
1479
|
+
children: [p ? /* @__PURE__ */ N(Pe, { className: "w-4 h-4 animate-spin" }) : N(h ? we : Ee, { className: "w-4 h-4" }), p ? o("common.saving", "Saving...") : h ? o("common.saved", "Saved!") : o("vibeDetails.loadApi", "Load API")]
|
|
1494
1480
|
})]
|
|
1495
1481
|
}),
|
|
1496
|
-
!
|
|
1482
|
+
!d && /* @__PURE__ */ N("p", {
|
|
1497
1483
|
className: "text-xs text-text-muted mt-1",
|
|
1498
1484
|
children: o("vibeDetails.loadingConfig", "Loading saved configuration...")
|
|
1499
1485
|
})
|
|
1500
1486
|
]
|
|
1501
|
-
}) }), t && !
|
|
1487
|
+
}) }), t && !v ? /* @__PURE__ */ N("div", {
|
|
1502
1488
|
className: "p-8 text-center text-sm text-text-secondary rounded-md border border-border-default bg-bg-sunken",
|
|
1503
|
-
children:
|
|
1489
|
+
children: ae ? o("vibeDetails.iframeTokenError", `Iframe token error: ${ae}`) : o("vibeDetails.mintingIframeToken", "Authorizing iframe…")
|
|
1504
1490
|
}) : /* @__PURE__ */ N("iframe", {
|
|
1505
|
-
src:
|
|
1491
|
+
src: ce,
|
|
1506
1492
|
title: s ? "REST API Playground" : "GraphQL Playground",
|
|
1507
1493
|
className: "w-full rounded-md border border-border-default bg-bg-sunken",
|
|
1508
1494
|
style: { height: "700px" },
|
|
1509
1495
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups"
|
|
1510
|
-
},
|
|
1496
|
+
}, te)]
|
|
1511
1497
|
});
|
|
1512
1498
|
}
|
|
1513
1499
|
//#endregion
|