Add git branch auto-approve rules

- Allow git branch command by default
- Block destructive options: -d, -D, -m, -M, --delete, --force
- Prevent accidental branch deletion and renaming
This commit is contained in:
Daniel Imms
2025-09-28 11:16:34 +09:00
parent 8daaaff976
commit 9269a1300b
@@ -165,6 +165,13 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
// - See notes on `grep`
'git grep': true,
// git branch
// - `-d`, `-D`, `--delete`: Prevent branch deletion
// - `-m`, `-M`: Prevent branch renaming
// - `--force`: Generally dangerous
'git branch': true,
'/^git branch\\b.*-(d|D|m|M|-delete|-force)\\b/': false,
// #endregion
// #region PowerShell