Settings

Theme

Show HN: An Agent That Resolves Merge Conflicts Automatically

github.com

3 points by someguy101010 8 months ago · 2 comments · 1 min read

Reader

Wanted to take a crack at agents so I wrote one for resolving merge conflicts based on this blog post https://sketch.dev/blog/agent-loop. I have found this to be pretty effective on some prs i've thrown at it but I'd run this in a vm because it just runs shell commands locally.

glitch253 8 months ago

I really like your agent-loop blog post.

How does the agent know which to keep and which to discard for a conflict? This would that it has deep contextual information about the codebase it's looking at.

  • someguy101010OP 8 months ago

    Thanks but its not mine! I just found it inspirational.

    > How does the agent know which to keep and which to discard for a conflict? This would that it has deep contextual information about the codebase it's looking at.

    There is no guidance regarding this in the agent. For some conflicts this is important but I have found that for the conflicts I've tried this on it does not need the additional context to do the right thing! There is a option to add additional prompting before it solves a conflict. I will add notes in here to guide it such as "ignore auto generated files, i will generate them again later" so that it doesn't get stuck on generated data.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection