MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / appendFinalPlanBlock

Function appendFinalPlanBlock

apps/cli/src/ai/chat-command.ts:234–248  ·  view source on GitHub ↗
(plan: PlanContentBlock)

Source from the content-addressed store, hash-verified

232 }
233
234 const appendFinalPlanBlock = (plan: PlanContentBlock) => {
235 const planBlock = JSON.parse(JSON.stringify(plan)) as PlanContentBlock
236 for (let index = contentBlocks.length - 1; index >= 0; index--) {
237 const block = contentBlocks[index]
238 if (block?.type === 'plan_draft') {
239 const displayText = block.text.trim()
240 if (displayText) planBlock.displayText = displayText
241 contentBlocks[index] = planBlock
242 hasReplayContentBlocks = true
243 return
244 }
245 }
246 contentBlocks.push(planBlock)
247 hasReplayContentBlocks = true
248 }
249
250 await runAgentStream(
251 {

Callers 1

runChatTurnFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected