mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
Refactor PolicyEngine to Core Package (#12325)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,23 @@ export class Storage {
|
||||
return path.join(Storage.getGlobalGeminiDir(), 'policies');
|
||||
}
|
||||
|
||||
static getSystemSettingsPath(): string {
|
||||
if (process.env['GEMINI_CLI_SYSTEM_SETTINGS_PATH']) {
|
||||
return process.env['GEMINI_CLI_SYSTEM_SETTINGS_PATH'];
|
||||
}
|
||||
if (os.platform() === 'darwin') {
|
||||
return '/Library/Application Support/GeminiCli/settings.json';
|
||||
} else if (os.platform() === 'win32') {
|
||||
return 'C:\\ProgramData\\gemini-cli\\settings.json';
|
||||
} else {
|
||||
return '/etc/gemini-cli/settings.json';
|
||||
}
|
||||
}
|
||||
|
||||
static getSystemPoliciesDir(): string {
|
||||
return path.join(path.dirname(Storage.getSystemSettingsPath()), 'policies');
|
||||
}
|
||||
|
||||
static getGlobalTempDir(): string {
|
||||
return path.join(Storage.getGlobalGeminiDir(), TMP_DIR_NAME);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user