Feature 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 diff
patch, // untrimmed createTwoFilesPatch(...) output
}
Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode currently sends
permission.askedevents foreditpermissions withmetadata.diff. This isnt applyable as a unified patch because it is run throughtrimDiff(), which removes common indentation from diff content lines.This breaks clients/integrations that consume
permission.askedover 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: