
























@@ -35,6 +35,10 @@ function createManagerStatus(params: {
3535};
3636}
373738+function nativePath(candidate: string): string {
39+return path.resolve(candidate);
40+}
41+3842function createManagerMock(params: {
3943backend: "qmd" | "builtin";
4044provider: string;
@@ -339,7 +343,7 @@ describe("getMemorySearchManager caching", () => {
339343expect(checkQmdBinaryAvailability).toHaveBeenCalledWith({
340344command: "qmd",
341345env: process.env,
342-cwd: "/tmp/workspace",
346+cwd: nativePath("/tmp/workspace"),
343347});
344348});
345349@@ -430,12 +434,12 @@ describe("getMemorySearchManager caching", () => {
430434expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, {
431435command: "qmd",
432436env: process.env,
433-cwd: "/tmp/workspace-a",
437+cwd: nativePath("/tmp/workspace-a"),
434438});
435439expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, {
436440command: "qmd",
437441env: process.env,
438-cwd: "/tmp/workspace-b",
442+cwd: nativePath("/tmp/workspace-b"),
439443});
440444});
441445@@ -582,12 +586,12 @@ describe("getMemorySearchManager caching", () => {
582586expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, {
583587command: "qmd",
584588env: process.env,
585-cwd: "/tmp/workspace-a",
589+cwd: nativePath("/tmp/workspace-a"),
586590});
587591expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, {
588592command: "qmd",
589593env: process.env,
590-cwd: "/tmp/workspace-b",
594+cwd: nativePath("/tmp/workspace-b"),
591595});
592596});
593597@@ -637,12 +641,12 @@ describe("getMemorySearchManager caching", () => {
637641expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, {
638642command: "qmd",
639643env: process.env,
640-cwd: "/tmp/workspace",
644+cwd: nativePath("/tmp/workspace"),
641645});
642646expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, {
643647command: "qmd-alt",
644648env: process.env,
645-cwd: "/tmp/workspace",
649+cwd: nativePath("/tmp/workspace"),
646650});
647651});
648652@@ -850,12 +854,12 @@ describe("getMemorySearchManager caching", () => {
850854expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, {
851855command: "qmd",
852856env: process.env,
853-cwd: "/tmp/workspace-a",
857+cwd: nativePath("/tmp/workspace-a"),
854858});
855859expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, {
856860command: "qmd",
857861env: process.env,
858-cwd: "/tmp/workspace-b",
862+cwd: nativePath("/tmp/workspace-b"),
859863});
860864861865const fullAgain = await getMemorySearchManager({ cfg: firstCfg, agentId });
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。