From fd3632c00780c7c9e5e43c1743d7aee1b16da48d Mon Sep 17 00:00:00 2001 From: Jerop Kipruto Date: Thu, 5 Mar 2026 21:12:34 -0500 Subject: [PATCH] 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. --- docs/cli/feature-lifecycle.md | 1 - docs/cli/settings.md | 13 --- docs/reference/configuration.md | 109 ---------------------- package.json | 2 +- packages/cli/src/config/config.test.ts | 56 ----------- packages/cli/src/config/config.ts | 1 - packages/cli/src/config/settingsSchema.ts | 9 -- packages/core/src/config/config.test.ts | 2 - packages/core/src/config/config.ts | 47 +--------- packages/core/src/config/features.ts | 7 -- schemas/settings.schema.json | 7 -- 11 files changed, 2 insertions(+), 252 deletions(-) diff --git a/docs/cli/feature-lifecycle.md b/docs/cli/feature-lifecycle.md index 9aea455051..6a58e28f43 100644 --- a/docs/cli/feature-lifecycle.md +++ b/docs/cli/feature-lifecycle.md @@ -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. | diff --git a/docs/cli/settings.md b/docs/cli/settings.md index 2853d88946..c980084eb5 100644 --- a/docs/cli/settings.md +++ b/docs/cli/settings.md @@ -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` | diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index e8e4021cb2..e11e7a1fb0 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -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 #### `mcpServers` diff --git a/package.json b/package.json index 76bce17411..0a16d322c4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/cli/src/config/config.test.ts b/packages/cli/src/config/config.test.ts index 84baf62763..f8c857cee8 100644 --- a/packages/cli/src/config/config.test.ts +++ b/packages/cli/src/config/config.test.ts @@ -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(() => { diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts index 2694ddeaf4..da0ac7a840 100755 --- a/packages/cli/src/config/config.ts +++ b/packages/cli/src/config/config.ts @@ -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, diff --git a/packages/cli/src/config/settingsSchema.ts b/packages/cli/src/config/settingsSchema.ts index 4c2e96289c..9fe2b40690 100644 --- a/packages/cli/src/config/settingsSchema.ts +++ b/packages/cli/src/config/settingsSchema.ts @@ -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; diff --git a/packages/core/src/config/config.test.ts b/packages/core/src/config/config.test.ts index bc89c181b7..9bb2bd81dc 100644 --- a/packages/core/src/config/config.test.ts +++ b/packages/core/src/config/config.test.ts @@ -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); }); }); diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 2e4883d947..b8340076c8 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -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; } diff --git a/packages/core/src/config/features.ts b/packages/core/src/config/features.ts index 57a9dca5b4..ae03c560ee 100644 --- a/packages/core/src/config/features.ts +++ b/packages/core/src/config/features.ts @@ -311,13 +311,6 @@ export const FeatureDefinitions: Record = { description: 'Enable planning features (Plan Mode and tools).', }, ], - zedIntegration: [ - { - preRelease: FeatureStage.Alpha, - since: '0.30.0', - description: 'Enable Zed integration.', - }, - ], }; // Register core features diff --git a/schemas/settings.schema.json b/schemas/settings.schema.json index 9a18c283ed..9ff09bb0a9 100644 --- a/schemas/settings.schema.json +++ b/schemas/settings.schema.json @@ -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