mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user