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

Method handleUserInputRequest

nodejs/src/client.ts:2651–2676  ·  view source on GitHub ↗
(params: {
        sessionId: string;
        question: string;
        choices?: string[];
        allowFreeform?: boolean;
    })

Source from the content-addressed store, hash-verified

2649 }
2650
2651 private async handleUserInputRequest(params: {
2652 sessionId: string;
2653 question: string;
2654 choices?: string[];
2655 allowFreeform?: boolean;
2656 }): Promise<{ answer: string; wasFreeform: boolean }> {
2657 if (
2658 !params ||
2659 typeof params.sessionId !== "string" ||
2660 typeof params.question !== "string"
2661 ) {
2662 throw new Error("Invalid user input request payload");
2663 }
2664
2665 const session = this.sessions.get(params.sessionId);
2666 if (!session) {
2667 throw new Error(`Session not found: ${params.sessionId}`);
2668 }
2669
2670 const result = await session._handleUserInputRequest({
2671 question: params.question,
2672 choices: params.choices,
2673 allowFreeform: params.allowFreeform,
2674 });
2675 return result;
2676 }
2677
2678 private async handleExitPlanModeRequest(
2679 params: ExitPlanModeRequest & { sessionId: string }

Callers 1

Calls 2

getMethod · 0.45

Tested by

no test coverage detected