Replies: 5 comments 5 replies
-
My PR #4401 implements automatic chat saving with a lot of detailed information—thoughts, timestamps, model info, etc. |
Beta Was this translation helpful? Give feedback.
-
See #3965 for both a technical answer (where and how it is stored) and some code (of mine) about it. The best is to ask Gemini ♊ herself, having got cloned this very repo. |
Beta Was this translation helpful? Give feedback.
-
Here's how the chat history is saved:
The JSON file contains an array of objects, where each object represents a message in the conversation history. Each message object has a role (user or model) and parts (the content of the message). Since the output is structured JSON, you can easily parse it for your own workflows. There is no specific API endpoint for this, but you can directly access the JSON files from the file system. |
Beta Was this translation helpful? Give feedback.
-
Correct #4974 (comment). Re: "Where exactly does /chat save filename persist the session" - my Readme https://github.com/Manamama/Puzzles_for_AIs/tree/main/code/Gemini%20CLI%20logs%20prettifier says it verbatim, q.v. :
assuming the default config. The rest of the Readme plus the program itself actually parse these JSONs (which are pretty standard anyhow). You can even have Gemini ingest these "verbatim" - I often do so when the session is beyond broken or non-restorable, see e.g. #5006 (comment) for a very recent case where I needed to do just that. ( |
Beta Was this translation helpful? Give feedback.
-
i can't find the /chat save list that i saved in the previous session, even though i checked manually it exists in /.gemini/tmp/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using the Gemini CLI for a few hours now, and I must say — I'm genuinely impressed by how well everything is working so far. I'm running it inside a Docker environment, integrated with tools from the security domain, and I'm currently building custom Markdown files to extend the system for my own specific use cases.
That said, here’s the core of my question:
I noticed that it's possible to save a conversation using the /chat save filename command. That’s a great feature — but it raises the question: who is this feature really for, and how can the saved content be accessed and reused effectively?
Personally, I prefer to evaluate and analyze my sessions afterwards — using my own toolsets and various AI systems hosted on my servers. Especially when it comes to longer sessions focused on optimization or identifying errors in system behavior, having access to the entire conversation is crucial. It allows me to refine and adapt my Markdown templates and YAML definitions with precision.
So here’s the big question:
I would greatly appreciate a clear technical answer on this — it would enable me to better align Gemini CLI with my custom development pipeline and make the most out of its capabilities.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions