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

Function appendPlanDraftBlock

apps/cli/src/ai/chat-command.ts:215–224  ·  view source on GitHub ↗
(delta: string)

Source from the content-addressed store, hash-verified

213 }
214
215 const appendPlanDraftBlock = (delta: string) => {
216 if (!delta) return
217 const lastBlock = contentBlocks[contentBlocks.length - 1]
218 if (lastBlock?.type === 'plan_draft') {
219 lastBlock.text += delta
220 } else {
221 contentBlocks.push({ type: 'plan_draft', version: 1, status: 'streaming', text: delta } as PlanDraftContentBlock)
222 }
223 hasReplayContentBlocks = true
224 }
225
226 const removePlanDraftBlocks = () => {
227 for (let index = contentBlocks.length - 1; index >= 0; index--) {

Callers 1

runChatTurnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected