refactor(api)!: remove the standalone API server (#6614)
This commit is contained in:
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] ?? {});
|
||||
};
|
||||
|
||||
@@ -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] *)";
|
||||
|
||||
Reference in new issue
Block a user