chat
chat copied to clipboard
Regenerate & edit messages
I'm working on adding two features to the chatbot app:
- A “regenerate” option for assistant messages.
- An “edit” option for user messages.
The frontend part is fairly straightforward, but I’m struggling a bit with how to handle message storage in the database. I think adding a new API route might be necessary, like what do you think? From a UX perspective, I believe the best behavior is that when a message is edited or regenerated, the system should delete all subsequent messages (from that one onward) and then regenerate the assistant’s response.