Skip to content

Commit b322942

Browse files
committed
fix: update condense test to expect array content with reasoning block
1 parent c2cd1ac commit b322942

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/core/condense/__tests__/condense.spec.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,19 @@ describe("Condense", () => {
8686
// Verify we have a summary message
8787
const summaryMessage = result.messages.find((msg) => msg.isSummary)
8888
expect(summaryMessage).toBeTruthy()
89-
expect(summaryMessage?.content).toBe("Mock summary of the conversation")
89+
// Summary content is now always an array with a synthetic reasoning block + text block
90+
// for DeepSeek-reasoner compatibility
91+
expect(Array.isArray(summaryMessage?.content)).toBe(true)
92+
const contentArray = summaryMessage?.content as Anthropic.Messages.ContentBlockParam[]
93+
expect(contentArray).toHaveLength(2)
94+
expect(contentArray[0]).toEqual({
95+
type: "reasoning",
96+
text: "Condensing conversation context. The summary below captures the key information from the prior conversation.",
97+
})
98+
expect(contentArray[1]).toEqual({
99+
type: "text",
100+
text: "Mock summary of the conversation",
101+
})
90102

91103
// With non-destructive condensing, all messages are retained (tagged but not deleted)
92104
// Use getEffectiveApiHistory to verify the effective view matches the old behavior

0 commit comments

Comments
 (0)