Ask GPT to retry if original block is not found

This commit is contained in:
Paul Gauthier 2023-07-19 17:24:53 -03:00
parent 691c013272
commit 4bc35a7376
3 changed files with 14 additions and 3 deletions

View file

@ -532,6 +532,7 @@ class Coder:
edited, edit_error = self.apply_updates()
if edit_error:
self.update_cur_messages(content, set())
return edit_error
# TODO: this shouldn't use content, should use self.partial_....
@ -1006,7 +1007,7 @@ class Coder:
apply_update_errors = 0
def apply_updates(self):
max_apply_update_errors = 2
max_apply_update_errors = 3
try:
edited = self.update_files()