* Type guard to check if a message is a tool message with toolCallId.
( msg: Message, )
| 31 | * Type guard to check if a message is a tool message with toolCallId. |
| 32 | */ |
| 33 | function isToolMessageWithId( |
| 34 | msg: Message, |
| 35 | ): msg is ToolMessage & { toolCallId: string } { |
| 36 | return ( |
| 37 | msg.role === 'tool' && |
| 38 | 'toolCallId' in msg && |
| 39 | typeof msg.toolCallId === 'string' |
| 40 | ) |
| 41 | } |
| 42 | /** |
| 43 | * Integration tests for the context-pruner agent. |
| 44 | * These tests verify that context-pruner correctly prunes message history |
no outgoing calls
no test coverage detected