mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
feat(core): Render memory hierarchically in context. (#18350)
This commit is contained in:
@@ -328,6 +328,16 @@ export function getProjectHash(projectRoot: string): string {
|
||||
return crypto.createHash('sha256').update(projectRoot).digest('hex');
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a path for reliable comparison.
|
||||
* - Resolves to an absolute path.
|
||||
* - On Windows, converts to lowercase for case-insensitivity.
|
||||
*/
|
||||
export function normalizePath(p: string): string {
|
||||
const resolved = path.resolve(p);
|
||||
return process.platform === 'win32' ? resolved.toLowerCase() : resolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a path is a subpath of another path.
|
||||
* @param parentPath The parent path.
|
||||
|
||||
Reference in New Issue
Block a user