()
| 61 | let textDeltaBatch = "" |
| 62 | let textDeltaTimer: Timer | undefined |
| 63 | const flushTextDelta = async () => { |
| 64 | if (textDeltaBatch && currentText) { |
| 65 | await Session.updatePart({ |
| 66 | part: currentText, |
| 67 | delta: textDeltaBatch, |
| 68 | }) |
| 69 | textDeltaBatch = "" |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // batching for reasoning deltas |
| 74 | const reasoningDeltaBatch: Record<string, string> = {} |