@@ -171,16 +171,16 @@ describe("compaction", () => {
171171 expect ( result . length ) . toBe ( 3 ) ;
172172
173173 // First message should be the summary
174- expect ( result [ 0 ] . id ) . toBe ( "compaction-summary" ) ;
175- expect ( result [ 0 ] . role ) . toBe ( "user" ) ;
176- expect ( result [ 0 ] . parts [ 0 ] . type ) . toBe ( "text" ) ;
177- expect ( ( result [ 0 ] . parts [ 0 ] as { text : string } ) . text ) . toInclude (
174+ expect ( result [ 0 ] ! . id ) . toBe ( "compaction-summary" ) ;
175+ expect ( result [ 0 ] ! . role ) . toBe ( "user" ) ;
176+ expect ( result [ 0 ] ! . parts [ 0 ] ! . type ) . toBe ( "text" ) ;
177+ expect ( ( result [ 0 ] ! . parts [ 0 ] as { text : string } ) . text ) . toInclude (
178178 "Summary of old messages"
179179 ) ;
180180
181181 // Should include messages from compaction point onwards
182- expect ( result [ 1 ] . id ) . toBe ( "3" ) ;
183- expect ( result [ 2 ] . id ) . toBe ( "4" ) ;
182+ expect ( result [ 1 ] ! . id ) . toBe ( "3" ) ;
183+ expect ( result [ 2 ] ! . id ) . toBe ( "4" ) ;
184184 } ) ;
185185 } ) ;
186186
@@ -198,7 +198,7 @@ describe("compaction", () => {
198198 const tools = createCompactionTool ( ) ;
199199 const compactionTool = tools [ COMPACT_CONVERSATION_TOOL_NAME ] ;
200200
201- const result = ( await compactionTool . execute (
201+ const result = ( await compactionTool ! . execute (
202202 { summary : "Test summary content" } ,
203203 { abortSignal : new AbortController ( ) . signal } as any
204204 ) ) as { summary : string ; compacted_at : string ; message : string } ;
0 commit comments