ui: export full message tree instead of active path only#25501
Conversation
downloadConversation serialized activeMessages, the root -> currNode path, so exporting a conversation with edited or regenerated messages dropped every alternate version and kept only the selected one. Fetch the whole message tree via getConversationMessages so the export carries all message versions, matching the multi-conversation export path which already did this. Keep the active conversation as the header source to preserve an up-to-date currNode. Forks are separate conversations, each with its own convId, and are exported on their own.
|
Import test OK. Untouched. |
|
Nice! I will give it a try. The output in your example looks more like what I was expecting when I tried exporting; for example, |
|
You can test it, the code was actually designed for this all along; it must be a minor regression or something that was overlooked during a refactor. Each conversation is a tree structure, and the conversation ID remains the same. |
|
EDIT: Never mind, it is working.
|
|
Works great! I tried many different combinations of editing messages (including the first message) and everything seems preserved in the exports. Thanks for doing this! |
Overview
When you export a single conversation from the sidebar (the "..." menu -> Export), you now get every version of your messages, not just the one currently displayed.
Before, if you had edited or regenerated a message, the exported file only contained the version you were looking at. The other versions were silently left out, so re-importing the file gave you back a trimmed conversation with your alternate takes gone.
Now the export contains the complete message tree of that conversation, so importing it restores everything exactly as it was, with all your edited and regenerated versions still navigable ("<" and ">" under messages).
Forks are untouched: a fork is its own conversation, so it keeps its own separate export.
Additional information
Before :
After :
Fixes #25451
Requirements