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

Method _handleUserInputRequest

nodejs/src/session.ts:1185–1200  ·  view source on GitHub ↗

* Handles a user input request from the Copilot CLI. * * @param request - The user input request data from the CLI * @returns A promise that resolves with the user's response * @internal This method is for internal use by the SDK.

(request: unknown)

Source from the content-addressed store, hash-verified

1183 * @internal This method is for internal use by the SDK.
1184 */
1185 async _handleUserInputRequest(request: unknown): Promise<UserInputResponse> {
1186 if (!this.userInputHandler) {
1187 // No handler registered, throw error
1188 throw new Error("User input requested but no handler registered");
1189 }
1190
1191 try {
1192 const result = await this.userInputHandler(request as UserInputRequest, {
1193 sessionId: this.sessionId,
1194 });
1195 return result;
1196 } catch (error) {
1197 // Handler failed, rethrow
1198 throw error;
1199 }
1200 }
1201
1202 /**
1203 * Handles a hooks invocation from the Copilot CLI.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected