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

Commit a7f4f2c

Browse files
committed
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.
1 parent 85f42dc commit a7f4f2c

33 files changed

Lines changed: 11 additions & 1567 deletions

packages/types/src/experiment.ts

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

99
export const experimentIds = [
1010
"powerSteering",
11-
"multiFileApplyDiff",
1211
"preventFocusDisruption",
1312
"imageGeneration",
1413
"runSlashCommand",
@@ -26,7 +25,6 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
2625

2726
export const experimentsSchema = z.object({
2827
powerSteering: z.boolean().optional(),
29-
multiFileApplyDiff: z.boolean().optional(),
3028
preventFocusDisruption: z.boolean().optional(),
3129
imageGeneration: z.boolean().optional(),
3230
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)