Skip to content

Commit 2f40ea3

Browse files
committed
readme: merge config precedence into configuration section
1 parent 3e8377e commit 2f40ea3

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ Prunes inputs from errored tool calls after a configurable number of turns (defa
4242

4343
## Configuration
4444

45-
DCP uses its own config file:
45+
DCP uses its own config file, searched in order:
4646

47-
- Global: `~/.config/opencode/dcp.jsonc` (or `dcp.json`), created automatically on first run
48-
- Custom config directory: `$OPENCODE_CONFIG_DIR/dcp.jsonc` (or `dcp.json`), if `OPENCODE_CONFIG_DIR` is set
49-
- Project: `.opencode/dcp.jsonc` (or `dcp.json`) in your project's `.opencode` directory
47+
1. Global: `~/.config/opencode/dcp.jsonc` (or `dcp.json`), created automatically on first run
48+
2. Custom config directory: `$OPENCODE_CONFIG_DIR/dcp.jsonc` (or `dcp.json`), if `OPENCODE_CONFIG_DIR` is set
49+
3. Project: `.opencode/dcp.jsonc` (or `dcp.json`) in your project's `.opencode` directory
50+
51+
Each level overrides the previous, so project settings take priority over global. Restart OpenCode after making config changes.
5052

5153
> [!IMPORTANT]
5254
> Defaults are applied automatically. Expand this if you want to review or override settings.
@@ -208,14 +210,6 @@ The `protectedTools` arrays in `commands` and `strategies` add to this default l
208210

209211
For the `compress` tool, `compress.protectedTools` ensures specific tool outputs are appended to the compressed summary. It defaults to an empty array `[]` but always inherently protects `task`, `skill`, `todowrite`, and `todoread`.
210212

211-
### Config Precedence
212-
213-
Settings are merged in order:
214-
Defaults → Global (`~/.config/opencode/dcp.jsonc`) → Config Dir (`$OPENCODE_CONFIG_DIR/dcp.jsonc`) → Project (`.opencode/dcp.jsonc`).
215-
Each level overrides the previous, so project settings take priority over config-dir and global, which take priority over defaults.
216-
217-
Restart OpenCode after making config changes.
218-
219213
## Impact on Prompt Caching
220214

221215
LLM providers cache prompts based on exact prefix matching. When DCP prunes content, it changes messages, which invalidates cached prefixes from that point forward.

0 commit comments

Comments
 (0)