2249
return { kind: 'approve-once' };
2250
}
2252
>
this._logService.info(`[Copilot:${this.sessionId}] Requesting confirmation for tool call: ${toolCallId}`);
2253
>
2254
>
const deferred = new DeferredPromise<PermissionRequestResult>();
2255
>
this._pendingPermissions.set(toolCallId, deferred);
2256
>
2257
>
// Auto-approve shell commands that run sandboxed by default, since the
2258
>
// sandbox already contains them. Commands that opted OUT of the sandbox
2259
>
// (`requestSandboxBypass`) are an elevation of privilege and must
2260
>
// fall through to the normal confirmation flow — otherwise enabling
2261
>
// `sandbox.allowBypass` would let the model escape the sandbox with no
2262
>
// prompt at all.
2263
if (isShellRequest && !request.requestSandboxBypass && await this._isShellSandboxedByDefault()) {
2264
// Session may have been disposed while we awaited the engine