mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
refactor: Improve edit handling with dry run and path resolution
This commit is contained in:
parent
5b6be29c1c
commit
e1d55c82b1
2 changed files with 10 additions and 7 deletions
|
@ -1811,12 +1811,11 @@ class Coder:
|
|||
edited = set()
|
||||
try:
|
||||
edits = self.get_edits()
|
||||
edits = self.apply_edits_dry_run(edits)
|
||||
edits = self.prepare_to_edit(edits)
|
||||
|
||||
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
|
||||
|
||||
|
@ -1943,6 +1942,9 @@ class Coder:
|
|||
def apply_edits(self, edits):
|
||||
return
|
||||
|
||||
def apply_edits_dry_run(self, edits):
|
||||
return edits
|
||||
|
||||
def run_shell_commands(self):
|
||||
if not self.suggest_shell_commands:
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue