Theia API Documentation v1.76.0
    Preparing search index...

    Collects the stream parts produced by the session events and by the tool handlers, and hands them to the consuming generator as they arrive.

    A buffer is needed because the parts originate from callbacks rather than from a stream we can await, and because the tool handlers of a turn run while its response is still being produced.

    Index

    Constructors

    Properties

    done: boolean = false
    failure: unknown
    flushWaiters: (() => void)[] = []
    notify: undefined | (() => void)

    Methods

    • Resolves once everything pushed so far has been taken by the consumer.

      Needed because a tool call has to be reported before the tool runs: the caller creates the record of the call from the stream, and the tool handler then completes that record. Handing the part over and invoking the handler in the same turn would leave the handler with nothing to complete.

      Returns Promise<void>