(
status: CopilotWebSocketCloseStatus = CopilotWebSocketCloseStatus.normalClosure
)
| 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 |
searching dependent graphs…