()
| 131 | }; |
| 132 | |
| 133 | const sendTextBlockStart = () => { |
| 134 | if (textBlockStarted) return; |
| 135 | textBlockStarted = true; |
| 136 | safeEnqueue(encoder.encode(`event: content_block_start\ndata: ${JSON.stringify({ |
| 137 | type: "content_block_start", index: 0, content_block: { type: "text", text: "" }, |
| 138 | })}\n\n`)); |
| 139 | }; |
| 140 | |
| 141 | const sendTextDelta = (text: string) => { |
| 142 | safeEnqueue(encoder.encode(`event: content_block_delta\ndata: ${JSON.stringify({ |