Commit Graph

2 Commits

Author SHA1 Message Date
Jerop Kipruto
e5f4093058 feat(worktree): add /worktree slash command for interactive switching
Implements the /worktree slash command, allowing users to switch the
active session to a new isolated Git worktree without restarting the CLI.

Key changes:
- Added '/worktree' slash command with streamlined messaging.
- Updated 'Config' class to support runtime updates to the target directory.
- Introduced 'WorkingDirectoryChanged' event to notify UI and hooks of path changes.
- Added comprehensive tests and updated documentation.
2026-03-18 14:35:18 -04:00
Jerop Kipruto
94ce4aba8b feat(worktree): add Git worktree support for isolated parallel sessions
Introduces a central Git worktree management system to enable isolated, parallel agent orchestration. This allows running multiple Gemini sessions on different branches within the same repository without file contention.

Key Features:
- Added 'WorktreeService' in @google/gemini-cli-core to manage creation, lifecycle, and cleanup of Git worktrees.
- Implemented smart cleanup logic that detects untracked files and new commits, automatically preserving worktrees with uncommitted work.
- Added '--worktree' (-w) flag to the CLI to launch sessions in fresh, isolated environments.
- Enhanced the session exit experience with detailed status messages and instructions for resuming work in preserved worktrees.
2026-03-18 14:23:08 -04:00