MCPcopy Create free account
hub / github.com/github/copilot-sdk / registerClientGlobalApiHandlers

Function registerClientGlobalApiHandlers

nodejs/src/generated/rpc.ts:17140–17159  ·  view source on GitHub ↗
(
    connection: MessageConnection,
    handlers: ClientGlobalApiHandlers,
)

Source from the content-addressed store, hash-verified

17138 * connection.
17139 */
17140export function registerClientGlobalApiHandlers(
17141 connection: MessageConnection,
17142 handlers: ClientGlobalApiHandlers,
17143): void {
17144 connection.onRequest("llmInference.httpRequestStart", async (params: LlmInferenceHttpRequestStartRequest) => {
17145 const handler = handlers.llmInference;
17146 if (!handler) throw new Error("No llmInference client-global handler registered");
17147 return handler.httpRequestStart(params);
17148 });
17149 connection.onRequest("llmInference.httpRequestChunk", async (params: LlmInferenceHttpRequestChunkRequest) => {
17150 const handler = handlers.llmInference;
17151 if (!handler) throw new Error("No llmInference client-global handler registered");
17152 return handler.httpRequestChunk(params);
17153 });
17154 connection.onRequest("gitHubTelemetry.event", async (params: GitHubTelemetryNotification) => {
17155 const handler = handlers.gitHubTelemetry;
17156 if (!handler) throw new Error("No gitHubTelemetry client-global handler registered");
17157 return handler.event(params);
17158 });
17159}

Callers 1

Calls 3

httpRequestStartMethod · 0.80
httpRequestChunkMethod · 0.80
eventMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…