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

Function isCollapsibleBlock

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

* Checks if a content block is collapsible. * Collapsible blocks are: thinking blocks (text with thinkingId), agent, tool, and agent-list blocks.

(block: ContentBlock)

Source from the content-addressed store, hash-verified

26 * Collapsible blocks are: thinking blocks (text with thinkingId), agent, tool, and agent-list blocks.
27 */
28function 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.

Callers 2

updateBlocksRecursivelyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected