File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/core/condense/__tests__ Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments