refactor(api)!: remove the standalone API server (#6614)

This commit is contained in:
Xubin Ren authored and GitHub committed 2026-11-10 10:46:14 +08:00
1 parent 5c72ced2fe
commit 220d5e6970
99 files changed
+240 -4133

No files matched your search

@@ -42,8 +42,6 @@ export function installIdleCompactionApi() {
const bodies: Record<string, unknown> = {
"/api/settings": persisted,
"/api/settings/nanobot-features": { features: [], enabled_count: 0, requires_restart: false },
"/api/settings/api-service": { installed: false, running: false, managed: false, host: "127.0.0.1",
port: 8900, timeout: 120, endpoint: "http://127.0.0.1:8900/v1", command: "nanobot serve" },
};
return Response.json(bodies[url.pathname] ?? {});
};
@@ -69,7 +69,6 @@ export function installSkeletonPreviewApi() {
"/api/settings": previewSettings, "/api/settings/usage": { usage: null },
"/api/webui/automations": { jobs }, "/api/settings/nanobot-features": { features: [], enabled_count: 0, requires_restart: false },
"/api/settings/cli-apps": { apps: [], installed_count: 0 }, "/api/settings/mcp-presets": { presets: [], installed_count: 0 },
"/api/settings/api-service": { installed: false, running: false, managed: false, host: "127.0.0.1", port: 8900, timeout: 120, endpoint: "http://127.0.0.1:8900/v1", command: "nanobot serve" },
};
return Response.json(bodies[url.pathname] ?? {});
};
+1 -1
View File
@@ -71,7 +71,7 @@ for (const width of [390, 1440]) for (const locale of ["en", "zh-CN"]) {
await expect(target.getByRole("switch")).toHaveCount(2);
await expect(target.getByRole("switch").first()).toBeEnabled();
}
if (section === "runtime") await expect(page.locator('[data-settings-section] button').filter({ hasText: locale === "en" ? "Start API server" : "启动 API 服务" })).toBeVisible();
if (section === "runtime") await expect(target.getByText("Langfuse", { exact: true })).toBeVisible();
await settle(page);
// Collapsed options remain mounted for drafts but do not occupy the visible layout.
const selector = section === "overview" ? "section button.group" : section === "models" ? '[data-testid^="model-call-order-row"], .settings-footer' : section === "about" ? ".settings-list-row" : ".settings-row:not([inert] *)";