All-Hands-AI / openhands-resolver

A system that tries to resolve all issues on a github repo with OpenHands.
MIT License
85 stars 20 forks source link

[Bug]: Check if file already exists in localization details #333

Closed malhotra5 closed 3 days ago

malhotra5 commented 3 days ago

This bug was introduced in #217 when addressing #189

Bug description

When an inline review comment is left, we provide openhands-resolver details on which file the review comment applies to. If multiple comments are left for the same file, resolver receives duplicate instances in Review thread files details. Example attached below

# Issues addressed 
[
    "![image](https://github.com/user-attachments/assets/e411289b-217b-44d4-8b5a-5eba2e447b20)\r\n"
]

# Review comments
None

# Review threads
[
    "@test-repo-helper change Openhands resovler to lowercase inline code\n@test-repo-helper test another comment underneath the same thread\n---\nlatest feedback:\nthis is a thread comment\n"
]

# Review thread files
[
    "README.md",
    "README.md",
    "README.md"
]

Summary of changes

Don't add another file instance if it already exists in the context