Skip to content

Commit 4b5c3b4

Browse files
authored
Merge pull request #140 from Opencode-DCP/chore/remove-prune-thinking-blocks
chore: remove pruneThinkingBlocks from config
2 parents dfd5270 + a0ee808 commit 4b5c3b4

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ DCP uses multiple strategies to reduce context size:
2727

2828
**Deduplication** — Identifies repeated tool calls (e.g., reading the same file multiple times) and keeps only the most recent output. Runs automatically on every request with zero LLM cost.
2929

30-
**Prune Thinking Blocks** — Removes LLM thinking/reasoning blocks from the conversation history.
31-
3230
**On Idle Analysis** — Uses a language model to semantically analyze conversation context during idle periods and identify tool outputs that are no longer relevant.
3331

3432
**Prune Tool** — Exposes a `prune` tool that the AI can call to manually trigger pruning when it determines context cleanup is needed.
3533

34+
*More strategies coming soon.*
35+
3636
Your session history is never modified. DCP replaces pruned outputs with a placeholder before sending requests to your LLM.
3737

3838
## Impact on Prompt Caching
@@ -66,10 +66,6 @@ DCP uses its own config file (`~/.config/opencode/dcp.jsonc` or `.opencode/dcp.j
6666
// Additional tools to protect from pruning
6767
"protectedTools": []
6868
},
69-
// Remove thinking/reasoning LLM blocks
70-
"pruneThinkingBlocks": {
71-
"enabled": false
72-
},
7369
// Exposes a prune tool to your LLM to call when it determines pruning is necessary
7470
"pruneTool": {
7571
"enabled": true,

lib/config.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ export interface Deduplication {
99
protectedTools: string[]
1010
}
1111

12-
export interface PruneThinkingBlocks {
13-
enabled: boolean
14-
}
15-
1612
export interface OnIdle {
1713
enabled: boolean
1814
model?: string
@@ -39,7 +35,6 @@ export interface PluginConfig {
3935
pruningSummary: "off" | "minimal" | "detailed"
4036
strategies: {
4137
deduplication: Deduplication
42-
pruneThinkingBlocks: PruneThinkingBlocks
4338
onIdle: OnIdle
4439
pruneTool: PruneTool
4540
}
@@ -59,9 +54,6 @@ export const VALID_CONFIG_KEYS = new Set([
5954
'strategies.deduplication',
6055
'strategies.deduplication.enabled',
6156
'strategies.deduplication.protectedTools',
62-
// strategies.pruneThinkingBlocks
63-
'strategies.pruneThinkingBlocks',
64-
'strategies.pruneThinkingBlocks.enabled',
6557
// strategies.onIdle
6658
'strategies.onIdle',
6759
'strategies.onIdle.enabled',
@@ -135,11 +127,6 @@ function validateConfigTypes(config: Record<string, any>): ValidationError[] {
135127
errors.push({ key: 'strategies.deduplication.protectedTools', expected: 'string[]', actual: typeof strategies.deduplication.protectedTools })
136128
}
137129

138-
// pruneThinkingBlocks
139-
if (strategies.pruneThinkingBlocks?.enabled !== undefined && typeof strategies.pruneThinkingBlocks.enabled !== 'boolean') {
140-
errors.push({ key: 'strategies.pruneThinkingBlocks.enabled', expected: 'boolean', actual: typeof strategies.pruneThinkingBlocks.enabled })
141-
}
142-
143130
// onIdle
144131
if (strategies.onIdle) {
145132
if (strategies.onIdle.enabled !== undefined && typeof strategies.onIdle.enabled !== 'boolean') {
@@ -237,9 +224,6 @@ const defaultConfig: PluginConfig = {
237224
enabled: true,
238225
protectedTools: [...DEFAULT_PROTECTED_TOOLS]
239226
},
240-
pruneThinkingBlocks: {
241-
enabled: false
242-
},
243227
pruneTool: {
244228
enabled: true,
245229
protectedTools: [...DEFAULT_PROTECTED_TOOLS],
@@ -322,10 +306,6 @@ function createDefaultConfig(): void {
322306
// Additional tools to protect from pruning
323307
"protectedTools": []
324308
},
325-
// Remove thinking/reasoning LLM blocks
326-
"pruneThinkingBlocks": {
327-
"enabled": false
328-
},
329309
// Exposes a prune tool to your LLM to call when it determines pruning is necessary
330310
"pruneTool": {
331311
"enabled": true,
@@ -396,9 +376,6 @@ function mergeStrategies(
396376
])
397377
]
398378
},
399-
pruneThinkingBlocks: {
400-
enabled: override.pruneThinkingBlocks?.enabled ?? base.pruneThinkingBlocks.enabled
401-
},
402379
onIdle: {
403380
enabled: override.onIdle?.enabled ?? base.onIdle.enabled,
404381
model: override.onIdle?.model ?? base.onIdle.model,
@@ -435,7 +412,6 @@ function deepCloneConfig(config: PluginConfig): PluginConfig {
435412
...config.strategies.deduplication,
436413
protectedTools: [...config.strategies.deduplication.protectedTools]
437414
},
438-
pruneThinkingBlocks: { ...config.strategies.pruneThinkingBlocks },
439415
onIdle: {
440416
...config.strategies.onIdle,
441417
protectedTools: [...config.strategies.onIdle.protectedTools]

0 commit comments

Comments
 (0)