fix: resolve extension typecheck errors in test files

- await-tool.test.ts: widen getTextFromResult param to accept ImageContent (text optional)
- auto-loop.test.ts: add missing rebuildState and resolveModelId to LoopDeps mock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-21 09:59:38 -06:00
parent 2d5628b51c
commit 243293e5b0
2 changed files with 4 additions and 2 deletions

View file

@ -7,8 +7,8 @@ import assert from "node:assert/strict";
import { AsyncJobManager } from "./job-manager.ts";
import { createAwaitTool } from "./await-tool.ts";
function getTextFromResult(result: { content: Array<{ type: string; text: string }> }): string {
return result.content.map((c) => c.text).join("\n");
function getTextFromResult(result: { content: Array<{ type: string; text?: string }> }): string {
return result.content.map((c) => c.text ?? "").join("\n");
}
const noopSignal = new AbortController().signal;

View file

@ -414,6 +414,8 @@ function makeMockDeps(
return "continue" as const;
},
getSessionFile: () => "/tmp/session.json",
rebuildState: async () => {},
resolveModelId: (id: string, models: any[]) => models.find((m: any) => m.id === id),
};
const merged = { ...baseDeps, ...overrides, callLog };