In Aider there was only edit tool, unless you chose whole mode, in which case there was only write tool. In edit mode, the model could only write a new file, was prompted to only use write for a new file, and only by separate diff fence style.
That said, I would not like to see some of the edits that would come out of faster, modern coding tools to replace a whole file. In Aider, rewriting a file can happen with a full edit block of the old file, and then the new file, but the failure rate goes (or used to go) up a lot -- and uses ~double the write tokens.