Preface¶
DSH finishes a round of conversation “silently”: you go do something else, and come back to find it answered long ago; how much quota this round cost can only be checked by digging into the webpage. This plugin brings these two aspects right before your eyes: a sound when the round truly ends, and a line of “Cost this round / Balance” popping up in the top-left corner, fading out after 10 seconds.
It is called _turn-sound, a DeepSeek Harness (DSH) plugin, maintained by Buir5, categorized as a client (dsh.client.platform = web). Below is an introduction to the plugin itself: what it does, how to install, how to use, and what pitfalls to watch out for.
What is it¶
In short, it is a DSH plugin that turns “round end” and “money spent this round” into an alert sound and a draggable floating layer.
The plugin is divided into two halves:
- The Host half runs in Node and is responsible for bookkeeping (
ledger) and providing audio; - The Client half is a 38px golden bell in the bottom-right corner, which opens to a settings panel.
The specific problem it solves: DSH finishes a round without a reminder, and quota consumption lacks immediate feedback; users either miss it or check the bill on the webpage later. This plugin brings these two actions into the current window.
Core Features¶
The capabilities listed in the README are as follows, verified against the original text:
| Capability | Description |
|---|---|
| Round End Alert Sound | Sounds only when the round truly ends (not during streaming); plays only once per round |
| Cost Floating Layer | Shows “Cost this round / Balance” in the top-left corner, draggable, fades out after 10 seconds, remembers position in browser |
| Quota Ledger | Listens to session/event’s assistant/message.usage, calculates RMB based on model unit price |
| Balance Calibration | Prioritizes deepseekAccount.getBalance(), falls back to API key / old snapshot if unavailable |
| Custom Audio | Select local MP3/WAV to upload in the panel, or use built-in sounds |
Note that the RMB amount is “estimated based on token unit price,” and there may be cent differences compared to the official bill; the balance retrieved is the real value from the account interface. The two metrics are not entirely consistent; displaying them side-by-side on the floating layer is precisely for easy comparison.
Installation & Enablement¶
The README does not provide commands like dsh plugin add ..., but instead uses the profile dependency method. The original text is as follows:
# 1) Put it in DSH's profile dependency
# In ~/.dsh/profiles/desktop/package.json, add:
# "_turn-sound": "file:C:/path/to/_turn-sound"
# And add "_turn-sound" to dsh.profile.bundles (putting it first puts it on top)
# 2) Let DSH recognize this package (key step, without it the plugin won't enter the app graph)
# The package comes with cordis.patch.yml:
# - insert:
# - id: _turn-sound
# name: _turn-sound
The role of the two steps: The first step hangs the package in profile dependencies and adds it to bundles; the second step’s cordis.patch.yml is the key to making DSH actually load it; without it, the plugin will not enter the application graph. After installation, restart DSH, and the golden bell appearing in the bottom-right corner takes effect.
The package comes with its own cordis.patch.yml, and package.json also points to it via dsh.bundle.patch, so there is no need to write the loading logic manually.
Typical Usage¶
According to the order in the README:
- Click the bell to open the panel;
- Check “Enable”, select a sound, adjust volume / floating layer opacity;
- “Preview” to confirm volume, “Test Floating Layer” to see the quota style;
- “Save” writes to
~/.dsh/turn-sound/config.json.
The data directory is ~/.dsh/turn-sound/, containing config.json, ledger.json, and uploaded audio.
Update checking is an internal behavior of the plugin: at startup, it reads version.json in the repository root directory (fetch + no-store). If the remote version is newer than the local one, a red dot appears in the top-right of the bell, and the panel bottom shows vCurrent -> vLatest · Go Update. Clicking it opens the Release page; it silently skips when there is no network, not affecting playback.
Suitable Scenarios & Notes¶
Suitable for: Developers using DSH in the Web client for long rounds, who want to perceive “it’s done” even when leaving the window, and want to know approximately how much money is spent per round.
Notes:
- The plugin runs with the permissions of the current DSH process; source code and license should be checked before installation (repository root provides
LICENSE,package.jsonstates MIT). - It only mounts on the Web client, requiring
dsh.client.platform = web; client files must be wrapped inwindow.__ModuleLoader__.load({...}); top-levelexportwill cause the rendering layer to reportUnexpected token exportand cause the entire web boot to fail. - Round end judgment relies on “streaming button disappears + 5 seconds of silence”. If DSH changes the accessibility label of the button, the selector in
busyUI()needs to be synchronized. - CNY amount is an estimate, balance is the real account interface value; the two may be inconsistent due to cents.
Version & License: The package.json attached to the README shows version 0.3.1, protocol MIT, Node requires >=18; author is Zhihu Senior. Star and client classification follow the community directory page.
Conclusion¶
The value of this plugin lies in moving “whether the round has ended” and “how much money was spent this round” from the DSH background and the webpage bill to the current window’s alert sound and floating layer; the cost is an extra permanent bell and a local ledger.
Directory page: https://www.skillhub.cn/plugins/Buir5/_turn-sound
GitHub: https://github.com/Buir5/_turn-sound