Support more diff types for diff patching
#148 aberto em 23 de out. de 2025
Métricas do repositório
- Stars
- (41 estrelas)
- Métricas de merge de PR
- (Mesclagem média 3d 13h) (2 fundiu PRs em 30d)
Description
Currently, diff patching is using a simpler but kinda-made-up diff format (the "pseudo-search-replace-diff" format).
It would be good to support different diff formats so that Neuro/Evil/Jippity/Gary can write in whatever format they desire.
Currently, I'm targeting the following diff formats:
- XML diff format
- Git diff format
I'm also considering the following diff formats:
- v4a diff format (or whatever it is that OpenAI says they use here: https://cookbook.openai.com/examples/gpt4-1_prompting_guide#appendix-generating-and-applying-file-diffs)
- Unix
diff/patchdiff format (are these similar enough to git's that we can consolidate/omit?)
Plan is to allow them to specify the diff format using a separate parameter (actionData.params?.format), then validate the diff format using validators. Alternatively, we could just detect the diff format based on heuristics, but what happens if they pasted multiple formats into the input (e.g. as part of code?), and also it's just simpler to let them specify the format separately, I think.