* Check if a message is assistant text that should break a group.
(msg: RenderableMessage)
| 352 | * Check if a message is assistant text that should break a group. |
| 353 | */ |
| 354 | function isTextBreaker(msg: RenderableMessage): boolean { |
| 355 | if (msg.type === 'assistant') { |
| 356 | const content = getFirstContentItem(msg.message?.content) |
| 357 | if (content && content.type === 'text' && (content as { type: 'text'; text: string }).text.trim().length > 0) { |
| 358 | return true |
| 359 | } |
| 360 | } |
| 361 | return false |
| 362 | } |
| 363 | |
| 364 | /** |
| 365 | * Check if a message is a non-collapsible tool use that should break a group. |
no test coverage detected