Skip to content

Commit 64b6510

Browse files
authored
Merge branch 'master' into prompt/synthetic
2 parents 10fe8d9 + 72a535c commit 64b6510

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ DCP uses two complementary techniques:
3232

3333
**Automatic Deduplication** — Silently identifies repeated tool calls (e.g., reading the same file multiple times) and keeps only the most recent output. Runs on every request with zero LLM cost.
3434

35-
**AI Analysis** — Uses a language model to semantically analyze conversation context and identify tool outputs that are no longer relevant to the current task. More thorough but incurs LLM cost. Configurable via `strategies`.
35+
**AI Analysis** — Uses a language model to semantically analyze conversation context and identify tool outputs that are no longer relevant to the current task.
3636

3737
## Context Pruning Tool
3838

3939
When `strategies.onTool` is enabled, DCP exposes a `prune` tool to Opencode that the AI can call to trigger pruning on demand.
4040

41-
When `nudge_freq` is enabled, injects reminders (every `nudge_freq` tool results) prompting the AI to consider pruning when appropriate.
41+
Adjust `nudge_freq` to control how aggressively the AI is prompted to prune — lower values trigger reminders sooner and more often.
4242

4343
## How It Works
4444

@@ -66,11 +66,11 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
6666
| `strictModelSelection` | `false` | Only run AI analysis with session or configured model (disables fallback models) |
6767
| `pruning_summary` | `"detailed"` | `"off"`, `"minimal"`, or `"detailed"` |
6868
| `nudge_freq` | `10` | How often to remind AI to prune (lower = more frequent) |
69-
| `protectedTools` | `["task", "todowrite", "todoread", "prune"]` | Tools that are never pruned |
69+
| `protectedTools` | `["task", "todowrite", "todoread", "prune", "batch", "edit", "write"]` | Tools that are never pruned |
7070
| `strategies.onIdle` | `["ai-analysis"]` | Strategies for automatic pruning |
7171
| `strategies.onTool` | `["ai-analysis"]` | Strategies when AI calls `prune` |
7272

73-
**Strategies:** `"ai-analysis"` uses LLM to identify prunable outputs. Empty array disables that trigger. Deduplication runs automatically on every request.
73+
**Strategies:** `"ai-analysis"` uses LLM to identify prunable outputs. Empty array disables that trigger. Deduplication always runs automatically. More strategies coming soon.
7474

7575
```jsonc
7676
{
@@ -79,7 +79,7 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
7979
"onIdle": ["ai-analysis"],
8080
"onTool": ["ai-analysis"]
8181
},
82-
"protectedTools": ["task", "todowrite", "todoread", "prune"]
82+
"protectedTools": ["task", "todowrite", "todoread", "prune", "batch", "edit", "write"]
8383
}
8484
```
8585

lib/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export interface ConfigResult {
3131
const defaultConfig: PluginConfig = {
3232
enabled: true,
3333
debug: false,
34-
protectedTools: ['task', 'todowrite', 'todoread', 'prune', 'batch'],
34+
protectedTools: ['task', 'todowrite', 'todoread', 'prune', 'batch', 'edit', 'write'],
3535
showModelErrorToasts: true,
3636
showUpdateToasts: true,
3737
strictModelSelection: false,
3838
pruning_summary: 'detailed',
39-
nudge_freq: 0,
39+
nudge_freq: 10,
4040
strategies: {
4141
onIdle: ['ai-analysis'],
4242
onTool: ['ai-analysis']

0 commit comments

Comments
 (0)