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

Method handleAutoModeSwitchRequest

nodejs/src/client.ts:2704–2721  ·  view source on GitHub ↗
(
        params: AutoModeSwitchRequest & { sessionId: string }
    )

Source from the content-addressed store, hash-verified

2702 }
2703
2704 private async handleAutoModeSwitchRequest(
2705 params: AutoModeSwitchRequest & { sessionId: string }
2706 ): Promise<{ response: AutoModeSwitchResponse }> {
2707 if (!params || typeof params.sessionId !== "string") {
2708 throw new Error("Invalid auto mode switch request payload");
2709 }
2710
2711 const session = this.sessions.get(params.sessionId);
2712 if (!session) {
2713 throw new Error(`Session not found: ${params.sessionId}`);
2714 }
2715
2716 const response = await session._handleAutoModeSwitchRequest({
2717 errorCode: params.errorCode,
2718 retryAfterSeconds: params.retryAfterSeconds,
2719 });
2720 return { response };
2721 }
2722
2723 private async handleHooksInvoke(params: {
2724 sessionId: string;

Callers 2

client.test.tsFile · 0.45

Calls 2

getMethod · 0.45

Tested by

no test coverage detected