(chunk, options)
| 89 | } |
| 90 | |
| 91 | const createController = (chunk, options) => ({ |
| 92 | skeleton: stripBufferedFields(chunk), |
| 93 | contentBuffer: '', |
| 94 | reasoningBuffer: '', |
| 95 | additionalReasoningBuffer: '', |
| 96 | toolCallArgBuffers: new Map(), |
| 97 | scheduled: false, |
| 98 | frameId: null, |
| 99 | lastPushAt: Date.now(), |
| 100 | lastEmitAt: 0, |
| 101 | lastFrameAt: Date.now(), |
| 102 | carryChars: 0, |
| 103 | avgIntervalMs: options.defaultIntervalMs, |
| 104 | avgChunkChars: Math.max(options.minReserveChars, getIncomingSize(chunk)) |
| 105 | }) |
| 106 | |
| 107 | const mergeSkeleton = (controller, chunk) => { |
| 108 | const stripped = stripBufferedFields(chunk) |
no test coverage detected