From 8a671bc53f3801c4d950021f3460a8bdf86a097e Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 12 Feb 2026 00:27:46 +0900 Subject: [PATCH] Refactor NotificationTrigger settings for improved match field options - Removed the 'toolName' and 'matchField' properties from the default trigger configuration. - Updated the default match field options to include a new option for matching against the entire JSON-serialized input. --- src/main/services/infrastructure/TriggerManager.ts | 2 -- .../settings/NotificationTriggerSettings/utils/trigger.ts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/services/infrastructure/TriggerManager.ts b/src/main/services/infrastructure/TriggerManager.ts index 4dd0a658..b1ad8961 100644 --- a/src/main/services/infrastructure/TriggerManager.ts +++ b/src/main/services/infrastructure/TriggerManager.ts @@ -33,9 +33,7 @@ export const DEFAULT_TRIGGERS: NotificationTrigger[] = [ name: '.env File Access Alert', enabled: true, contentType: 'tool_use', - toolName: 'Any Tool', mode: 'content_match', - matchField: 'command', matchPattern: '/.env', isBuiltin: true, color: 'red', diff --git a/src/renderer/components/settings/NotificationTriggerSettings/utils/trigger.ts b/src/renderer/components/settings/NotificationTriggerSettings/utils/trigger.ts index fb9803ae..e0d42b77 100644 --- a/src/renderer/components/settings/NotificationTriggerSettings/utils/trigger.ts +++ b/src/renderer/components/settings/NotificationTriggerSettings/utils/trigger.ts @@ -76,7 +76,8 @@ export function getAvailableMatchFields( { value: 'args', label: 'Arguments' }, ]; default: - return []; + // "Any Tool" - match against the entire JSON-serialized input + return [{ value: '', label: 'Full Input (JSON)' }]; } }