treg
superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:river291/display-api-balance
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Shows the DeepSeek API balance as an ambient stat under the DeepSeek Harness composer and refreshes it every 60 seconds. Click the balance to set a local low-balance threshold; the amount turns red once it reaches the threshold.
localStorage (display-api-balance:threshold); it is never uploaded or sent
over the network.DEEPSEEK_API_KEY, a failed request, or a
signed-out account — no wrong number is displayed.--dsw-alias-* semantic tokens.DSH bundles are installed into a profile. From the desktop Plugins page or the CLI:
# From GitHub (source is the artifact: no build step, no allowBuilds approval)
dsh plugin --profile <profile> add github:river291/display-api-balance
Then confirm display-api-balance is enabled on the Plugins page.
The plugin is distributed from GitHub; there is no npm release yet, so install
with the GitHub spec above. If it is published to npm later,
dsh plugin add display-api-balance will work as well. The published package's
repository field points back at this repository, so marketplaces can map npm
data to it.
DEEPSEEK_API_KEY: fill in a
DeepSeek API key under DSH Settings → Models, or export the variable in the
environment that launches DSH.0.2.1-rc.5 (desktop). The host half
only uses webServer and credentials; the client half only uses slots and
locale.index.js) registers GET /api/balance. Each request
re-resolves the DEEPSEEK_API_KEY credential (rotating the key needs no
restart), calls https://api.deepseek.com/user/balance with
Authorization: Bearer, applies a 15-second timeout, and returns the upstream
JSON. The key stays inside the host process and is never handed to the
browser.client.js) registers the balance as one text stat in the
conversation.composer.dock slot (order: 2, after the context-occupancy
meter). A relative fetch('/api/balance') reaches the host route above
through the dsh-app:// protocol in the desktop app, and as a same-origin
request in the web build./api/balance is
meant to be bound to the loopback address only.The web version used webServer.tapIndex to inject a DOM script into
index.html. The desktop (Electron) window loads the page from the packaged
dsh-web-frontend/dist and never runs the host's renderIndex, so injected
scripts do not execute there. This plugin renders through a client slot with
React instead, so both the desktop and web builds work.
dsh plugin --profile <profile> remove display-api-balance
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: api。