Files
gemini-cli/packages
gemini-cli[bot] ad74c9c3af fix(core): robustly compare workspace and home directory paths
This PR addresses issue #27075 where redundant command namespace conflicts were detected when running the CLI from the user's home directory.

The root cause was identified as discrepancies in path formatting (e.g., Windows short names, trailing slashes, or `\\?\` prefixes) that survived `normalizePath` and `resolveToRealPath`.

Changes:
- Refactored `isWorkspaceHomeDir` in `Storage.ts` to use `path.relative` on resolved real paths.
- Added explicit stripping of the Windows long path prefix (`\\?\`) before comparison to ensure robust unification.
- Added a new focused test file `packages/core/src/config/storage.path.test.ts` verifying various path formatting edge cases.

Verified with `npm test -w @google/gemini-cli-core -- src/config/storage.path.test.ts` and full build/lint/typecheck.

cc @google-gemini/gemini-cli-maintainers
2026-05-15 02:50:51 +00:00
..