Skip to content

Commit 7f6da16

Browse files
SebTardifsteipete
authored andcommitted
fix(compaction): use as-unknown-as-AgentMessage cast for assistant test fixtures
1 parent 5c23f3e commit 7f6da16

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/agents/compaction-partial-summary.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe("summarizeChunks partial summary preservation (#82952)", () => {
183183
// Small message (chunk 1)
184184
{ role: "user", content: "Short question about code", timestamp: 1 },
185185
// Oversized message (will be in chunk 2, triggers the oversized retry)
186-
{ role: "assistant", content: [{ type: "text", text: "x".repeat(500_000) }], timestamp: 2 },
186+
{ role: "assistant", content: "x".repeat(500_000), timestamp: 2 } as unknown as AgentMessage,
187187
// Small message after oversized (should be recovered by oversized retry)
188188
{ role: "user", content: "Follow-up question", timestamp: 3 },
189189
];
@@ -214,7 +214,7 @@ describe("summarizeChunks partial summary preservation (#82952)", () => {
214214
const mixedMessages: AgentMessage[] = [
215215
{ role: "user", content: "Short question", timestamp: 1 },
216216
// Oversized message that will be filtered in the retry
217-
{ role: "assistant", content: [{ type: "text", text: "x".repeat(500_000) }], timestamp: 2 },
217+
{ role: "assistant", content: "x".repeat(500_000), timestamp: 2 } as unknown as AgentMessage,
218218
{ role: "user", content: "a".repeat(400), timestamp: 3 },
219219
{ role: "user", content: "b".repeat(400), timestamp: 4 },
220220
];

0 commit comments

Comments
 (0)