apteva 0.4.32 → 0.4.44
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/ActivityPage.c48n83h2.js +3 -0
- package/dist/ApiDocsPage.yzcxx5ax.js +4 -0
- package/dist/App.09yb8t0b.js +1 -0
- package/dist/App.152mbs1r.js +4 -0
- package/dist/App.3a67nx9w.js +4 -0
- package/dist/App.9epx6785.js +4 -0
- package/dist/App.d8955awp.js +4 -0
- package/dist/App.drwb57jq.js +4 -0
- package/dist/App.gssbmajb.js +4 -0
- package/dist/App.qw70pc29.js +53 -0
- package/dist/App.qzbx5wtj.js +4 -0
- package/dist/App.r5serxkt.js +8 -0
- package/dist/App.tpmp9020.js +20 -0
- package/dist/App.v2wb4d7d.js +61 -0
- package/dist/App.vxmaaj0m.js +13 -0
- package/dist/App.w4p2tda9.js +4 -0
- package/dist/App.wv2ng55q.js +221 -0
- package/dist/App.yncnrn0f.js +4 -0
- package/dist/ConnectionsPage.k6cspyqq.js +3 -0
- package/dist/McpPage.cdxm48xj.js +3 -0
- package/dist/SettingsPage.evpv7c2y.js +3 -0
- package/dist/SkillsPage.pvzp6c1a.js +3 -0
- package/dist/TasksPage.6jnvbpsy.js +3 -0
- package/dist/TelemetryPage.t7vk24zc.js +3 -0
- package/dist/TestsPage.5x6658aa.js +3 -0
- package/dist/ThreadsPage.3fvhtevh.js +3 -0
- package/dist/apteva-kit.css +1 -1
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -9
- package/src/crypto.ts +4 -3
- package/src/db.ts +171 -36
- package/src/integrations/agentdojo.ts +95 -12
- package/src/integrations/index.ts +7 -0
- package/src/mcp-platform.ts +870 -142
- package/src/openapi.ts +96 -0
- package/src/providers.ts +60 -34
- package/src/routes/api/agent-utils.ts +59 -47
- package/src/routes/api/agents.ts +71 -2
- package/src/routes/api/integrations.ts +11 -5
- package/src/routes/api/mcp.ts +5 -4
- package/src/routes/api/meta-agent.ts +37 -1
- package/src/routes/api/projects.ts +3 -3
- package/src/routes/api/providers.ts +121 -30
- package/src/routes/api/skills.ts +2 -3
- package/src/routes/api/system.ts +98 -14
- package/src/routes/api/telemetry.ts +19 -1
- package/src/routes/share.ts +85 -0
- package/src/server.ts +43 -32
- package/src/triggers/agentdojo.ts +2 -2
- package/src/web/App.tsx +107 -21
- package/src/web/components/activity/ActivityPage.tsx +242 -389
- package/src/web/components/agents/AgentCard.tsx +19 -27
- package/src/web/components/agents/AgentPanel.tsx +358 -198
- package/src/web/components/agents/AgentsView.tsx +4 -4
- package/src/web/components/agents/CreateAgentModal.tsx +21 -79
- package/src/web/components/api/ApiDocsPage.tsx +66 -66
- package/src/web/components/auth/CreateAccountStep.tsx +16 -16
- package/src/web/components/auth/LoginPage.tsx +10 -10
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/common/LoadingSpinner.tsx +2 -2
- package/src/web/components/common/Modal.tsx +8 -8
- package/src/web/components/common/Select.tsx +11 -10
- package/src/web/components/connections/ConnectionsPage.tsx +4 -4
- package/src/web/components/connections/IntegrationsTab.tsx +18 -18
- package/src/web/components/connections/OverviewTab.tsx +13 -13
- package/src/web/components/connections/TriggersTab.tsx +99 -99
- package/src/web/components/dashboard/Dashboard.tsx +177 -52
- package/src/web/components/index.ts +1 -1
- package/src/web/components/layout/Header.tsx +50 -34
- package/src/web/components/layout/Sidebar.tsx +41 -16
- package/src/web/components/mcp/IntegrationsPanel.tsx +160 -69
- package/src/web/components/mcp/McpPage.tsx +218 -209
- package/src/web/components/meta-agent/MetaAgent.tsx +15 -11
- package/src/web/components/onboarding/OnboardingWizard.tsx +25 -25
- package/src/web/components/settings/SettingsPage.tsx +389 -221
- package/src/web/components/skills/SkillsPage.tsx +88 -88
- package/src/web/components/tasks/TasksPage.tsx +385 -68
- package/src/web/components/telemetry/TelemetryPage.tsx +294 -39
- package/src/web/components/tests/TestsPage.tsx +50 -50
- package/src/web/components/threads/ThreadsPage.tsx +315 -0
- package/src/web/context/AuthContext.tsx +3 -3
- package/src/web/context/ProjectContext.tsx +8 -3
- package/src/web/context/TelemetryContext.tsx +24 -6
- package/src/web/context/ThemeContext.tsx +69 -0
- package/src/web/context/index.ts +3 -1
- package/src/web/styles.css +25 -7
- package/src/web/themes.ts +99 -0
- package/src/web/types.ts +4 -7
- package/dist/ActivityPage.41nbye4r.js +0 -3
- package/dist/ApiDocsPage.4smnt8m3.js +0 -4
- package/dist/App.0sbax9et.js +0 -4
- package/dist/App.0ws427h8.js +0 -4
- package/dist/App.6q6bar8b.js +0 -4
- package/dist/App.80301vdb.js +0 -4
- package/dist/App.af2wg84v.js +0 -267
- package/dist/App.ca1rz1ph.js +0 -4
- package/dist/App.ensa6z0r.js +0 -4
- package/dist/App.f8g7tych.js +0 -13
- package/dist/App.mvtqv6qc.js +0 -20
- package/dist/App.ncgc9cxy.js +0 -4
- package/dist/App.p02f4ret.js +0 -1
- package/dist/App.p0fb1pds.js +0 -4
- package/dist/App.pmaq48sj.js +0 -4
- package/dist/App.yv87t9m5.js +0 -4
- package/dist/App.zjmfm8p6.js +0 -4
- package/dist/ConnectionsPage.anb3rv9a.js +0 -3
- package/dist/McpPage.y396h6fy.js +0 -3
- package/dist/SettingsPage.p1hc60gk.js +0 -3
- package/dist/SkillsPage.yj3xdsay.js +0 -3
- package/dist/TasksPage.sjv0khtv.js +0 -3
- package/dist/TelemetryPage.2qm4w16r.js +0 -3
- package/dist/TestsPage.zzs4qfj8.js +0 -3
|
@@ -69,7 +69,7 @@ export function AgentsView({
|
|
|
69
69
|
)}
|
|
70
70
|
<h1 className="text-xl font-semibold">{headerTitle}</h1>
|
|
71
71
|
{currentProjectId !== null && (
|
|
72
|
-
<span className="text-sm text-[
|
|
72
|
+
<span className="text-sm text-[var(--color-text-muted)]">
|
|
73
73
|
({filteredAgents.length} agent{filteredAgents.length !== 1 ? "s" : ""})
|
|
74
74
|
</span>
|
|
75
75
|
)}
|
|
@@ -78,7 +78,7 @@ export function AgentsView({
|
|
|
78
78
|
<button
|
|
79
79
|
onClick={onNewAgent}
|
|
80
80
|
disabled={!canCreateAgent}
|
|
81
|
-
className="bg-[
|
|
81
|
+
className="bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition"
|
|
82
82
|
>
|
|
83
83
|
+ New Agent
|
|
84
84
|
</button>
|
|
@@ -132,7 +132,7 @@ export function AgentsView({
|
|
|
132
132
|
|
|
133
133
|
function EmptyState({ onNewAgent, canCreateAgent, hasProjectFilter }: { onNewAgent?: () => void; canCreateAgent?: boolean; hasProjectFilter?: boolean }) {
|
|
134
134
|
return (
|
|
135
|
-
<div className="text-center py-20 text-[
|
|
135
|
+
<div className="text-center py-20 text-[var(--color-text-muted)]">
|
|
136
136
|
{hasProjectFilter ? (
|
|
137
137
|
<>
|
|
138
138
|
<p className="text-lg">No agents in this project</p>
|
|
@@ -148,7 +148,7 @@ function EmptyState({ onNewAgent, canCreateAgent, hasProjectFilter }: { onNewAge
|
|
|
148
148
|
<button
|
|
149
149
|
onClick={onNewAgent}
|
|
150
150
|
disabled={!canCreateAgent}
|
|
151
|
-
className="mt-4 bg-[
|
|
151
|
+
className="mt-4 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition"
|
|
152
152
|
>
|
|
153
153
|
+ New Agent
|
|
154
154
|
</button>
|
|
@@ -3,7 +3,7 @@ import { Modal } from "../common/Modal";
|
|
|
3
3
|
import { Select } from "../common/Select";
|
|
4
4
|
import { MemoryIcon, TasksIcon, FilesIcon, VisionIcon, OperatorIcon, McpIcon, RealtimeIcon, MultiAgentIcon } from "../common/Icons";
|
|
5
5
|
import { useProjects } from "../../context";
|
|
6
|
-
import type { Provider, NewAgentForm, AgentFeatures,
|
|
6
|
+
import type { Provider, NewAgentForm, AgentFeatures, MultiAgentConfig } from "../../types";
|
|
7
7
|
import { getMultiAgentConfig } from "../../types";
|
|
8
8
|
|
|
9
9
|
interface CreateAgentModalProps {
|
|
@@ -106,7 +106,7 @@ export function CreateAgentModal({
|
|
|
106
106
|
...form,
|
|
107
107
|
features: {
|
|
108
108
|
...form.features,
|
|
109
|
-
agents: { enabled: true,
|
|
109
|
+
agents: { enabled: true, group: form.projectId || undefined },
|
|
110
110
|
},
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -128,23 +128,6 @@ export function CreateAgentModal({
|
|
|
128
128
|
return (agentsVal as MultiAgentConfig)?.enabled ?? false;
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
// Get current agent mode
|
|
132
|
-
const getAgentMode = (): AgentMode => {
|
|
133
|
-
const config = getMultiAgentConfig(form.features, form.projectId);
|
|
134
|
-
return config.mode || "worker";
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
// Set multi-agent mode
|
|
138
|
-
const setAgentMode = (mode: AgentMode) => {
|
|
139
|
-
const currentConfig = getMultiAgentConfig(form.features, form.projectId);
|
|
140
|
-
onFormChange({
|
|
141
|
-
...form,
|
|
142
|
-
features: {
|
|
143
|
-
...form.features,
|
|
144
|
-
agents: { ...currentConfig, enabled: true, mode },
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
131
|
|
|
149
132
|
return (
|
|
150
133
|
<Modal>
|
|
@@ -160,7 +143,7 @@ export function CreateAgentModal({
|
|
|
160
143
|
type="text"
|
|
161
144
|
value={form.name}
|
|
162
145
|
onChange={(e) => onFormChange({ ...form, name: e.target.value })}
|
|
163
|
-
className="w-full bg-[
|
|
146
|
+
className="w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)] text-[var(--color-text)]"
|
|
164
147
|
placeholder="My Agent"
|
|
165
148
|
/>
|
|
166
149
|
</FormField>
|
|
@@ -187,10 +170,10 @@ export function CreateAgentModal({
|
|
|
187
170
|
|
|
188
171
|
<FormField label="Model">
|
|
189
172
|
{loadingOllamaModels ? (
|
|
190
|
-
<div className="text-sm text-[
|
|
173
|
+
<div className="text-sm text-[var(--color-text-muted)] py-2">Loading Ollama models...</div>
|
|
191
174
|
) : form.provider === "ollama" && modelOptions.length === 0 ? (
|
|
192
175
|
<div className="text-sm text-yellow-400/80 py-2">
|
|
193
|
-
No models found. Run <code className="bg-[
|
|
176
|
+
No models found. Run <code className="bg-[var(--color-surface-raised)] px-1 rounded">ollama pull llama3.3</code> to download a model.
|
|
194
177
|
</div>
|
|
195
178
|
) : (
|
|
196
179
|
<Select
|
|
@@ -206,7 +189,7 @@ export function CreateAgentModal({
|
|
|
206
189
|
<textarea
|
|
207
190
|
value={form.systemPrompt}
|
|
208
191
|
onChange={(e) => onFormChange({ ...form, systemPrompt: e.target.value })}
|
|
209
|
-
className="w-full bg-[
|
|
192
|
+
className="w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[var(--color-accent)] text-[var(--color-text)]"
|
|
210
193
|
/>
|
|
211
194
|
</FormField>
|
|
212
195
|
|
|
@@ -221,16 +204,16 @@ export function CreateAgentModal({
|
|
|
221
204
|
onClick={() => toggleFeature(key)}
|
|
222
205
|
className={`flex items-center gap-3 p-3 rounded border text-left transition ${
|
|
223
206
|
isEnabled
|
|
224
|
-
? "border-[
|
|
225
|
-
: "border-[
|
|
207
|
+
? "border-[var(--color-accent)] bg-[var(--color-accent-10)]"
|
|
208
|
+
: "border-[var(--color-border-light)] hover:border-[var(--color-border-light)]"
|
|
226
209
|
}`}
|
|
227
210
|
>
|
|
228
|
-
<Icon className={`w-5 h-5 flex-shrink-0 ${isEnabled ? "text-[
|
|
211
|
+
<Icon className={`w-5 h-5 flex-shrink-0 ${isEnabled ? "text-[var(--color-accent)]" : "text-[var(--color-text-muted)]"}`} />
|
|
229
212
|
<div className="flex-1 min-w-0">
|
|
230
|
-
<div className={`text-sm font-medium ${isEnabled ? "text-[
|
|
213
|
+
<div className={`text-sm font-medium ${isEnabled ? "text-[var(--color-accent)]" : ""}`}>
|
|
231
214
|
{label}
|
|
232
215
|
</div>
|
|
233
|
-
<div className="text-xs text-[
|
|
216
|
+
<div className="text-xs text-[var(--color-text-muted)]">{description}</div>
|
|
234
217
|
</div>
|
|
235
218
|
</button>
|
|
236
219
|
);
|
|
@@ -238,47 +221,6 @@ export function CreateAgentModal({
|
|
|
238
221
|
</div>
|
|
239
222
|
</FormField>
|
|
240
223
|
|
|
241
|
-
{/* Multi-Agent Mode Selection */}
|
|
242
|
-
{isAgentsEnabled() && (
|
|
243
|
-
<FormField label="Multi-Agent Mode">
|
|
244
|
-
<div className="flex gap-2">
|
|
245
|
-
<button
|
|
246
|
-
type="button"
|
|
247
|
-
onClick={() => setAgentMode("coordinator")}
|
|
248
|
-
className={`flex-1 p-3 rounded border text-left transition ${
|
|
249
|
-
getAgentMode() === "coordinator"
|
|
250
|
-
? "border-[#f97316] bg-[#f97316]/10"
|
|
251
|
-
: "border-[#222] hover:border-[#333]"
|
|
252
|
-
}`}
|
|
253
|
-
>
|
|
254
|
-
<div className={`text-sm font-medium ${getAgentMode() === "coordinator" ? "text-[#f97316]" : ""}`}>
|
|
255
|
-
Coordinator
|
|
256
|
-
</div>
|
|
257
|
-
<div className="text-xs text-[#666]">Orchestrates and delegates</div>
|
|
258
|
-
</button>
|
|
259
|
-
<button
|
|
260
|
-
type="button"
|
|
261
|
-
onClick={() => setAgentMode("worker")}
|
|
262
|
-
className={`flex-1 p-3 rounded border text-left transition ${
|
|
263
|
-
getAgentMode() === "worker"
|
|
264
|
-
? "border-[#f97316] bg-[#f97316]/10"
|
|
265
|
-
: "border-[#222] hover:border-[#333]"
|
|
266
|
-
}`}
|
|
267
|
-
>
|
|
268
|
-
<div className={`text-sm font-medium ${getAgentMode() === "worker" ? "text-[#f97316]" : ""}`}>
|
|
269
|
-
Worker
|
|
270
|
-
</div>
|
|
271
|
-
<div className="text-xs text-[#666]">Receives delegated tasks</div>
|
|
272
|
-
</button>
|
|
273
|
-
</div>
|
|
274
|
-
{form.projectId && (
|
|
275
|
-
<p className="text-xs text-[#555] mt-2">
|
|
276
|
-
Group: Using project as agent group
|
|
277
|
-
</p>
|
|
278
|
-
)}
|
|
279
|
-
</FormField>
|
|
280
|
-
)}
|
|
281
|
-
|
|
282
224
|
{/* Agent Built-in Tools - Anthropic only */}
|
|
283
225
|
{form.provider === "anthropic" && (
|
|
284
226
|
<FormField label="Agent Built-in Tools">
|
|
@@ -297,8 +239,8 @@ export function CreateAgentModal({
|
|
|
297
239
|
})}
|
|
298
240
|
className={`flex items-center gap-2 px-3 py-2 rounded border transition ${
|
|
299
241
|
form.features.builtinTools?.webSearch
|
|
300
|
-
? "border-[
|
|
301
|
-
: "border-[
|
|
242
|
+
? "border-[var(--color-accent)] bg-[var(--color-accent-10)] text-[var(--color-accent)]"
|
|
243
|
+
: "border-[var(--color-border-light)] hover:border-[var(--color-border-light)] text-[var(--color-text-secondary)]"
|
|
302
244
|
}`}
|
|
303
245
|
>
|
|
304
246
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -320,8 +262,8 @@ export function CreateAgentModal({
|
|
|
320
262
|
})}
|
|
321
263
|
className={`flex items-center gap-2 px-3 py-2 rounded border transition ${
|
|
322
264
|
form.features.builtinTools?.webFetch
|
|
323
|
-
? "border-[
|
|
324
|
-
: "border-[
|
|
265
|
+
? "border-[var(--color-accent)] bg-[var(--color-accent-10)] text-[var(--color-accent)]"
|
|
266
|
+
: "border-[var(--color-border-light)] hover:border-[var(--color-border-light)] text-[var(--color-text-secondary)]"
|
|
325
267
|
}`}
|
|
326
268
|
>
|
|
327
269
|
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -330,7 +272,7 @@ export function CreateAgentModal({
|
|
|
330
272
|
<span className="text-sm">Web Fetch</span>
|
|
331
273
|
</button>
|
|
332
274
|
</div>
|
|
333
|
-
<p className="text-xs text-[
|
|
275
|
+
<p className="text-xs text-[var(--color-text-faint)] mt-2">
|
|
334
276
|
Provider-native tools for real-time web access
|
|
335
277
|
</p>
|
|
336
278
|
</FormField>
|
|
@@ -340,14 +282,14 @@ export function CreateAgentModal({
|
|
|
340
282
|
<div className="flex gap-3 mt-6">
|
|
341
283
|
<button
|
|
342
284
|
onClick={onClose}
|
|
343
|
-
className="flex-1 border border-[
|
|
285
|
+
className="flex-1 border border-[var(--color-border-light)] hover:border-[var(--color-accent)] hover:text-[var(--color-accent)] px-4 py-2 rounded font-medium transition"
|
|
344
286
|
>
|
|
345
287
|
Cancel
|
|
346
288
|
</button>
|
|
347
289
|
<button
|
|
348
290
|
onClick={onCreate}
|
|
349
291
|
disabled={!form.name}
|
|
350
|
-
className="flex-1 bg-[
|
|
292
|
+
className="flex-1 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition"
|
|
351
293
|
>
|
|
352
294
|
Create
|
|
353
295
|
</button>
|
|
@@ -361,7 +303,7 @@ export function CreateAgentModal({
|
|
|
361
303
|
function FormField({ label, children }: { label: string; children: React.ReactNode }) {
|
|
362
304
|
return (
|
|
363
305
|
<div>
|
|
364
|
-
<label className="block text-sm text-[
|
|
306
|
+
<label className="block text-sm text-[var(--color-text-muted)] mb-1">{label}</label>
|
|
365
307
|
{children}
|
|
366
308
|
</div>
|
|
367
309
|
);
|
|
@@ -370,10 +312,10 @@ function FormField({ label, children }: { label: string; children: React.ReactNo
|
|
|
370
312
|
function NoProvidersMessage({ onGoToSettings }: { onGoToSettings: () => void }) {
|
|
371
313
|
return (
|
|
372
314
|
<div className="text-center py-6">
|
|
373
|
-
<p className="text-[
|
|
315
|
+
<p className="text-[var(--color-text-muted)] mb-4">No API keys configured. Add a provider key first.</p>
|
|
374
316
|
<button
|
|
375
317
|
onClick={onGoToSettings}
|
|
376
|
-
className="bg-[
|
|
318
|
+
className="bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-black px-4 py-2 rounded font-medium transition"
|
|
377
319
|
>
|
|
378
320
|
Go to Settings
|
|
379
321
|
</button>
|
|
@@ -159,16 +159,16 @@ function TryItOut({
|
|
|
159
159
|
const hasBody = ["post", "put", "patch"].includes(method) && requestBody;
|
|
160
160
|
|
|
161
161
|
return (
|
|
162
|
-
<div style={{ marginTop: 16, padding: 16, background: "
|
|
163
|
-
<h4 style={{ fontSize: 13, color: "
|
|
162
|
+
<div style={{ marginTop: 16, padding: 16, background: "var(--color-bg)", borderRadius: 6, border: "1px solid var(--color-border-light)" }}>
|
|
163
|
+
<h4 style={{ fontSize: 13, color: "var(--color-accent)", marginBottom: 12, fontWeight: 600 }}>Try it out</h4>
|
|
164
164
|
|
|
165
165
|
{/* Path Parameters */}
|
|
166
166
|
{pathParams.length > 0 && (
|
|
167
167
|
<div style={{ marginBottom: 12 }}>
|
|
168
|
-
<div style={{ fontSize: 11, color: "
|
|
168
|
+
<div style={{ fontSize: 11, color: "var(--color-text-muted)", marginBottom: 6 }}>Path Parameters</div>
|
|
169
169
|
{pathParams.map((param) => (
|
|
170
170
|
<div key={param.name} style={{ marginBottom: 8 }}>
|
|
171
|
-
<label style={{ fontSize: 12, color: "
|
|
171
|
+
<label style={{ fontSize: 12, color: "var(--color-text-secondary)", display: "block", marginBottom: 4 }}>
|
|
172
172
|
{param.name} {param.required && <span style={{ color: "#f66" }}>*</span>}
|
|
173
173
|
</label>
|
|
174
174
|
<input
|
|
@@ -179,10 +179,10 @@ function TryItOut({
|
|
|
179
179
|
style={{
|
|
180
180
|
width: "100%",
|
|
181
181
|
padding: "8px 12px",
|
|
182
|
-
background: "
|
|
183
|
-
border: "1px solid
|
|
182
|
+
background: "var(--color-surface)",
|
|
183
|
+
border: "1px solid var(--color-border-light)",
|
|
184
184
|
borderRadius: 4,
|
|
185
|
-
color: "
|
|
185
|
+
color: "var(--color-text)",
|
|
186
186
|
fontSize: 13,
|
|
187
187
|
fontFamily: "monospace",
|
|
188
188
|
}}
|
|
@@ -195,10 +195,10 @@ function TryItOut({
|
|
|
195
195
|
{/* Query Parameters */}
|
|
196
196
|
{queryParams.length > 0 && (
|
|
197
197
|
<div style={{ marginBottom: 12 }}>
|
|
198
|
-
<div style={{ fontSize: 11, color: "
|
|
198
|
+
<div style={{ fontSize: 11, color: "var(--color-text-muted)", marginBottom: 6 }}>Query Parameters</div>
|
|
199
199
|
{queryParams.map((param) => (
|
|
200
200
|
<div key={param.name} style={{ marginBottom: 8 }}>
|
|
201
|
-
<label style={{ fontSize: 12, color: "
|
|
201
|
+
<label style={{ fontSize: 12, color: "var(--color-text-secondary)", display: "block", marginBottom: 4 }}>
|
|
202
202
|
{param.name} {param.required && <span style={{ color: "#f66" }}>*</span>}
|
|
203
203
|
</label>
|
|
204
204
|
<input
|
|
@@ -209,10 +209,10 @@ function TryItOut({
|
|
|
209
209
|
style={{
|
|
210
210
|
width: "100%",
|
|
211
211
|
padding: "8px 12px",
|
|
212
|
-
background: "
|
|
213
|
-
border: "1px solid
|
|
212
|
+
background: "var(--color-surface)",
|
|
213
|
+
border: "1px solid var(--color-border-light)",
|
|
214
214
|
borderRadius: 4,
|
|
215
|
-
color: "
|
|
215
|
+
color: "var(--color-text)",
|
|
216
216
|
fontSize: 13,
|
|
217
217
|
fontFamily: "monospace",
|
|
218
218
|
}}
|
|
@@ -225,7 +225,7 @@ function TryItOut({
|
|
|
225
225
|
{/* Request Body */}
|
|
226
226
|
{hasBody && (
|
|
227
227
|
<div style={{ marginBottom: 12 }}>
|
|
228
|
-
<div style={{ fontSize: 11, color: "
|
|
228
|
+
<div style={{ fontSize: 11, color: "var(--color-text-muted)", marginBottom: 6 }}>Request Body (JSON)</div>
|
|
229
229
|
<textarea
|
|
230
230
|
value={bodyValue}
|
|
231
231
|
onChange={(e) => setBodyValue(e.target.value)}
|
|
@@ -233,10 +233,10 @@ function TryItOut({
|
|
|
233
233
|
style={{
|
|
234
234
|
width: "100%",
|
|
235
235
|
padding: "8px 12px",
|
|
236
|
-
background: "
|
|
237
|
-
border: "1px solid
|
|
236
|
+
background: "var(--color-surface)",
|
|
237
|
+
border: "1px solid var(--color-border-light)",
|
|
238
238
|
borderRadius: 4,
|
|
239
|
-
color: "
|
|
239
|
+
color: "var(--color-text)",
|
|
240
240
|
fontSize: 12,
|
|
241
241
|
fontFamily: "monospace",
|
|
242
242
|
resize: "vertical",
|
|
@@ -251,8 +251,8 @@ function TryItOut({
|
|
|
251
251
|
disabled={loading}
|
|
252
252
|
style={{
|
|
253
253
|
padding: "10px 20px",
|
|
254
|
-
background: loading ? "
|
|
255
|
-
color: loading ? "
|
|
254
|
+
background: loading ? "var(--color-border-light)" : "var(--color-accent)",
|
|
255
|
+
color: loading ? "var(--color-text-muted)" : "#000",
|
|
256
256
|
border: "none",
|
|
257
257
|
borderRadius: 4,
|
|
258
258
|
cursor: loading ? "not-allowed" : "pointer",
|
|
@@ -273,7 +273,7 @@ function TryItOut({
|
|
|
273
273
|
{/* Response */}
|
|
274
274
|
{response && (
|
|
275
275
|
<div style={{ marginTop: 12 }}>
|
|
276
|
-
<div style={{ fontSize: 11, color: "
|
|
276
|
+
<div style={{ fontSize: 11, color: "var(--color-text-muted)", marginBottom: 6 }}>
|
|
277
277
|
Response{" "}
|
|
278
278
|
<span style={{ color: response.status >= 200 && response.status < 300 ? "#49cc90" : "#f66" }}>
|
|
279
279
|
{response.status}
|
|
@@ -282,9 +282,9 @@ function TryItOut({
|
|
|
282
282
|
<pre
|
|
283
283
|
style={{
|
|
284
284
|
padding: 12,
|
|
285
|
-
background: "
|
|
285
|
+
background: "var(--color-surface)",
|
|
286
286
|
borderRadius: 4,
|
|
287
|
-
color: "
|
|
287
|
+
color: "var(--color-text-secondary)",
|
|
288
288
|
fontSize: 11,
|
|
289
289
|
fontFamily: "monospace",
|
|
290
290
|
overflow: "auto",
|
|
@@ -390,7 +390,7 @@ export function ApiDocsPage() {
|
|
|
390
390
|
if (loading) {
|
|
391
391
|
return (
|
|
392
392
|
<div style={{ padding: 24 }}>
|
|
393
|
-
<p style={{ color: "
|
|
393
|
+
<p style={{ color: "var(--color-text-secondary)" }}>Loading API documentation...</p>
|
|
394
394
|
</div>
|
|
395
395
|
);
|
|
396
396
|
}
|
|
@@ -469,9 +469,9 @@ export function ApiDocsPage() {
|
|
|
469
469
|
style={{
|
|
470
470
|
padding: "8px 16px",
|
|
471
471
|
borderRadius: 4,
|
|
472
|
-
border: "1px solid
|
|
473
|
-
background: copied ? "#49cc90" : "
|
|
474
|
-
color: copied ? "#000" : "
|
|
472
|
+
border: "1px solid var(--color-border-light)",
|
|
473
|
+
background: copied ? "#49cc90" : "var(--color-surface-raised)",
|
|
474
|
+
color: copied ? "#000" : "var(--color-text)",
|
|
475
475
|
cursor: "pointer",
|
|
476
476
|
fontSize: 12,
|
|
477
477
|
fontFamily: "inherit",
|
|
@@ -484,9 +484,9 @@ export function ApiDocsPage() {
|
|
|
484
484
|
style={{
|
|
485
485
|
padding: "8px 16px",
|
|
486
486
|
borderRadius: 4,
|
|
487
|
-
border: "1px solid
|
|
488
|
-
background: "
|
|
489
|
-
color: "
|
|
487
|
+
border: "1px solid var(--color-border-light)",
|
|
488
|
+
background: "var(--color-surface-raised)",
|
|
489
|
+
color: "var(--color-text)",
|
|
490
490
|
cursor: "pointer",
|
|
491
491
|
fontSize: 12,
|
|
492
492
|
fontFamily: "inherit",
|
|
@@ -496,23 +496,23 @@ export function ApiDocsPage() {
|
|
|
496
496
|
</button>
|
|
497
497
|
</div>
|
|
498
498
|
</div>
|
|
499
|
-
<p style={{ color: "
|
|
499
|
+
<p style={{ color: "var(--color-text-secondary)", marginBottom: 8 }}>
|
|
500
500
|
{spec.info.description.split("\n")[0]}
|
|
501
501
|
</p>
|
|
502
|
-
<p style={{ color: "
|
|
502
|
+
<p style={{ color: "var(--color-text-muted)", fontSize: 12 }}>Version: {spec.info.version}</p>
|
|
503
503
|
</div>
|
|
504
504
|
|
|
505
505
|
{/* Base URL */}
|
|
506
506
|
<div
|
|
507
507
|
style={{
|
|
508
|
-
background: "
|
|
508
|
+
background: "var(--color-surface-raised)",
|
|
509
509
|
padding: 12,
|
|
510
510
|
borderRadius: 6,
|
|
511
511
|
marginBottom: 24,
|
|
512
512
|
fontFamily: "monospace",
|
|
513
513
|
}}
|
|
514
514
|
>
|
|
515
|
-
<span style={{ color: "
|
|
515
|
+
<span style={{ color: "var(--color-text-secondary)" }}>Base URL: </span>
|
|
516
516
|
<span style={{ color: "#61affe" }}>
|
|
517
517
|
{window.location.origin}/api
|
|
518
518
|
</span>
|
|
@@ -525,9 +525,9 @@ export function ApiDocsPage() {
|
|
|
525
525
|
style={{
|
|
526
526
|
padding: "6px 12px",
|
|
527
527
|
borderRadius: 4,
|
|
528
|
-
border: "1px solid
|
|
529
|
-
background: selectedTag === null ? "
|
|
530
|
-
color: selectedTag === null ? "
|
|
528
|
+
border: "1px solid var(--color-border-light)",
|
|
529
|
+
background: selectedTag === null ? "var(--color-border-light)" : "transparent",
|
|
530
|
+
color: selectedTag === null ? "var(--color-text)" : "var(--color-text-secondary)",
|
|
531
531
|
cursor: "pointer",
|
|
532
532
|
fontSize: 12,
|
|
533
533
|
}}
|
|
@@ -541,9 +541,9 @@ export function ApiDocsPage() {
|
|
|
541
541
|
style={{
|
|
542
542
|
padding: "6px 12px",
|
|
543
543
|
borderRadius: 4,
|
|
544
|
-
border: "1px solid
|
|
545
|
-
background: selectedTag === tag.name ? "
|
|
546
|
-
color: selectedTag === tag.name ? "
|
|
544
|
+
border: "1px solid var(--color-border-light)",
|
|
545
|
+
background: selectedTag === tag.name ? "var(--color-border-light)" : "transparent",
|
|
546
|
+
color: selectedTag === tag.name ? "var(--color-text)" : "var(--color-text-secondary)",
|
|
547
547
|
cursor: "pointer",
|
|
548
548
|
fontSize: 12,
|
|
549
549
|
}}
|
|
@@ -563,13 +563,13 @@ export function ApiDocsPage() {
|
|
|
563
563
|
const pathKey = `${method}:${path}`;
|
|
564
564
|
const isExpanded = expandedPaths.has(pathKey);
|
|
565
565
|
const methodUpper = method.toUpperCase();
|
|
566
|
-
const color = METHOD_COLORS[method] || "
|
|
566
|
+
const color = METHOD_COLORS[method] || "var(--color-text-secondary)";
|
|
567
567
|
|
|
568
568
|
return (
|
|
569
569
|
<div
|
|
570
570
|
key={pathKey}
|
|
571
571
|
style={{
|
|
572
|
-
border: "1px solid
|
|
572
|
+
border: "1px solid var(--color-border-light)",
|
|
573
573
|
borderRadius: 6,
|
|
574
574
|
overflow: "hidden",
|
|
575
575
|
}}
|
|
@@ -582,7 +582,7 @@ export function ApiDocsPage() {
|
|
|
582
582
|
alignItems: "center",
|
|
583
583
|
gap: 12,
|
|
584
584
|
padding: "12px 16px",
|
|
585
|
-
background: isExpanded ? "
|
|
585
|
+
background: isExpanded ? "var(--color-surface-raised)" : "transparent",
|
|
586
586
|
cursor: "pointer",
|
|
587
587
|
}}
|
|
588
588
|
>
|
|
@@ -600,13 +600,13 @@ export function ApiDocsPage() {
|
|
|
600
600
|
>
|
|
601
601
|
{methodUpper}
|
|
602
602
|
</span>
|
|
603
|
-
<span style={{ fontFamily: "monospace", color: "
|
|
603
|
+
<span style={{ fontFamily: "monospace", color: "var(--color-text)" }}>
|
|
604
604
|
{path}
|
|
605
605
|
</span>
|
|
606
|
-
<span style={{ color: "
|
|
606
|
+
<span style={{ color: "var(--color-text-secondary)", flex: 1, fontSize: 13 }}>
|
|
607
607
|
{details.summary}
|
|
608
608
|
</span>
|
|
609
|
-
<span style={{ color: "
|
|
609
|
+
<span style={{ color: "var(--color-text-muted)", fontSize: 12 }}>
|
|
610
610
|
{isExpanded ? "[-]" : "[+]"}
|
|
611
611
|
</span>
|
|
612
612
|
</div>
|
|
@@ -616,12 +616,12 @@ export function ApiDocsPage() {
|
|
|
616
616
|
<div
|
|
617
617
|
style={{
|
|
618
618
|
padding: 16,
|
|
619
|
-
background: "
|
|
620
|
-
borderTop: "1px solid
|
|
619
|
+
background: "var(--color-bg)",
|
|
620
|
+
borderTop: "1px solid var(--color-border-light)",
|
|
621
621
|
}}
|
|
622
622
|
>
|
|
623
623
|
{details.description && (
|
|
624
|
-
<p style={{ color: "
|
|
624
|
+
<p style={{ color: "var(--color-text-secondary)", marginBottom: 16, fontSize: 13 }}>
|
|
625
625
|
{details.description}
|
|
626
626
|
</p>
|
|
627
627
|
)}
|
|
@@ -629,12 +629,12 @@ export function ApiDocsPage() {
|
|
|
629
629
|
{/* Parameters */}
|
|
630
630
|
{details.parameters && details.parameters.length > 0 && (
|
|
631
631
|
<div style={{ marginBottom: 16 }}>
|
|
632
|
-
<h4 style={{ fontSize: 13, color: "
|
|
632
|
+
<h4 style={{ fontSize: 13, color: "var(--color-text-secondary)", marginBottom: 8 }}>
|
|
633
633
|
Parameters
|
|
634
634
|
</h4>
|
|
635
635
|
<div
|
|
636
636
|
style={{
|
|
637
|
-
background: "
|
|
637
|
+
background: "var(--color-surface-raised)",
|
|
638
638
|
borderRadius: 4,
|
|
639
639
|
padding: 12,
|
|
640
640
|
}}
|
|
@@ -655,12 +655,12 @@ export function ApiDocsPage() {
|
|
|
655
655
|
<span style={{ color: "#f66" }}>*</span>
|
|
656
656
|
)}
|
|
657
657
|
</span>
|
|
658
|
-
<span style={{ color: "
|
|
659
|
-
<span style={{ color: "
|
|
658
|
+
<span style={{ color: "var(--color-text-muted)" }}>({param.in})</span>
|
|
659
|
+
<span style={{ color: "var(--color-text-secondary)" }}>
|
|
660
660
|
{param.schema?.type || "string"}
|
|
661
661
|
</span>
|
|
662
662
|
{param.description && (
|
|
663
|
-
<span style={{ color: "
|
|
663
|
+
<span style={{ color: "var(--color-text-muted)" }}>
|
|
664
664
|
- {param.description}
|
|
665
665
|
</span>
|
|
666
666
|
)}
|
|
@@ -673,7 +673,7 @@ export function ApiDocsPage() {
|
|
|
673
673
|
{/* Request Body */}
|
|
674
674
|
{details.requestBody && (
|
|
675
675
|
<div style={{ marginBottom: 16 }}>
|
|
676
|
-
<h4 style={{ fontSize: 13, color: "
|
|
676
|
+
<h4 style={{ fontSize: 13, color: "var(--color-text-secondary)", marginBottom: 8 }}>
|
|
677
677
|
Request Body
|
|
678
678
|
{details.requestBody.required && (
|
|
679
679
|
<span style={{ color: "#f66" }}> (required)</span>
|
|
@@ -681,7 +681,7 @@ export function ApiDocsPage() {
|
|
|
681
681
|
</h4>
|
|
682
682
|
<div
|
|
683
683
|
style={{
|
|
684
|
-
background: "
|
|
684
|
+
background: "var(--color-surface-raised)",
|
|
685
685
|
borderRadius: 4,
|
|
686
686
|
padding: 12,
|
|
687
687
|
fontFamily: "monospace",
|
|
@@ -692,7 +692,7 @@ export function ApiDocsPage() {
|
|
|
692
692
|
{Object.entries(details.requestBody.content || {}).map(
|
|
693
693
|
([mediaType, content]) => (
|
|
694
694
|
<div key={mediaType}>
|
|
695
|
-
<span style={{ color: "
|
|
695
|
+
<span style={{ color: "var(--color-text-muted)" }}>{mediaType}: </span>
|
|
696
696
|
{getSchemaPreview(content.schema)}
|
|
697
697
|
</div>
|
|
698
698
|
)
|
|
@@ -704,12 +704,12 @@ export function ApiDocsPage() {
|
|
|
704
704
|
{/* Responses */}
|
|
705
705
|
{details.responses && (
|
|
706
706
|
<div>
|
|
707
|
-
<h4 style={{ fontSize: 13, color: "
|
|
707
|
+
<h4 style={{ fontSize: 13, color: "var(--color-text-secondary)", marginBottom: 8 }}>
|
|
708
708
|
Responses
|
|
709
709
|
</h4>
|
|
710
710
|
<div
|
|
711
711
|
style={{
|
|
712
|
-
background: "
|
|
712
|
+
background: "var(--color-surface-raised)",
|
|
713
713
|
borderRadius: 4,
|
|
714
714
|
padding: 12,
|
|
715
715
|
}}
|
|
@@ -737,14 +737,14 @@ export function ApiDocsPage() {
|
|
|
737
737
|
>
|
|
738
738
|
{code}
|
|
739
739
|
</span>
|
|
740
|
-
<span style={{ color: "
|
|
740
|
+
<span style={{ color: "var(--color-text-secondary)" }}>{resp.description}</span>
|
|
741
741
|
</div>
|
|
742
742
|
{respContent && (
|
|
743
743
|
<div
|
|
744
744
|
style={{
|
|
745
745
|
marginLeft: 52,
|
|
746
746
|
padding: "8px 12px",
|
|
747
|
-
background: "
|
|
747
|
+
background: "var(--color-bg)",
|
|
748
748
|
borderRadius: 4,
|
|
749
749
|
fontFamily: "monospace",
|
|
750
750
|
}}
|
|
@@ -754,9 +754,9 @@ export function ApiDocsPage() {
|
|
|
754
754
|
) : schemaType === "array" && schemaItems ? (
|
|
755
755
|
<span style={{ color: "#61affe" }}>{schemaItems}[]</span>
|
|
756
756
|
) : schemaType === "array" ? (
|
|
757
|
-
<span style={{ color: "
|
|
757
|
+
<span style={{ color: "var(--color-text-secondary)" }}>array</span>
|
|
758
758
|
) : (
|
|
759
|
-
<span style={{ color: "
|
|
759
|
+
<span style={{ color: "var(--color-text-secondary)" }}>{getSchemaPreview(respContent)}</span>
|
|
760
760
|
)}
|
|
761
761
|
</div>
|
|
762
762
|
)}
|
|
@@ -787,7 +787,7 @@ export function ApiDocsPage() {
|
|
|
787
787
|
{spec.components?.schemas && getFilteredSchemas().length > 0 && (
|
|
788
788
|
<div style={{ marginTop: 32 }}>
|
|
789
789
|
<h2 style={{ fontSize: 18, fontWeight: 600, marginBottom: 16 }}>
|
|
790
|
-
Schemas {selectedTag && <span style={{ color: "
|
|
790
|
+
Schemas {selectedTag && <span style={{ color: "var(--color-text-muted)", fontSize: 14 }}>({selectedTag})</span>}
|
|
791
791
|
</h2>
|
|
792
792
|
<div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
|
|
793
793
|
{getFilteredSchemas().map((name) => {
|
|
@@ -797,7 +797,7 @@ export function ApiDocsPage() {
|
|
|
797
797
|
<div
|
|
798
798
|
key={name}
|
|
799
799
|
style={{
|
|
800
|
-
border: "1px solid
|
|
800
|
+
border: "1px solid var(--color-border-light)",
|
|
801
801
|
borderRadius: 6,
|
|
802
802
|
padding: 12,
|
|
803
803
|
}}
|
|
@@ -817,13 +817,13 @@ export function ApiDocsPage() {
|
|
|
817
817
|
fontFamily: "monospace",
|
|
818
818
|
}}
|
|
819
819
|
>
|
|
820
|
-
<span style={{ color: "
|
|
821
|
-
<span style={{ color: "
|
|
820
|
+
<span style={{ color: "var(--color-text)", minWidth: 120 }}>{prop}</span>
|
|
821
|
+
<span style={{ color: "var(--color-text-secondary)" }}>
|
|
822
822
|
{propSchema.type || (propSchema.$ref ? propSchema.$ref.split("/").pop() : "any")}
|
|
823
823
|
{propSchema.nullable && " | null"}
|
|
824
824
|
</span>
|
|
825
825
|
{propSchema.enum && (
|
|
826
|
-
<span style={{ color: "
|
|
826
|
+
<span style={{ color: "var(--color-text-muted)" }}>
|
|
827
827
|
[{propSchema.enum.join(" | ")}]
|
|
828
828
|
</span>
|
|
829
829
|
)}
|