MCPcopy
hub / github.com/di-sukharev/opencommit / _createAssistantStream

Method _createAssistantStream

out/cli.cjs:83170–83187  ·  view source on GitHub ↗
(run, threadId, params, options)

Source from the content-addressed store, hash-verified

83168 for await (const event of stream4) {
83169 __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event);
83170 }
83171 if (stream4.controller.signal?.aborted) {
83172 throw new APIUserAbortError3();
83173 }
83174 return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this));
83175 }
83176 async _createAssistantStream(run, threadId, params, options) {
83177 const signal = options?.signal;
83178 if (signal) {
83179 if (signal.aborted)
83180 this.controller.abort();
83181 signal.addEventListener("abort", () => this.controller.abort());
83182 }
83183 const body = { ...params, stream: true };
83184 const stream4 = await run.create(threadId, body, { ...options, signal: this.controller.signal });
83185 this._connected();
83186 for await (const event of stream4) {
83187 __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event);
83188 }
83189 if (stream4.controller.signal?.aborted) {
83190 throw new APIUserAbortError3();

Callers 1

_runAssistantStreamMethod · 0.95

Calls 5

_addRunMethod · 0.95
__classPrivateFieldGet12Function · 0.85
abortMethod · 0.45
createMethod · 0.45
_connectedMethod · 0.45

Tested by

no test coverage detected