Skip to content

feat(desktop): add native OS notification when agent response is ready#43255

Open
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:feat/desktop-notification-on-response
Open

feat(desktop): add native OS notification when agent response is ready#43255
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:feat/desktop-notification-on-response

Conversation

@liuhao1024

Copy link
Copy Markdown
Contributor

Problem

When the user minimizes Hermes Desktop or switches to another application, there is no system notification when the agent finishes processing. The user must manually switch back to check.

Competing tools like OpenAI Codex and WorkBuddy send native OS notifications when the agent completes its turn.

Solution

Fire a native OS notification (via Electron's Notification API, already wired in preload.cjsmain.cjs) when:

  1. The agent completes a response (message.complete event)
  2. The window is not focused (!document.hasFocus())
  3. Desktop notifications are enabled (default: on)

Changes

File Change
store/desktop-notifications.ts New — $desktopNotificationsEnabled nanostore with localStorage persistence
use-message-stream.ts Fire native notification on message.complete when window is unfocused
appearance-settings.tsx Settings toggle in Appearance section
i18n/types.ts Type definitions for notification strings
i18n/en.ts English strings
i18n/zh.ts Chinese strings
desktop-notifications.test.ts 5 unit tests

Notification behavior

  • Shows the first non-empty line of the response (truncated to 120 chars)
  • Title: "Hermes"
  • Click: brings window to front (default Electron behavior)
  • Configurable via Settings → Appearance → Desktop Notifications toggle

Screenshots

The toggle appears in Settings → Appearance, below the "Tool Call Display" option.

Closes #43225

When the user minimizes Hermes Desktop or switches to another window,
there is no system notification when the agent finishes processing.
This PR adds a native OS notification (Electron Notification API) that
fires on  when the window is not focused.

Changes:
- Add  nanostore with localStorage persistence
- Fire native notification on message.complete when window is unfocused
- Add settings toggle in Appearance section
- Add i18n strings (en, zh)
- Add 5 unit tests

Closes NousResearch#43225
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: System notification (toast) when agent response is ready

2 participants