Improve failed diff edit response

This commit is contained in:
Saoud Rizwan committed 2024-12-26 12:55:00 -08:00
1 parent 2c0340eaaa
commit b2cae6c2fb
2 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -297,7 +297,7 @@ export async function constructNewFileContent(
;[searchMatchIndex, searchEndIndex] = blockMatch
} else {
throw new Error(
`The SEARCH block:\n${currentSearchContent.trimEnd()}\n...does not match anything in the file.\nThis is likely due to differences in whitespace or line endings between the SEARCH block and the actual file. Try again with a more precise SEARCH block.\n(If you keep running into this error, you may use the write_to_file tool as a workaround.)`,
`The SEARCH block:\n${currentSearchContent.trimEnd()}\n...does not match anything in the file.`,
)
}
}