anomalyco / anomalyco/opencode
[FEATURE]:feat: support selective acceptance of code changes (per-file/per-hunk) instead of all-or-nothing
Open
@kitlangton is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
Currently opencode applies all code changes unconditionally. If a specific line or file edit is incorrect, the user has no way to reject only that change — it is all or nothing.
Expected Behavior
Provide a mechanism for selective acceptance:
- Per-file accept/reject: Show a list of modified files, let the user choose which to keep
- Per-hunk/per-line accept/reject: Interactive mode similar to
git add -p, allowing the user to review and accept/reject each hunk - Diff preview + confirmation: Show the diff before writing, ask for confirmation
Use Cases
- Most edits in a file are correct but one line has wrong logic
- A particular file change violates project conventions
- User wants to adopt only some suggestions while keeping the rest original
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.