From 381669dce046108d8d22650a53601483367853ff Mon Sep 17 00:00:00 2001 From: Victor Vianna Date: Mon, 2 Feb 2026 13:49:17 +0000 Subject: [PATCH] chore: delete autoAccept setting unused in production (#17862) Co-authored-by: Victor Hugo Vianna Silva Co-authored-by: Jack Wotherspoon --- docs/cli/settings.md | 1 - docs/get-started/configuration-v1.md | 8 -------- docs/get-started/configuration.md | 5 ----- .../cli/src/config/policy-engine.integration.test.ts | 3 --- packages/cli/src/config/settings-validation.test.ts | 1 - packages/cli/src/config/settingsSchema.ts | 11 ----------- .../cli/src/ui/components/SettingsDialog.test.tsx | 3 --- schemas/settings.schema.json | 7 ------- 8 files changed, 39 deletions(-) diff --git a/docs/cli/settings.md b/docs/cli/settings.md index ab637aed3e..d6b3a65b91 100644 --- a/docs/cli/settings.md +++ b/docs/cli/settings.md @@ -97,7 +97,6 @@ they appear in the UI. | -------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | | Enable Interactive Shell | `tools.shell.enableInteractiveShell` | Use node-pty for an interactive shell experience. Fallback to child_process still applies. | `true` | | Show Color | `tools.shell.showColor` | Show color in shell output. | `false` | -| Auto Accept | `tools.autoAccept` | Automatically accept and execute tool calls that are considered safe (e.g., read-only operations). | `false` | | Approval Mode | `tools.approvalMode` | The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. 'yolo' is not supported yet. | `"default"` | | Use Ripgrep | `tools.useRipgrep` | Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance. | `true` | | Enable Tool Output Truncation | `tools.enableToolOutputTruncation` | Enable truncation of large tool outputs. | `true` | diff --git a/docs/get-started/configuration-v1.md b/docs/get-started/configuration-v1.md index e4a71a03e6..050dce32b6 100644 --- a/docs/get-started/configuration-v1.md +++ b/docs/get-started/configuration-v1.md @@ -215,14 +215,6 @@ a few things you can try in order of recommendation: MCP servers of their own. This should not be used as an airtight security mechanism. -- **`autoAccept`** (boolean): - - **Description:** Controls whether the CLI automatically accepts and executes - tool calls that are considered safe (e.g., read-only operations) without - explicit user confirmation. If set to `true`, the CLI will bypass the - confirmation prompt for tools deemed safe. - - **Default:** `false` - - **Example:** `"autoAccept": true` - - **`theme`** (string): - **Description:** Sets the visual [theme](../cli/themes.md) for Gemini CLI. - **Default:** `"Default"` diff --git a/docs/get-started/configuration.md b/docs/get-started/configuration.md index 5ce8231a51..9819f1abd2 100644 --- a/docs/get-started/configuration.md +++ b/docs/get-started/configuration.md @@ -661,11 +661,6 @@ their corresponding top-level category object in your `settings.json` file. performance. - **Default:** `true` -- **`tools.autoAccept`** (boolean): - - **Description:** Automatically accept and execute tool calls that are - considered safe (e.g., read-only operations). - - **Default:** `false` - - **`tools.approvalMode`** (enum): - **Description:** The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is diff --git a/packages/cli/src/config/policy-engine.integration.test.ts b/packages/cli/src/config/policy-engine.integration.test.ts index f4cc35dd8a..935248ab64 100644 --- a/packages/cli/src/config/policy-engine.integration.test.ts +++ b/packages/cli/src/config/policy-engine.integration.test.ts @@ -164,7 +164,6 @@ describe('Policy Engine Integration Tests', () => { it('should handle complex mixed configurations', async () => { const settings: Settings = { tools: { - autoAccept: true, // Allows read-only tools allowed: ['custom-tool', 'my-server__special-tool'], exclude: ['glob', 'dangerous-tool'], }, @@ -438,7 +437,6 @@ describe('Policy Engine Integration Tests', () => { it('should verify priority ordering works correctly in practice', async () => { const settings: Settings = { tools: { - autoAccept: true, // Priority 50 allowed: ['specific-tool'], // Priority 100 exclude: ['blocked-tool'], // Priority 200 }, @@ -614,7 +612,6 @@ describe('Policy Engine Integration Tests', () => { it('should verify rules are created with correct priorities', async () => { const settings: Settings = { tools: { - autoAccept: true, allowed: ['tool1', 'tool2'], exclude: ['tool3'], }, diff --git a/packages/cli/src/config/settings-validation.test.ts b/packages/cli/src/config/settings-validation.test.ts index 4c9579e5f0..27b940ea53 100644 --- a/packages/cli/src/config/settings-validation.test.ts +++ b/packages/cli/src/config/settings-validation.test.ts @@ -124,7 +124,6 @@ describe('settings-validation', () => { }, tools: { sandbox: 'inherit', - autoAccept: false, }, }; diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index a34163ccb3..bf18fa94e2 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -1041,17 +1041,6 @@ const SETTINGS_SCHEMA = { }, }, }, - autoAccept: { - type: 'boolean', - label: 'Auto Accept', - category: 'Tools', - requiresRestart: false, - default: false, - description: oneLine` - Automatically accept and execute tool calls that are considered safe (e.g., read-only operations). - `, - showInDialog: true, - }, approvalMode: { type: 'enum', label: 'Approval Mode', diff --git a/packages/cli/src/ui/components/SettingsDialog.test.tsx b/packages/cli/src/ui/components/SettingsDialog.test.tsx index d219b41ca8..ec8d8b55b4 100644 --- a/packages/cli/src/ui/components/SettingsDialog.test.tsx +++ b/packages/cli/src/ui/components/SettingsDialog.test.tsx @@ -1391,7 +1391,6 @@ describe('SettingsDialog', () => { }, tools: { enableInteractiveShell: true, - autoAccept: true, useRipgrep: true, }, security: { @@ -1484,7 +1483,6 @@ describe('SettingsDialog', () => { userSettings: { tools: { enableInteractiveShell: true, - autoAccept: false, useRipgrep: true, truncateToolOutputThreshold: 25000, truncateToolOutputLines: 500, @@ -1537,7 +1535,6 @@ describe('SettingsDialog', () => { }, tools: { enableInteractiveShell: false, - autoAccept: false, useRipgrep: false, }, security: { diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index d33c75bf63..6613fb816a 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -1112,13 +1112,6 @@ }, "additionalProperties": false }, - "autoAccept": { - "title": "Auto Accept", - "description": "Automatically accept and execute tool calls that are considered safe (e.g., read-only operations).", - "markdownDescription": "Automatically accept and execute tool calls that are considered safe (e.g., read-only operations).\n\n- Category: `Tools`\n- Requires restart: `no`\n- Default: `false`", - "default": false, - "type": "boolean" - }, "approvalMode": { "title": "Approval Mode", "description": "The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. 'yolo' is not supported yet.",