Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 526488e

Browse files
chore: remove MULTI_FILE_APPLY_DIFF experiment (#10925)
* chore: remove MULTI_FILE_APPLY_DIFF experiment Remove the 'Enable concurrent file edits' experimental feature that allowed editing multiple files in a single apply_diff call. - Remove multiFileApplyDiff from experiment types and config - Delete MultiFileSearchReplaceDiffStrategy class and tests - Delete MultiApplyDiffTool wrapper and tests - Remove experiment-specific code paths in Task.ts, generateSystemPrompt.ts, and presentAssistantMessage.ts - Remove special handling in ExperimentalSettings.tsx - Remove translations from all 18 locale files The existing MultiSearchReplaceDiffStrategy continues to handle multiple SEARCH/REPLACE blocks within a single file. * fix: remove unused EXPERIMENT_IDS/experiments import from Task.ts Addresses review feedback: removes the unused imports from src/core/task/Task.ts that were left over after removing the MULTI_FILE_APPLY_DIFF experiment routing code.
1 parent f7434de commit 526488e

33 files changed

Lines changed: 34 additions & 1567 deletions

packages/types/src/experiment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
77
*/
88

99
export const experimentIds = [
10-
"multiFileApplyDiff",
10+
"powerSteering",
1111
"preventFocusDisruption",
1212
"imageGeneration",
1313
"runSlashCommand",
@@ -24,7 +24,7 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
2424
*/
2525

2626
export const experimentsSchema = z.object({
27-
multiFileApplyDiff: z.boolean().optional(),
27+
powerSteering: z.boolean().optional(),
2828
preventFocusDisruption: z.boolean().optional(),
2929
imageGeneration: z.boolean().optional(),
3030
runSlashCommand: z.boolean().optional(),

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { t } from "../../i18n"
1010

1111
import { defaultModeSlug, getModeBySlug } from "../../shared/modes"
1212
import type { ToolParamName, ToolResponse, ToolUse, McpToolUse } from "../../shared/tools"
13-
import { experiments, EXPERIMENT_IDS } from "../../shared/experiments"
1413

1514
import { AskIgnoredError } from "../task/AskIgnoredError"
1615
import { Task } from "../task/Task"
@@ -19,7 +18,6 @@ import { fetchInstructionsTool } from "../tools/FetchInstructionsTool"
1918
import { listFilesTool } from "../tools/ListFilesTool"
2019
import { readFileTool } from "../tools/ReadFileTool"
2120
import { writeToFileTool } from "../tools/WriteToFileTool"
22-
import { applyDiffTool } from "../tools/MultiApplyDiffTool"
2321
import { searchAndReplaceTool } from "../tools/SearchAndReplaceTool"
2422
import { searchReplaceTool } from "../tools/SearchReplaceTool"
2523
import { editFileTool } from "../tools/EditFileTool"
@@ -743,32 +741,14 @@ export async function presentAssistantMessage(cline: Task) {
743741
pushToolResult,
744742
})
745743
break
746-
case "apply_diff": {
744+
case "apply_diff":
747745
await checkpointSaveAndMark(cline)
748-
749-
// Get the provider and state to check experiment settings
750-
const provider = cline.providerRef.deref()
751-
let isMultiFileApplyDiffEnabled = false
752-
753-
if (provider) {
754-
const state = await provider.getState()
755-
isMultiFileApplyDiffEnabled = experiments.isEnabled(
756-
state.experiments ?? {},
757-
EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF,
758-
)
759-
}
760-
761-
if (isMultiFileApplyDiffEnabled) {
762-
await applyDiffTool(cline, block, askApproval, handleError, pushToolResult)
763-
} else {
764-
await applyDiffToolClass.handle(cline, block as ToolUse<"apply_diff">, {
765-
askApproval,
766-
handleError,
767-
pushToolResult,
768-
})
769-
}
746+
await applyDiffToolClass.handle(cline, block as ToolUse<"apply_diff">, {
747+
askApproval,
748+
handleError,
749+
pushToolResult,
750+
})
770751
break
771-
}
772752
case "search_and_replace":
773753
await checkpointSaveAndMark(cline)
774754
await searchAndReplaceTool.handle(cline, block as ToolUse<"search_and_replace">, {

src/core/diff/strategies/__tests__/multi-file-search-replace-8char.spec.ts

Lines changed: 0 additions & 189 deletions
This file was deleted.

0 commit comments

Comments
 (0)