1016
*/
1017
protected _enablePlanModeOnClient(client: CopilotClient): void {
1018
>
// `connection` is declared private on `CopilotClient` at the type
copilotAgent.ts
1019
>
// level but is a plain field at runtime — see the SDK's compiled
1020
>
// `dist/client.js`.
1021
>
const connection = (client as unknown as { connection?: IExitPlanModeConnection }).connection;
1022
>
if (!connection) {
1023
this._logService.warn('[Copilot] Could not enable plan mode: client.connection is null');
1024
return;