You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Expose applyable patch in edit permission metadata #31625
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
OpenCode currently sends permission.asked events for edit permissions with metadata.diff. This isnt applyable as a unified patch because it is run through trimDiff(), which removes common indentation from diff content lines.
This breaks clients/integrations that consume permission.asked over the server/SSE API and want to preview the proposed edit using standard patch tooling, as in the case in https://github.com/nickjvandyke/opencode.nvim.
Requested enhancement:
Expose an untrimmed, applyable patch separately from the display diff, for example:
metadata: {filepath,diff,// current trimmed display diffpatch,// untrimmed createTwoFilesPatch(...) output}
Activity
zhibinF commentedon Jun 18, 2026
Hi, I'd like to try implementing this.
github-actions commentedon Aug 18, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.