deepforce/dsh-balance
deepforce★ 3TypeScriptLast synced: 2026-08-15
DSH plugin: /balance command, composer-dock balance readout with top-up link, session-cost estimate
README excerpt
dsh-balance English 中文 A DeepSeek Harness plugin that adds a /balance slash command and a composer-dock balance readout to the web GUI, querying the DeepSeek account balance live. It calls DeepSeek's official Get User Balance endpoint and returns the total, topped-up, and granted balance per currency. The API key is resolved through the credential seam ( ctx.credentials ) or the environment on every call — it is never written into configuration, into the returned text, or into the browser. Features - /balance — human slash command that prints the full balance breakdown in the session. - Web GUI readout — the conversation stats area (below the cache-hit figure) shows a compact Balance: ¥… line with hover details (topped-up / granted), a Top up link to the DeepSeek platform top-up page, a manual refresh button, and an estimated Session ≈ ¥… spend figure (hover shows the token buckets × unit prices). The readout copy is bilingual and follows the active dsh language (Chinese / English). The browser fetches the host's /dsh-balance route; the API key never leaves the host. - Daily-spend chart — hovering Last {days}d ≈ ¥… floats a comic speech bubble upward from the summary: a titled SVG …
View full README on GitHub →