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

Function groupConsecutiveToolBlocks

cli/src/utils/implementor-helpers.ts:167–176  ·  view source on GitHub ↗
(
  blocks: ContentBlock[],
  startIndex: number,
)

Source from the content-addressed store, hash-verified

165}
166
167export function groupConsecutiveToolBlocks(
168 blocks: ContentBlock[],
169 startIndex: number,
170): { group: ToolContentBlock[]; nextIndex: number } {
171 return groupConsecutiveBlocks(
172 blocks,
173 startIndex,
174 (block): block is ToolContentBlock => block.type === 'tool',
175 )
176}
177
178/**
179 * Extract a value for a key from tool output (key: value format).

Callers 2

processBlocksFunction · 0.90

Calls 1

groupConsecutiveBlocksFunction · 0.85

Tested by

no test coverage detected