mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
enforce a min similarity to do the edit
This commit is contained in:
parent
7138649bd9
commit
551cc011aa
1 changed files with 2 additions and 0 deletions
2
coder.py
2
coder.py
|
@ -428,6 +428,8 @@ class Coder:
|
||||||
new_content = after_text
|
new_content = after_text
|
||||||
else:
|
else:
|
||||||
new_content = replace_most_similar_chunk(content, before_text, after_text)
|
new_content = replace_most_similar_chunk(content, before_text, after_text)
|
||||||
|
if not new_content:
|
||||||
|
return
|
||||||
|
|
||||||
fname.write_text(new_content)
|
fname.write_text(new_content)
|
||||||
self.console.print(f"[red]Applied edit to {fname}")
|
self.console.print(f"[red]Applied edit to {fname}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue