Comment by basch

20 hours ago

I have no idea when I’m being lied to anymore but allegedly Aider and Cursor work the way I described, although cursor is using a second model to apply the edit.

They all do something similar under the hood. Patching files is not a trivial task when you only have the changed text content and not the actual file structure to work with. It kind of works, but is fundamentally limited by the LLM output architecture.

Cursor has a dedicated merge model. It takes input like this:

    class Foo {
        // ....
        int calculation() {
            return 42;
        }
    
        // more stuff
    }

where the main model emits something that is a sort of casual under-specified diff format and the merge model figures out how to interpret it as a patch.