mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
make udiff more clear when some hunks did apply
This commit is contained in:
parent
c7f520129f
commit
79ae43cb59
1 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,10 @@ The diff needs to apply to a unique set of lines in {path}!
|
||||||
{original}```
|
{original}```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
other_hunks_applied = (
|
||||||
|
"Note: some hunks did apply successfully. See the updated source code shown above.\n\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class UnifiedDiffCoder(Coder):
|
class UnifiedDiffCoder(Coder):
|
||||||
edit_format = "udiff"
|
edit_format = "udiff"
|
||||||
|
@ -110,6 +114,8 @@ class UnifiedDiffCoder(Coder):
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
errors = "\n\n".join(errors)
|
errors = "\n\n".join(errors)
|
||||||
|
if len(errors) < len(uniq):
|
||||||
|
errors += other_hunks_applied
|
||||||
raise ValueError(errors)
|
raise ValueError(errors)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue