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

Method ping

nodejs/src/client.ts:1703–1716  ·  view source on GitHub ↗

* Sends a ping request to the server to verify connectivity. * * @param message - Optional message to include in the ping * @returns A promise that resolves with the ping response containing the message and timestamp * @throws Error if the client is not connected * * @e

(
        message?: string
    )

Source from the content-addressed store, hash-verified

1701 * ```
1702 */
1703 async ping(
1704 message?: string
1705 ): Promise<{ message: string; timestamp: string; protocolVersion?: number }> {
1706 if (!this.connection) {
1707 throw new Error("Client not connected");
1708 }
1709
1710 const result = await this.connection.sendRequest("ping", { message });
1711 return result as {
1712 message: string;
1713 timestamp: string;
1714 protocolVersion?: number;
1715 };
1716 }
1717
1718 /**
1719 * Get CLI status including version and protocol information

Calls 1

sendRequestMethod · 0.45

Tested by

no test coverage detected