证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
证据已验证Plugin Bundle界面与体验dsh-tui Profile

dsh-chime-sound

为 dsh-tui 的回复完成和用户提问提示提供 Windows 通知声音。

快速了解

它能做什么

为 dsh-tui 的回复完成和用户提问提示提供 Windows 通知声音。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

使用场景
界面与体验通知终端 UI个性化
适配技术
dsh-tuidshwindows
兼容性

dsh-tui Profile
dsh-tui 0.10.x; dsh 0.1.2-rc.1+; Node ^22.19 || >=24

可信度与状态

证据已验证
核对日期 2026/9/13 UTC 14:12

有代码证据的贡献

它为 DSH 增加什么

通知声音设置区

为 dsh-tui 中的回复完成和用户提问提示添加可选声音与音量控制。

机制证据

选择前先看

dsh-chime-sound 会在 dsh-tui 中添加“Notice Sounds(通知声音)”设置区。它为回复完成和 ask_user_question 事件提供 9 组可选声音,也可逐项关闭;可分别设置终端聚焦和未聚焦时的声音,并提供仅影响插件的 0–150% 音量控制。该包通过 DSH bundle 挂载。

适合谁

希望在智能体完成一轮回复或需要回答问题时获得声音提醒的 Windows dsh-tui 用户。

常见任务

  • 离开终端时,通过不同声音得知回复已经完成。
  • 当智能体调用 ask_user_question 时获得提醒。
  • 在 dsh-tui 设置或 chime 配置命名空间中调整提醒声音和插件音量。

权限与数据

使用本地 Windows API 播放随包声音,并判断终端是否处于前台。

权限
  • 通过 winmm.dll 使用 Win32 PlaySoundW。
  • 通过 user32.dll 读取前台窗口和控制台窗口信息。
数据处理
  • 现有证据描述的是本地事件处理和焦点检测,未说明收集或传输用户数据。

局限

  • 仅支持 Windows;文档称在 Linux 和 macOS 上会静默不播放声音并记录警告。
  • 仅针对两个已说明的事件提醒:回合结束和 ask_user_question。
  • 需要满足声明的 DSH、dsh-tui、Node 和 peer dependency 版本要求。

DSHub 已核对

  • 已捕获不可变源提交、包清单和 bundle patch,且 bundle 结构校验通过。
  • 清单声明版本为 0.3.2、MIT 许可证、Node ^22.19 || >=24 及所需 peer dependencies。
  • README 说明了 9 组声音、聚焦/未聚焦差异、音量设置和仅限 Windows 的行为。

DSHub 未核对

  • 未实际执行安装或声音播放。
  • 未在具体本地 dsh-tui 或 DSH 环境中测试运行时兼容性。
  • 提供的分发证据中未找到该 npm 包版本。

固定版本安装

安装 dsh-chime-sound

这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit 1fce85c 对应的 README
维护者编写的上游内容原文于 2026/9/13README.md 获取,正文和仓库相对媒体固定到 commit 1fce85caecf8,内容哈希为 475d677abf51。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

dsh-chime-sound

ci

English · 中文

Notification sounds for dsh-tui (originally named dsh-notice-sound, renamed on 2026-09-07).

  • Triggers: the agent calling ask_user_question (session/event tool/call — a nudge to come back and answer) and a reply finishing (session/event turn/end; agent-loop emits this once per turn, while assistant/message fires on every tool step and is deliberately not used). Both distinguish a focused from an unfocused terminal.
  • 9 sound groups × 4 situations, selectable (or off) in the settings page's “Notice Sounds” section: g1 Crisp / g2 Wood / g3 Chiptune / g4 Warm (synthesised in code), g5 Bell / g6 Bubble / g7 Arcade / g8 Marimba / g9 Soft Synth (CC0 samples).
  • New in 0.2.0 — master volume (the “Volume” field): 0–150% in 5% steps (31 steps), default 100% = the original level. ←/→ steps 5%; holding the key repeats, because dsh-tui's input layer expands the auto-repeat into per-step events. The new level is auditioned immediately. Above 100% the samples are 16-bit saturated (peak ≈ 105%, clipping only for very short stretches). The gain is applied to the WAV samples inside the plugin and never touches system volume.
  • g1–g4 are synthesised by this repository's scripts/gen-sounds.mjs (WAV, 16-bit / 48 kHz); g5–g9 are Freesound CC0 1.0 material, decoded and then trimmed, faded and loudness-normalised to the same format. Sources and conversion parameters are recorded in assets/sounds/CREDITS.md (CC0 needs no attribution and may be redistributed with this plugin).
  • Settings and copy are bilingual (Chinese/English); the settings card is localised by the host according to the language dsh-tui's /lang selected.

