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

Method getLastSessionId

nodejs/src/client.ts:1878–1885  ·  view source on GitHub ↗

* Gets the ID of the most recently updated session. * * This is useful for resuming the last conversation when the session ID * was not stored. * * @returns A promise that resolves with the session ID, or undefined if no sessions exist * @throws Error if the client is n

()

Source from the content-addressed store, hash-verified

1876 * ```
1877 */
1878 async getLastSessionId(): Promise<string | undefined> {
1879 if (!this.connection) {
1880 throw new Error("Client not connected");
1881 }
1882
1883 const response = await this.connection.sendRequest("session.getLastId", {});
1884 return (response as { sessionId?: string }).sessionId;
1885 }
1886
1887 /**
1888 * Permanently deletes a session and all its data from disk, including

Calls 1

sendRequestMethod · 0.45

Tested by

no test coverage detected