When using commands such as ellama-change-code, the answer written to the current buffer should be one atomic modification that can be undone all at once instead of being as many insertions as needed. The reason behind that is that if a user is not satisfied by the changes they should be able to rollback from calling ellama with one undo. Nonetheless, the current behavior imposes the user to undo as many changes as needed and sometimes it is not even possible since the number of registered modifications is too large. The only option being to first save the file, then call ellama and be prepared to kill the buffer without saving to reopen the file if the changes are not recoverable.
This would prevent users from losing code if they did not think of saving their work before asking ellama to generate the doc (like I did :^) )
Hello there,
When using commands such as
ellama-change-code
, the answer written to the current buffer should be one atomic modification that can be undone all at once instead of being as many insertions as needed. The reason behind that is that if a user is not satisfied by the changes they should be able to rollback from calling ellama with oneundo
. Nonetheless, the current behavior imposes the user to undo as many changes as needed and sometimes it is not even possible since the number of registered modifications is too large. The only option being to first save the file, then call ellama and be prepared to kill the buffer without saving to reopen the file if the changes are not recoverable.This would prevent users from losing code if they did not think of saving their work before asking ellama to generate the doc (like I did :^) )
Thank you in advance.