(parts: Part[])
| 269 | } |
| 270 | |
| 271 | function partsText(parts: Part[]): string { |
| 272 | return parts |
| 273 | .map((part) => (part.content?.$case === 'text' ? part.content.value : '')) |
| 274 | .filter(Boolean) |
| 275 | .join('\n') |
| 276 | } |
| 277 | |
| 278 | /** Concatenated text of all text parts in a message. */ |
| 279 | export function extractText(message: Message): string { |
no test coverage detected