Introduction¶
When developing agents with DSH, the common question isn’t just “how many tokens were used in this session,” but how to view usage distribution, cache hits, cost trends, and official balances simultaneously when multiple workspaces, projects, and models are present.
dsh-pulse is a web UI plugin for DSH that consolidates this information into a single observatory. It primarily addresses three categories of issues:
- Cross-session token usage trends;
- Usage and cost breakdowns by model and project dimensions;
- Side-by-side comparison of DeepSeek official balance and cost estimation.
The following sections introduce its positioning, features, installation methods, typical usage, and considerations.
What is it¶
dsh-pulse is a DSH plugin maintained by Enc-hanted under the MIT license.
It runs on the DSH UI surface, does not provide model-visibility tools, and consumes no additional tokens. The plugin itself does not save keys.
It provides a cross-session usage and cost observatory that includes:
- daily token charts;
- cache hit ring;
- 90-day / 1-year heatmap;
- model and project breakdown;
- adaptive color theme;
- CSV export.
Core Features¶
1. Usage Trends¶
dsh-pulse’s usage trends support multiple time windows:
- hourly line chart for today;
- daily bar charts for 7 days / 30 days;
- GitHub-style heatmap for 90 days / 1 year;
- custom date range up to 30 days.
This section is suitable for reviewing overall trends first, then zooming in on a specific day or week.
2. Project and Model Filtering¶
The dashboard provides two searchable dropdowns to filter by workspace and model.
After selecting one workspace, or selecting both a workspace and a model, the entire dashboard data will converge to the corresponding scope.
3. Distinguishing Models Across Providers¶
Model tags come from the Models configuration and follow the format:
provider · display name
When multiple providers offer models with the same name, they can be distinguished by their provider prefix.
4. Model Distribution and Project Ranking¶
dsh-pulse displays:
- model share bars;
- project ranked table.
These two sections are suitable for answering questions like “which model is used the most” and “which project consumes the most.”
5. Session Details and Subagent Attribution¶
Sessions are grouped by project and provide:
- subagent subtotal;
- per-session break analysis.
This helps to view the stages of a task—such as research, thinking, and summarizing—separately.
6. Cost Estimation¶
Cost estimation is based on per-model rates and distinguishes between peak and off-peak tiers.
Models without matching rules will be displayed as unpriced.
It should be noted that the cost estimation uses a manual exchange rate usdToCny, with a default value of:
6.8
It is an estimator, not an accounting standard.
If you do not want to display cost figures, you can set:
costEnabled: false
This will hide cost-related numbers but retain other usage figures.
7. Cost Trends¶
Cost trends provide daily sparklines.
After accumulating a full day of snapshots, the official balance reconciliation line will be overlaid on the same chart.
8. Official Balance¶
If DEEPSEEK_API_KEY is saved, dsh-pulse can query the DeepSeek platform balance and supports manual refreshing.
The query uses the key already saved by the host; the plugin itself does not save keys.
9. CSV Export¶
You can one-click export the currently loaded window from the dashboard header.
The exported content is a UTF-8 CSV daily table.
Installation and Enablement¶
dsh-pulse requires:
node >=22.15
Installation command:
dsh plugin --profile web add -w dsh-pulse
After installation, restart dsh web, then open:
Settings → Usage Pulse
After installation, you can use the dsh-pulse dashboard in the DSH web UI.
Typical Usage¶
1. View Text Summary in Session¶
In any DSH session, enter:
/pulse
It will print a text summary.
2. Open Floating Panel¶
You can open the dsh-pulse floating panel using the button at the bottom of the DSH web sidebar.
3. View Official Balance and Reconciliation Line¶
If DEEPSEEK_API_KEY is saved, the dashboard will display the official balance.
After snapshots accumulate for a full day, the official balance reconciliation line will appear in the cost trend chart.
Configuration and Limits¶
The local save location for dsh-pulse is:
$DSH_HOME/settings.yaml
Specifically written to the pulse: section within it.
Configuration changes take effect immediately and are retained after a restart.
Please note that:
- without an
llmservice, there are no editable rows; - without a settings service, the page is read-only;
- cost figures are estimates and are not suitable as accounting evidence;
- models without configured rules will be displayed as unpriced.
Uninstallation and Residuals¶
Uninstallation command:
dsh plugin --profile web remove -w dsh-pulse
After uninstallation, the following can be safely deleted:
~/.dsh/settings.yaml 中的 pulse section
~/.dsh/storages/pulse_balance.json
Use Cases and Considerations¶
dsh-pulse is suitable for developers who need to monitor DSH usage over the long term, especially in scenarios involving multiple projects, models, and providers.
It is suitable for answering the following questions:
- At what time period is token consumption concentrated today?
- What are the usage trends for the last 7 or 30 days?
- Which project or model consumes the most?
- How long will the official balance last?
- What is the difference between cost estimation and the official balance?
Please note before use:
- dsh-pulse runs as a DSH plugin and accesses DSH’s local configuration and saved keys;
- the plugin runs with the permissions of the current dsh process;
- check the source code and MIT license before installing;
- cost estimation does not equal the official accounting results;
- the plugin itself does not save keys.
Links¶
GitHub repository:
https://github.com/Enc-hanted/dsh-pulse