MCPcopy
hub / github.com/TanStack/ai / waitForProcessing

Method waitForProcessing

packages/ai-client/src/chat-client.ts:724–730  ·  view source on GitHub ↗

* Create a promise that resolves when onStreamEnd fires. * Used by streamResponse to await processing completion.

()

Source from the content-addressed store, hash-verified

722 * Used by streamResponse to await processing completion.
723 */
724 private waitForProcessing(): Promise<void> {
725 // Resolve any stale promise (e.g., from a previous aborted request)
726 this.resolveProcessing()
727 return new Promise<void>((resolve) => {
728 this.processingResolve = resolve
729 })
730 }
731
732 /**
733 * Send a message and stream the response.

Callers 1

streamResponseMethod · 0.95

Calls 1

resolveProcessingMethod · 0.95

Tested by

no test coverage detected