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