( content: string | DeepImmutable<Array<ContentBlockParam>>, )
| 3256 | } |
| 3257 | |
| 3258 | export function getContentText( |
| 3259 | content: string | DeepImmutable<Array<ContentBlockParam>>, |
| 3260 | ): string | null { |
| 3261 | if (typeof content === 'string') { |
| 3262 | return content |
| 3263 | } |
| 3264 | if (Array.isArray(content)) { |
| 3265 | return extractTextContent(content, '\n').trim() || null |
| 3266 | } |
| 3267 | return null |
| 3268 | } |
| 3269 | |
| 3270 | export type StreamingToolUse = { |
| 3271 | index: number |
no test coverage detected