(status: PlanBlockStatus)
| 745 | } |
| 746 | |
| 747 | const updatePlanBlockStatus = (status: PlanBlockStatus) => { |
| 748 | const idx = getAiMessageIndex() |
| 749 | const blocks = targetBuffer.messages[idx].contentBlocks || [] |
| 750 | for (let index = blocks.length - 1; index >= 0; index--) { |
| 751 | const block = blocks[index] |
| 752 | if (block.type === 'plan') { |
| 753 | block.status = status |
| 754 | break |
| 755 | } |
| 756 | } |
| 757 | updateAIMessage({ contentBlocks: [...blocks] }) |
| 758 | } |
| 759 | |
| 760 | const appendErrorToBlocks = (error: SerializedErrorInfo) => { |
| 761 | const idx = getAiMessageIndex() |
no test coverage detected