mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +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}```
|
||||
"""
|
||||
|
||||
other_hunks_applied = (
|
||||
"Note: some hunks did apply successfully. See the updated source code shown above.\n\n"
|
||||
)
|
||||
|
||||
|
||||
class UnifiedDiffCoder(Coder):
|
||||
edit_format = "udiff"
|
||||
|
@ -110,6 +114,8 @@ class UnifiedDiffCoder(Coder):
|
|||
|
||||
if errors:
|
||||
errors = "\n\n".join(errors)
|
||||
if len(errors) < len(uniq):
|
||||
errors += other_hunks_applied
|
||||
raise ValueError(errors)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue