MCPcopy Index your code
hub / github.com/TanStack/ai / push

Method push

packages/ai-opencode/src/stream/queue.ts:16–24  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

14 private failed = false
15
16 push(value: T): void {
17 if (this.ended || this.failed) return
18 const waiter = this.waiters.shift()
19 if (waiter) {
20 waiter.resolve({ value, done: false })
21 } else {
22 this.values.push(value)
23 }
24 }
25
26 /** Signal normal completion; pending and future reads resolve as done. */
27 end(): void {

Callers 15

chatStreamMethod · 0.95
makeFakeHandleFunction · 0.45
collectFunction · 0.45
translate.test.tsFile · 0.45
collectFunction · 0.45
handleToolCallMethod · 0.45
formatMessagesMethod · 0.45
constructorMethod · 0.45
collectStreamFunction · 0.45
handleServerEventFunction · 0.45
sendEventFunction · 0.45

Calls 1

resolveMethod · 0.80

Tested by 9

makeFakeHandleFunction · 0.36
collectFunction · 0.36
collectFunction · 0.36
constructorMethod · 0.36
collectStreamFunction · 0.36
runFinishedForFunction · 0.36
captureSerializedToolFunction · 0.36
runFinishedFunction · 0.36
captureSerializedToolsFunction · 0.36