mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
moved console print statements to indicate success or failure of applying edits.
This commit is contained in:
parent
d6de4d3877
commit
11a5379d61
1 changed files with 4 additions and 3 deletions
7
coder.py
7
coder.py
|
@ -377,7 +377,10 @@ class Coder:
|
|||
self.fnames[path] = 0
|
||||
|
||||
edited.add(path)
|
||||
self.do_replace(path, original, updated)
|
||||
if self.do_replace(path, original, updated):
|
||||
self.console.print(f"[red]Applied edit to {fname}")
|
||||
else:
|
||||
self.console.print(f"[red]Failed to apply edit to {fname}")
|
||||
|
||||
return edited
|
||||
|
||||
|
@ -404,11 +407,9 @@ class Coder:
|
|||
content, before_text, after_text
|
||||
)
|
||||
if not new_content:
|
||||
self.console.print(f"[red]Failed to apply edit to {fname}")
|
||||
return
|
||||
|
||||
fname.write_text(new_content)
|
||||
self.console.print(f"[red]Applied edit to {fname}")
|
||||
return True
|
||||
|
||||
def commit(self, history=None, prefix=None, ask=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue