(part: StreamedMessagePart)
| 104 | |
| 105 | /** Check if a streamed part is a ContentPart (text, think, image_url, audio_url, video_url). */ |
| 106 | export function isContentPart(part: StreamedMessagePart): part is ContentPart { |
| 107 | const t = part.type; |
| 108 | return ( |
| 109 | t === 'text' || t === 'think' || t === 'image_url' || t === 'audio_url' || t === 'video_url' |
| 110 | ); |
| 111 | } |
| 112 | |
| 113 | /** Check if a streamed part is a ToolCall. */ |
| 114 | export function isToolCall(part: StreamedMessagePart): part is ToolCall { |
no outgoing calls
no test coverage detected