mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
refactor: handle updated edits array returned from apply_edits
This commit is contained in:
parent
f9604633e6
commit
7553104433
2 changed files with 4 additions and 3 deletions
|
@ -1813,9 +1813,10 @@ class Coder:
|
|||
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)!
|
||||
updated_edits = self.apply_edits(edits)
|
||||
if updated_edits is not None:
|
||||
edits = updated_edits
|
||||
edited = set(edit[0] for edit in edits)
|
||||
self.apply_edits(edits)
|
||||
except ValueError as err:
|
||||
self.num_malformed_responses += 1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue