MCPcopy Index your code
hub / github.com/github/copilot-sdk / #run

Method #run

nodejs/src/copilotRequestHandler.ts:801–817  ·  view source on GitHub ↗
(terminal: boolean, action: () => Promise<void>)

Source from the content-addressed store, hash-verified

799 }
800
801 #run(terminal: boolean, action: () => Promise<void>): Promise<void> {
802 const task = this.#serial.then(async () => {
803 if (this.#completed) {
804 return;
805 }
806 if (!this.#started) {
807 this.#started = true;
808 await this.#exchange.startResponse({ status: 101, headers: {} });
809 }
810 if (terminal) {
811 this.#completed = true;
812 }
813 await action();
814 });
815 this.#serial = task.catch(() => {});
816 return task;
817 }
818}

Callers 4

startMethod · 0.95
writeMethod · 0.95
endMethod · 0.95
errorMethod · 0.95

Calls 1

startResponseMethod · 0.45

Tested by

no test coverage detected