The DSH philosophy is “everything is a plugin”. When multiple people use AI to write code in parallel, it is often unclear how many tokens a team project actually consumed and who consumed them: the DeepSeek dashboard only provides account-level usage, without a project-level breakdown; each person works on their own machine, so usage is scattered across individuals. dsh-team-panel is a DSH plugin for tracking token usage across team projects. It makes each machine focus on a single project and aggregate that project’s usage to a team server in real time, so when anyone opens DSH they see the same ledger.
Core Features¶
- Project first, then counting: You must select a DSH project before use; no tokens are counted before a project is selected. After selection, only usage from sessions under that project (including subdirectories) is counted.
- Team visibility: The panel shows which project each member has selected.
- Real-time peak/off-peak badge: Determined by DeepSeek’s official peak/off-peak billing rules, including weekends and statutory holidays, with a countdown to the next switch.
- Persistent sidebar bottom panel: It remains below the “Workspace” list and above the “Settings” row, and automatically hides when the sidebar is collapsed.
- Zero-dependency team server: Uses only Node built-in modules, supports invite-code joining, member token authentication, and a web admin console; the service starts with a single command.
- Auto-start on boot + automatic restart on crash: A single script installs it as a SYSTEM background task, so a machine reboot is seamless for teammates.
- Reports counts only, not content: Aside from the member name, project name, and usage numbers, nothing else leaves the local machine.
- Built-in connectivity self-test: Connectivity, latency, transport security, and end-to-end round-trip are tested at once, directly showing where the issue occurs.
Installation and Enablement¶
- Install the plugin.
In the current GUI (DSH Desktop interface), run:
dsh plugin --profile desktop add link:<本仓库的绝对路径>
After installation, **do not move the repository directory**. Restart DSH Desktop to verify that it takes effect.
-
Select a project.
In the DSH panel, select a project to monitor and start monitoring. Usage for that project is counted only after the project is selected. -
Configure the server and form the team.
- Server side (admin): Run the auto-start installation script and the command to open the port.
- Teammate side: Enter the server address and invitation code to join the team.
- Network access: Use Tailscale or a Cloudflare Quick Tunnel as the networking solution.
Notes¶
- The plugin runs with the permissions of the current dsh process; review the source code and license before installation.
- Administrator privileges are required to run the auto-start installation script.
- Only usage counts are reported; no content is reported.
- This file contains member tokens; do not commit or share it.
This plugin provides a solution for building a team token-usage statistics system from scratch. For more details, see the GitHub repository.