You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/config.mdx
+75-1Lines changed: 75 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,8 @@ You can configure TUI-specific settings through the `tui` option.
106
106
"scroll_speed": 3,
107
107
"scroll_acceleration": {
108
108
"enabled": true
109
-
}
109
+
},
110
+
"diff_style": "auto"
110
111
}
111
112
}
112
113
```
@@ -115,6 +116,7 @@ Available options:
115
116
116
117
-`scroll_acceleration.enabled` - Enable macOS-style scroll acceleration. **Takes precedence over `scroll_speed`.**
117
118
-`scroll_speed` - Custom scroll speed multiplier (default: `1`, minimum: `1`). Ignored if `scroll_acceleration.enabled` is `true`.
119
+
-`diff_style` - Control diff rendering. `"auto"` adapts to terminal width, `"stacked"` always shows single column.
118
120
119
121
[Learn more about using the TUI here](/docs/tui).
120
122
@@ -178,6 +180,25 @@ You can configure the providers and models you want to use in your OpenCode conf
178
180
179
181
The `small_model` option configures a separate model for lightweight tasks like title generation. By default, OpenCode tries to use a cheaper model if one is available from your provider, otherwise it falls back to your main model.
180
182
183
+
Provider options can include `timeout` and `setCacheKey`:
184
+
185
+
```json title="opencode.json"
186
+
{
187
+
"$schema": "https://opencode.ai/config.json",
188
+
"provider": {
189
+
"anthropic": {
190
+
"options": {
191
+
"timeout": 600000,
192
+
"setCacheKey": true
193
+
}
194
+
}
195
+
}
196
+
}
197
+
```
198
+
199
+
-`timeout` - Request timeout in milliseconds (default: 300000). Set to `false` to disable.
200
+
-`setCacheKey` - Ensure a cache key is always set for designated provider.
201
+
181
202
You can also configure [local models](/docs/models#local). [Learn more](/docs/models).
182
203
183
204
---
@@ -363,6 +384,42 @@ For example, to ensure that the `edit` and `bash` tools require user approval:
363
384
364
385
---
365
386
387
+
### Compaction
388
+
389
+
You can control context compaction behavior through the `compaction` option.
390
+
391
+
```json title="opencode.json"
392
+
{
393
+
"$schema": "https://opencode.ai/config.json",
394
+
"compaction": {
395
+
"auto": true,
396
+
"prune": true
397
+
}
398
+
}
399
+
```
400
+
401
+
-`auto` - Automatically compact the session when context is full (default: `true`).
402
+
-`prune` - Remove old tool outputs to save tokens (default: `true`).
403
+
404
+
---
405
+
406
+
### Watcher
407
+
408
+
You can configure file watcher ignore patterns through the `watcher` option.
0 commit comments