mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
feat(masking): enable tool output masking by default (#18564)
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"experimental": {
|
"experimental": {
|
||||||
"toolOutputMasking": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"plan": true
|
"plan": true
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
|
|||||||
@@ -126,7 +126,8 @@ they appear in the UI.
|
|||||||
### Experimental
|
### Experimental
|
||||||
|
|
||||||
| UI Label | Setting | Description | Default |
|
| UI Label | Setting | Description | Default |
|
||||||
| ---------------- | ---------------------------- | ----------------------------------------------------------------------------------- | ------- |
|
| -------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------- | ------- |
|
||||||
|
| Enable Tool Output Masking | `experimental.toolOutputMasking.enabled` | Enables tool output masking to save tokens. | `true` |
|
||||||
| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 sequence for pasting instead of clipboardy (useful for remote sessions). | `false` |
|
| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 sequence for pasting instead of clipboardy (useful for remote sessions). | `false` |
|
||||||
| Plan | `experimental.plan` | Enable planning features (Plan Mode and tools). | `false` |
|
| Plan | `experimental.plan` | Enable planning features (Plan Mode and tools). | `false` |
|
||||||
|
|
||||||
|
|||||||
@@ -852,6 +852,28 @@ their corresponding top-level category object in your `settings.json` file.
|
|||||||
|
|
||||||
#### `experimental`
|
#### `experimental`
|
||||||
|
|
||||||
|
- **`experimental.toolOutputMasking.enabled`** (boolean):
|
||||||
|
- **Description:** Enables tool output masking to save tokens.
|
||||||
|
- **Default:** `true`
|
||||||
|
- **Requires restart:** Yes
|
||||||
|
|
||||||
|
- **`experimental.toolOutputMasking.toolProtectionThreshold`** (number):
|
||||||
|
- **Description:** Minimum number of tokens to protect from masking (most
|
||||||
|
recent tool outputs).
|
||||||
|
- **Default:** `50000`
|
||||||
|
- **Requires restart:** Yes
|
||||||
|
|
||||||
|
- **`experimental.toolOutputMasking.minPrunableTokensThreshold`** (number):
|
||||||
|
- **Description:** Minimum prunable tokens required to trigger a masking pass.
|
||||||
|
- **Default:** `30000`
|
||||||
|
- **Requires restart:** Yes
|
||||||
|
|
||||||
|
- **`experimental.toolOutputMasking.protectLatestTurn`** (boolean):
|
||||||
|
- **Description:** Ensures the absolute latest turn is never masked,
|
||||||
|
regardless of token count.
|
||||||
|
- **Default:** `true`
|
||||||
|
- **Requires restart:** Yes
|
||||||
|
|
||||||
- **`experimental.enableAgents`** (boolean):
|
- **`experimental.enableAgents`** (boolean):
|
||||||
- **Description:** Enable local and remote subagents. Warning: Experimental
|
- **Description:** Enable local and remote subagents. Warning: Experimental
|
||||||
feature, uses YOLO mode for subagents
|
feature, uses YOLO mode for subagents
|
||||||
|
|||||||
@@ -1471,7 +1471,7 @@ const SETTINGS_SCHEMA = {
|
|||||||
label: 'Tool Output Masking',
|
label: 'Tool Output Masking',
|
||||||
category: 'Experimental',
|
category: 'Experimental',
|
||||||
requiresRestart: true,
|
requiresRestart: true,
|
||||||
ignoreInDocs: true,
|
ignoreInDocs: false,
|
||||||
default: {},
|
default: {},
|
||||||
description:
|
description:
|
||||||
'Advanced settings for tool output masking to manage context window efficiency.',
|
'Advanced settings for tool output masking to manage context window efficiency.',
|
||||||
@@ -1482,9 +1482,9 @@ const SETTINGS_SCHEMA = {
|
|||||||
label: 'Enable Tool Output Masking',
|
label: 'Enable Tool Output Masking',
|
||||||
category: 'Experimental',
|
category: 'Experimental',
|
||||||
requiresRestart: true,
|
requiresRestart: true,
|
||||||
default: false,
|
default: true,
|
||||||
description: 'Enables tool output masking to save tokens.',
|
description: 'Enables tool output masking to save tokens.',
|
||||||
showInDialog: false,
|
showInDialog: true,
|
||||||
},
|
},
|
||||||
toolProtectionThreshold: {
|
toolProtectionThreshold: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ export class Config {
|
|||||||
this.modelAvailabilityService = new ModelAvailabilityService();
|
this.modelAvailabilityService = new ModelAvailabilityService();
|
||||||
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
||||||
this.toolOutputMasking = {
|
this.toolOutputMasking = {
|
||||||
enabled: params.toolOutputMasking?.enabled ?? false,
|
enabled: params.toolOutputMasking?.enabled ?? true,
|
||||||
toolProtectionThreshold:
|
toolProtectionThreshold:
|
||||||
params.toolOutputMasking?.toolProtectionThreshold ??
|
params.toolOutputMasking?.toolProtectionThreshold ??
|
||||||
DEFAULT_TOOL_PROTECTION_THRESHOLD,
|
DEFAULT_TOOL_PROTECTION_THRESHOLD,
|
||||||
|
|||||||
@@ -1439,8 +1439,8 @@
|
|||||||
"enabled": {
|
"enabled": {
|
||||||
"title": "Enable Tool Output Masking",
|
"title": "Enable Tool Output Masking",
|
||||||
"description": "Enables tool output masking to save tokens.",
|
"description": "Enables tool output masking to save tokens.",
|
||||||
"markdownDescription": "Enables tool output masking to save tokens.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`",
|
"markdownDescription": "Enables tool output masking to save tokens.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `true`",
|
||||||
"default": false,
|
"default": true,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"toolProtectionThreshold": {
|
"toolProtectionThreshold": {
|
||||||
|
|||||||
Reference in New Issue
Block a user