docs: fix deprecated settings cleanup for all platforms
This commit is contained in:
40
README.md
40
README.md
@@ -172,9 +172,45 @@ If you see repeated warnings like:
|
||||
The system configuration contains deprecated settings: [experimental.codebaseInvestigatorSettings]
|
||||
```
|
||||
|
||||
Fix:
|
||||
The key exists in **system-level** config files. Fix all locations:
|
||||
|
||||
```bash
|
||||
python3 -c "import json; p='$HOME/.gemini/settings.json'; d=json.load(open(p)); e=d.get('experimental',{}); e.pop('codebaseInvestigatorSettings',None); [d.pop('experimental') for _ in '' if not e and 'experimental' in d]; json.dump(d,open(p,'w'),indent=2); print('Done')"
|
||||
# Linux
|
||||
for f in "$HOME/.gemini/settings.json" "/etc/gemini-cli/settings.json" "/etc/gemini-cli/system-defaults.json"; do
|
||||
[ -f "$f" ] && python3 -c "
|
||||
import json,sys
|
||||
d=json.load(open('$f'))
|
||||
e=d.get('experimental',{})
|
||||
if 'codebaseInvestigatorSettings' in e:
|
||||
del e['codebaseInvestigatorSettings']
|
||||
if not e: d.pop('experimental',None)
|
||||
json.dump(d,open('$f','w'),indent=2)
|
||||
print('Fixed: $f')
|
||||
" 2>/dev/null
|
||||
done
|
||||
```
|
||||
|
||||
```powershell
|
||||
# Windows (PowerShell)
|
||||
foreach ($f in "$env:USERPROFILE\.gemini\settings.json", "C:\ProgramData\gemini-cli\settings.json", "C:\ProgramData\gemini-cli\system-defaults.json") {
|
||||
if (Test-Path $f) { $d = Get-Content $f | ConvertFrom-Json; if ($d.experimental.codebaseInvestigatorSettings) { $d.experimental.PSObject.Properties.Remove('codebaseInvestigatorSettings'); $d | ConvertTo-Json -Depth 10 | Set-Content $f; Write-Host "Fixed: $f" } }
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
# macOS
|
||||
for f in "$HOME/.gemini/settings.json" "/Library/Application Support/GeminiCli/settings.json"; do
|
||||
[ -f "$f" ] && python3 -c "
|
||||
import json
|
||||
d=json.load(open('$f'))
|
||||
e=d.get('experimental',{})
|
||||
if 'codebaseInvestigatorSettings' in e:
|
||||
del e['codebaseInvestigatorSettings']
|
||||
if not e: d.pop('experimental',None)
|
||||
json.dump(d,open('$f','w'),indent=2)
|
||||
print('Fixed: $f')
|
||||
" 2>/dev/null
|
||||
done
|
||||
```
|
||||
|
||||
### Gemini CLI: Session cleanup disabled
|
||||
|
||||
Reference in New Issue
Block a user