test: tighten context pruning placeholder assertion

This commit is contained in:
Peter Steinberger
2026-05-09 14:30:42 +01:00
parent 3925370e70
commit e84eb59ea2

View File

@@ -390,7 +390,7 @@ describe("pruneContextMessages", () => {
const toolResult = result[1] as Extract<AgentMessage, { role: "toolResult" }>;
expect(toolResult.content).toHaveLength(1);
expect(toolResult.content[0]).toMatchObject({ type: "text" });
expect(toolResult.content[0]?.type).toBe("text");
const textBlock = toolResult.content[0] as { type: "text"; text: string };
expect(textBlock.text).toContain("[image removed during context pruning]");
expect(textBlock.text).toContain(