( content: string | DeepImmutable<Array<ContentBlockParam>>, )
| 2930 | } |
| 2931 | |
| 2932 | export function getContentText( |
| 2933 | content: string | DeepImmutable<Array<ContentBlockParam>>, |
| 2934 | ): string | null { |
| 2935 | if (typeof content === 'string') { |
| 2936 | return content |
| 2937 | } |
| 2938 | if (Array.isArray(content)) { |
| 2939 | return extractTextContent(content, '\n').trim() || null |
| 2940 | } |
| 2941 | return null |
| 2942 | } |
| 2943 | |
| 2944 | export type StreamingToolUse = { |
| 2945 | index: number |
no test coverage detected