* Type guard to check if a content part is a tool-call part with toolCallId.
(part: unknown)
| 17 | * Type guard to check if a content part is a tool-call part with toolCallId. |
| 18 | */ |
| 19 | function isToolCallPart(part: unknown): part is ToolCallPart { |
| 20 | return ( |
| 21 | typeof part === 'object' && |
| 22 | part !== null && |
| 23 | 'type' in part && |
| 24 | part.type === 'tool-call' && |
| 25 | 'toolCallId' in part && |
| 26 | typeof (part as ToolCallPart).toolCallId === 'string' |
| 27 | ) |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Type guard to check if a message is a tool message with toolCallId. |
no outgoing calls
no test coverage detected