feat(webui): add completion notification sound preference

When a turn finishes while the user is watching the page there is no
audible cue; the existing browser notifications only cover the
background case. Add a `notificationSound` local preference (off by
default, next to `browserNotifications`) and play a short bundled
chime from the `turn_end` handler only while the page is visible, so
background tabs stay silent.

- webui/src/lib/notification-sound.ts: visibility- and preference-gated
  playback of the bundled /notification.wav, one reused Audio element
- Overview settings toggle with localized copy in all 10 locales
- Tests cover the default-off, visible, hidden, reuse and
  playback-rejection paths
This commit is contained in:
Li Fengmin authored and chengyongru committed 2026-09-24 17:34:33 +08:00
1 parent 3ecc3d3556
commit 7c2bf8949c
17 files changed
+156

No files matched your search

+2
View File
@@ -288,6 +288,7 @@
"currentModel": "현재 설정",
"brandLogos": "브랜드 로고",
"browserNotifications": "작업 알림",
"notificationSound": "완료 알림음",
"cliAppsCatalog": "카탈로그",
"cliAppsFilter": "필터",
"engine": "엔진",
@@ -331,6 +332,7 @@
"selectedModelValue": "선택한 모델에 의해 설정됩니다.",
"brandLogos": "설정에서 타사 제공업체와 CLI 로고를 표시합니다.",
"browserNotifications": "이 페이지가 백그라운드에 있을 때만 알립니다. 기본값은 꺼짐입니다.",
"notificationSound": "이 페이지가 포그라운드에 있을 때 턴이 끝나면 짧은 알림음을 재생합니다. 기본적으로 꺼져 있습니다.",
"cliAppsCatalog": "nanobot이 이 컴퓨터에서 사용할 수 있는 명령줄 도구를 설치합니다. 데스크톱 앱은 변경하지 않습니다.",
"cliAppsFilter": "앱, 카테고리 또는 기능으로 검색합니다.",
"logs": "데스크톱 앱의 로그 폴더를 엽니다.",