fix(opencode): ACP Attach structured diff content for edit permissions#15517
Open
MaxDillon wants to merge 3 commits intoanomalyco:devfrom
Open
fix(opencode): ACP Attach structured diff content for edit permissions#15517MaxDillon wants to merge 3 commits intoanomalyco:devfrom
MaxDillon wants to merge 3 commits intoanomalyco:devfrom
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #11653
Type of change
What does this PR do?
This addresses an issue where ACP edit permissions do not include structured diff content, preventing ACP compliant editors to show diff before asking for final edit approval.
Previously, edit permissions only sent metadata (filepath, diff) to requestPermission, and the file was written immediately after approval. No ToolCallContent of type "diff" was attached, so the client could not render a diff preview.
This PR:
This allows ACP clients (e.g. CodeCompanion) to render a proper diff preview.
Non-edit permissions are unchanged.
How did you verify your code works?
Screenshots / recordings
Dev environment configuration
Make change request
Diff visualization in CodeCompanion.nvim
Updated file after change approval
Checklist