mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 07:52:03 +00:00
docs: fix permission docs
This commit is contained in:
parent
a63fa64dec
commit
1d621260ff
4 changed files with 189 additions and 167 deletions
|
|
@ -249,7 +249,9 @@ You can configure code formatters through the `formatter` option.
|
|||
|
||||
### Permissions
|
||||
|
||||
You can configure permissions to control what AI agents can do in your codebase through the `permission` option.
|
||||
By default, opencode **allows all operations** without requiring explicit approval. You can change this using the `permission` option.
|
||||
|
||||
For example, to ensure that the `edit` and `bash` tools require user approval:
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
|
|
@ -261,11 +263,6 @@ You can configure permissions to control what AI agents can do in your codebase
|
|||
}
|
||||
```
|
||||
|
||||
This allows you to configure explicit approval requirements for sensitive operations:
|
||||
|
||||
- `edit` - Controls whether file editing operations require user approval (`"ask"` or `"allow"`)
|
||||
- `bash` - Controls whether bash commands require user approval (can be `"ask"`/`"allow"` or a pattern map)
|
||||
|
||||
[Learn more about permissions here](/docs/permissions).
|
||||
|
||||
---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue