MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / updateLastPlanBlockStatus

Function updateLastPlanBlockStatus

src/services/ai/planBlocks.ts:87–99  ·  view source on GitHub ↗
(
  blocks: readonly PlanContentBlock[],
  status: PlanBlockStatus
)

Source from the content-addressed store, hash-verified

85}
86
87export function updateLastPlanBlockStatus(
88 blocks: readonly PlanContentBlock[],
89 status: PlanBlockStatus
90): PlanContentBlock[] {
91 const nextBlocks = blocks.map(toPlanContentBlock)
92 for (let index = nextBlocks.length - 1; index >= 0; index--) {
93 if (nextBlocks[index].type === 'plan') {
94 nextBlocks[index].status = status
95 break
96 }
97 }
98 return nextBlocks
99}

Callers 1

planBlocks.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected