mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-29 23:50:09 +00:00
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