Merge remote-tracking branch 'origin/main' into gemini-cli-resume-minimal

# Conflicts:
#	docs/cli/cli-reference.md
#	packages/cli/src/gemini.test.tsx
#	packages/cli/src/ui/AppContainer.tsx
#	packages/cli/src/ui/components/DialogManager.tsx
#	packages/cli/src/ui/components/SessionBrowser.tsx
#	packages/cli/src/ui/components/SessionSummaryDisplay.test.tsx
#	packages/cli/src/ui/components/SessionSummaryDisplay.tsx
#	packages/cli/src/ui/components/__snapshots__/SessionSummaryDisplay.test.tsx.snap
#	packages/cli/src/ui/hooks/useSessionBrowser.test.ts
#	packages/cli/src/ui/hooks/useSessionResume.test.ts
#	packages/cli/src/utils/sessionUtils.test.ts
#	packages/cli/src/utils/sessionUtils.ts
#	packages/core/src/services/chatRecordingService.ts
This commit is contained in:
Dmitry Lyalin
2026-03-22 18:35:55 -04:00
1519 changed files with 112159 additions and 35716 deletions
+46 -7
View File
@@ -70,6 +70,15 @@ Browser**:
/resume
```
When typing `/resume` (or `/chat`) in slash completion, commands are grouped
under titled separators:
- `-- auto --` (session browser)
- `list` is selectable and opens the session browser
- `-- checkpoints --` (manual tagged checkpoint commands)
Unique prefixes such as `/resum` and `/cha` resolve to the same grouped menu.
The Session Browser provides an interactive interface where you can perform the
following actions:
@@ -82,6 +91,27 @@ following actions:
created in a different folder, Gemini CLI confirms before continuing there.
- **Esc:** Press **Esc** to exit the Session Browser.
### Manual chat checkpoints
For named branch points inside a session, use chat checkpoints:
```text
/resume save decision-point
/resume list
/resume resume decision-point
```
Compatibility aliases:
- `/chat ...` works for the same commands.
- `/resume checkpoints ...` also remains supported during migration.
## Parallel sessions with Git worktrees
When working on multiple tasks at once, you can use
[Git worktrees](./git-worktrees.md) to give each Gemini session its own copy of
the codebase. This prevents changes in one session from colliding with another.
## Managing sessions
You can list and delete sessions to keep your history organized and manage disk
@@ -132,27 +162,36 @@ session lengths.
### Session retention
To prevent your history from growing indefinitely, enable automatic cleanup
policies in your settings.
By default, Gemini CLI automatically cleans up old session data to prevent your
history from growing indefinitely. When a session is deleted, Gemini CLI also
removes all associated data, including implementation plans, task trackers, tool
outputs, and activity logs.
The default policy is to **retain sessions for 30 days**.
#### Configuration
You can customize these policies using the `/settings` command or by manually
editing your `settings.json` file:
```json
{
"general": {
"sessionRetention": {
"enabled": true,
"maxAge": "30d", // Keep sessions for 30 days
"maxCount": 50 // Keep the 50 most recent sessions
"maxAge": "30d",
"maxCount": 50
}
}
}
```
- **`enabled`**: (boolean) Master switch for session cleanup. Defaults to
`false`.
`true`.
- **`maxAge`**: (string) Duration to keep sessions (for example, "24h", "7d",
"4w"). Sessions older than this are deleted.
"4w"). Sessions older than this are deleted. Defaults to `"30d"`.
- **`maxCount`**: (number) Maximum number of sessions to retain. The oldest
sessions exceeding this count are deleted.
sessions exceeding this count are deleted. Defaults to undefined (unlimited).
- **`minRetention`**: (string) Minimum retention period (safety limit). Defaults
to `"1d"`. Sessions newer than this period are never deleted by automatic
cleanup.