





















@@ -455,9 +455,9 @@ describe("getMemorySearchManager caching", () => {
455455requireManager(second);
456456expect(first.manager).toBe(second.manager);
457457expect(createQmdManagerMock).toHaveBeenCalledTimes(1);
458-expect(createQmdManagerMock.mock.calls[0]?.[0]).toEqual(
459- expect.objectContaining({ agentId: "main-agent" }),
460-);
458+const createParams = createQmdManagerMock.mock.calls[0]?.[0];
459+expect(createParams?.agentId).toBe("main-agent");
460+expect(createParams?.mode).toBe("full");
461461});
462462463463it("replaces cached full qmd manager across different workspaces", async () => {
@@ -702,12 +702,12 @@ describe("getMemorySearchManager caching", () => {
702702703703expect(cliManager).toBe(cliPrimary);
704704expect(cliManager).not.toBe(fullManager);
705-expect(createQmdManagerMock.mock.calls[0]?.[0]).toEqual(
706- expect.objectContaining({ agentId, mode: "full" }),
707-);
708-expect(createQmdManagerMock.mock.calls[1]?.[0]).toEqual(
709- expect.objectContaining({ agentId, mode: "cli" }),
710-);
705+const fullCreateParams = createQmdManagerMock.mock.calls[0]?.[0];
706+const cliCreateParams = createQmdManagerMock.mock.calls[1]?.[0];
707+expect(fullCreateParams?.agentId).toBe(agentId);
708+expect(fullCreateParams?.mode).toBe("full");
709+expect(cliCreateParams?.agentId).toBe(agentId);
710+expect(cliCreateParams?.mode).toBe("cli");
711711712712await cli.manager?.close?.();
713713expect(cliPrimary.close).toHaveBeenCalledTimes(1);
@@ -775,9 +775,9 @@ describe("getMemorySearchManager caching", () => {
775775chunks: 42,
776776sourceCounts: [{ source: "memory", files: 10, chunks: 42 }],
777777});
778-expect(createQmdManagerMock.mock.calls[0]?.[0]).toEqual(
779- expect.objectContaining({ agentId, mode: "status" }),
780-);
778+const createParams = createQmdManagerMock.mock.calls[0]?.[0];
779+expect(createParams?.agentId).toBe(agentId);
780+expect(createParams?.mode).toBe("status");
781781});
782782783783it("reuses cached full qmd manager for status-only requests", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。