MCPcopy Index your code
hub / github.com/codeaashu/claude-code / onRequest

Function onRequest

src/services/lsp/LSPClient.ts:352–371  ·  view source on GitHub ↗
(
      method: string,
      handler: (params: TParams) => TResult | Promise<TResult>,
    )

Source from the content-addressed store, hash-verified

350 },
351
352 onRequest<TParams, TResult>(
353 method: string,
354 handler: (params: TParams) => TResult | Promise<TResult>,
355 ): void {
356 if (!connection) {
357 // Queue handler for application when connection is ready (lazy initialization)
358 pendingRequestHandlers.push({
359 method,
360 handler: handler as (params: unknown) => unknown | Promise<unknown>,
361 })
362 logForDebugging(
363 `Queued request handler for ${serverName}.${method} (connection not ready)`,
364 )
365 return
366 }
367
368 checkStartFailed()
369
370 connection.onRequest(method, handler)
371 },
372
373 async stop(): Promise<void> {
374 let shutdownError: Error | undefined

Callers

nothing calls this directly

Calls 3

logForDebuggingFunction · 0.85
checkStartFailedFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected