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:
parent
2d5628b51c
commit
243293e5b0
2 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue