mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 00:54:33 +00:00
fix(doctor): skip embedding provider check when QMD backend is active (openclaw#17295) thanks @miloudbelarebia
Verified: - pnpm build - pnpm check (fails on baseline formatting drift in files identical to origin/main) - pnpm test:macmini Co-authored-by: miloudbelarebia <52387093+miloudbelarebia@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ const resolveDefaultAgentId = vi.hoisted(() => vi.fn(() => "agent-default"));
|
||||
const resolveAgentDir = vi.hoisted(() => vi.fn(() => "/tmp/agent-default"));
|
||||
const resolveMemorySearchConfig = vi.hoisted(() => vi.fn());
|
||||
const resolveApiKeyForProvider = vi.hoisted(() => vi.fn());
|
||||
const resolveMemoryBackendConfig = vi.hoisted(() => vi.fn());
|
||||
|
||||
vi.mock("../terminal/note.js", () => ({
|
||||
note,
|
||||
@@ -25,6 +26,10 @@ vi.mock("../agents/model-auth.js", () => ({
|
||||
resolveApiKeyForProvider,
|
||||
}));
|
||||
|
||||
vi.mock("../memory/backend-config.js", () => ({
|
||||
resolveMemoryBackendConfig,
|
||||
}));
|
||||
|
||||
import { noteMemorySearchHealth } from "./doctor-memory-search.js";
|
||||
import { detectLegacyWorkspaceDirs } from "./doctor-workspace.js";
|
||||
|
||||
@@ -50,6 +55,24 @@ describe("noteMemorySearchHealth", () => {
|
||||
resolveAgentDir.mockClear();
|
||||
resolveMemorySearchConfig.mockReset();
|
||||
resolveApiKeyForProvider.mockReset();
|
||||
resolveMemoryBackendConfig.mockReset();
|
||||
resolveMemoryBackendConfig.mockReturnValue({ backend: "builtin", citations: "auto" });
|
||||
});
|
||||
|
||||
it("does not warn when QMD backend is active", async () => {
|
||||
resolveMemoryBackendConfig.mockReturnValue({
|
||||
backend: "qmd",
|
||||
citations: "auto",
|
||||
});
|
||||
resolveMemorySearchConfig.mockReturnValue({
|
||||
provider: "auto",
|
||||
local: {},
|
||||
remote: {},
|
||||
});
|
||||
|
||||
await noteMemorySearchHealth(cfg);
|
||||
|
||||
expect(note).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not warn when remote apiKey is configured for explicit provider", async () => {
|
||||
|
||||
Reference in New Issue
Block a user