⚠️ Platform support (Windows only)

Sound is played through Win32 APIs (koffi → winmm.dll PlaySoundW, with focus detection via user32.dll), so this plugin is Windows-only (Windows Terminal and classic conhost). On Linux and macOS it degrades silently to a no-op — no sound, no boot failure — and logs a Win32-only warning. Do not expect notification sounds elsewhere.

Install

Option 1 — dsh CLI (recommended):

dsh plugin --profile <profile> add dsh-chime-sound

(Or from the dsh plugin market / GitHub: dsh plugin add github:VviLliAm-qwq/dsh-chime.)

Option 2 — manual:

  1. Copy the package to ~/.dsh/profiles/dsh-tui/node_modules/dsh-chime-sound/
  2. Append "dsh-chime-sound" to dsh.profile.bundles in ~/.dsh/profiles/dsh-tui/package.json (the package declares dsh.bundle.patch, so it mounts itself at boot)
  3. Restart dsh-tui (/restart)

Compatibility: dsh-tui 0.10.x (the ctx.tuiSettingsSections and session/event seams, both soft-probed); dsh 0.1.2-rc.1+; Node ^22.19 || >=24; pure ESM. Every configuration key has a default, and a missing configuration degrades to “nothing happens”.

Configuration

The settings live in dsh-tui's “Notice Sounds” section (or the chime: namespace of ~/.dsh/settings.yaml):

chime:
  doneFocus: g2   # reply finished, terminal focused: g1-g9 / off
  doneBlur: g2    # reply finished, terminal unfocused
  askFocus: g2    # question asked, terminal focused
  askBlur: g2     # question asked, terminal unfocused
  volume: "50"    # 0-150, 5% steps, default "100"

Why session/event and not the message observer

dsh-tui's mediated tuiMessageObserver.subscribe() is unusable here: the API requires the activation to hold a verified Component identity through host admission, and a plugin mounted by a bundle patch never goes through admission — its subscriptions are refused (COMPONENT_NOT_ADMITTED) and no sound ever plays.

This plugin therefore listens on the session/event cordis bus published by @deepseek-ai/dsh-session (the same channel the official dsh-working-activity extension uses), which needs no Component identity:

  • tool/call with name === 'ask_user_question' → the question sound (askFocus / askBlur)
  • turn/end → the completion sound (doneFocus / doneBlur); subagent sessions are ignored
  • Focus detection: the GetForegroundWindow handle equals GetConsoleWindow, or the window class matches (CASCADIA_HOSTING_WINDOW_CLASS = Windows Terminal, ConsoleWindowClass = classic conhost). Under ConPTY GetConsoleWindow returns a hidden PseudoConsoleWindow that is never foreground, so the earlier handle-only and class-only readings were both flawed; the check is now a pair of criteria with a corrected class read.
  • dsh-plugin.json no longer declares the unused messages.observe capability.

Restart dsh-tui after installing.

Publishing

  • Repository: https://github.com/VviLliAm-qwq/dsh-chime (public)
  • Release: v* tags drive .github/workflows/release.yml, which publishes to npm through trusted publishing (OIDC) — no token is stored in the repository.

License

MIT — see LICENSE. Sound assets are licensed and attributed in assets/sounds/CREDITS.md.

有意识地管理

安装与管理

前置条件与目标 Profile

目标 dsh-tui Profile

交付方式 Git Bundle — VviLliAm-qwq/dsh-chime#1fce85caecf8d45ac36034f6dc543a3eed1c3de2

验证、更新与移除

显示生命周期命令
验证
dsh plugin --profile dsh-tui list

兼容性与访问范围

Declared for dsh-tui 0.10.x and dsh 0.1.2-rc.1+ dsh-tui 0.10.x; dsh 0.1.2-rc.1+; Node ^22.19 || >=24

检查兼容性证据

风险事实

platform

Windows-only audio

证据
system-api

Uses Win32 sound and foreground-window APIs through koffi

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

应使用固定提交的 Git bundle 路径,不要假定 npm 分发可用。

AI 审查于 2026/9/13 UTC 14:13GitHub 事实核对日期: 2026/9/13 UTC 14:13

自当前证据基线以来,没有记录到重要源码变化。

下一步

按 Plugin 安装流程操作

订阅重要变化: dsh-chime-sound