dsh-plugin-sound-alert: DSH Web Completion and Authorization Notification Sounds

Introduction

When running long-running tasks in DSH Web, a common practice is to watch the session status or switch back to the tab repeatedly to see if the response has finished or if a prompt for authorization or plan review has appeared. Browsers themselves do not explicitly notify for “busy finished” or “pendingInteraction” states, and it is easy to miss these when multiple sessions are running in parallel. The following is an introduction to the community plugin dsh-plugin-sound-alert (Maintainer: WanchunLian, Category: Client-side): It plays alert sounds when a response is completed or when authorization/review/questions are required. It features built-in WebAudio synthesized sounds and supports local WAV files; the implementation is purely client-side and does not bundle resource files.

What is this

dsh-plugin-sound-alert is a lightweight sound alert plugin for DSH Web. It listens to session status on the client side and rings in agreed-upon scenarios. The settings entry is Settings → Sound Alerts. Custom ringtones are implemented by selecting a local .wav file. Configuration and audio are persisted in the local browser as Data URLs and are not uploaded. The plugin does not register backend routes or call LLMs. The license is MIT; the current package version is 0.1.0. The community directory page can be found at SkillHub Plugin Page, and the source code is available on GitHub. This directory is not officially affiliated with DeepSeek or Hithink RoyalFlush; please review the source code yourself before installation.

Core Features

  1. Completion Sound: Plays when the session “busy” state ends (response/processing completed). If the alert scope is set to “All Sessions,” it also plays when a background session generates a “Completed” notification. The default is a two-note ascending “ding-dong,” which can be changed to a custom WAV.
  2. Authorization Sound: Plays when an authorization request, plan review, or “Question for You” (pendingInteraction) appears. The default is a triple-beep alert, which can be changed to a custom WAV.
  3. Conflict Strategy: If a completion frame and a pending authorization occur simultaneously, only the authorization sound plays to avoid duplicate disturbances.
  4. Alert Scope and Volume: Can be set to “Current Session Only” or “All Sessions”; volume is adjustable. The default is “Current Session Only” to reduce disturbance from frequent sub-session or background tasks.
  5. Debouncing: Approximately 1.6s debounce for completion scenarios and 0.5s for authorization scenarios to reduce duplicate ringing from multiple events within a single frame.
  6. Data Location: Configuration and custom WAVs are stored in the local browser’s localStorage (key dsh-plugin-sound-alert:cfg). Settings must be redone when switching browsers or devices.
Scenario Sound
Session “busy” state ends (response/processing completed) Completion Sound
Background session “Completed” notification (Scope = All Sessions) Completion Sound
Authorization request / Plan review / Question for You Authorization Sound
Completion and Pending Authorization occur simultaneously Only Authorization Sound plays

Installation and Activation

The plugin is loaded with the web profile bundle. For the GitHub release, the command provided in the resources is:

dsh plugin --profile web add github:WanchunLian/dsh-plugin-sound-alert

After adding, you need to follow your usual web profile workflow to install/compose the bundle and restart the Web (e.g., in the terminal running the GUI, press Ctrl-C and then run dsh web again). If using link mode for local development, the steps are the same as for dsh-plugin-polish-my-expression in the README: add the link dependency to the web profile, write the package name into dsh.profile.bundles, then execute dsh plugin --profile web install and restart the web profile. Specific link paths depend on your local machine; refer to the repository README.

Note: The plugin runs within the current DSH process and browser environment; third-party plugins should be checked for source code and license before installation.

Typical Usage

  1. Open Settings (Gear) → Sound Alerts.
  2. Check Enable Sound Alerts.
  3. For Completion Sound and Authorization Sound respectively, choose Built-in Ringtone (WebAudio synthesis, no file needed) or Custom WAV (Click “Select WAV…” to choose a local file, recommended to be short and ≤3MB). You can Preview or Remove.
  4. Set the Alert Scope (Current Session Only / All Sessions) and Volume as needed.

Browser autoplay policy requirement: Stable audio playback requires at least one click or keypress on the page; if there has been no interaction, sound may be blocked silently. Please click the page once before the first preview.

Implementation Highlights (For Source Code Review)

Repository structure (excerpt from README): lib/index.js is the host-side cordis shell; lib/client.js handles browser-side status listening, the sound engine, and the settings page; cordis.yml is the bundle patch for the web profile loader. Overall design description can be found in docs/design.md within the repository.

Conclusion

If you need to use sound to distinguish between “Task Completed” and “Authorization Required” in DSH Web without introducing audio packages with static resources, dsh-plugin-sound-alert keeps the logic purely client-side with a zero-resource-file bundle and a fixed configuration path. For further information, see the SkillHub Directory Page and the GitHub Repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye