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

Function close

nodejs/src/copilotRequestHandler.ts:94–110  ·  view source on GitHub ↗
(
        status: CopilotWebSocketCloseStatus = CopilotWebSocketCloseStatus.normalClosure
    )

Source from the content-addressed store, hash-verified

92 }
93
94 async close(
95 status: CopilotWebSocketCloseStatus = CopilotWebSocketCloseStatus.normalClosure
96 ): Promise<void> {
97 if (this.#closed) {
98 return;
99 }
100 this.#closed = true;
101 if (status.error) {
102 await this.#response.error({
103 message: status.description ?? status.error.message,
104 code: status.errorCode,
105 });
106 } else {
107 await this.#response.end();
108 }
109 this.#resolveCompletion(status);
110 }
111
112 abstract sendRequestMessage(data: string | Uint8Array): Promise<void> | void;
113

Calls 2

errorMethod · 0.45
endMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…