feat(ui): add session status notifications

This commit is contained in:
Shantur Rathore
2026-02-09 00:42:33 +00:00
parent 0d4a4ccad7
commit 5bde55f8d4
20 changed files with 1058 additions and 9 deletions

View File

@@ -49,6 +49,12 @@ export interface Preferences {
showUsageMetrics: boolean
autoCleanupBlankSessions: boolean
listeningMode: ListeningMode
// OS notifications
osNotificationsEnabled: boolean
osNotificationsAllowWhenVisible: boolean
notifyOnNeedsInput: boolean
notifyOnIdle: boolean
}
@@ -85,6 +91,11 @@ const defaultPreferences: Preferences = {
showUsageMetrics: true,
autoCleanupBlankSessions: true,
listeningMode: "local",
osNotificationsEnabled: false,
osNotificationsAllowWhenVisible: false,
notifyOnNeedsInput: true,
notifyOnIdle: true,
}
@@ -135,6 +146,12 @@ function normalizePreferences(pref?: Partial<Preferences> & { agentModelSelectio
showUsageMetrics: sanitized.showUsageMetrics ?? defaultPreferences.showUsageMetrics,
autoCleanupBlankSessions: sanitized.autoCleanupBlankSessions ?? defaultPreferences.autoCleanupBlankSessions,
listeningMode: sanitized.listeningMode ?? defaultPreferences.listeningMode,
osNotificationsEnabled: sanitized.osNotificationsEnabled ?? defaultPreferences.osNotificationsEnabled,
osNotificationsAllowWhenVisible:
sanitized.osNotificationsAllowWhenVisible ?? defaultPreferences.osNotificationsAllowWhenVisible,
notifyOnNeedsInput: sanitized.notifyOnNeedsInput ?? defaultPreferences.notifyOnNeedsInput,
notifyOnIdle: sanitized.notifyOnIdle ?? defaultPreferences.notifyOnIdle,
}
}