(chunk: string)
| 943 | }); |
| 944 | |
| 945 | const flushVisible = (chunk: string): void => { |
| 946 | if (!chunk) return; |
| 947 | visibleText += chunk; |
| 948 | const delta = attemptStreamer.push(chunk); |
| 949 | if (!delta) return; |
| 950 | |
| 951 | if (clientRequestedThinking && thinkingContent && !streamState.thinkingEmitted) { |
| 952 | emitAnthropicThinkingBlock(res, streamState, thinkingContent); |
| 953 | } |
| 954 | writeAnthropicTextDelta(res, streamState, delta); |
| 955 | }; |
| 956 | |
| 957 | const apiStart = Date.now(); |
| 958 | let firstChunk = true; |
no test coverage detected