Skip to content

feat: add terminal bell setting to enable/disable audio notifications#1194

Merged
pomelo-nwu merged 3 commits intoQwenLM:mainfrom
afarber:add-audio-notification-bell
Dec 13, 2025
Merged

feat: add terminal bell setting to enable/disable audio notifications#1194
pomelo-nwu merged 3 commits intoQwenLM:mainfrom
afarber:add-audio-notification-bell

Conversation

@afarber
Copy link
Copy Markdown
Contributor

@afarber afarber commented Dec 9, 2025

TLDR

Adds a user-facing general.terminalBell setting that lets users toggle the terminal bell notification on/off via the settings dialog. The terminal bell feature already existed but wasn't configurable - this PR wires up the setting so users can disable it if they find it annoying.

Dive Deeper

The terminal bell (\u0007) was already being emitted by notifyTerminalAttention() when:

  • Waiting for tool approval (and terminal is unfocused)
  • A long task (>20 seconds) completes (and terminal is unfocused)

The changes are minimal:

  1. Added terminalBell boolean to settings schema with showInDialog: true
  2. Added enabled option to TerminalNotificationOptions interface
  3. Hook now reads the setting and passes it through to the notification function
  4. Added test coverage for the disabled case

Default is true to preserve existing behavior.

Reviewer Test Plan

  1. Run npm run build && npm run start
  2. Type /settings and verify "Terminal Bell" toggle appears under General category
  3. With setting enabled (default):
  • Ask qwen to edit a file that requires approval
  • Switch to another terminal tab
  • Verify you hear/see the bell when approval is requested
  1. Disable the setting in /settings
  2. Repeat step 3 - verify no bell sounds
  3. Run npx vitest run src/ui/hooks/useAttentionNotifications.test.ts src/utils/attentionNotification.test.ts - all 10 tests should pass

Testing Matrix

🍏 🪟 🐧
npm run yes yes
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Closes #1193

@afarber
Copy link
Copy Markdown
Contributor Author

afarber commented Dec 9, 2025

Smoke tested on macOS 26.1:

image

@BlockHand
Copy link
Copy Markdown
Contributor

BlockHand commented Dec 11, 2025

@afarber Thank you for your contribution! I've already tested it and everything is fine. We will merge this PR.

@pomelo-nwu pomelo-nwu merged commit 693a58d into QwenLM:main Dec 13, 2025
1 check passed
@afarber afarber deleted the add-audio-notification-bell branch December 13, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add user-facing setting to enable/disable terminal bell notifications

3 participants