eca icon indicating copy to clipboard operation
eca copied to clipboard

Support export/import chats

Open ericdallo opened this issue 1 year ago • 12 comments

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

ericdallo avatar Jul 30 '25 17:07 ericdallo

Is this still a wanted feature? I wanna understand better the use cases

ericdallo avatar Mar 15 '26 14:03 ericdallo

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 avatar Mar 17 '26 15:03 razzmatazz

@razzmatazz we already support that via /resume, all chats are auto saved after finishing the prompt

ericdallo avatar Mar 17 '26 16:03 ericdallo

But my Q is, do chats survive server restarts? /resume says "No past chats found to resume" when attempting to list these.

razzmatazz avatar Mar 18 '26 16:03 razzmatazz

yes, every time a chat finish a prompt, it saves to ~/.cache/eca which eca reads when initializing to offer via /resume

ericdallo avatar Mar 18 '26 16:03 ericdallo

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 avatar Apr 01 '26 13:04 ovistoica

@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.

ericdallo avatar Apr 01 '26 14:04 ericdallo

@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

ovistoica avatar Apr 01 '26 15:04 ovistoica

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 /resume even if not in cache

georgiansarghi avatar Jun 13 '26 11:06 georgiansarghi

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

ericdallo avatar Jun 30 '26 19:06 ericdallo

Implemented via /export <file|dir> and /import <file> (2cd74a40a), will be in the next release.

ericdallo avatar Jul 01 '26 00:07 ericdallo

This is really cool!

zikajk avatar Jul 01 '26 06:07 zikajk