Introduction¶
When using sessions in the DeepSeek Harness (DSH) Web client, information such as context usage, cumulative tokens for this session, and context composition needs to be checked near the header. dsh-token-pet is a DSH plugin that places this information in the top-right corner of the session header, accompanied by the day of the week, real-time weather, a 3-day forecast, and extreme weather alerts. Below is an introduction to its positioning, installation methods, and daily usage.
What is it¶
dsh-token-pet is maintained by pk7j7sqryy-ops and is licensed under MIT. Its one-sentence positioning is: Displaying the cartoon Token usage doll “Bubu” in the top-right corner of the DSH session header, along with the day of the week, real-time weather, a 3-day forecast, and extreme weather alerts.
Core Features¶
- Embedded in the top-right corner tool area of the session header, not floating.
- Display today’s date/day of the week, calculated in real-time using the browser’s local timezone.
- Display real-time weather using IP geolocation + Open-Meteo, cached for 30 minutes, with graceful degradation on failure.
- Display a 3-day daily weather forecast, including icons and high/low temperatures.
- Display a token usage widget: context usage, cumulative input/output/cache read/write for this session, and context composition.
- The doll “Bubu” changes expression based on token usage.
- Provide extreme weather alerts (including heavy rain/thunderstorms/heavy snow) and cover severe weather warnings for the next 3 days.
- Follows
--dsw-alias-*CSS variable theme colors, adapting to light and dark modes. - Token data reuses the projection of the host already applied to the frontend, resulting in zero requests from the frontend.
Installation and Activation¶
Recommended for installation as a package. The following command adds the plugin to the web profile:
dsh plugin --profile web add github:pk7j7sqryy-ops/dsh-token-pet
After installation, restart the Web client:
dsh --profile web
After the steps above, “Bubu” will appear in the top-right corner of the session header.
If you only want to verify temporarily, you can also use the dynamic plugin method. You need to paste dynamic/client.js into the code.client of cordis_define, paste dynamic/host.js into code.host, and then execute cordis_run. This method takes effect temporarily within the process and will expire after a restart.
Typical Usage¶
- Check collapsed state: The small pill in the top-right corner is the “Bubu” doll with usage percentage.
- Open card: Click the pill to open the card; click outside, press
Esc, or click✕to close. - Manually refresh weather: Click the weather cell in the card; weather cache is 30 minutes.
Applicable Scenarios and Notes¶
Suitable for those viewing current session token usage in the DSH Web profile while also wanting date and weather information. Note before use:
- Weather data relies on
ipwho.isandOpen-Meteo, cached for 30 minutes, with graceful degradation on failure. - If the local web service has no fetch provider and
curlis unavailable or blocked by the sandbox, weather may show as unavailable; the token part is unaffected. - Geolocation uses IP; using a VPN/proxy may cause location drift; you can fix the longitude and latitude by modifying
locate()inlib/index.js. - Does not directly connect to the official alert API; official alerts require an API key, and currently, it is based on WMO codes to determine current and severe weather for the next 3 days.
- The dynamic plugin method expires after a restart.
package.jsondeclares Node.js>= 18and peerDependencies@deepseek-ai/cordis ^4.0.0andreact ^18.2.0.- The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing.
Source¶
DSH’s philosophy is “Everything is a plugin”. The community directory is an independent site with no official affiliation to DeepSeek/Quant, and is not equivalent to the official app store.
- GitHub: https://github.com/pk7j7sqryy-ops/dsh-token-pet
- Directory page (from plugin lead, not verified in this material): https://www.skillhub.cn/plugins/pk7j7sqryy-ops/dsh-token-pet