MCPcopy Create free account
hub / github.com/stackblitz/bolt.new / transform

Function transform

app/routes/api.enhancer.ts:36–46  ·  view source on GitHub ↗
(chunk, controller)

Source from the content-addressed store, hash-verified

34
35 const transformStream = new TransformStream({
36 transform(chunk, controller) {
37 const processedChunk = decoder
38 .decode(chunk)
39 .split('\n')
40 .filter((line) => line !== '')
41 .map(parseStreamPart)
42 .map((part) => part.value)
43 .join('');
44
45 controller.enqueue(encoder.encode(processedChunk));
46 },
47 });
48
49 const transformedStream = result.toAIStream().pipeThrough(transformStream);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected