@@ -13,14 +13,16 @@ export interface PluginConfig {
1313 model ?: string // Format: "provider/model" (e.g., "anthropic/claude-haiku-4-5")
1414 showModelErrorToasts ?: boolean // Show toast notifications when model selection fails
1515 pruningMode : "auto" | "smart" // Pruning strategy: auto (deduplication only) or smart (deduplication + LLM analysis)
16+ pruning_summary : "off" | "minimal" | "detailed" // UI summary display mode
1617}
1718
1819const defaultConfig : PluginConfig = {
1920 enabled : true , // Plugin is enabled by default
2021 debug : false , // Disable debug logging by default
2122 protectedTools : [ 'task' , 'todowrite' , 'todoread' ] , // Tools that should never be pruned (including stateful tools)
2223 showModelErrorToasts : true , // Show model error toasts by default
23- pruningMode : 'smart' // Default to smart mode (deduplication + LLM analysis)
24+ pruningMode : 'smart' , // Default to smart mode (deduplication + LLM analysis)
25+ pruning_summary : 'detailed' // Default to detailed summary
2426}
2527
2628const GLOBAL_CONFIG_DIR = join ( homedir ( ) , '.config' , 'opencode' )
@@ -109,6 +111,12 @@ function createDefaultConfig(): void {
109111 // "smart": Deduplication + AI analysis for intelligent pruning (recommended)
110112 "pruningMode": "smart",
111113
114+ // Pruning summary display mode:
115+ // "off": No UI summary (silent pruning)
116+ // "minimal": Show tokens saved and count (e.g., "Saved ~2.5K tokens (6 tools pruned)")
117+ // "detailed": Show full breakdown by tool type and pruning method (default)
118+ "pruning_summary": "detailed",
119+
112120 // List of tools that should never be pruned from context
113121 // "task": Each subagent invocation is intentional
114122 // "todowrite"/"todoread": Stateful tools where each call matters
@@ -161,7 +169,8 @@ export function getConfig(ctx?: PluginInput): PluginConfig {
161169 protectedTools : globalConfig . protectedTools ?? config . protectedTools ,
162170 model : globalConfig . model ?? config . model ,
163171 showModelErrorToasts : globalConfig . showModelErrorToasts ?? config . showModelErrorToasts ,
164- pruningMode : globalConfig . pruningMode ?? config . pruningMode
172+ pruningMode : globalConfig . pruningMode ?? config . pruningMode ,
173+ pruning_summary : globalConfig . pruning_summary ?? config . pruning_summary
165174 }
166175 logger . info ( 'config' , 'Loaded global config' , { path : configPaths . global } )
167176 }
@@ -181,7 +190,8 @@ export function getConfig(ctx?: PluginInput): PluginConfig {
181190 protectedTools : projectConfig . protectedTools ?? config . protectedTools ,
182191 model : projectConfig . model ?? config . model ,
183192 showModelErrorToasts : projectConfig . showModelErrorToasts ?? config . showModelErrorToasts ,
184- pruningMode : projectConfig . pruningMode ?? config . pruningMode
193+ pruningMode : projectConfig . pruningMode ?? config . pruningMode ,
194+ pruning_summary : projectConfig . pruning_summary ?? config . pruning_summary
185195 }
186196 logger . info ( 'config' , 'Loaded project config (overrides global)' , { path : configPaths . project } )
187197 }
0 commit comments