(
params: AutoModeSwitchRequest & { sessionId: string }
)
| 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; |
no test coverage detected