diff --git a/packages/coding-agent/test/sdk-move-cwd.test.ts b/packages/coding-agent/test/sdk-move-cwd.test.ts index 1e634b010..a695a267d 100644 --- a/packages/coding-agent/test/sdk-move-cwd.test.ts +++ b/packages/coding-agent/test/sdk-move-cwd.test.ts @@ -2,6 +2,7 @@ import { afterEach, describe, expect, it } from "bun:test"; import * as fs from "node:fs"; import * as os from "node:os"; import * as path from "node:path"; +import type { AgentToolContext } from "@oh-my-pi/pi-agent-core"; import { getBundledModel } from "@oh-my-pi/pi-ai"; import { Settings } from "@oh-my-pi/pi-coding-agent/config/settings"; import { createAgentSession } from "@oh-my-pi/pi-coding-agent/sdk"; @@ -62,7 +63,9 @@ describe("createAgentSession cwd after /move", () => { const bashTool = session.getToolByName("bash"); if (!bashTool) throw new Error("Expected bash tool"); - const result = await bashTool.execute("pwd-after-move", { command: "pwd" }); + const result = await bashTool.execute("pwd-after-move", { command: "pwd" }, undefined, undefined, { + autoApprove: true, + } as AgentToolContext); expect(textContent(result)).toContain(cwdB); } finally {