* Checks if a content block is collapsible. * Collapsible blocks are: thinking blocks (text with thinkingId), agent, tool, and agent-list blocks.
(block: ContentBlock)
| 26 | * Collapsible blocks are: thinking blocks (text with thinkingId), agent, tool, and agent-list blocks. |
| 27 | */ |
| 28 | function isCollapsibleBlock(block: ContentBlock): block is CollapsibleBlock { |
| 29 | if (block.type === 'text' && 'thinkingId' in block && block.thinkingId) { |
| 30 | return true |
| 31 | } |
| 32 | if (block.type === 'agent' || block.type === 'tool' || block.type === 'agent-list') { |
| 33 | return true |
| 34 | } |
| 35 | return false |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Checks if a collapsible block is explicitly expanded. |
no outgoing calls
no test coverage detected