Error: Error: The edit was not applied. The text in ORIGINAL must EXACTLY match lines of code in the file, but there was no match for: Has this situation not been handled?
VSCode Version: 1.99.3 Void Version: 1.4.1 Commit: Unknown Date: Unknown Electron: 34.3.2 ElectronBuildId: undefined Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Windows_NT x64 10.0.26100
Error: Error: The edit was not applied. The text in ORIGINAL must EXACTLY match lines of code in the file, but there was no match for:
Has this situation not been handled?
+1, tried with multiple gemini models.
Yeah, i tend to use slow apply a lot. The fast apply only really works with some models and only if you're given code that has a single change in the code block with function name (or class etc.) visible in that codeblock.
Having same problem with Gemma3 12B qat and Qwen2.5 14B q4.
Same issue with deepseek R1 671b, it appears in both slow and fast apply edits. For reference I use venice.ai api and the issue is not specific to a single model
This is unfortunately a model intelligence problem -- it happens when the model outputs SEARCH/REPLACE blocks when it goes to edit, but the code it searches for doesn't actually exist. We do some things to get around this like ignoring whitespace differences, but it doesn't always work.
Tools like Windsurf and Cursor do occasionally have these issue too, but they sweep them under the rug a little better. We're working on this. We might want to update our prompt so the LLM outputs only 1 change at a time, but we thought it made more sense to give it some freedom to do whatever it does in its pretraining. Will keep this open for now.