how to access previous chats to continue the same project after restarting the cli?
Guys, I'm pretty sure this is so simple, so forgive me. I started working on a project and the context window was still very low and the project was going perfectly, but I had to turn the pc off and come back later, but when I start gemini in the same directory where the project is the entire chat is reset, the previous conversation and context is totally gone (I though, obviously, its just a terminal), but is there even a way to somehow re-load the previous conversation? is it not saved anywhere? do we need to save it manually? or is it the way i start the chat or the project? Thank you, I hope is not a duplicated issue.
The /chat commands already exist for this! Here's how to save and resume your conversations:
Save your current chat: /chat save my-project-name
List saved chats: /chat list
Resume a previous chat: /chat resume my-project-name
Delete old chats: /chat delete my-project-name
Your chats are saved locally at:
- Windows: C:\Users<shivas1432[username]>\AppData\Roaming\google-generative-ai\checkpoints\
- Linux/macOS: i was not sure about this
This feature exists but isn't well documented - that's why we're improving the README to make it more discoverable.
Thank you @shivas1432! I was trying to find it in the documentation myself, i spent hours not lying. This is going to be very helpful, I'm pretty sure most people didn't even know it's possible.
@JuanDechia Exactly. That's the whole point of this PR. The /chat commands work great but they're buried in the documentation - I couldn't find them either when I first needed this feature.
The goal here is to make this functionality front and center in the README so people don't have to hunt through docs to discover it. Should save a lot of frustration for new users who restart the CLI and wonder where their context went.
Thanks for the feedback on the storage paths too - I wasn't 100% sure about the Linux/macOS one so appreciate the confirmation that it's working as documented.
The /chat commands already exist for this! Here's how to save and resume your conversations:
Save your current chat: /chat save my-project-name
List saved chats: /chat list
Resume a previous chat: /chat resume my-project-name
Delete old chats: /chat delete my-project-name
Your chats are saved locally at:
- Windows: C:\Users<shivas1432[username]>\AppData\Roaming\google-generative-ai\checkpoints\
- Linux/macOS: i was not sure about this
This feature exists but isn't well documented - that's why we're improving the README to make it more discoverable.
Thank you very much for this
Thank you for your answer to the question
This is documented here https://google-gemini.github.io/gemini-cli/docs/cli/commands.html, but after new session I don't see previous checkpoints, just like OP describes, and the directory described in the link doesn't exist either, so might be outdated/misconfiguration paths maybe.
Just saving the checkpoint with the unique name allowed me to search it in file system, on Windows, I find that in C:\Users\myusername\.gemini\tmp\randomhashnumber, so it might just not be saved/loaded from the correct filesystem location maybe, didn't try to manually move/copy it to see if that would work, but hope this helps to solve the issue.
I found some json files on Linux in ~/.gemini/tmp/<hash>/chats/*.json but when I do /chat list I get "No saved conversation checkpoints found" so yeah, this is a very incomplete implementation. Context is the product of money and time spent, it is valuable IP to the user and for this cli to treat it so carelessly and require users to manually save is a reflection of priorities.
Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.
It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.
Thank you for your contribution!
There should be a configurable autosave option, why wouldn't this autosave chats by default? WTF.
There should be a configurable autosave option, why wouldn't this autosave chats by default? WTF.
I was in the same situation, so I found their docs that with either gemini-- resume or /resume on the CLI, you can continue the conversation.
There should be a configurable autosave option, why wouldn't this autosave chats by default? WTF.
I was in the same situation, so I found their docs that with either
gemini-- resumeor/resumeon the CLI, you can continue the conversation.
Thank you!