(
content: Content | undefined,
)
| 576 | } |
| 577 | |
| 578 | private isTextContent( |
| 579 | content: Content | undefined, |
| 580 | ): content is Content & { parts: [{ text: string }, ...Part[]] } { |
| 581 | return !!( |
| 582 | content && |
| 583 | content.role === 'model' && |
| 584 | content.parts && |
| 585 | content.parts.length > 0 && |
| 586 | typeof content.parts[0].text === 'string' && |
| 587 | content.parts[0].text !== '' |
| 588 | ); |
| 589 | } |
| 590 | |
| 591 | private isThoughtContent( |
| 592 | content: Content | undefined, |