* Check if a message should be skipped (not break the group, just passed through). * This includes thinking blocks, redacted thinking, attachments, etc.
(msg: RenderableMessage)
| 382 | * This includes thinking blocks, redacted thinking, attachments, etc. |
| 383 | */ |
| 384 | function shouldSkipMessage(msg: RenderableMessage): boolean { |
| 385 | if (msg.type === 'assistant') { |
| 386 | const content = msg.message.content[0] |
| 387 | // Skip thinking blocks and other non-text, non-tool content |
| 388 | if (content?.type === 'thinking' || content?.type === 'redacted_thinking') { |
| 389 | return true |
| 390 | } |
| 391 | } |
| 392 | // Skip attachment messages |
| 393 | if (msg.type === 'attachment') { |
| 394 | return true |
| 395 | } |
| 396 | // Skip system messages |
| 397 | if (msg.type === 'system') { |
| 398 | return true |
| 399 | } |
| 400 | return false |
| 401 | } |
| 402 | |
| 403 | /** |
| 404 | * Type predicate: Check if a message is a collapsible tool use. |
no outgoing calls
no test coverage detected