* Gets the current collapsed state of a block. * Thinking blocks use thinkingCollapseState; others use isCollapsed.
(block: CollapsibleBlock)
| 51 | * Thinking blocks use thinkingCollapseState; others use isCollapsed. |
| 52 | */ |
| 53 | function getBlockCollapsedState(block: CollapsibleBlock): boolean { |
| 54 | if (isThinkingTextBlock(block)) { |
| 55 | return block.thinkingCollapseState !== 'expanded' |
| 56 | } |
| 57 | return block.isCollapsed ?? true |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Creates an updated block with new collapsed state if different from current. |
no test coverage detected