how the ai models are editing the code snippets???
Posted by lavangamm@reddit | LocalLLaMA | View on Reddit | 4 comments
like in the most of the ai ide's cursor/github copilot or any other ai ide's when there is change in code it seems like they only generate only a small code snippet not generating the whole file again how they are doing it or i have assumed wrong its just they are generating???
any idea on this thing??
Low-Opening25@reddit
by applying patches
ttkciar@reddit
Maybe? When I tested Qwen3 to see if it could generate diffs (appropriate for
patch(1)input), it appeared to to well on the toy examples I gave it, but it's not clear to me that codegen agents are doing that.AXYZE8@reddit
It's either 'apply model' or classic 'search and replace'.
Here's example apply model https://openrouter.ai/relace/relace-apply-3
MidAirRunner@reddit
They're using tool calling to perform multiple find & replace operations. So their output might look like this:
SEARCH >>>
//old code snippet
REPLACE >>>
//new code snippet
The old code snippet gets replaced with the new one.