fix: handle updated edits array in apply_edits return value

This commit is contained in:
Paul Gauthier 2024-10-29 14:10:19 -07:00 committed by Paul Gauthier (aider)
parent eb9a73bdb0
commit f9604633e6
2 changed files with 4 additions and 1 deletions

View file

@ -1812,6 +1812,8 @@ class Coder:
try:
edits = self.get_edits()
edits = self.prepare_to_edit(edits)
# ai: handle the case where apply_edits returns an updated edits array (it may just return None, meaning use the existing edits array)!
edited = set(edit[0] for edit in edits)
self.apply_edits(edits)
except ValueError as err: