@@ -60,6 +60,7 @@ export interface PluginConfig {
6060 enabled : boolean
6161 debug : boolean
6262 pruneNotification : "off" | "minimal" | "detailed"
63+ pruneNotificationType : "chat" | "toast"
6364 commands : Commands
6465 turnProtection : TurnProtection
6566 protectedFilePatterns : string [ ]
@@ -91,6 +92,7 @@ export const VALID_CONFIG_KEYS = new Set([
9192 "debug" ,
9293 "showUpdateToasts" , // Deprecated but kept for backwards compatibility
9394 "pruneNotification" ,
95+ "pruneNotificationType" ,
9496 "turnProtection" ,
9597 "turnProtection.enabled" ,
9698 "turnProtection.turns" ,
@@ -173,6 +175,17 @@ function validateConfigTypes(config: Record<string, any>): ValidationError[] {
173175 }
174176 }
175177
178+ if ( config . pruneNotificationType !== undefined ) {
179+ const validValues = [ "chat" , "toast" ]
180+ if ( ! validValues . includes ( config . pruneNotificationType ) ) {
181+ errors . push ( {
182+ key : "pruneNotificationType" ,
183+ expected : '"chat" | "toast"' ,
184+ actual : JSON . stringify ( config . pruneNotificationType ) ,
185+ } )
186+ }
187+ }
188+
176189 if ( config . protectedFilePatterns !== undefined ) {
177190 if ( ! Array . isArray ( config . protectedFilePatterns ) ) {
178191 errors . push ( {
@@ -454,6 +467,7 @@ const defaultConfig: PluginConfig = {
454467 enabled : true ,
455468 debug : false ,
456469 pruneNotification : "detailed" ,
470+ pruneNotificationType : "chat" ,
457471 commands : {
458472 enabled : true ,
459473 protectedTools : [ ...DEFAULT_PROTECTED_TOOLS ] ,
@@ -732,6 +746,8 @@ export function getConfig(ctx: PluginInput): PluginConfig {
732746 enabled : result . data . enabled ?? config . enabled ,
733747 debug : result . data . debug ?? config . debug ,
734748 pruneNotification : result . data . pruneNotification ?? config . pruneNotification ,
749+ pruneNotificationType :
750+ result . data . pruneNotificationType ?? config . pruneNotificationType ,
735751 commands : mergeCommands ( config . commands , result . data . commands as any ) ,
736752 turnProtection : {
737753 enabled : result . data . turnProtection ?. enabled ?? config . turnProtection . enabled ,
@@ -775,6 +791,8 @@ export function getConfig(ctx: PluginInput): PluginConfig {
775791 enabled : result . data . enabled ?? config . enabled ,
776792 debug : result . data . debug ?? config . debug ,
777793 pruneNotification : result . data . pruneNotification ?? config . pruneNotification ,
794+ pruneNotificationType :
795+ result . data . pruneNotificationType ?? config . pruneNotificationType ,
778796 commands : mergeCommands ( config . commands , result . data . commands as any ) ,
779797 turnProtection : {
780798 enabled : result . data . turnProtection ?. enabled ?? config . turnProtection . enabled ,
@@ -815,6 +833,8 @@ export function getConfig(ctx: PluginInput): PluginConfig {
815833 enabled : result . data . enabled ?? config . enabled ,
816834 debug : result . data . debug ?? config . debug ,
817835 pruneNotification : result . data . pruneNotification ?? config . pruneNotification ,
836+ pruneNotificationType :
837+ result . data . pruneNotificationType ?? config . pruneNotificationType ,
818838 commands : mergeCommands ( config . commands , result . data . commands as any ) ,
819839 turnProtection : {
820840 enabled : result . data . turnProtection ?. enabled ?? config . turnProtection . enabled ,
0 commit comments