dsh-plugin-peak-pricing: Display DeepSeek Peak/Off-Peak Pricing Periods in DSH Sidebar

Preface

When developing agents with DeepSeek Harness (DSH), API call costs vary depending on “peak full-price / off-peak half-price” time slots. The peak/off-peak switching rules are fixed to Beijing time, but the interface itself does not persistently indicate which tier is currently active or how long until the next switch. Developers often have to consult documentation or keep their own notes, which can lead to accidentally launching large batch tasks during peak hours.

Below is the community plugin dsh-plugin-peak-pricing (maintainer c-ling): it displays peak/off-peak time badges near the sidebar settings button in DSH Web and Desktop, is purely UI-based, stateless, makes no network requests, and relies entirely on the local clock for time-slot calculations.

What This Is

dsh-plugin-peak-pricing is a dual-sided DSH plugin categorized as “fun cosmetic,” searchable in the SkillHub plugin directory. Current package version 2.0.1, license MIT, target runtime DeepSeek Harness 0.2.1+ (Web and Desktop).

It does not hook into host routes or persist configuration; all display logic runs client-side and switches between Chinese and English text following the DSH interface language (Settings → General → Language).

Core Features

Time-Slot Rules

Rules follow Beijing time (UTC+8, no daylight saving time):

  • Peak (full price): 09:00–12:00, 14:00–18:00
  • Off-peak (half price): all other time slots
  • Starting 2026-08-24: all-day Saturday and Sunday are treated as off-peak; before that date, weekends still follow the weekday time-slot division above

The plugin refreshes every 30 seconds; crossing a time-slot boundary automatically switches the display.

Expanded and Collapsed Forms

Expanded state: a single-line card is displayed docked at the bottom below the sidebar settings button, e.g.
● Off-peak · Half price · Peak starts in 2h 12m. A yellow dot indicates peak full price; a green dot indicates off-peak half price; hovering shows Beijing time details.

Collapsed state:

  • Web / Linux: a colored dot (36px circle on hover, consistent with the settings button) is centered within a 56px track; hovering pops up a tooltip with the same color scheme and font size as DSH’s official Tooltip.
  • Desktop (macOS / Windows): when the sidebar is collapsed and the entire column width becomes 0, a 28px floating dot is used instead, fixed at the bottom-left corner of the viewport (left:12px; bottom:12px), still allowing hover to view the full text.

DSH Version Compatibility

Starting with v2.0.0, the plugin adopts the dsh.bundle + cordis.patch.yml installation form and no longer depends on the CSS Module hash used in 0.1.x. It locates the footer area via stable class-name suffixes (footArea / collapsed / settingsArea) and data-slot="sidebar.footer.action", making it more robust against minor 0.2.x releases. 0.1.x is no longer a compatible target.

Installation and Activation

Before installing, please review the GitHub repository source code and license yourself. The plugin runs with the current DSH process privileges; installing it constitutes trust in the package.

On the Web side, run the following (dsh plugin adds the package to the profile’s dsh.profile.bundles, and the bundle patch inserts the loader):

dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v2.0.1"
# or
npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v2.0.1"

Desktop requires the Desktop’s own CLI or the in-app Plugins page (npx @deepseek-ai/dsh will reject --profile desktop):

"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" \
  plugin --profile desktop add "github:c-ling/dsh-plugin-peak-pricing#v2.0.1"

After installation, the host must be restarted: for Web, restart dsh web; for Desktop, quit and reopen the app. client-modules caches package resolution per process, so new bundles will not take effect without a restart.

Manual Mode (plain dependency)

If you are not using bundles, you can install the package as a regular dependency and manually add an insert line to cordis.patch.yml yourself; do not also add the package to dsh.profile.bundles, otherwise it will be activated twice. Manually editing the profile on Desktop is not recommended; prefer using the CLI or the Plugins page.

Typical Usage and Verification

After the installation and restart steps above, you can self-check on the page as suggested in the README:

  1. Expand the sidebar: a time-slot card should appear below the settings button; switching Settings → General → Language should switch the text in place between Chinese and English.
  2. Collapse the sidebar on Web: a colored dot should appear within the 56px track, below the settings button; hovering displays a tooltip.
  3. Collapse the sidebar on Desktop: the dot is fixed at the bottom-left corner of the window, and hovering still reveals details.

The repository provides the following commands for local verification (expect all 11 tests to pass):

cd dsh-plugin-peak-pricing
node --check lib/index.js lib/client.js
node --test
python3 -m json.tool package.json

Note: this plugin has no /api/... routes. Do not use the old anonymous GET /plugins/dsh-plugin-peak-pricing/client.js to determine whether loading succeeded; in 0.2.1 the client bundle is loaded via the post-authentication startup image.

Updating and Uninstalling

To update, simply re-run the install command against the new version tag; in bundle mode there is generally no need to modify cordis.patch.yml:

dsh plugin --profile web add "github:c-ling/dsh-plugin-peak-pricing#v2.0.1"

To uninstall on Web:

dsh plugin --profile web remove dsh-plugin-peak-pricing

On Desktop, you can remove it via the Plugins page or use the Desktop CLI’s plugin --profile desktop remove. The plugin stores no persistent data, so the layout is fully restored after uninstallation.

Use Cases and Caveats

This plugin is suitable for developers who orchestrate agents in DSH Web or Desktop long-term and want to see at a glance whether they are currently in a half-price slot and how long until the next peak/off-peak switch. It does not replace the official billing page and does not sync with network time; if the system clock is manually changed, the change will be reflected in the display on the next 30-second refresh.

Known limitations include: if DSH changes its footer DOM conventions in the future, the badge may still be attached to the footer action bar but positioned off from “below the settings button”; the desktop bottom-left dot offset is a fixed value, and if new controls are added to the bottom-left corner of the window, a future plugin update may be needed.

The DSH ecosystem emphasizes “everything is a plugin”; community directories such as SkillHub are independent sites with no official affiliation with DeepSeek / High-Flyer. For source code, issues, or English documentation, visit GitHub: c-ling/dsh-plugin-peak-pricing; directory page: SkillHub - dsh-plugin-peak-pricing.

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

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

Xiaoye