MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getBlockCollapsedState

Function getBlockCollapsedState

cli/src/utils/collapse-helpers.ts:53–58  ·  view source on GitHub ↗

* Gets the current collapsed state of a block. * Thinking blocks use thinkingCollapseState; others use isCollapsed.

(block: CollapsibleBlock)

Source from the content-addressed store, hash-verified

51 * Thinking blocks use thinkingCollapseState; others use isCollapsed.
52 */
53function 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.

Callers 2

createUpdatedBlockFunction · 0.85
updateBlocksRecursivelyFunction · 0.85

Calls 1

isThinkingTextBlockFunction · 0.85

Tested by

no test coverage detected