This pull request adds a feature that allows users to configure auto-approved commands via a `safeCommands` array in the configuration file. ## Related Issue #380 ## Changes - Added loading and validation of the `safeCommands` array in `src/utils/config.ts` - Implemented auto-approval logic for commands matching `safeCommands` prefixes in `src/approvals.ts` - Added test cases in `src/tests/approvals.test.ts` to verify `safeCommands` behavior - Updated documentation with examples and explanations of the configuration
This commit is contained in:
@@ -288,6 +288,9 @@ Codex looks for config files in **`~/.codex/`**.
|
||||
model: o4-mini # Default model
|
||||
fullAutoErrorMode: ask-user # or ignore-and-continue
|
||||
notify: true # Enable desktop notifications for responses
|
||||
safeCommands:
|
||||
- npm test # Automatically approve npm test
|
||||
- yarn lint # Automatically approve yarn lint
|
||||
```
|
||||
|
||||
You can also define custom instructions:
|
||||
|
||||
Reference in New Issue
Block a user