mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge pull request #1524 from vivek-kothandapani/diff-edit-failed
fix: Diff Edit Failed
This commit is contained in:
commit
754a075ac0
2 changed files with 10 additions and 0 deletions
3
.changes/unreleased/Fixed-20250129-095107.yaml
Normal file
3
.changes/unreleased/Fixed-20250129-095107.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
kind: Fixed
|
||||
body: Fix for the "Diff Edit Failed" / "replace_in_file" defects - #1010 #1511 #953
|
||||
time: 2025-01-29T09:51:07.5008655-05:00
|
||||
|
|
@ -1595,6 +1595,13 @@ export class Cline {
|
|||
diff = fixModelHtmlEscaping(diff)
|
||||
diff = removeInvalidChars(diff)
|
||||
}
|
||||
|
||||
// open the editor if not done already. This is to fix diff error when model provides correct search-replace text but Cline throws error
|
||||
// because file is not open.
|
||||
if (!this.diffViewProvider.isEditing) {
|
||||
await this.diffViewProvider.open(relPath)
|
||||
}
|
||||
|
||||
try {
|
||||
newContent = await constructNewFileContent(
|
||||
diff,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue