Skip to content
Discussion options

You must be logged in to vote

This is what we do. The system uses 3 offline diff parsing methods before it resorts to the Intelligent Update API tool.
We start by trying with git apply, then git apply --recount, then we use search & replace technique that tries to find matching fragments.

For more information, the implementation is here:
https://github.com/robertpiosik/CodeWebChat/blob/29f60dc58e7ae19e899a2ae03e607bf6843e5ce2/packages/vscode/src/commands/apply-chat-response-command/handlers/diff-handler.ts

Also check the TIP in readme: "Each edit format has pros and cons. With the most capable models...". tldr; DIFFS are demanding and require a strong model.

I hope it helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kexul
Comment options

Answer selected by kexul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants