feat(cli): add --delete flag to /exit command for session deletion (#19332)

Co-authored-by: David Pierce <davidapierce@google.com>
This commit is contained in:
Abdul Tawab
2026-04-29 22:20:57 +05:00
committed by GitHub
parent 2cf0c75a04
commit 011c0f9bc0
9 changed files with 272 additions and 2 deletions

View File

@@ -61,6 +61,19 @@ gemini --list-sessions
gemini --delete-session 1
```
### Scenario: Delete session on exit
If you're doing a one-off task and don't want to leave any session history
behind, use the `--delete` flag when exiting:
```
/exit --delete
```
This removes the current session's conversation history and tool output files
before exiting. It's useful for privacy-sensitive tasks or quick one-off
interactions.
## How to rewind time (Undo mistakes)
Gemini CLI's **Rewind** feature is like `Ctrl+Z` for your workflow.