MCPcopy Create free account
hub / github.com/CopilotKit/aimock / write

Method write

src/recorder.ts:914–916  ·  view source on GitHub ↗

Decode a chunk, holding back any trailing partial multibyte sequence.

(chunk: Buffer)

Source from the content-addressed store, hash-verified

912 private decoder = new StringDecoder("utf8");
913 /** Decode a chunk, holding back any trailing partial multibyte sequence. */
914 write(chunk: Buffer): string {
915 return this.decoder.write(chunk);
916 }
917 /** Flush any buffered bytes once the stream has ended. */
918 end(): string {
919 return this.decoder.end();

Callers 15

_download_tarballMethod · 0.80
writeCohereSSEStreamFunction · 0.80
writeNDJSONStreamFunction · 0.80
onUpstreamDataFunction · 0.80
makeUpstreamRequestFunction · 0.80
writeGeminiSSEStreamFunction · 0.80
writeSSEStreamFunction · 0.80
writeResponsesSSEStreamFunction · 0.80
writeEventStreamFunction · 0.80

Calls

no outgoing calls

Tested by 15

requestFunction · 0.64
httpRequestFunction · 0.64
httpPostFunction · 0.64
postFunction · 0.64
postRawFunction · 0.64
postFunction · 0.64
postRawFunction · 0.64
httpPostFunction · 0.64
postFunction · 0.64
httpPostFunction · 0.64
httpPostFunction · 0.64
postFunction · 0.64