MCPcopy Create free account
hub / github.com/TanStack/ai / drainSandboxFileQueue

Method drainSandboxFileQueue

packages/ai/src/activities/chat/index.ts:2545–2550  ·  view source on GitHub ↗

* Drain queued `sandbox.file` chunks (emitted via the SandboxRuntime sink) * through the middleware pipeline and into the public stream.

()

Source from the content-addressed store, hash-verified

2543 * through the middleware pipeline and into the public stream.
2544 */
2545 private async *drainSandboxFileQueue(): AsyncGenerator<StreamChunk> {
2546 while (this.sandboxFileQueue.length > 0) {
2547 const chunk = this.sandboxFileQueue.shift()
2548 if (chunk) yield* this.pipeThroughMiddleware(chunk)
2549 }
2550 }
2551
2552 /**
2553 * Drain an executeToolCalls async generator, yielding any CustomEvent chunks

Callers 1

streamModelResponseMethod · 0.95

Calls 1

pipeThroughMiddlewareMethod · 0.95

Tested by

no test coverage detected