dsh-usage-footer: Displays balance and consumption rate at the bottom of the DSH Web interface
A status bar is permanently displayed at the bottom of the DSH Web window in the `shell.bottom` slot, sequentially showing manual refresh, balance, bonus, current session consumption, consumption speed, and last refresh time. Data is sourced from the existing `account/getBalance` Remote and `session/list` endpoints, requiring no modifications to the core DSH. The balance displayed is the wallet with the highest total amount after aggregating by currency (using ¥ for CNY and $ for USD). The bonus wallet balance is shown only when it exceeds 0. Current session consumption is counted against both the top-up and bonus balances simultaneously, as DeepSeek deductions utilize the bonus quota first. Consumption speed is calculated by sampling the token increment of running sessions every 5 seconds, calculating the difference against the earliest sample within a 2-minute window, and converting it to Yuan/second based on the `deepseek-flash` peak/idle unit price. For non-CNY wallets, conversion uses the `CNY_PER_CURRENCY` constant at the top of `client.js`; currently, USD = 6.67. Hover tooltips provide the current period price, along with Yuan/second and tok/s metrics split by session. Balance polling occurs every 30 seconds, with immediate refreshes triggered by window focus, visibility changes, or hash changes. A baseline is stored in `sessionStorage` as `dsh-usage-footer:<path+search+hash>`. Counting restarts from zero when the application is closed and reopened; `Ctrl+R` within the page refreshes. Installation is performed by having the agent use `plugin_manager`'s `install_bundle` with the target set to `https://github.com/Roccn/dsh-usage-footer.git`. After installation, press `Ctrl+R` to refresh. The plugin is installed as a junction to `~/.dsh/profiles/desktop/node_modules/@local/dsh-usage-footer` and an `insert` is appended to the end of `cordis.patch.yml`. Amount display aligns with Platform Web rules, truncating positive numbers to cents. `cacheWriteTokens` are priced as misses, and legal holidays are priced at peak rates. `CLIENT_VERSION` is hardcoded as 0.2.1-rc.5. Client injection requires declaring both `remote` and `remote.account`/`remote.session`; otherwise, desktop web boot auditing will prevent the window from opening.
Read Moredsh-usage-footer: DSH Web Usage and Cost Monitoring Plugin
`dsh-usage-footer` is a DSH Web UI plugin designed to address delays in official billing queries. It provides real-time monitoring of account balance, peak/off-peak periods, and token usage via a floating button in the bottom-right corner. The panel displays the current session’s usage, compares local ledger entries with official data, and supports light/dark themes. It is maintained by 1514100951, released under the MIT license, requires an API key configuration, and offers flexible local statistics and official data verification.
Read More