()
| 145 | }; |
| 146 | |
| 147 | const sendTextBlockStop = () => { |
| 148 | if (!textBlockStarted) return; |
| 149 | textBlockStarted = false; |
| 150 | safeEnqueue(encoder.encode(`event: content_block_stop\ndata: ${JSON.stringify({ |
| 151 | type: "content_block_stop", index: 0, |
| 152 | })}\n\n`)); |
| 153 | }; |
| 154 | |
| 155 | const sendToolBlockStart = (toolCall: any, idx: number) => { |
| 156 | if (sentToolIds.has(toolCall.id)) return; |