diff --git a/packages/coding-agent/test/agent-session-concurrent.test.ts b/packages/coding-agent/test/agent-session-concurrent.test.ts index bd3d7124..50536e8e 100644 --- a/packages/coding-agent/test/agent-session-concurrent.test.ts +++ b/packages/coding-agent/test/agent-session-concurrent.test.ts @@ -450,6 +450,7 @@ describe("AgentSession concurrent prompt guard", () => { systemPrompt: string, systemPromptOptions: BuildSystemPromptOptions, ) => Promise; + invalidate: (message?: string) => void; }; }; sessionWithRunner._extensionRunner = { @@ -466,6 +467,7 @@ describe("AgentSession concurrent prompt guard", () => { }, emitInput: async () => ({ action: "continue" }), emitBeforeAgentStart: async () => undefined, + invalidate: () => {}, }; await session.prompt("hi"); @@ -590,6 +592,7 @@ describe("AgentSession concurrent prompt guard", () => { systemPrompt: string, systemPromptOptions: BuildSystemPromptOptions, ) => Promise; + invalidate: (message?: string) => void; }; }; sessionWithRunner._extensionRunner = { @@ -601,6 +604,7 @@ describe("AgentSession concurrent prompt guard", () => { }, emitInput: async () => ({ action: "continue" }), emitBeforeAgentStart: async () => undefined, + invalidate: () => {}, }; await session.prompt("hi"); diff --git a/packages/coding-agent/test/interactive-mode-clone-command.test.ts b/packages/coding-agent/test/interactive-mode-clone-command.test.ts index 7a306065..9388b89f 100644 --- a/packages/coding-agent/test/interactive-mode-clone-command.test.ts +++ b/packages/coding-agent/test/interactive-mode-clone-command.test.ts @@ -6,7 +6,6 @@ type CloneCommandContext = { runtimeHost: { fork: (entryId: string, options?: { position?: "before" | "at" }) => Promise<{ cancelled: boolean }>; }; - handleRuntimeSessionChange: () => Promise; renderCurrentSessionState: () => void; editor: { setText: (text: string) => void }; showStatus: (message: string) => void; @@ -23,7 +22,6 @@ const interactiveModePrototype = InteractiveMode.prototype as unknown as Interac describe("InteractiveMode /clone", () => { it("clones the current leaf into a new session", async () => { const fork = vi.fn(async () => ({ cancelled: false })); - const handleRuntimeSessionChange = vi.fn(async () => {}); const renderCurrentSessionState = vi.fn(); const setText = vi.fn(); const showStatus = vi.fn(); @@ -33,7 +31,6 @@ describe("InteractiveMode /clone", () => { const context: CloneCommandContext = { sessionManager: { getLeafId: () => "leaf-123" }, runtimeHost: { fork }, - handleRuntimeSessionChange, renderCurrentSessionState, editor: { setText }, showStatus, @@ -44,7 +41,6 @@ describe("InteractiveMode /clone", () => { await interactiveModePrototype.handleCloneCommand.call(context); expect(fork).toHaveBeenCalledWith("leaf-123", { position: "at" }); - expect(handleRuntimeSessionChange).toHaveBeenCalled(); expect(renderCurrentSessionState).toHaveBeenCalled(); expect(setText).toHaveBeenCalledWith(""); expect(showStatus).toHaveBeenCalledWith("Cloned to new session"); @@ -60,7 +56,6 @@ describe("InteractiveMode /clone", () => { const context: CloneCommandContext = { sessionManager: { getLeafId: () => null }, runtimeHost: { fork }, - handleRuntimeSessionChange: vi.fn(async () => {}), renderCurrentSessionState: vi.fn(), editor: { setText: vi.fn() }, showStatus, diff --git a/packages/coding-agent/test/interactive-mode-compaction.test.ts b/packages/coding-agent/test/interactive-mode-compaction.test.ts index 4a3c1ae2..85e8e919 100644 --- a/packages/coding-agent/test/interactive-mode-compaction.test.ts +++ b/packages/coding-agent/test/interactive-mode-compaction.test.ts @@ -16,7 +16,8 @@ describe("InteractiveMode compaction events", () => { showError: vi.fn(), showStatus: vi.fn(), flushCompactionQueue: vi.fn().mockResolvedValue(undefined), - ui: { requestRender: vi.fn() }, + settingsManager: { getShowTerminalProgress: () => false }, + ui: { requestRender: vi.fn(), terminal: { setProgress: vi.fn() } }, }; const handleEvent = Reflect.get(InteractiveMode.prototype, "handleEvent") as ( diff --git a/packages/coding-agent/test/print-mode.test.ts b/packages/coding-agent/test/print-mode.test.ts index 80d0accb..1a4907d2 100644 --- a/packages/coding-agent/test/print-mode.test.ts +++ b/packages/coding-agent/test/print-mode.test.ts @@ -27,6 +27,7 @@ type FakeRuntimeHost = { fork: ReturnType; switchSession: ReturnType; dispose: ReturnType; + setRebindSession: ReturnType; }; function createAssistantMessage(options?: { @@ -81,6 +82,7 @@ function createRuntimeHost(assistantMessage: AssistantMessage): FakeRuntimeHost dispose: vi.fn(async () => { await session.extensionRunner.emit({ type: "session_shutdown", reason: "quit" }); }), + setRebindSession: vi.fn(), }; } diff --git a/packages/coding-agent/test/rpc-prompt-response-semantics.test.ts b/packages/coding-agent/test/rpc-prompt-response-semantics.test.ts index 66f1d6ce..93148864 100644 --- a/packages/coding-agent/test/rpc-prompt-response-semantics.test.ts +++ b/packages/coding-agent/test/rpc-prompt-response-semantics.test.ts @@ -147,6 +147,7 @@ function createRuntimeHost(options: { withAuth: boolean; responseDelayMs: number switchSession: vi.fn(async () => ({ cancelled: true })), fork: vi.fn(async () => ({ cancelled: true, selectedText: "" })), dispose: vi.fn(async () => {}), + setRebindSession: vi.fn(), } as unknown as AgentSessionRuntime; return {