Repository navigation
Closes #3602: Suppress ignored Claude notifications #3959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
25030ee
17f1477
636c344
bee9922
0cf31e7
5adc3d5
0a9029e
d9091ba
eb366d3
48ea5c2
a22d3b6
1a010d2
183a71a
9a613da
dcddc10
57574ad
23613f8
0d442bc
270a7c7
76ee9f0
4c7ba93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import Foundation | ||
|
|
||
| enum ClaudeNotificationTypeNormalization { | ||
| static let ignoredTypesDefaultsKey = "claudeCodeIgnoredNotificationTypes" | ||
| static let ignoredTypesEnvironmentKey = "CMUX_CLAUDE_IGNORED_NOTIFICATION_TYPES" | ||
| static let defaultIgnoredTypes: [String] = [] | ||
|
|
||
| static func normalized(_ raw: String) -> String? { | ||
| let collapsedWhitespace = raw | ||
| .trimmingCharacters(in: .whitespacesAndNewlines) | ||
| .components(separatedBy: .whitespacesAndNewlines) | ||
| .filter { !$0.isEmpty } | ||
| .joined(separator: "_") | ||
| let normalized = collapsedWhitespace | ||
| .replacingOccurrences(of: "-", with: "_") | ||
| .lowercased() | ||
| return normalized.isEmpty ? nil : normalized | ||
| } | ||
|
|
||
| static func normalizedSet(_ values: [String]) -> Set<String> { | ||
| Set(values.compactMap(normalized)) | ||
| } | ||
|
|
||
| static func normalizedUniqueList(_ values: [String]) -> [String] { | ||
| var seen = Set<String>() | ||
| return values.compactMap { raw in | ||
| guard let normalized = normalized(raw), | ||
| seen.insert(normalized).inserted else { | ||
| return nil | ||
| } | ||
| return normalized | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -452,6 +452,13 @@ final class CmuxSettingsFileStore { | |
| if let raw = jsonString(section["command"]) { | ||
| snapshot.managedUserDefaults[NotificationSoundSettings.customCommandKey] = .string(raw) | ||
| } | ||
| if let values = jsonStringArray(section["ignoredClaudeNotificationTypes"]) { | ||
| snapshot.managedUserDefaults[ClaudeCodeIntegrationSettings.ignoredNotificationTypesKey] = .stringArray( | ||
| ClaudeCodeIntegrationSettings.normalizedIgnoredNotificationTypes(values) | ||
| ) | ||
| } else if section.keys.contains("ignoredClaudeNotificationTypes") { | ||
| logInvalid("notifications.ignoredClaudeNotificationTypes", sourcePath: sourcePath) | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. App merge ignores hook precedenceMedium Severity When a valid primary Additional Locations (1)Reviewed by Cursor Bugbot for commit 4c7ba93. Configure here. |
||
| } | ||
|
|
||
| private func parseTerminalSection( | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.