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

Method disconnect

nodejs/src/session.ts:1301–1309  ·  view source on GitHub ↗

* Disconnects this session and releases all in-memory resources (event handlers, * tool handlers, permission handlers). * * Session state on disk (conversation history, planning state, artifacts) is * preserved, so the conversation can be resumed later by calling * {@link Co

()

Source from the content-addressed store, hash-verified

1299 * ```
1300 */
1301 async disconnect(): Promise<void> {
1302 if (this.disconnected) {
1303 return;
1304 }
1305 await this.connection.sendRequest("session.destroy", {
1306 sessionId: this.sessionId,
1307 });
1308 this._markDisconnected();
1309 }
1310
1311 /** Enables `await using session = ...` syntax for automatic cleanup. */
1312 async [Symbol.asyncDispose](): Promise<void> {

Calls 2

_markDisconnectedMethod · 0.95
sendRequestMethod · 0.45

Tested by 5

isAliveMethod · 0.36
disconnectSessionFunction · 0.36
runTurnFunction · 0.36
disconnectFunction · 0.36
assertRoutingFunction · 0.36