Preface¶
DeepSeek Official V4 pricing follows Beijing Time peak-valley schedules starting from 2026-08-17: peak hours are expensive, and valley hours are cheap. The boundaries of 09:00, 12:00, 14:00, and 18:00 are not hard to remember, but the hard part is forgetting to check the time while running a long task—heavy work hitting peak time means higher token costs. Keeping track of time yourself is one way; a more worry-free approach is to have a resident component watch the clock for you and notify you before the switch. The dsh-plugin-whale-fenggu introduced in this article is such a plugin.
DSH’s philosophy is “everything is a plugin,” and these small tools fit perfectly into the plugin system.
What is this¶
dsh-plugin-whale-fenggu (Blue Big Fat Fish · DeepSeek Peak-Valley Reminder) is maintained by Mungbean-Cake, under the MIT license, current version 1.1.0. It is a pure frontend, zero-dependency plugin for the DSH Web GUI: it determines the DeepSeek peak-valley pricing periods in real-time using Beijing Time, hangs a “Little Fat Fish” card in the corner of the screen, showing the current period, Beijing Time, and a countdown to the next switch, and pops up an in-app toast before the switch based on a set lead time.
The “Liang Wenfeng / Liang Wengu” in the name is a community meme. The project README explains the origin: DeepSeek’s founder is Liang Wenfeng, and Official V4 pricing follows Beijing Time peak-valley schedules, so the community calls the peak hours “Liang Wenfeng” (expensive) and the valley hours “Liang Wengu” (cheap); the plugin adopts this terminology.
Time Period Rules¶
The plugin distinguishes two periods based on Beijing Time:
- Peak (Liang Wenfeng): 09:00–12:00, 14:00–18:00, expensive price
- Valley (Liang Wengu): The rest of the time, cheap price
Implementation-wise, the time zone uses Intl.DateTimeFormat('Asia/Shanghai') for Beijing Time (this time zone has no DST, consistent with official rules); the daily boundaries are 09:00 / 12:00 / 14:00 / 18:00, with the peak taking the left-closed right-open intervals [09:00,12:00) and [14:00,18:00). Wall-clock time is encoded as a unified epoch for comparison, the next boundary is calculated to get the remaining minutes, which is the source of the countdown on the card.
Core Features¶
Card & Early Reminder¶
- Real-time broadcast: The card constantly shows whether it is Liang Wenfeng or Liang Wengu, along with Beijing Time and the countdown to the switch.
- Early reminder: Pop up an in-app toast N minutes before the switch; default is 10 minutes, adjustable from 1–120 minutes.
- Prevent duplicates: Record by “date + target period” for every switch, only remind once.
- Manual operation: Click 📢 to manually broadcast the current period, click 🧪 to test the reminder style, no need to wait until the actual switch.
Drag & Position Memory¶
Hold the blank space of the card (header, tips area) to drag it to any position on the screen; coordinates are automatically recorded as {x,y}. Configuration is written to both Cookie and localStorage using a double-write strategy, with the storage key being whaleFengguReminder:config: since Cookie does not distinguish ports, even if DSH Desktop changes ports on startup, the position and settings are not lost; localStorage serves as a fallback to record the state under the current port.
Robustness measures:
- Drag coordinates are sanitized to prevent illegal values like NaN from causing the card to go off-screen.
- The component is rebuilt by a self-healing check running every 20 seconds if removed externally.
- Single-point errors are isolated with try/catch so they don’t crash other parts of the page.
- A global __WHALE_FENGGU__ is used for deduplication to avoid injecting two cards.
Configuration Items¶
Click the ⚙️ button on the card to open the settings panel. Adjustable items are as follows:
| Key | Default | Description |
|---|---|---|
enabled |
true | Master switch |
leadMinutes |
10 | Minutes to remind before switch (1–120) |
position |
left | Preset position: Bottom Left / Bottom Right |
pos |
null | Custom coordinates, auto-recorded after dragging |
opacity |
0.95 | Card opacity (0.2–1, slider adjustment) |
visible |
true | Visibility switch, hides as a small fish dot when off, clicks to restore |
minimal |
false | Minimalist mode, only shows current status |
toast |
true | In-app toast reminder switch |
tips |
true | Token-saving tips carousel switch |
lastNotified |
{} | Notification records, auto-maintained, used for preventing duplicates |
Additional points:
- The settings panel includes built-in token-saving guides: merging requests, opening new sessions for long chats, running light work during peak hours, etc.; the card also has a carousel of small tips.
- The UI follows the blue-fantasy skin style: indigo-purple tones, frosted glass, rounded corners, floating animations.
- The component includes built-in UI micro-adjustment CSS: hides the bottom button of the “Plugin Market”, makes the balance badge occupy its own line (the latter works with the balance monitoring plugin), and takes effect after formal installation.
Installation¶
Prerequisites: Need DSH Desktop (or dsh web profile), and DeepSeek Official V4 peak-valley pricing must be in effect (from 2026-08-17).
Method A: Formal Installation (Recommended)¶
dsh plugin --profile web add <本项目路径>
Replace <本项目路径> with the local cloned or extracted project directory. Installation is written to the lockfile and protected transactions by dsh plugin, so it won’t be lost after restart. After installation, restart DSH Desktop, then press Ctrl+Shift+R to force refresh the page to see the card.
Windows Desktop Note: Fully exit DSH Desktop (including tray icon) before installing, otherwise pnpm will throw EPERM due to file locking.
Method B: Transitional Injection (When you don’t want to install the plugin)¶
The project comes with lib/widget.raw.js, a self-contained IIFE with no dependencies, including deduplication and DOM ready handling. Paste the entire block into any already loaded client-side plugin. The example in the README is for the balance monitor plugin @rainronin/dsh-balance-monitor:
// Inside the factory function of balance-monitor/lib/client.js, before return module.exports:
// Paste the entire content of lib/widget.raw.js
Save and refresh the page to make it effective.
Cost of this method: When node_modules is re-linked by pnpm (e.g., installing or updating other plugins), the injected content will be reverted and needs to be re-injected, or switch back to formal installation.
Typical Usage¶
- After startup, a Little Fat Fish card appears in the bottom left (default position), displaying the current period and countdown in real-time.
- Hold the card header or tips area and drag it to a position that doesn’t obstruct the view.
- Click ⚙️ to open the settings panel: adjust lead minutes, switch preset positions or use custom coordinates after dragging, toggle various features; click 🔄 to reset to the bottom left with one click.
- Click 📢 to hear a manual broadcast, click 🧪 to preview the reminder toast style.
- N minutes before the switch time, a notification toast pops up at the bottom of the screen; each period switch only reminds once.
Applicable Scenarios & Notes¶
Who is it for: People running tasks in DSH Desktop / web profile who care about peak-valley price differences and don’t want to remember boundary times; if you are already using the blue-fantasy skin, the card’s visual style is also compatible.
Things to note before use:
- The plugin runs with the permissions of the current dsh process. Before installing any third-party plugin, it is recommended to read the source code first and confirm the license (this project is MIT) meets your requirements before deciding to install it.
- Transitional injection is not the same as formal installation; it will become invalid after pnpm re-linking, so don’t treat it as a long-term solution.
- If the card is missing, check in this order: first Ctrl+Shift+R for a force refresh; if you are using transitional injection, it is mostly been reverted by re-linking, re-inject or switch to formal installation.
- For more detailed principles, troubleshooting, and contribution instructions, see docs/TUTORIAL.md in the repository.
Summary¶
dsh-plugin-whale-fenggu doesn’t do complicated things: it turns the peak-valley schedule into a floating animation resident card, calling out to you just before you forget, and stuffing in a few token-saving tips. Pure frontend, zero dependencies, low integration cost. If you often need to schedule tasks around peak times, give it a try.
Project Address:
- GitHub: https://github.com/Mungbean-Cake/dsh-plugin-whale-fenggu
- Community Directory: https://www.skillhub.cn/plugins/Mungbean-Cake/dsh-plugin-whale-fenggu
Note: The community directory is an independent site with no official affiliation to DeepSeek / Huanfang.