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

Function insertPlanBlock

cli/src/utils/message-block-helpers.ts:61–73  ·  view source on GitHub ↗
(
  blocks: ContentBlock[],
  planContent: string,
)

Source from the content-addressed store, hash-verified

59}
60
61export const insertPlanBlock = (
62 blocks: ContentBlock[],
63 planContent: string,
64): ContentBlock[] => {
65 const cleanedBlocks = scrubPlanTagsInBlocks(blocks)
66 return [
67 ...cleanedBlocks,
68 {
69 type: 'plan',
70 content: planContent,
71 },
72 ]
73}
74
75/**
76 * Recursively collapses blocks that weren't manually opened by the user.

Callers 2

appendRootChunkFunction · 0.90

Calls 1

scrubPlanTagsInBlocksFunction · 0.85

Tested by

no test coverage detected