I’m starting a new thread about this so it doesn’t get lost, since it stops working with around 200 lines.
Then it almost always fails with all models, especially Claude. Claude can’t fix it anymore, Gemini manages to repair it occasionally, but it takes far too long and is unnecessary.
The AI calls it “replace_file_content” and “multi_replace_file_content”
This means when content, specifically individual lines, should only be replaced with small fixes. In the AI past, the entire file was rewritten. “Replace Content” would prevent this, which I think is great, but unfortunately, it’s not working yet but the AI in antigravity is using it by default. On the contrary, actually it consumes more tokens than if the file were completely recreated, because the repair takes a really long time and is constantly being corrected.
I strongly suspect that when changes occur and the number of lines change, the AI attempts to make the changes on the wrong line the second time.
The AI first looks at the file, sees where the changes need to be made (e.g., changes in lines 3-5 and lines 223-225), and then implements them rigidly. The content input for the line is probably missing here; it would likely work better if the content was also checked, and not just the line number. I mean, I’m just speculating, but that seems logical but on the other side this is not the case with smaller files.
In any case, in my current project i have more and more fails here, so I’m doing it manually now. But yeah, I’m not up for that anymore, the AI should do that ;D