From 3e59fb0317b6dc63a2ce8e3f9d2ef9ea05768f2b Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Mon, 22 Dec 2025 23:26:42 -0700 Subject: [PATCH 1/5] chore: remove diffEnabled and fuzzyMatchThreshold settings Native tool calling makes these controls obsolete. Removes: - diffEnabled and fuzzyMatchThreshold from provider settings types - DiffSettingsControl UI component - Related translations from all 18 locale files - System prompt diffEnabled parameter - Conditional apply_diff tool filtering based on diffEnabled - Associated tests and migrations --- packages/types/src/cloud.ts | 1 - packages/types/src/global-settings.ts | 5 - packages/types/src/provider-settings.ts | 2 - packages/types/src/task.ts | 1 - .../presentAssistantMessage.ts | 2 +- src/core/config/ProviderSettingsManager.ts | 44 --------- .../__tests__/getEnvironmentDetails.spec.ts | 1 - .../__tests__/add-custom-instructions.spec.ts | 5 - .../__tests__/custom-system-prompt.spec.ts | 3 - .../prompts/__tests__/system-prompt.spec.ts | 93 ------------------- src/core/prompts/system.ts | 13 +-- .../prompts/tools/filter-tools-for-mode.ts | 5 - src/core/task/Task.ts | 37 +++----- src/core/task/__tests__/Task.spec.ts | 33 +------ src/core/task/build-tools.ts | 3 - src/core/webview/ClineProvider.ts | 24 +---- .../webview/__tests__/ClineProvider.spec.ts | 52 +---------- src/core/webview/generateSystemPrompt.ts | 7 +- .../src/components/settings/ApiOptions.tsx | 6 -- .../settings/DiffSettingsControl.tsx | 68 -------------- .../src/components/settings/SettingsView.tsx | 4 - .../settings/__tests__/ApiOptions.spec.tsx | 38 +------- .../src/context/ExtensionStateContext.tsx | 7 -- webview-ui/src/i18n/locales/ca/settings.json | 4 - webview-ui/src/i18n/locales/de/settings.json | 4 - webview-ui/src/i18n/locales/en/settings.json | 4 - webview-ui/src/i18n/locales/es/settings.json | 4 - webview-ui/src/i18n/locales/fr/settings.json | 4 - webview-ui/src/i18n/locales/hi/settings.json | 4 - webview-ui/src/i18n/locales/id/settings.json | 4 - webview-ui/src/i18n/locales/it/settings.json | 4 - webview-ui/src/i18n/locales/ja/settings.json | 4 - webview-ui/src/i18n/locales/ko/settings.json | 4 - webview-ui/src/i18n/locales/nl/settings.json | 4 - webview-ui/src/i18n/locales/pl/settings.json | 4 - .../src/i18n/locales/pt-BR/settings.json | 4 - webview-ui/src/i18n/locales/ru/settings.json | 4 - webview-ui/src/i18n/locales/tr/settings.json | 4 - webview-ui/src/i18n/locales/vi/settings.json | 4 - .../src/i18n/locales/zh-CN/settings.json | 4 - .../src/i18n/locales/zh-TW/settings.json | 4 - 41 files changed, 25 insertions(+), 501 deletions(-) delete mode 100644 webview-ui/src/components/settings/DiffSettingsControl.tsx diff --git a/packages/types/src/cloud.ts b/packages/types/src/cloud.ts index cccac017eed..fe62990899d 100644 --- a/packages/types/src/cloud.ts +++ b/packages/types/src/cloud.ts @@ -94,7 +94,6 @@ export type OrganizationAllowList = z.infer export const organizationDefaultSettingsSchema = globalSettingsSchema .pick({ enableCheckpoints: true, - fuzzyMatchThreshold: true, maxOpenTabsContext: true, maxReadFileLine: true, maxWorkspaceFiles: true, diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 62b7eb28a1a..383678059e9 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -162,8 +162,6 @@ export const globalSettingsSchema = z.object({ diagnosticsEnabled: z.boolean().optional(), rateLimitSeconds: z.number().optional(), - diffEnabled: z.boolean().optional(), - fuzzyMatchThreshold: z.number().optional(), experiments: experimentsSchema.optional(), codebaseIndexModels: codebaseIndexModelsSchema.optional(), @@ -349,9 +347,6 @@ export const EVALS_SETTINGS: RooCodeSettings = { diagnosticsEnabled: true, - diffEnabled: true, - fuzzyMatchThreshold: 1, - enableCheckpoints: false, rateLimitSeconds: 0, diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index ba652269b14..0c5965f7ff6 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -168,9 +168,7 @@ export type ProviderSettingsEntry = z.infer const baseProviderSettingsSchema = z.object({ includeMaxTokens: z.boolean().optional(), - diffEnabled: z.boolean().optional(), todoListEnabled: z.boolean().optional(), - fuzzyMatchThreshold: z.number().optional(), modelTemperature: z.number().nullish(), rateLimitSeconds: z.number().optional(), consecutiveMistakeLimit: z.number().min(0).optional(), diff --git a/packages/types/src/task.ts b/packages/types/src/task.ts index 3f6a0aa581c..d735073b9a7 100644 --- a/packages/types/src/task.ts +++ b/packages/types/src/task.ts @@ -91,7 +91,6 @@ export type TaskProviderEvents = { export interface CreateTaskOptions { enableDiff?: boolean enableCheckpoints?: boolean - fuzzyMatchThreshold?: number consecutiveMistakeLimit?: number experiments?: Record initialTodos?: TodoItem[] diff --git a/src/core/assistant-message/presentAssistantMessage.ts b/src/core/assistant-message/presentAssistantMessage.ts index 6469ba8a5cc..ced3d5b5d21 100644 --- a/src/core/assistant-message/presentAssistantMessage.ts +++ b/src/core/assistant-message/presentAssistantMessage.ts @@ -650,7 +650,7 @@ export async function presentAssistantMessage(cline: Task) { block.name as ToolName, mode ?? defaultModeSlug, customModes ?? [], - { apply_diff: cline.diffEnabled }, + {}, block.params, stateExperiments, includedTools, diff --git a/src/core/config/ProviderSettingsManager.ts b/src/core/config/ProviderSettingsManager.ts index bf145f09c2d..3024540b676 100644 --- a/src/core/config/ProviderSettingsManager.ts +++ b/src/core/config/ProviderSettingsManager.ts @@ -43,7 +43,6 @@ export const providerProfilesSchema = z.object({ migrations: z .object({ rateLimitSecondsMigrated: z.boolean().optional(), - diffSettingsMigrated: z.boolean().optional(), openAiHeadersMigrated: z.boolean().optional(), consecutiveMistakeLimitMigrated: z.boolean().optional(), todoListEnabledMigrated: z.boolean().optional(), @@ -68,7 +67,6 @@ export class ProviderSettingsManager { modeApiConfigs: this.defaultModeApiConfigs, migrations: { rateLimitSecondsMigrated: true, // Mark as migrated on fresh installs - diffSettingsMigrated: true, // Mark as migrated on fresh installs openAiHeadersMigrated: true, // Mark as migrated on fresh installs consecutiveMistakeLimitMigrated: true, // Mark as migrated on fresh installs todoListEnabledMigrated: true, // Mark as migrated on fresh installs @@ -141,7 +139,6 @@ export class ProviderSettingsManager { if (!providerProfiles.migrations) { providerProfiles.migrations = { rateLimitSecondsMigrated: false, - diffSettingsMigrated: false, openAiHeadersMigrated: false, consecutiveMistakeLimitMigrated: false, todoListEnabledMigrated: false, @@ -156,12 +153,6 @@ export class ProviderSettingsManager { isDirty = true } - if (!providerProfiles.migrations.diffSettingsMigrated) { - await this.migrateDiffSettings(providerProfiles) - providerProfiles.migrations.diffSettingsMigrated = true - isDirty = true - } - if (!providerProfiles.migrations.openAiHeadersMigrated) { await this.migrateOpenAiHeaders(providerProfiles) providerProfiles.migrations.openAiHeadersMigrated = true @@ -235,41 +226,6 @@ export class ProviderSettingsManager { } } - private async migrateDiffSettings(providerProfiles: ProviderProfiles) { - try { - let diffEnabled: boolean | undefined - let fuzzyMatchThreshold: number | undefined - - try { - diffEnabled = await this.context.globalState.get("diffEnabled") - fuzzyMatchThreshold = await this.context.globalState.get("fuzzyMatchThreshold") - } catch (error) { - console.error("[MigrateDiffSettings] Error getting global diff settings:", error) - } - - if (diffEnabled === undefined) { - // Failed to get the existing value, use the default. - diffEnabled = true - } - - if (fuzzyMatchThreshold === undefined) { - // Failed to get the existing value, use the default. - fuzzyMatchThreshold = 1.0 - } - - for (const [_name, apiConfig] of Object.entries(providerProfiles.apiConfigs)) { - if (apiConfig.diffEnabled === undefined) { - apiConfig.diffEnabled = diffEnabled - } - if (apiConfig.fuzzyMatchThreshold === undefined) { - apiConfig.fuzzyMatchThreshold = fuzzyMatchThreshold - } - } - } catch (error) { - console.error(`[MigrateDiffSettings] Failed to migrate diff settings:`, error) - } - } - private async migrateOpenAiHeaders(providerProfiles: ProviderProfiles) { try { for (const [_name, apiConfig] of Object.entries(providerProfiles.apiConfigs)) { diff --git a/src/core/environment/__tests__/getEnvironmentDetails.spec.ts b/src/core/environment/__tests__/getEnvironmentDetails.spec.ts index 65b447ff162..eef92e9b6ff 100644 --- a/src/core/environment/__tests__/getEnvironmentDetails.spec.ts +++ b/src/core/environment/__tests__/getEnvironmentDetails.spec.ts @@ -115,7 +115,6 @@ describe("getEnvironmentDetails", () => { createMessage: vi.fn(), countTokens: vi.fn(), } as unknown as ApiHandler, - diffEnabled: true, providerRef: { deref: vi.fn().mockReturnValue(mockProvider), [Symbol.toStringTag]: "WeakRef", diff --git a/src/core/prompts/__tests__/add-custom-instructions.spec.ts b/src/core/prompts/__tests__/add-custom-instructions.spec.ts index daf4d961f1b..52b34963703 100644 --- a/src/core/prompts/__tests__/add-custom-instructions.spec.ts +++ b/src/core/prompts/__tests__/add-custom-instructions.spec.ts @@ -210,7 +210,6 @@ describe("addCustomInstructions", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -233,7 +232,6 @@ describe("addCustomInstructions", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -258,7 +256,6 @@ describe("addCustomInstructions", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -284,7 +281,6 @@ describe("addCustomInstructions", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments false, // enableMcpServerCreation undefined, // language @@ -308,7 +304,6 @@ describe("addCustomInstructions", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language diff --git a/src/core/prompts/__tests__/custom-system-prompt.spec.ts b/src/core/prompts/__tests__/custom-system-prompt.spec.ts index 6106e161743..5399b92c651 100644 --- a/src/core/prompts/__tests__/custom-system-prompt.spec.ts +++ b/src/core/prompts/__tests__/custom-system-prompt.spec.ts @@ -104,7 +104,6 @@ describe("File-Based Custom System Prompt", () => { customModePrompts, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -142,7 +141,6 @@ describe("File-Based Custom System Prompt", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -188,7 +186,6 @@ describe("File-Based Custom System Prompt", () => { customModePrompts, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language diff --git a/src/core/prompts/__tests__/system-prompt.spec.ts b/src/core/prompts/__tests__/system-prompt.spec.ts index 79641029296..d171e135077 100644 --- a/src/core/prompts/__tests__/system-prompt.spec.ts +++ b/src/core/prompts/__tests__/system-prompt.spec.ts @@ -225,7 +225,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -248,7 +247,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -273,7 +271,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -296,7 +293,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -319,7 +315,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes, undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -329,85 +324,6 @@ describe("SYSTEM_PROMPT", () => { expect(prompt).toMatchFileSnapshot("./__snapshots__/system-prompt/with-different-viewport-size.snap") }) - - it("should include diff strategy tool description when diffEnabled is true", async () => { - const prompt = await SYSTEM_PROMPT( - mockContext, - "/test/path", - false, - undefined, // mcpHub - new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase - undefined, // browserViewportSize - defaultModeSlug, // mode - undefined, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - true, // diffEnabled - experiments, - true, // enableMcpServerCreation - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Native-only: tool catalog isn't embedded in the system prompt anymore. - expect(prompt).not.toContain("# Tools") - expect(prompt).not.toContain("apply_diff") - expect(prompt).toMatchFileSnapshot("./__snapshots__/system-prompt/with-diff-enabled-true.snap") - }) - - it("should exclude diff strategy tool description when diffEnabled is false", async () => { - const prompt = await SYSTEM_PROMPT( - mockContext, - "/test/path", - false, // supportsImages - undefined, // mcpHub - new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase - undefined, // browserViewportSize - defaultModeSlug, // mode - undefined, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - false, // diffEnabled - experiments, - true, // enableMcpServerCreation - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Native-only: tool catalog isn't embedded in the system prompt anymore. - expect(prompt).not.toContain("# Tools") - expect(prompt).not.toContain("apply_diff") - expect(prompt).toMatchFileSnapshot("./__snapshots__/system-prompt/with-diff-enabled-false.snap") - }) - - it("should exclude diff strategy tool description when diffEnabled is undefined", async () => { - const prompt = await SYSTEM_PROMPT( - mockContext, - "/test/path", - false, - undefined, // mcpHub - new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase - undefined, // browserViewportSize - defaultModeSlug, // mode - undefined, // customModePrompts - undefined, // customModes - undefined, // globalCustomInstructions - undefined, // diffEnabled - experiments, - true, // enableMcpServerCreation - undefined, // language - undefined, // rooIgnoreInstructions - undefined, // partialReadsEnabled - ) - - // Native-only: tool catalog isn't embedded in the system prompt anymore. - expect(prompt).not.toContain("# Tools") - expect(prompt).not.toContain("apply_diff") - expect(prompt).toMatchFileSnapshot("./__snapshots__/system-prompt/with-diff-enabled-undefined.snap") - }) - it("should include vscode language in custom instructions", async () => { // Mock vscode.env.language const vscode = vi.mocked(await import("vscode")) as any @@ -447,7 +363,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments true, // enableMcpServerCreation undefined, // language @@ -508,7 +423,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts customModes, // customModes "Global instructions", // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -546,7 +460,6 @@ describe("SYSTEM_PROMPT", () => { customModePrompts, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments false, // enableMcpServerCreation undefined, // language @@ -579,7 +492,6 @@ describe("SYSTEM_PROMPT", () => { customModePrompts, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled undefined, // experiments false, // enableMcpServerCreation undefined, // language @@ -610,7 +522,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -643,7 +554,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -676,7 +586,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -709,7 +618,6 @@ describe("SYSTEM_PROMPT", () => { undefined, // customModePrompts undefined, // customModes undefined, // globalCustomInstructions - undefined, // diffEnabled experiments, true, // enableMcpServerCreation undefined, // language @@ -746,7 +654,6 @@ describe("SYSTEM_PROMPT", () => { expect(prompt).toContain("SYSTEM INFORMATION") expect(prompt).toContain("OBJECTIVE") }) - afterAll(() => { vi.restoreAllMocks() }) diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 01f99570fbd..013cf284528 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -53,7 +53,6 @@ async function generatePrompt( promptComponent?: PromptComponent, customModeConfigs?: ModeConfig[], globalCustomInstructions?: string, - diffEnabled?: boolean, experiments?: Record, enableMcpServerCreation?: boolean, language?: string, @@ -68,9 +67,6 @@ async function generatePrompt( throw new Error("Extension context is required for generating system prompt") } - // If diff is disabled, don't pass the diffStrategy - const effectiveDiffStrategy = diffEnabled ? diffStrategy : undefined - // Get the full mode config to ensure we have the role definition (used for groups, etc.) const modeConfig = getModeBySlug(mode, customModeConfigs) || modes.find((m) => m.slug === mode) || modes[0] const { roleDefinition, baseInstructions } = getModeSelection(mode, promptComponent, customModeConfigs) @@ -85,7 +81,7 @@ async function generatePrompt( const [modesSection, mcpServersSection, skillsSection] = await Promise.all([ getModesSection(context), shouldIncludeMcp - ? getMcpServersSection(mcpHub, effectiveDiffStrategy, enableMcpServerCreation, false) + ? getMcpServersSection(mcpHub, diffStrategy, enableMcpServerCreation, false) : Promise.resolve(""), getSkillsSection(skillsManager, mode as string), ]) @@ -133,7 +129,6 @@ export const SYSTEM_PROMPT = async ( customModePrompts?: CustomModePrompts, customModes?: ModeConfig[], globalCustomInstructions?: string, - diffEnabled?: boolean, experiments?: Record, enableMcpServerCreation?: boolean, language?: string, @@ -192,21 +187,17 @@ ${fileCustomSystemPrompt} ${customInstructions}` } - // If diff is disabled, don't pass the diffStrategy - const effectiveDiffStrategy = diffEnabled ? diffStrategy : undefined - return generatePrompt( context, cwd, supportsComputerUse, currentMode.slug, mcpHub, - effectiveDiffStrategy, + diffStrategy, browserViewportSize, promptComponent, customModes, globalCustomInstructions, - diffEnabled, experiments, enableMcpServerCreation, language, diff --git a/src/core/prompts/tools/filter-tools-for-mode.ts b/src/core/prompts/tools/filter-tools-for-mode.ts index 79db5d6edcb..5560fe9bc6d 100644 --- a/src/core/prompts/tools/filter-tools-for-mode.ts +++ b/src/core/prompts/tools/filter-tools-for-mode.ts @@ -296,11 +296,6 @@ export function filterNativeToolsForMode( allowedToolNames.delete("browser_action") } - // Conditionally exclude apply_diff if diffs are disabled - if (settings?.diffEnabled === false) { - allowedToolNames.delete("apply_diff") - } - // Conditionally exclude access_mcp_resource if MCP is not enabled or there are no resources if (!mcpHub || !hasAnyMcpResources(mcpHub)) { allowedToolNames.delete("access_mcp_resource") diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 7c9bfa342e4..02b265f0ccb 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -142,11 +142,9 @@ const MAX_CONTEXT_WINDOW_RETRIES = 3 // Maximum retries for context window error export interface TaskOptions extends CreateTaskOptions { provider: ClineProvider apiConfiguration: ProviderSettings - enableDiff?: boolean enableCheckpoints?: boolean checkpointTimeout?: number enableBridge?: boolean - fuzzyMatchThreshold?: number consecutiveMistakeLimit?: number task?: string images?: string[] @@ -311,8 +309,6 @@ export class Task extends EventEmitter implements TaskLike { // Editing diffViewProvider: DiffViewProvider diffStrategy?: DiffStrategy - diffEnabled: boolean = false - fuzzyMatchThreshold: number didEditFile: boolean = false // LLM Messages & Chat Messages @@ -418,11 +414,9 @@ export class Task extends EventEmitter implements TaskLike { constructor({ provider, apiConfiguration, - enableDiff = false, enableCheckpoints = true, checkpointTimeout = DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, enableBridge = false, - fuzzyMatchThreshold = 1.0, consecutiveMistakeLimit = DEFAULT_CONSECUTIVE_MISTAKE_LIMIT, task, images, @@ -510,8 +504,6 @@ export class Task extends EventEmitter implements TaskLike { } } }) - this.diffEnabled = enableDiff - this.fuzzyMatchThreshold = fuzzyMatchThreshold this.consecutiveMistakeLimit = consecutiveMistakeLimit ?? DEFAULT_CONSECUTIVE_MISTAKE_LIMIT this.providerRef = new WeakRef(provider) this.globalStoragePath = provider.context.globalStorageUri.fsPath @@ -556,23 +548,20 @@ export class Task extends EventEmitter implements TaskLike { // Listen for provider profile changes to update parser state this.setupProviderProfileChangeListener(provider) - // Only set up diff strategy if diff is enabled. - if (this.diffEnabled) { - // Default to old strategy, will be updated if experiment is enabled. - this.diffStrategy = new MultiSearchReplaceDiffStrategy(this.fuzzyMatchThreshold) + // Always set up diff strategy - default to old strategy, will be updated if experiment is enabled. + this.diffStrategy = new MultiSearchReplaceDiffStrategy() - // Check experiment asynchronously and update strategy if needed. - provider.getState().then((state) => { - const isMultiFileApplyDiffEnabled = experiments.isEnabled( - state.experiments ?? {}, - EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF, - ) + // Check experiment asynchronously and update strategy if needed. + provider.getState().then((state) => { + const isMultiFileApplyDiffEnabled = experiments.isEnabled( + state.experiments ?? {}, + EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF, + ) - if (isMultiFileApplyDiffEnabled) { - this.diffStrategy = new MultiFileSearchReplaceDiffStrategy(this.fuzzyMatchThreshold) - } - }) - } + if (isMultiFileApplyDiffEnabled) { + this.diffStrategy = new MultiFileSearchReplaceDiffStrategy() + } + }) this.toolRepetitionDetector = new ToolRepetitionDetector(this.consecutiveMistakeLimit) @@ -3681,7 +3670,6 @@ export class Task extends EventEmitter implements TaskLike { customModePrompts, customModes, customInstructions, - this.diffEnabled, experiments, enableMcpServerCreation, language, @@ -4129,7 +4117,6 @@ export class Task extends EventEmitter implements TaskLike { maxConcurrentFileReads: state?.maxConcurrentFileReads ?? 5, browserToolEnabled: state?.browserToolEnabled ?? true, modelInfo, - diffEnabled: this.diffEnabled, includeAllToolsWithRestrictions: supportsAllowedFunctionNames, }) allTools = toolsResult.tools diff --git a/src/core/task/__tests__/Task.spec.ts b/src/core/task/__tests__/Task.spec.ts index 870cdc556e2..86577685b82 100644 --- a/src/core/task/__tests__/Task.spec.ts +++ b/src/core/task/__tests__/Task.spec.ts @@ -313,31 +313,15 @@ describe("Cline", () => { }) describe("constructor", () => { - it("should respect provided settings", async () => { + it("should always have diff strategy defined", async () => { const cline = new Task({ provider: mockProvider, apiConfiguration: mockApiConfig, - fuzzyMatchThreshold: 0.95, task: "test task", startTask: false, }) - expect(cline.diffEnabled).toBe(false) - }) - - it("should use default fuzzy match threshold when not provided", async () => { - const cline = new Task({ - provider: mockProvider, - apiConfiguration: mockApiConfig, - enableDiff: true, - fuzzyMatchThreshold: 0.95, - task: "test task", - startTask: false, - }) - - expect(cline.diffEnabled).toBe(true) - - // The diff strategy should be created with default threshold (1.0). + // Diff is always enabled - diffStrategy should be defined expect(cline.diffStrategy).toBeDefined() }) @@ -1412,19 +1396,6 @@ describe("Cline", () => { expect(task.diffStrategy).toBeInstanceOf(MultiSearchReplaceDiffStrategy) expect(task.diffStrategy?.getName()).toBe("MultiSearchReplace") }) - - it("should not create diff strategy when enableDiff is false", async () => { - const task = new Task({ - provider: mockProvider, - apiConfiguration: mockApiConfig, - enableDiff: false, - task: "test task", - startTask: false, - }) - - expect(task.diffEnabled).toBe(false) - expect(task.diffStrategy).toBeUndefined() - }) }) describe("getApiProtocol", () => { diff --git a/src/core/task/build-tools.ts b/src/core/task/build-tools.ts index fe884314965..46896d050b6 100644 --- a/src/core/task/build-tools.ts +++ b/src/core/task/build-tools.ts @@ -26,7 +26,6 @@ interface BuildToolsOptions { maxConcurrentFileReads: number browserToolEnabled: boolean modelInfo?: ModelInfo - diffEnabled: boolean /** * If true, returns all tools without mode filtering, but also includes * the list of allowed tool names for use with allowedFunctionNames. @@ -94,7 +93,6 @@ export async function buildNativeToolsArrayWithRestrictions(options: BuildToolsO maxConcurrentFileReads, browserToolEnabled, modelInfo, - diffEnabled, includeAllToolsWithRestrictions, } = options @@ -109,7 +107,6 @@ export async function buildNativeToolsArrayWithRestrictions(options: BuildToolsO todoListEnabled: apiConfiguration?.todoListEnabled ?? true, browserToolEnabled: browserToolEnabled ?? true, modelInfo, - diffEnabled, } // Determine if partial reads are enabled based on maxReadFileLine setting. diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 5335e372f0d..25cb68a5510 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -970,24 +970,14 @@ export class ClineProvider } } - const { - apiConfiguration, - diffEnabled: enableDiff, - enableCheckpoints, - checkpointTimeout, - fuzzyMatchThreshold, - experiments, - cloudUserInfo, - taskSyncEnabled, - } = await this.getState() + const { apiConfiguration, enableCheckpoints, checkpointTimeout, experiments, cloudUserInfo, taskSyncEnabled } = + await this.getState() const task = new Task({ provider: this, apiConfiguration, - enableDiff, enableCheckpoints, checkpointTimeout, - fuzzyMatchThreshold, consecutiveMistakeLimit: apiConfiguration.consecutiveMistakeLimit, historyItem, experiments, @@ -1980,7 +1970,6 @@ export class ClineProvider soundEnabled, ttsEnabled, ttsSpeed, - diffEnabled, enableCheckpoints, checkpointTimeout, taskHistory, @@ -2001,7 +1990,6 @@ export class ClineProvider terminalZshOhMy, terminalZshP10k, terminalZdotdir, - fuzzyMatchThreshold, mcpEnabled, enableMcpServerCreation, currentApiConfigName, @@ -2120,7 +2108,6 @@ export class ClineProvider soundEnabled: soundEnabled ?? false, ttsEnabled: ttsEnabled ?? false, ttsSpeed: ttsSpeed ?? 1.0, - diffEnabled: diffEnabled ?? true, enableCheckpoints: enableCheckpoints ?? true, checkpointTimeout: checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, shouldShowAnnouncement: @@ -2144,7 +2131,6 @@ export class ClineProvider terminalZshOhMy: terminalZshOhMy ?? false, terminalZshP10k: terminalZshP10k ?? false, terminalZdotdir: terminalZdotdir ?? false, - fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0, mcpEnabled: mcpEnabled ?? true, enableMcpServerCreation: enableMcpServerCreation ?? true, currentApiConfigName: currentApiConfigName ?? "default", @@ -2372,7 +2358,6 @@ export class ClineProvider soundEnabled: stateValues.soundEnabled ?? false, ttsEnabled: stateValues.ttsEnabled ?? false, ttsSpeed: stateValues.ttsSpeed ?? 1.0, - diffEnabled: stateValues.diffEnabled ?? true, enableCheckpoints: stateValues.enableCheckpoints ?? true, checkpointTimeout: stateValues.checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, soundVolume: stateValues.soundVolume, @@ -2381,7 +2366,6 @@ export class ClineProvider remoteBrowserHost: stateValues.remoteBrowserHost, remoteBrowserEnabled: stateValues.remoteBrowserEnabled ?? false, cachedChromeHostUrl: stateValues.cachedChromeHostUrl as string | undefined, - fuzzyMatchThreshold: stateValues.fuzzyMatchThreshold ?? 1.0, writeDelayMs: stateValues.writeDelayMs ?? DEFAULT_WRITE_DELAY_MS, terminalOutputLineLimit: stateValues.terminalOutputLineLimit ?? 500, terminalOutputCharacterLimit: @@ -2872,10 +2856,8 @@ export class ClineProvider const { apiConfiguration, organizationAllowList, - diffEnabled: enableDiff, enableCheckpoints, checkpointTimeout, - fuzzyMatchThreshold, experiments, cloudUserInfo, remoteControlEnabled, @@ -2897,10 +2879,8 @@ export class ClineProvider const task = new Task({ provider: this, apiConfiguration, - enableDiff, enableCheckpoints, checkpointTimeout, - fuzzyMatchThreshold, consecutiveMistakeLimit: apiConfiguration.consecutiveMistakeLimit, task: text, images, diff --git a/src/core/webview/__tests__/ClineProvider.spec.ts b/src/core/webview/__tests__/ClineProvider.spec.ts index ff186892f2e..918c5de183b 100644 --- a/src/core/webview/__tests__/ClineProvider.spec.ts +++ b/src/core/webview/__tests__/ClineProvider.spec.ts @@ -554,11 +554,9 @@ describe("ClineProvider", () => { uriScheme: "vscode", soundEnabled: false, ttsEnabled: false, - diffEnabled: false, enableCheckpoints: false, writeDelayMs: 1000, browserViewportSize: "900x600", - fuzzyMatchThreshold: 1.0, mcpEnabled: true, enableMcpServerCreation: false, mode: defaultModeSlug, @@ -767,7 +765,6 @@ describe("ClineProvider", () => { expect(state).toHaveProperty("taskHistory") expect(state).toHaveProperty("soundEnabled") expect(state).toHaveProperty("ttsEnabled") - expect(state).toHaveProperty("diffEnabled") expect(state).toHaveProperty("writeDelayMs") }) @@ -779,15 +776,6 @@ describe("ClineProvider", () => { expect(state.language).toBe("pt-BR") }) - test("diffEnabled defaults to true when not set", async () => { - // Mock globalState.get to return undefined for diffEnabled - ;(mockContext.globalState.get as any).mockReturnValue(undefined) - - const state = await provider.getState() - - expect(state.diffEnabled).toBe(true) - }) - test("writeDelayMs defaults to 1000ms", async () => { // Mock globalState.get to return undefined for writeDelayMs ;(mockContext.globalState.get as any).mockImplementation((key: string) => @@ -1444,10 +1432,10 @@ describe("ClineProvider", () => { ) }) - test("generates system prompt with diff enabled", async () => { + test("generates system prompt with various configurations", async () => { await provider.resolveWebviewView(mockWebviewView) - // Mock getState to return diffEnabled: true + // Mock getState with typical configuration vi.spyOn(provider, "getState").mockResolvedValue({ apiConfiguration: { apiProvider: "openrouter", @@ -1458,8 +1446,6 @@ describe("ClineProvider", () => { enableMcpServerCreation: true, mcpEnabled: false, browserViewportSize: "900x600", - diffEnabled: true, - fuzzyMatchThreshold: 0.8, experiments: experimentDefault, browserToolEnabled: true, } as any) @@ -1478,40 +1464,6 @@ describe("ClineProvider", () => { ) }) - test("generates system prompt with diff disabled", async () => { - await provider.resolveWebviewView(mockWebviewView) - - // Mock getState to return diffEnabled: false - vi.spyOn(provider, "getState").mockResolvedValue({ - apiConfiguration: { - apiProvider: "openrouter", - apiModelId: "test-model", - }, - customModePrompts: {}, - mode: "code", - mcpEnabled: false, - browserViewportSize: "900x600", - diffEnabled: false, - fuzzyMatchThreshold: 0.8, - experiments: experimentDefault, - enableMcpServerCreation: true, - browserToolEnabled: false, - } as any) - - // Trigger getSystemPrompt - const handler = getMessageHandler() - await handler({ type: "getSystemPrompt", mode: "code" }) - - // Verify system prompt was generated and sent - expect(mockPostMessage).toHaveBeenCalledWith( - expect.objectContaining({ - type: "systemPrompt", - text: expect.any(String), - mode: "code", - }), - ) - }) - test("uses correct mode-specific instructions when mode is specified", async () => { await provider.resolveWebviewView(mockWebviewView) diff --git a/src/core/webview/generateSystemPrompt.ts b/src/core/webview/generateSystemPrompt.ts index d8f39386f5d..09e22f79e88 100644 --- a/src/core/webview/generateSystemPrompt.ts +++ b/src/core/webview/generateSystemPrompt.ts @@ -17,9 +17,7 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web customModePrompts, customInstructions, browserViewportSize, - diffEnabled, mcpEnabled, - fuzzyMatchThreshold, experiments, enableMcpServerCreation, browserToolEnabled, @@ -36,8 +34,8 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web ) const diffStrategy = isMultiFileApplyDiffEnabled - ? new MultiFileSearchReplaceDiffStrategy(fuzzyMatchThreshold) - : new MultiSearchReplaceDiffStrategy(fuzzyMatchThreshold) + ? new MultiFileSearchReplaceDiffStrategy() + : new MultiSearchReplaceDiffStrategy() const cwd = provider.cwd @@ -80,7 +78,6 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web customModePrompts, customModes, customInstructions, - diffEnabled, experiments, enableMcpServerCreation, language, diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index bddbbe802d2..939d2734d4b 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -114,7 +114,6 @@ import { ModelPicker } from "./ModelPicker" import { ApiErrorMessage } from "./ApiErrorMessage" import { ThinkingBudget } from "./ThinkingBudget" import { Verbosity } from "./Verbosity" -import { DiffSettingsControl } from "./DiffSettingsControl" import { TodoListSettingsControl } from "./TodoListSettingsControl" import { TemperatureControl } from "./TemperatureControl" import { RateLimitSecondsControl } from "./RateLimitSecondsControl" @@ -818,11 +817,6 @@ const ApiOptions = ({ todoListEnabled={apiConfiguration.todoListEnabled} onChange={(field, value) => setApiConfigurationField(field, value)} /> - setApiConfigurationField(field, value)} - /> {selectedModelInfo?.supportsTemperature !== false && ( void -} - -export const DiffSettingsControl: React.FC = ({ - diffEnabled = true, - fuzzyMatchThreshold = 1.0, - onChange, -}) => { - const { t } = useAppTranslation() - - const handleDiffEnabledChange = useCallback( - (e: any) => { - onChange("diffEnabled", e.target.checked) - }, - [onChange], - ) - - const handleThresholdChange = useCallback( - (newValue: number[]) => { - onChange("fuzzyMatchThreshold", newValue[0]) - }, - [onChange], - ) - - return ( -
-
- - {t("settings:advanced.diff.label")} - -
- {t("settings:advanced.diff.description")} -
-
- - {diffEnabled && ( -
-
- -
- - {Math.round(fuzzyMatchThreshold * 100)}% -
-
- {t("settings:advanced.diff.matchPrecision.description")} -
-
-
- )} -
- ) -} diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 792e23bf611..67ba48676c5 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -165,9 +165,7 @@ const SettingsView = forwardRef(({ onDone, t browserViewportSize, enableCheckpoints, checkpointTimeout, - diffEnabled, experiments, - fuzzyMatchThreshold, maxOpenTabsContext, maxWorkspaceFiles, mcpEnabled, @@ -383,13 +381,11 @@ const SettingsView = forwardRef(({ onDone, t soundVolume: soundVolume ?? 0.5, ttsEnabled, ttsSpeed, - diffEnabled: diffEnabled ?? true, enableCheckpoints: enableCheckpoints ?? false, checkpointTimeout: checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, browserViewportSize: browserViewportSize ?? "900x600", remoteBrowserHost: remoteBrowserEnabled ? remoteBrowserHost : undefined, remoteBrowserEnabled: remoteBrowserEnabled ?? false, - fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0, writeDelayMs, screenshotQuality: screenshotQuality ?? 75, terminalOutputLineLimit: terminalOutputLineLimit ?? 500, diff --git a/webview-ui/src/components/settings/__tests__/ApiOptions.spec.tsx b/webview-ui/src/components/settings/__tests__/ApiOptions.spec.tsx index c8bcc72c0af..95f9207c62c 100644 --- a/webview-ui/src/components/settings/__tests__/ApiOptions.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/ApiOptions.spec.tsx @@ -158,33 +158,6 @@ vi.mock("../RateLimitSecondsControl", () => ({ ), })) -// Mock DiffSettingsControl for tests -vi.mock("../DiffSettingsControl", () => ({ - DiffSettingsControl: ({ diffEnabled, fuzzyMatchThreshold, onChange }: any) => ( -
- -
- Fuzzy match threshold - onChange("fuzzyMatchThreshold", parseFloat(e.target.value))} - min={0.8} - max={1} - step={0.005} - /> -
-
- ), -})) - // Mock TodoListSettingsControl for tests vi.mock("../TodoListSettingsControl", () => ({ TodoListSettingsControl: ({ todoListEnabled, onChange }: any) => ( @@ -323,23 +296,16 @@ describe("ApiOptions", () => { expect(mockSetApiConfigurationField).toHaveBeenCalledWith("apiModelId", openAiCodexDefaultModelId, false) }) - it("shows diff settings, temperature and rate limit controls by default", () => { + it("shows temperature and rate limit controls by default", () => { renderApiOptions({ - apiConfiguration: { - diffEnabled: true, - fuzzyMatchThreshold: 0.95, - }, + apiConfiguration: {}, }) - // Check for DiffSettingsControl by looking for text content - expect(screen.getByText(/enable editing through diffs/i)).toBeInTheDocument() expect(screen.getByTestId("temperature-control")).toBeInTheDocument() expect(screen.getByTestId("rate-limit-seconds-control")).toBeInTheDocument() }) it("hides all controls when fromWelcomeView is true", () => { renderApiOptions({ fromWelcomeView: true }) - // Check for absence of DiffSettingsControl text - expect(screen.queryByText(/enable editing through diffs/i)).not.toBeInTheDocument() expect(screen.queryByTestId("temperature-control")).not.toBeInTheDocument() expect(screen.queryByTestId("rate-limit-seconds-control")).not.toBeInTheDocument() }) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index a2633ca154d..a783eb50124 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -89,12 +89,10 @@ export interface ExtensionStateContextType extends ExtensionState { setTerminalZdotdir: (value: boolean) => void setTtsEnabled: (value: boolean) => void setTtsSpeed: (value: number) => void - setDiffEnabled: (value: boolean) => void setEnableCheckpoints: (value: boolean) => void checkpointTimeout: number setCheckpointTimeout: (value: number) => void setBrowserViewportSize: (value: string) => void - setFuzzyMatchThreshold: (value: number) => void setWriteDelayMs: (value: number) => void screenshotQuality?: number setScreenshotQuality: (value: number) => void @@ -207,10 +205,8 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode isBrowserSessionActive: false, ttsEnabled: false, ttsSpeed: 1.0, - diffEnabled: false, enableCheckpoints: true, checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, // Default to 15 seconds - fuzzyMatchThreshold: 1.0, language: "en", // Default language code writeDelayMs: 1000, browserViewportSize: "900x600", @@ -499,7 +495,6 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode commands, soundVolume: state.soundVolume, ttsSpeed: state.ttsSpeed, - fuzzyMatchThreshold: state.fuzzyMatchThreshold, writeDelayMs: state.writeDelayMs, screenshotQuality: state.screenshotQuality, routerModels: extensionRouterModels, @@ -541,12 +536,10 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode setSoundVolume: (value) => setState((prevState) => ({ ...prevState, soundVolume: value })), setTtsEnabled: (value) => setState((prevState) => ({ ...prevState, ttsEnabled: value })), setTtsSpeed: (value) => setState((prevState) => ({ ...prevState, ttsSpeed: value })), - setDiffEnabled: (value) => setState((prevState) => ({ ...prevState, diffEnabled: value })), setEnableCheckpoints: (value) => setState((prevState) => ({ ...prevState, enableCheckpoints: value })), setCheckpointTimeout: (value) => setState((prevState) => ({ ...prevState, checkpointTimeout: value })), setBrowserViewportSize: (value: string) => setState((prevState) => ({ ...prevState, browserViewportSize: value })), - setFuzzyMatchThreshold: (value) => setState((prevState) => ({ ...prevState, fuzzyMatchThreshold: value })), setWriteDelayMs: (value) => setState((prevState) => ({ ...prevState, writeDelayMs: value })), setScreenshotQuality: (value) => setState((prevState) => ({ ...prevState, screenshotQuality: value })), setTerminalOutputLineLimit: (value) => diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 16d2683cd17..d6c5279489d 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -783,10 +783,6 @@ "unified": "L'estratègia de diff unificat pren múltiples enfocaments per aplicar diffs i tria el millor enfocament.", "multiBlock": "L'estratègia de diff multi-bloc permet actualitzar múltiples blocs de codi en un fitxer en una sola sol·licitud." } - }, - "matchPrecision": { - "label": "Precisió de coincidència", - "description": "Aquest control lliscant controla amb quina precisió han de coincidir les seccions de codi en aplicar diffs. Valors més baixos permeten coincidències més flexibles però augmenten el risc de reemplaçaments incorrectes. Utilitzeu valors per sota del 100% amb extrema precaució." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index d7dedaa5e60..83d560d9f9e 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -783,10 +783,6 @@ "unified": "Die einheitliche Diff-Strategie wendet mehrere Ansätze zur Anwendung von Diffs an und wählt den besten Ansatz.", "multiBlock": "Die Mehrblock-Diff-Strategie ermöglicht das Aktualisieren mehrerer Codeblöcke in einer Datei in einer Anfrage." } - }, - "matchPrecision": { - "label": "Übereinstimmungspräzision", - "description": "Dieser Schieberegler steuert, wie genau Codeabschnitte bei der Anwendung von Diffs übereinstimmen müssen. Niedrigere Werte ermöglichen eine flexiblere Übereinstimmung, erhöhen aber das Risiko falscher Ersetzungen. Verwenden Sie Werte unter 100 % mit äußerster Vorsicht." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 9bf14366066..4c37e68f558 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -792,10 +792,6 @@ "unified": "Unified diff strategy takes multiple approaches to applying diffs and chooses the best approach.", "multiBlock": "Multi-block diff strategy allows updating multiple code blocks in a file in one request." } - }, - "matchPrecision": { - "label": "Match precision", - "description": "This slider controls how precisely code sections must match when applying diffs. Lower values allow more flexible matching but increase the risk of incorrect replacements. Use values below 100% with extreme caution." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index f97a26bef41..ca6a5cdaf4a 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -783,10 +783,6 @@ "unified": "La estrategia de diff unificado toma múltiples enfoques para aplicar diffs y elige el mejor enfoque.", "multiBlock": "La estrategia de diff multi-bloque permite actualizar múltiples bloques de código en un archivo en una sola solicitud." } - }, - "matchPrecision": { - "label": "Precisión de coincidencia", - "description": "Este control deslizante controla cuán precisamente deben coincidir las secciones de código al aplicar diffs. Valores más bajos permiten coincidencias más flexibles pero aumentan el riesgo de reemplazos incorrectos. Use valores por debajo del 100% con extrema precaución." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index d87805079c3..8d7657b5a1f 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -783,10 +783,6 @@ "unified": "La stratégie de diff unifié prend plusieurs approches pour appliquer les diffs et choisit la meilleure approche.", "multiBlock": "La stratégie de diff multi-blocs permet de mettre à jour plusieurs blocs de code dans un fichier en une seule requête." } - }, - "matchPrecision": { - "label": "Précision de correspondance", - "description": "Ce curseur contrôle la précision avec laquelle les sections de code doivent correspondre lors de l'application des diffs. Des valeurs plus basses permettent des correspondances plus flexibles mais augmentent le risque de remplacements incorrects. Utilisez des valeurs inférieures à 100 % avec une extrême prudence." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index fa23a6a0443..507e8a5f627 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -784,10 +784,6 @@ "unified": "एकीकृत diff रणनीति diffs लागू करने के लिए कई दृष्टिकोण लेती है और सर्वोत्तम दृष्टिकोण चुनती है।", "multiBlock": "मल्टी-ब्लॉक diff रणनीति एक अनुरोध में एक फाइल में कई कोड ब्लॉक अपडेट करने की अनुमति देती है।" } - }, - "matchPrecision": { - "label": "मिलान सटीकता", - "description": "यह स्लाइडर नियंत्रित करता है कि diffs लागू करते समय कोड अनुभागों को कितनी सटीकता से मेल खाना चाहिए। निम्न मान अधिक लचीले मिलान की अनुमति देते हैं लेकिन गलत प्रतिस्थापन का जोखिम बढ़ाते हैं। 100% से नीचे के मानों का उपयोग अत्यधिक सावधानी के साथ करें।" } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index 741d1854077..1b62a030c25 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -788,10 +788,6 @@ "unified": "Strategi unified diff mengambil beberapa pendekatan untuk menerapkan diff dan memilih pendekatan terbaik.", "multiBlock": "Strategi multi-block diff memungkinkan memperbarui beberapa blok kode dalam file dalam satu permintaan." } - }, - "matchPrecision": { - "label": "Presisi pencocokan", - "description": "Slider ini mengontrol seberapa tepat bagian kode harus cocok saat menerapkan diff. Nilai yang lebih rendah memungkinkan pencocokan yang lebih fleksibel tetapi meningkatkan risiko penggantian yang salah. Gunakan nilai di bawah 100% dengan sangat hati-hati." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 93845477e2f..cbef7c2eb81 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -784,10 +784,6 @@ "unified": "La strategia diff unificato adotta diversi approcci per applicare i diff e sceglie il migliore.", "multiBlock": "La strategia diff multi-blocco consente di aggiornare più blocchi di codice in un file in una singola richiesta." } - }, - "matchPrecision": { - "label": "Precisione corrispondenza", - "description": "Questo cursore controlla quanto precisamente le sezioni di codice devono corrispondere quando si applicano i diff. Valori più bassi consentono corrispondenze più flessibili ma aumentano il rischio di sostituzioni errate. Usa valori inferiori al 100% con estrema cautela." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index c9e2883d5ae..2afec7839e9 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -784,10 +784,6 @@ "unified": "統合diff戦略はdiffを適用するための複数のアプローチを取り、最良のアプローチを選択します。", "multiBlock": "マルチブロックdiff戦略は、1つのリクエストでファイル内の複数のコードブロックを更新できます。" } - }, - "matchPrecision": { - "label": "マッチ精度", - "description": "このスライダーは、diffを適用する際にコードセクションがどれだけ正確に一致する必要があるかを制御します。低い値はより柔軟なマッチングを可能にしますが、誤った置換のリスクが高まります。100%未満の値は細心の注意を払って使用してください。" } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index 7a4fd179fe2..de6da1bc6b7 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -784,10 +784,6 @@ "unified": "통합 diff 전략은 diff를 적용하는 여러 접근 방식을 취하고 최상의 접근 방식을 선택합니다.", "multiBlock": "다중 블록 diff 전략은 하나의 요청으로 파일의 여러 코드 블록을 업데이트할 수 있습니다." } - }, - "matchPrecision": { - "label": "일치 정확도", - "description": "이 슬라이더는 diff를 적용할 때 코드 섹션이 얼마나 정확하게 일치해야 하는지 제어합니다. 낮은 값은 더 유연한 일치를 허용하지만 잘못된 교체 위험이 증가합니다. 100% 미만의 값은 극도로 주의해서 사용하세요." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index c02db25e9ca..c5925d76375 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -784,10 +784,6 @@ "unified": "Unified diff-strategie gebruikt meerdere methoden om diffs toe te passen en kiest de beste aanpak.", "multiBlock": "Multi-block diff-strategie laat toe om meerdere codeblokken in één verzoek bij te werken." } - }, - "matchPrecision": { - "label": "Matchnauwkeurigheid", - "description": "Deze schuifregelaar bepaalt hoe nauwkeurig codeblokken moeten overeenkomen bij het toepassen van diffs. Lagere waarden laten flexibelere matching toe maar verhogen het risico op verkeerde vervangingen. Gebruik waarden onder 100% met uiterste voorzichtigheid." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index 59ab07f7525..a7e287a839b 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -784,10 +784,6 @@ "unified": "Strategia diff ujednoliconego stosuje wiele podejść do zastosowania różnic i wybiera najlepsze podejście.", "multiBlock": "Strategia diff wieloblokowego pozwala na aktualizację wielu bloków kodu w pliku w jednym żądaniu." } - }, - "matchPrecision": { - "label": "Precyzja dopasowania", - "description": "Ten suwak kontroluje, jak dokładnie sekcje kodu muszą pasować podczas stosowania różnic. Niższe wartości umożliwiają bardziej elastyczne dopasowywanie, ale zwiększają ryzyko nieprawidłowych zamian. Używaj wartości poniżej 100% z najwyższą ostrożnością." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index 9985677e385..e4e1d6f5464 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -784,10 +784,6 @@ "unified": "A estratégia de diff unificado adota várias abordagens para aplicar diffs e escolhe a melhor abordagem.", "multiBlock": "A estratégia de diff multi-bloco permite atualizar vários blocos de código em um arquivo em uma única requisição." } - }, - "matchPrecision": { - "label": "Precisão de correspondência", - "description": "Este controle deslizante controla quão precisamente as seções de código devem corresponder ao aplicar diffs. Valores mais baixos permitem correspondências mais flexíveis, mas aumentam o risco de substituições incorretas. Use valores abaixo de 100% com extrema cautela." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index 4c3073b6b93..32749f99848 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -784,10 +784,6 @@ "unified": "Унифицированная стратегия использует несколько подходов к применению диффов и выбирает лучший.", "multiBlock": "Мультиблочная стратегия позволяет обновлять несколько блоков кода в файле за один запрос." } - }, - "matchPrecision": { - "label": "Точность совпадения", - "description": "Этот ползунок управляет точностью совпадения секций кода при применении диффов. Меньшие значения позволяют более гибкое совпадение, но увеличивают риск неверной замены. Используйте значения ниже 100% с осторожностью." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index eda1ee6fc83..142bd709b25 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -784,10 +784,6 @@ "unified": "Birleştirilmiş diff stratejisi, diff'leri uygulamak için birden çok yaklaşım benimser ve en iyi yaklaşımı seçer.", "multiBlock": "Çoklu blok diff stratejisi, tek bir istekte bir dosyadaki birden çok kod bloğunu güncellemenize olanak tanır." } - }, - "matchPrecision": { - "label": "Eşleşme hassasiyeti", - "description": "Bu kaydırıcı, diff'ler uygulanırken kod bölümlerinin ne kadar hassas bir şekilde eşleşmesi gerektiğini kontrol eder. Daha düşük değerler daha esnek eşleşmeye izin verir ancak yanlış değiştirme riskini artırır. %100'ün altındaki değerleri son derece dikkatli kullanın." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index 7dc80edfdd7..75350af8f4e 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -784,10 +784,6 @@ "unified": "Chiến lược diff thống nhất thực hiện nhiều cách tiếp cận để áp dụng diff và chọn cách tiếp cận tốt nhất.", "multiBlock": "Chiến lược diff đa khối cho phép cập nhật nhiều khối mã trong một tệp trong một yêu cầu." } - }, - "matchPrecision": { - "label": "Độ chính xác khớp", - "description": "Thanh trượt này kiểm soát mức độ chính xác các phần mã phải khớp khi áp dụng diff. Giá trị thấp hơn cho phép khớp linh hoạt hơn nhưng tăng nguy cơ thay thế không chính xác. Sử dụng giá trị dưới 100% với sự thận trọng cao." } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 8c45e887eee..daeca12aa66 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -784,10 +784,6 @@ "unified": "统一 diff 策略采用多种方法应用差异并选择最佳方法。", "multiBlock": "多块 diff 策略允许在一个请求中更新文件中的多个代码块。" } - }, - "matchPrecision": { - "label": "匹配精度", - "description": "控制代码匹配的精确程度。数值越低匹配越宽松(容错率高但风险大),建议保持100%以确保安全。" } }, "todoList": { diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 1ad8148f9eb..4b32bac9204 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -784,10 +784,6 @@ "unified": "統一差異策略會嘗試多種比對方式,並選擇最佳方案。", "multiBlock": "多區塊策略可在單一請求中更新檔案內的多個程式碼區塊。" } - }, - "matchPrecision": { - "label": "比對精確度", - "description": "此滑桿控制套用差異時程式碼區段的比對精確度。較低的數值允許更彈性的比對,但也會增加錯誤取代的風險。使用低於 100% 的數值時請特別謹慎。" } }, "todoList": { From 14778e461e8b32f58ccd55f61c82774b3c1e2096 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Tue, 23 Dec 2025 01:15:08 -0700 Subject: [PATCH 2/5] chore: remove enableDiff from CreateTaskOptions Remove enableDiff property from public CreateTaskOptions interface since diffs are now always enabled. This addresses the review feedback to clean up the no-op property. - Remove enableDiff from packages/types/src/task.ts - Remove enableDiff usage from test file --- packages/types/src/task.ts | 1 - src/core/task/__tests__/Task.spec.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/packages/types/src/task.ts b/packages/types/src/task.ts index d735073b9a7..00751837c21 100644 --- a/packages/types/src/task.ts +++ b/packages/types/src/task.ts @@ -89,7 +89,6 @@ export type TaskProviderEvents = { */ export interface CreateTaskOptions { - enableDiff?: boolean enableCheckpoints?: boolean consecutiveMistakeLimit?: number experiments?: Record diff --git a/src/core/task/__tests__/Task.spec.ts b/src/core/task/__tests__/Task.spec.ts index 86577685b82..16cca2b099f 100644 --- a/src/core/task/__tests__/Task.spec.ts +++ b/src/core/task/__tests__/Task.spec.ts @@ -1339,7 +1339,6 @@ describe("Cline", () => { const task = new Task({ provider: mockProvider, apiConfiguration: mockApiConfig, - enableDiff: true, task: "test task", startTask: false, }) @@ -1359,7 +1358,6 @@ describe("Cline", () => { const task = new Task({ provider: mockProvider, apiConfiguration: mockApiConfig, - enableDiff: true, task: "test task", startTask: false, }) @@ -1381,7 +1379,6 @@ describe("Cline", () => { const task = new Task({ provider: mockProvider, apiConfiguration: mockApiConfig, - enableDiff: true, task: "test task", startTask: false, }) From 957e3caa2a4ed6b7a55339ca480c74f4721cacee Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Thu, 22 Jan 2026 23:56:14 -0700 Subject: [PATCH 3/5] fix(types): remove diffEnabled/fuzzyMatchThreshold from ExtensionState --- packages/types/src/vscode-extension-host.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/types/src/vscode-extension-host.ts b/packages/types/src/vscode-extension-host.ts index f7d034f4fa8..a2ab2fe67ea 100644 --- a/packages/types/src/vscode-extension-host.ts +++ b/packages/types/src/vscode-extension-host.ts @@ -317,8 +317,6 @@ export type ExtensionState = Pick< | "terminalZdotdir" | "terminalCompressProgressBar" | "diagnosticsEnabled" - | "diffEnabled" - | "fuzzyMatchThreshold" | "language" | "modeApiConfigs" | "customModePrompts" @@ -369,7 +367,7 @@ export type ExtensionState = Pick< mode: string customModes: ModeConfig[] - toolRequirements?: Record // Map of tool names to their requirements (e.g. {"apply_diff": true} if diffEnabled) + toolRequirements?: Record // Map of tool names to their requirements (e.g. {"apply_diff": true}) cwd?: string // Current working directory telemetrySetting: TelemetrySetting From 00e96e2650cc435863f4f8f22b889fddd7d9f9a6 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Fri, 23 Jan 2026 13:48:53 -0700 Subject: [PATCH 4/5] test: remove diffEnabled/fuzzyMatchThreshold from test mocks --- src/__tests__/single-open-invariant.spec.ts | 4 ---- .../presentAssistantMessage-custom-tool.spec.ts | 1 - .../__tests__/presentAssistantMessage-images.spec.ts | 1 - .../presentAssistantMessage-unknown-tool.spec.ts | 1 - .../config/__tests__/ProviderSettingsManager.spec.ts | 12 ------------ .../generateSystemPrompt.browser-capability.spec.ts | 2 -- .../__tests__/SettingsView.change-detection.spec.tsx | 2 -- .../__tests__/SettingsView.unsaved-changes.spec.tsx | 2 -- 8 files changed, 25 deletions(-) diff --git a/src/__tests__/single-open-invariant.spec.ts b/src/__tests__/single-open-invariant.spec.ts index 3284ae7629b..7fac886030f 100644 --- a/src/__tests__/single-open-invariant.spec.ts +++ b/src/__tests__/single-open-invariant.spec.ts @@ -46,10 +46,8 @@ describe("Single-open-task invariant", () => { getState: vi.fn().mockResolvedValue({ apiConfiguration: { apiProvider: "anthropic", consecutiveMistakeLimit: 0 }, organizationAllowList: "*", - diffEnabled: false, enableCheckpoints: true, checkpointTimeout: 60, - fuzzyMatchThreshold: 1.0, cloudUserInfo: null, remoteControlEnabled: false, }), @@ -94,10 +92,8 @@ describe("Single-open-task invariant", () => { }, getState: vi.fn().mockResolvedValue({ apiConfiguration: { apiProvider: "anthropic", consecutiveMistakeLimit: 0 }, - diffEnabled: false, enableCheckpoints: true, checkpointTimeout: 60, - fuzzyMatchThreshold: 1.0, experiments: {}, cloudUserInfo: null, taskSyncEnabled: false, diff --git a/src/core/assistant-message/__tests__/presentAssistantMessage-custom-tool.spec.ts b/src/core/assistant-message/__tests__/presentAssistantMessage-custom-tool.spec.ts index 18e277905f1..690861bb56a 100644 --- a/src/core/assistant-message/__tests__/presentAssistantMessage-custom-tool.spec.ts +++ b/src/core/assistant-message/__tests__/presentAssistantMessage-custom-tool.spec.ts @@ -54,7 +54,6 @@ describe("presentAssistantMessage - Custom Tool Recording", () => { didCompleteReadingStream: false, didRejectTool: false, didAlreadyUseTool: false, - diffEnabled: false, consecutiveMistakeCount: 0, clineMessages: [], api: { diff --git a/src/core/assistant-message/__tests__/presentAssistantMessage-images.spec.ts b/src/core/assistant-message/__tests__/presentAssistantMessage-images.spec.ts index 6740f780ed3..9adac74fd2f 100644 --- a/src/core/assistant-message/__tests__/presentAssistantMessage-images.spec.ts +++ b/src/core/assistant-message/__tests__/presentAssistantMessage-images.spec.ts @@ -41,7 +41,6 @@ describe("presentAssistantMessage - Image Handling in Native Tool Calling", () = didCompleteReadingStream: false, didRejectTool: false, didAlreadyUseTool: false, - diffEnabled: false, consecutiveMistakeCount: 0, api: { getModel: () => ({ id: "test-model", info: {} }), diff --git a/src/core/assistant-message/__tests__/presentAssistantMessage-unknown-tool.spec.ts b/src/core/assistant-message/__tests__/presentAssistantMessage-unknown-tool.spec.ts index e4a50be925a..ed90127b5b8 100644 --- a/src/core/assistant-message/__tests__/presentAssistantMessage-unknown-tool.spec.ts +++ b/src/core/assistant-message/__tests__/presentAssistantMessage-unknown-tool.spec.ts @@ -35,7 +35,6 @@ describe("presentAssistantMessage - Unknown Tool Handling", () => { didCompleteReadingStream: false, didRejectTool: false, didAlreadyUseTool: false, - diffEnabled: false, consecutiveMistakeCount: 0, clineMessages: [], api: { diff --git a/src/core/config/__tests__/ProviderSettingsManager.spec.ts b/src/core/config/__tests__/ProviderSettingsManager.spec.ts index 0669d9591c8..e233fc913c5 100644 --- a/src/core/config/__tests__/ProviderSettingsManager.spec.ts +++ b/src/core/config/__tests__/ProviderSettingsManager.spec.ts @@ -57,14 +57,11 @@ describe("ProviderSettingsManager", () => { default: { config: {}, id: "default", - diffEnabled: true, - fuzzyMatchThreshold: 1.0, }, }, modeApiConfigs: {}, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: true, @@ -93,7 +90,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, }, }), ) @@ -170,7 +166,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: false, }, @@ -211,7 +206,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: false, @@ -260,7 +254,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: true, @@ -298,7 +291,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: true, @@ -329,7 +321,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: true, @@ -565,7 +556,6 @@ describe("ProviderSettingsManager", () => { apiConfigs: { default: {} }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, }, }), @@ -694,7 +684,6 @@ describe("ProviderSettingsManager", () => { apiConfigs: { test: { apiProvider: "anthropic", id: "test-id" } }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, }, }), @@ -727,7 +716,6 @@ describe("ProviderSettingsManager", () => { }, migrations: { rateLimitSecondsMigrated: true, - diffSettingsMigrated: true, openAiHeadersMigrated: true, consecutiveMistakeLimitMigrated: true, todoListEnabledMigrated: true, diff --git a/src/core/webview/__tests__/generateSystemPrompt.browser-capability.spec.ts b/src/core/webview/__tests__/generateSystemPrompt.browser-capability.spec.ts index 5aa2ea2c63a..702c932fd5d 100644 --- a/src/core/webview/__tests__/generateSystemPrompt.browser-capability.spec.ts +++ b/src/core/webview/__tests__/generateSystemPrompt.browser-capability.spec.ts @@ -58,9 +58,7 @@ function makeProviderStub() { customModePrompts: undefined, customInstructions: undefined, browserViewportSize: "900x600", - diffEnabled: false, mcpEnabled: false, - fuzzyMatchThreshold: 1.0, experiments: {}, enableMcpServerCreation: false, browserToolEnabled: true, // critical: enabled in settings diff --git a/webview-ui/src/components/settings/__tests__/SettingsView.change-detection.spec.tsx b/webview-ui/src/components/settings/__tests__/SettingsView.change-detection.spec.tsx index e20f4884a15..8f9467c332f 100644 --- a/webview-ui/src/components/settings/__tests__/SettingsView.change-detection.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/SettingsView.change-detection.spec.tsx @@ -161,9 +161,7 @@ describe("SettingsView - Change Detection Fix", () => { browserToolEnabled: false, browserViewportSize: "1280x720", enableCheckpoints: false, - diffEnabled: true, experiments: {}, - fuzzyMatchThreshold: 1.0, maxOpenTabsContext: 10, maxWorkspaceFiles: 200, mcpEnabled: false, diff --git a/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx b/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx index 5d7a894110f..726d0248cfe 100644 --- a/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx @@ -166,9 +166,7 @@ describe("SettingsView - Unsaved Changes Detection", () => { browserToolEnabled: false, browserViewportSize: "1280x720", enableCheckpoints: false, - diffEnabled: true, experiments: {}, - fuzzyMatchThreshold: 1.0, maxOpenTabsContext: 10, maxWorkspaceFiles: 200, mcpEnabled: false, From 8a75e6078c4a76948bed044c6ed9ecdb52cd301d Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Fri, 23 Jan 2026 14:02:18 -0700 Subject: [PATCH 5/5] fix: remove remaining diffEnabled references from Task.ts after rebase --- src/core/task/Task.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 02b265f0ccb..dc2677a27ec 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -1597,7 +1597,6 @@ export class Task extends EventEmitter implements TaskLike { maxConcurrentFileReads: state?.maxConcurrentFileReads ?? 5, browserToolEnabled: state?.browserToolEnabled ?? true, modelInfo, - diffEnabled: this.diffEnabled, includeAllToolsWithRestrictions: false, }) allTools = toolsResult.tools @@ -3743,7 +3742,6 @@ export class Task extends EventEmitter implements TaskLike { maxConcurrentFileReads: state?.maxConcurrentFileReads ?? 5, browserToolEnabled: state?.browserToolEnabled ?? true, modelInfo, - diffEnabled: this.diffEnabled, includeAllToolsWithRestrictions: false, }) allTools = toolsResult.tools @@ -3960,7 +3958,6 @@ export class Task extends EventEmitter implements TaskLike { maxConcurrentFileReads: state?.maxConcurrentFileReads ?? 5, browserToolEnabled: state?.browserToolEnabled ?? true, modelInfo, - diffEnabled: this.diffEnabled, includeAllToolsWithRestrictions: false, }) contextMgmtTools = toolsResult.tools