Preface¶
The philosophy of DeepSeek Harness (DSH) is “everything is a plugin,” theoretically allowing every corner of the conversation interface to be extended by plugins. However, actually writing a top-bar plugin involves handling several things: registering your own component in the conversation top-bar toolbar, adapting to light/dark themes, and persisting user settings—where the last step has extra restrictions for third-party plugins.
dsh-peak-hours is a small plugin that tackles all these issues: it displays a “Peak Hours” status badge in the conversation top bar, judging based on Beijing Time whether the current time is between 09:00–12:00 or 14:00–18:00, and includes the current Beijing time. You can see the status as soon as you open the conversation without having to switch away to check the time.
Below, we introduce it in the order of features, principles, installation, and usage.
What is this?¶
dsh-peak-hours is a DeepSeek Harness plugin by lco117, MIT licensed (© 2026 lco117), current version 0.1.0. The community directory categorizes it under “Fun Skins” (this category comes from the directory page tag).
It solves a specific problem: displaying whether the current Beijing time is in peak hours in the dsh web conversation top bar at all times. The judgment logic always uses Beijing time as the standard—shifting absolute timestamps by UTC+8 (no Daylight Saving Time), unaffected by the machine’s time zone.
Core Features¶
- Conversation Top Bar Badge: Displayed in the top toolbar of the conversation area, to the left of “Download Conversation Logs”.
- Always Beijing Time: Judgment based on UTC+8 shift, so the status is correct regardless of the machine’s time zone.
- Two Peak Intervals:
09:00–12:00and14:00–18:00, half-open intervals—12:00:00 and 18:00:00 belong to off-peak. - Auto-refresh every 15 seconds: After reaching an interval boundary, the status flips within 15 seconds at most, without refreshing the page.
- Language Configurable: Select Chinese or English in “Settings → General → Badge Language”. The selection is persisted and remains after restart.
- Follow Theme: Uses shell semantic color tokens (
--dsw-alias-*), coordinated in both light and dark themes. - Zero Latency: Pure client-side time calculation, no network requests, and no extra model calls.
Display Rules: During peak hours, show “🔴 Peak Hours” + current Beijing time; during other times, show “🟢 Off-Peak Hours”. Hover to see the full interval description.
How it Works¶
The plugin is divided into two halves:
client.js(Browser Half): Readsnew Date()on mount and every 15 seconds, converts it to clock face minutes in Beijing time, and checks against the two half-open peak intervals; registers the badge intoconversation.session.header.utilities(to the left of the conversation log tool), and registers the “Badge Language” selection row intosettings.general.item.index.js(Host Half): Registers thepeak-hourssettings namespace (with alanguagefield, defaultzh), and a private loopback RPC channel/peak-hours(get/set) within the host process, for the browser half to read/write language settings.
There are two design decisions worth clarifying:
Why use a private RPC channel for language settings instead of the settings RPC? dsh-host-apiproxy only opens settings read/write for namespaces within an explicit whitelist (WEB_SETTINGS_NAMESPACES / PRODUCT_SETTINGS_NAMESPACES). Third-party plugins registering namespaces will receive settings-not-exposed, making persistence impossible. Therefore, the browser half uses a private channel within the host process (ctx.connection.rpc.handle), where read/write access to ctx.settings inside the host is not restricted by this whitelist, and persistence remains unchanged.
Why is peak hour judgment placed on the client? The requirement is “convert current system time to Beijing time”. The browser clock is the system time, the UTC+8 shift is a constant, and local calculation is sufficient—no Host RPC round trip, and no extra failure points.
Installation and Enablement¶
Requires the dsh CLI to be installed and a profile initialized (dsh plugin --profile <name> add initializes automatically).
Install directly from GitHub:
dsh plugin --profile web add github:lco117/dsh-peak-hours
Pure JS package, no build scripts, runtime dependency is only @deepseek-ai/schemastery ^3.18.1, no need for pnpm ≥10’s allowBuilds permission, ready to use after direct install. The official documentation suggests installing with a specific commit:
dsh plugin --profile web add github:lco117/dsh-peak-hours#<commit-sha>
Install from a local directory during development:
dsh plugin --profile web add ./dsh-peak-hours
Verify installation:
dsh --profile web --dump-config
The output should contain a "# == dsh-peak-hours" layer.
Typical Usage¶
- Start
dsh web. - Open any conversation—the badge appears at the far left of the conversation top bar toolbar (to the left of the “Download Conversation Logs” button).
- Read the status: During
09:00–12:00/14:00–18:00, show “🔴 Peak Hours” + Beijing time; during other times, show “🟢 Off-Peak Hours”; hover to see the full interval description. - Optional: Open “Settings → General”, select Chinese or English in “Badge Language”, the selection persists and remains after restart.
Customization¶
Two common adjustments are in the source code:
- Peak intervals and refresh interval are constants at the top of
client.js, just changePEAK_WINDOWS/REFRESH_MS. - Badge text is in
LANGUAGESinclient.js, and the settings schema is inindex.js. When adding a new badge language, these two places need to be synchronized.
Use Cases and Notes¶
Suitable for users working in dsh web who want to see at any time whether the Beijing time is in peak hours. It is also suitable as a minimal reference implementation for “how to register a custom toolbar item in a conversation” and “how to bypass the settings whitelist for persistence”.
A few notes:
- On first run, the blank welcome page hides the entire conversation top bar, so the badge is invisible. Open a formal conversation to see it.
- The plugin runs with the permissions of the current dsh process. Installing directly from GitHub is equivalent to pulling and executing third-party code. Before installation, it is recommended to check the repository source code and license (MIT © 2026 lco117), and pin to a specific commit as suggested by the official documentation.
Conclusion¶
dsh-peak-hours is small in size but provides working answers to several practical problems in DSH plugin development—top bar registration, theme adaptation, and the whitelist restrictions on setting persistence. Install it to use, or dissect it to learn.
- Community Directory Page: https://www.skillhub.cn/plugins/lco117/dsh-peak-hours
- GitHub Repository: https://github.com/lco117/dsh-peak-hours