* Check if a message should be skipped (not break the group, just passed through). * This includes thinking blocks, redacted thinking, attachments, etc.
(msg: RenderableMessage)
| 410 | * This includes thinking blocks, redacted thinking, attachments, etc. |
| 411 | */ |
| 412 | function shouldSkipMessage(msg: RenderableMessage): boolean { |
| 413 | if (msg.type === 'assistant') { |
| 414 | const content = msg.message.content[0] |
| 415 | // Skip thinking blocks and other non-text, non-tool content |
| 416 | if (content?.type === 'thinking' || content?.type === 'redacted_thinking') { |
| 417 | return true |
| 418 | } |
| 419 | } |
| 420 | // Skip attachment messages |
| 421 | if (msg.type === 'attachment') { |
| 422 | return true |
| 423 | } |
| 424 | // Skip system messages |
| 425 | if (msg.type === 'system') { |
| 426 | return true |
| 427 | } |
| 428 | return false |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Type predicate: Check if a message is a collapsible tool use. |
no outgoing calls
no test coverage detected