thrudcoco/dsh-peak-hours-banner--packages-dsh-peak-hours-banner ↗★ 0
@thrudcoco/dsh-peak-hours-banner
DSH web GUI chat-area top period-status banner: peak/off-peak pill anchored to Beijing-time windows converted into the viewer's local timezone, bilingual (zh/en) via the dsh locale service, with floating minimize/close controls and a self-healing 15s minute-boundary auto refresh
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:thrudcoco/dsh-peak-hours-banner#d556e7077b27c336136f3c732d554b62986a4168&path:packages/dsh-peak-hours-banner说明文档
阅读完整 README ↗dsh-peak-hours-banner
A DeepSeek Harness (DSH) web GUI plugin: a chat-area top banner that shows the current period status — peak or off-peak — based on the viewer's computer clock, with period windows anchored on Beijing time (UTC+8) and converted into the viewer's local timezone.
Behavior
| Item | Value |
|---|---|
| Position | Top center of the chat area, anchored to the session header strip's bottom edge; never covers the message scrollport or the "load earlier" button |
| Peak windows (Beijing) | 09:00–12:00 and 14:00–18:00, left-closed right-open (9:00/14:00 are peak; 12:00/18:00 are off-peak) |
| Year-round | Weekdays follow the Beijing-window rule; Beijing-time Saturdays and Sundays are all-day off-peak |
| Timezone | Judgement and the displayed range both use the viewer's local timezone |
| Peak text | Red, only the current window: "现在是高峰时段(09:00–12:00),请注意余额消耗。" / "Peak hours now (09:00–12:00). Watch your balance usage." |
| Off-peak text | Green, no time range: "现在是空闲时段,请注意休息,劳逸结合。" / "Off-peak hours now. Please rest and keep a good balance." |
| Language | zh / en, follows the dsh language setting (locale service), switches live |
| Auto refresh | 15s heartbeat with minute-boundary detection: period switches land within ≤15s (no manual refresh button) |
| Controls | Floating transparent round buttons at the banner's top-right corner: "–" minimizes to a red/green status dot (click to expand), "×" closes (recover by reloading the page) |
Install
Install into a profile with the official bundle flow (dsh plugin forwards
to pnpm inside the profile and, because this package declares dsh.bundle,
appends it to dsh.profile.bundles):
dsh plugin --profile web add link:/packages/dsh-peak-hours-banner
link:installs the checkout itself, so rebuildinglib/takes effect on the next DSH restart without reinstalling.- Verify without starting:
dsh --profile web --dump-configshows a# == @thrudcoco/dsh-peak-hours-bannerlayer. - Remove with
dsh plugin --profile web remove @thrudcoco/dsh-peak-hours-banner.
After installing, restart the DSH process. The host half (exports ".")
activates as a no-op stub; dsh-client-modules scans the mounted row's
dsh.client declaration and serves the browser half at
/plugins/ui-peak-hours-banner/client.js, which the web GUI then loads.
While a dynamic session copy of this banner is also running, both pills render (different slot ids). Stop the dynamic plugin before relying on the persistent one.
Build & test
node packages/dsh-peak-hours-banner/scripts/build-client.js # build lib/
node --test --test-isolation=none # repo test suite
License
Apache-2.0. See LICENSE.