mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix: remove stale code re-introduced during rebase
Remove syncPlanModeTools(), getExperimentalZedIntegration(), and all zedIntegration references that were re-introduced by conflict resolution but had already been deleted on main. Fix stale doc path in package.json lint-staged config.
This commit is contained in:
@@ -99,7 +99,6 @@ For more details on persistent configuration, see the [Configuration guide].
|
||||
| `plan` | ALPHA | Disabled | 0.30.0 | Enable planning features (Plan Mode and tools). |
|
||||
| `toolOutputMasking` | BETA | Enabled | 0.30.0 | Enables tool output masking to save tokens. |
|
||||
| `useOSC52Paste` | ALPHA | Disabled | 0.30.0 | Use OSC 52 sequence for pasting. |
|
||||
| `zedIntegration` | ALPHA | Disabled | 0.30.0 | Enable Zed integration. |
|
||||
|
||||
<!-- FEATURES-AUTOGEN:END -->
|
||||
|
||||
|
||||
@@ -137,18 +137,6 @@ they appear in the UI.
|
||||
| --------------------------------- | ------------------------------ | --------------------------------------------- | ------- |
|
||||
| Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `false` |
|
||||
|
||||
### Experimental
|
||||
|
||||
| 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 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
||||
| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
||||
| Plan | `experimental.plan` | Enable planning features (Plan Mode and tools). | `false` |
|
||||
| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |
|
||||
| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |
|
||||
| Enable Gemma Model Router | `experimental.gemmaModelRouter.enabled` | Enable the Gemma Model Router. Requires a local endpoint serving Gemma via the Gemini API using LiteRT-LM shim. | `false` |
|
||||
|
||||
### Skills
|
||||
|
||||
| UI Label | Setting | Description | Default |
|
||||
@@ -177,6 +165,5 @@ they appear in the UI.
|
||||
| JIT Context Loading | `features.jitContext` | Enable Just-In-Time (JIT) context loading. | `false` | `ALPHA` |
|
||||
| Use OSC 52 Paste | `features.useOSC52Paste` | Use OSC 52 sequence for pasting. | `false` | `ALPHA` |
|
||||
| Plan Mode | `features.plan` | Enable planning features (Plan Mode and tools). | `false` | `ALPHA` |
|
||||
| Zed Integration | `features.zedIntegration` | Enable Zed integration. | `false` | `ALPHA` |
|
||||
|
||||
<!-- SETTINGS-AUTOGEN:END -->
|
||||
|
||||
@@ -963,109 +963,6 @@ features, see the
|
||||
- **Description:** Configuration for the bug report command.
|
||||
- **Default:** `undefined`
|
||||
|
||||
#### `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):
|
||||
- **Description:** Enable local and remote subagents. Warning: Experimental
|
||||
feature, uses YOLO mode for subagents
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.extensionManagement`** (boolean):
|
||||
- **Description:** Enable extension management features.
|
||||
- **Default:** `true`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.extensionConfig`** (boolean):
|
||||
- **Description:** Enable requesting and fetching of extension settings.
|
||||
- **Default:** `true`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.extensionRegistry`** (boolean):
|
||||
- **Description:** Enable extension registry explore UI.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.extensionReloading`** (boolean):
|
||||
- **Description:** Enables extension loading/unloading within the CLI session.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.jitContext`** (boolean):
|
||||
- **Description:** Enable Just-In-Time (JIT) context loading.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.useOSC52Paste`** (boolean):
|
||||
- **Description:** Use OSC 52 for pasting. This may be more robust than the
|
||||
default system when using remote terminal sessions (if your terminal is
|
||||
configured to allow it).
|
||||
- **Default:** `false`
|
||||
|
||||
- **`experimental.useOSC52Copy`** (boolean):
|
||||
- **Description:** Use OSC 52 for copying. This may be more robust than the
|
||||
default system when using remote terminal sessions (if your terminal is
|
||||
configured to allow it).
|
||||
- **Default:** `false`
|
||||
|
||||
- **`experimental.plan`** (boolean):
|
||||
- **Description:** Enable planning features (Plan Mode and tools).
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.taskTracker`** (boolean):
|
||||
- **Description:** Enable task tracker tools.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.modelSteering`** (boolean):
|
||||
- **Description:** Enable model steering (user hints) to guide the model
|
||||
during tool execution.
|
||||
- **Default:** `false`
|
||||
|
||||
- **`experimental.directWebFetch`** (boolean):
|
||||
- **Description:** Enable web fetch behavior that bypasses LLM summarization.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.gemmaModelRouter.enabled`** (boolean):
|
||||
- **Description:** Enable the Gemma Model Router. Requires a local endpoint
|
||||
serving Gemma via the Gemini API using LiteRT-LM shim.
|
||||
- **Default:** `false`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.gemmaModelRouter.classifier.host`** (string):
|
||||
- **Description:** The host of the classifier.
|
||||
- **Default:** `"http://localhost:9379"`
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`experimental.gemmaModelRouter.classifier.model`** (string):
|
||||
- **Description:** The model to use for the classifier. Only tested on
|
||||
`gemma3-1b-gpu-custom`.
|
||||
- **Default:** `"gemma3-1b-gpu-custom"`
|
||||
- **Requires restart:** Yes
|
||||
#### `skills`
|
||||
|
||||
- **`skills.enabled`** (boolean):
|
||||
@@ -1239,12 +1136,6 @@ features, see the
|
||||
- **Default:** `false`
|
||||
- **Stage:** ALPHA
|
||||
- **Requires restart:** Yes
|
||||
|
||||
- **`features.zedIntegration`** (boolean):
|
||||
- **Description:** Enable Zed integration.
|
||||
- **Default:** `false`
|
||||
- **Stage:** ALPHA
|
||||
- **Requires restart:** Yes
|
||||
<!-- SETTINGS-AUTOGEN:END -->
|
||||
|
||||
#### `mcpServers`
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@
|
||||
],
|
||||
"packages/cli/src/config/settingsSchema.ts": [
|
||||
"npm run docs:settings",
|
||||
"git add schemas/settings.schema.json docs/get-started/configuration.md docs/cli/settings.md docs/cli/feature-lifecycle.md"
|
||||
"git add schemas/settings.schema.json docs/reference/configuration.md docs/cli/settings.md docs/cli/feature-lifecycle.md"
|
||||
],
|
||||
"packages/cli/src/config/keyBindings.ts": [
|
||||
"npm run docs:keybindings",
|
||||
|
||||
@@ -2647,62 +2647,6 @@ describe('loadCliConfig approval mode', () => {
|
||||
expect(plansDir).toContain('.custom-plans');
|
||||
});
|
||||
|
||||
describe('Feature Gates', () => {
|
||||
it('should parse --feature-gates CLI flag', async () => {
|
||||
process.argv = [
|
||||
'node',
|
||||
'script.js',
|
||||
'--feature-gates',
|
||||
'plan=true,enableAgents=false',
|
||||
];
|
||||
const argv = await parseArguments(createTestMergedSettings());
|
||||
expect(argv.featureGates).toBe('plan=true,enableAgents=false');
|
||||
});
|
||||
|
||||
it('should respect "features" setting in loadCliConfig', async () => {
|
||||
process.argv = ['node', 'script.js'];
|
||||
const settings = createTestMergedSettings({
|
||||
features: { plan: true },
|
||||
});
|
||||
const argv = await parseArguments(settings);
|
||||
const config = await loadCliConfig(settings, 'test-session', argv);
|
||||
expect(config.isFeatureEnabled('plan')).toBe(true);
|
||||
});
|
||||
|
||||
it('should prioritize --feature-gates flag over settings', async () => {
|
||||
process.argv = ['node', 'script.js', '--feature-gates', 'plan=true'];
|
||||
const settings = createTestMergedSettings({
|
||||
features: { plan: false },
|
||||
});
|
||||
const argv = await parseArguments(settings);
|
||||
const config = await loadCliConfig(settings, 'test-session', argv);
|
||||
expect(config.isFeatureEnabled('plan')).toBe(true);
|
||||
});
|
||||
|
||||
it('should allow plan approval mode when features.plan is enabled', async () => {
|
||||
process.argv = ['node', 'script.js', '--approval-mode', 'plan'];
|
||||
const settings = createTestMergedSettings({
|
||||
features: { plan: true },
|
||||
});
|
||||
const argv = await parseArguments(settings);
|
||||
const config = await loadCliConfig(settings, 'test-session', argv);
|
||||
expect(config.getApprovalMode()).toBe(ServerConfig.ApprovalMode.PLAN);
|
||||
});
|
||||
|
||||
it('should throw error when --approval-mode=plan is used but features.plan is disabled', async () => {
|
||||
process.argv = ['node', 'script.js', '--approval-mode', 'plan'];
|
||||
const settings = createTestMergedSettings({
|
||||
features: { plan: false },
|
||||
});
|
||||
const argv = await parseArguments(settings);
|
||||
await expect(
|
||||
loadCliConfig(settings, 'test-session', argv),
|
||||
).rejects.toThrow(
|
||||
'Approval mode "plan" is only available when experimental.plan is enabled.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// --- Untrusted Folder Scenarios ---
|
||||
describe('when folder is NOT trusted', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -767,7 +767,6 @@ export async function loadCliConfig(
|
||||
bugCommand: settings.advanced?.bugCommand,
|
||||
model: resolvedModel,
|
||||
maxSessionTurns: settings.model?.maxSessionTurns,
|
||||
experimentalZedIntegration: argv.experimentalAcp || false,
|
||||
features: settings.features,
|
||||
featureGates: argv.featureGates,
|
||||
listExtensions: argv.listExtensions || false,
|
||||
|
||||
@@ -2389,15 +2389,6 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Enable planning features (Plan Mode and tools).',
|
||||
showInDialog: true,
|
||||
},
|
||||
zedIntegration: {
|
||||
type: 'boolean',
|
||||
label: 'Zed Integration',
|
||||
category: 'Features',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description: 'Enable Zed integration.',
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const satisfies SettingsSchema;
|
||||
|
||||
@@ -2473,7 +2473,6 @@ describe('FeatureGate Integration', () => {
|
||||
extensionManagement: true,
|
||||
plan: true,
|
||||
enableAgents: true,
|
||||
zedIntegration: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -2482,7 +2481,6 @@ describe('FeatureGate Integration', () => {
|
||||
expect(config.getExtensionManagement()).toBe(true);
|
||||
expect(config.isPlanEnabled()).toBe(true);
|
||||
expect(config.isAgentsEnabled()).toBe(true);
|
||||
expect(config.getExperimentalZedIntegration()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -733,8 +733,6 @@ export class Config implements McpContext {
|
||||
private readonly useBackgroundColor: boolean;
|
||||
private readonly useAlternateBuffer: boolean;
|
||||
private shellExecutionConfig: ShellExecutionConfig;
|
||||
private readonly extensionManagement: boolean = true;
|
||||
private readonly enablePromptCompletion: boolean = false;
|
||||
private readonly truncateToolOutputThreshold: number;
|
||||
private compressionTruncationCounter = 0;
|
||||
private initialized = false;
|
||||
@@ -788,7 +786,6 @@ export class Config implements McpContext {
|
||||
overageStrategy: OverageStrategy;
|
||||
};
|
||||
|
||||
private readonly enableAgents: boolean;
|
||||
private agents: AgentSettings;
|
||||
private readonly enableEventDrivenScheduler: boolean;
|
||||
private readonly skillsSupport: boolean;
|
||||
@@ -913,7 +910,6 @@ export class Config implements McpContext {
|
||||
extensionManagement: params.extensionManagement,
|
||||
plan: params.plan,
|
||||
jitContext: params.experimentalJitContext,
|
||||
zedIntegration: params.experimentalZedIntegration,
|
||||
};
|
||||
for (const [key, value] of Object.entries(legacyMap)) {
|
||||
if (value !== undefined && params.features?.[key] === undefined) {
|
||||
@@ -931,7 +927,6 @@ export class Config implements McpContext {
|
||||
this.featureGate = gate;
|
||||
|
||||
this.modelAvailabilityService = new ModelAvailabilityService();
|
||||
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
||||
this.modelSteering = params.modelSteering ?? false;
|
||||
this.userHintService = new UserHintService(() =>
|
||||
this.isModelSteeringEnabled(),
|
||||
@@ -1215,7 +1210,7 @@ export class Config implements McpContext {
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.interactive || this.acpMode || this.getExperimentalZedIntegration()) {
|
||||
if (!this.interactive || this.acpMode) {
|
||||
await this.mcpInitializationPromise;
|
||||
}
|
||||
|
||||
@@ -2092,42 +2087,6 @@ export class Config implements McpContext {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronizes enter/exit plan mode tools based on current mode.
|
||||
*/
|
||||
syncPlanModeTools(): void {
|
||||
const isPlanMode = this.getApprovalMode() === ApprovalMode.PLAN;
|
||||
const registry = this.getToolRegistry();
|
||||
|
||||
if (isPlanMode) {
|
||||
if (registry.getTool(ENTER_PLAN_MODE_TOOL_NAME)) {
|
||||
registry.unregisterTool(ENTER_PLAN_MODE_TOOL_NAME);
|
||||
}
|
||||
if (!registry.getTool(EXIT_PLAN_MODE_TOOL_NAME)) {
|
||||
registry.registerTool(new ExitPlanModeTool(this, this.messageBus));
|
||||
}
|
||||
} else {
|
||||
if (registry.getTool(EXIT_PLAN_MODE_TOOL_NAME)) {
|
||||
registry.unregisterTool(EXIT_PLAN_MODE_TOOL_NAME);
|
||||
}
|
||||
if (this.isPlanEnabled()) {
|
||||
if (!registry.getTool(ENTER_PLAN_MODE_TOOL_NAME)) {
|
||||
registry.registerTool(new EnterPlanModeTool(this, this.messageBus));
|
||||
}
|
||||
} else {
|
||||
if (registry.getTool(ENTER_PLAN_MODE_TOOL_NAME)) {
|
||||
registry.unregisterTool(ENTER_PLAN_MODE_TOOL_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.geminiClient?.isInitialized()) {
|
||||
this.geminiClient.setTools().catch((err) => {
|
||||
debugLogger.error('Failed to update tools', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the duration of the current approval mode.
|
||||
*/
|
||||
@@ -2334,10 +2293,6 @@ export class Config implements McpContext {
|
||||
}
|
||||
}
|
||||
|
||||
getExperimentalZedIntegration(): boolean {
|
||||
return this.isFeatureEnabled('zedIntegration');
|
||||
}
|
||||
|
||||
getListExtensions(): boolean {
|
||||
return this.listExtensions;
|
||||
}
|
||||
|
||||
@@ -311,13 +311,6 @@ export const FeatureDefinitions: Record<string, FeatureSpec[]> = {
|
||||
description: 'Enable planning features (Plan Mode and tools).',
|
||||
},
|
||||
],
|
||||
zedIntegration: [
|
||||
{
|
||||
preRelease: FeatureStage.Alpha,
|
||||
since: '0.30.0',
|
||||
description: 'Enable Zed integration.',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Register core features
|
||||
|
||||
@@ -2124,13 +2124,6 @@
|
||||
"markdownDescription": "Enable planning features (Plan Mode and tools).\n\n- Category: `Features`\n- Requires restart: `yes`\n- Default: `false`",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"zedIntegration": {
|
||||
"title": "Zed Integration",
|
||||
"description": "Enable Zed integration.",
|
||||
"markdownDescription": "Enable Zed integration.\n\n- Category: `Features`\n- Requires restart: `yes`\n- Default: `false`",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
Reference in New Issue
Block a user