mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: Diff Edit Failed
This commit is contained in:
parent
fc5d0bdb5a
commit
907ad48371
1 changed files with 7 additions and 0 deletions
|
|
@ -1602,6 +1602,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