MCPcopy
hub / github.com/7836246/cursor2api / flushVisible

Function flushVisible

src/handler.ts:945–955  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

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;

Callers 1

executeAttemptFunction · 0.70

Calls 3

writeAnthropicTextDeltaFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected