Support export/import chats
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
this would allow users export chat histories to import and other machines and unlock the power to use it as context for other chats, like @past-chats
Is this still a wanted feature? I wanna understand better the use cases
May not be related but my question is does this issue entail chat persistence across server restarts? I must have missed configuration options for this but I cannot figure it out if it's possible to access/save/load chats from last server session.
@razzmatazz we already support that via /resume, all chats are auto saved after finishing the prompt
But my Q is, do chats survive server restarts? /resume says "No past chats found to resume" when attempting to list these.
yes, every time a chat finish a prompt, it saves to ~/.cache/eca which eca reads when initializing to offer via /resume
Yes, I really want this. Usecases:
- Export a chat but taking out all of the tool calls that would clutter it. THis is useful if I want to transfer context to another agent in another project where resume isn't possible
- Export a chat to share with the team for incident reports to show how a conclusion was reached
@ovistoica we already have eca-chat-save-to-file, besides the tool call clutter, does that helps solves your second point?
Maybe it's just a matter of evolve that, while import a chat would be mention that chat file.
@ovistoica we already have
eca-chat-save-to-file, besides the tool call clutter, does that helps solves your second point? Maybe it's just a matter of evolve that, while import a chat would be mention that chat file.
Yes. Ideally if you can also import with chat-ids intact to benefit from caching
But yes, it does pretty much solve the issue regarding importing in another chat. Didn't know about eca-save-chat-to-file
Ideally export would preserve enough structured data to restore the chat as a real ECA chat, not just a readable transcript.
Currently eca-chat-save-to-file is useful as a Markdown/text archive, but it does not appear to be restorable as an ECA chat. If the workspace cache under ~/.cache/eca is deleted, /resume has nothing to load, and the saved Markdown file cannot be imported back into the structured chat DB/cache.
A structured export/import would be useful for:
- moving chats between machines
- chats available with
/resumeeven if not in cache
Got it , that makes sense now @georgiansarghi , thanks for the examples, I believe we can have that yes, maybe a command like:
/export <filepath> and one /import <filepath>?
In those commands we would try to preserve not only the chat messages but chosen model, variant, agent, usage data, etc. c/c @zikajk
Implemented via /export <file|dir> and /import <file> (2cd74a40a), will be in the next release.
This is really cool!