chore: Fix types in tests 26/N.

This commit is contained in:
cpojer
2026-02-17 14:31:40 +09:00
parent 6e5df1dc0f
commit 4235435309
14 changed files with 57 additions and 45 deletions

View File

@@ -52,6 +52,7 @@ import { log } from "./logger.js";
import { runEmbeddedPiAgent } from "./run.js";
import { makeAttemptResult } from "./run.overflow-compaction.fixture.js";
import { runEmbeddedAttempt } from "./run/attempt.js";
import type { EmbeddedRunAttemptResult } from "./run/types.js";
import {
sessionLikelyHasOversizedToolResults,
truncateOversizedToolResultsInSession,
@@ -171,7 +172,12 @@ describe("overflow compaction in run loop", () => {
.mockResolvedValueOnce(
makeAttemptResult({
promptError: overflowError,
messagesSnapshot: [{ role: "assistant", content: "big tool output" }],
messagesSnapshot: [
{
role: "assistant",
content: "big tool output",
} as unknown as EmbeddedRunAttemptResult["messagesSnapshot"][number],
],
}),
)
.mockResolvedValueOnce(makeAttemptResult({ promptError: null }));
@@ -362,7 +368,7 @@ describe("overflow compaction in run loop", () => {
cacheWrite: 0,
total: 2_000,
},
} as EmbeddedRunAttemptResult["lastAssistant"],
} as unknown as EmbeddedRunAttemptResult["lastAssistant"],
}),
);