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

Function push

src/streaming-text.ts:189–199  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

187
188 return {
189 push(chunk: string): string {
190 if (!chunk) return '';
191
192 rawText += chunk;
193 if (!tryUnlock()) return '';
194
195 const safeRawLength = Math.max(0, rawText.length - guardChars);
196 if (safeRawLength <= 0) return '';
197
198 return emitFromRawLength(safeRawLength);
199 },
200
201 finish(): string {
202 if (!rawText) return '';

Callers

nothing calls this directly

Calls 2

tryUnlockFunction · 0.85
emitFromRawLengthFunction · 0.85

Tested by

no test coverage detected