feat: show account window balances

This commit is contained in:
2026-08-02 23:58:31 +08:00
parent f757b824c2
commit 845f103bd1
5 changed files with 38 additions and 11 deletions
+7 -2
View File
@@ -94,7 +94,7 @@ complete keys, accounts, and models. On a narrow terminal, a table scrolls
horizontally instead of truncating a field:
```text
ACCOUNT | Group | Today | Daily | 5h | 7d | Avail
ACCOUNT | Group | Today | Daily | 5h | 5h Bal | 7d | 7d Bal | Avail
KEY | Today | Tokens | Req
LOG KEY | Account | Model | First | Duration | Tok/s | Input | Output | Cache | Tokens | Cost | Time | Age
ERR | Status | Key | Account | Model | Time | Age
@@ -241,7 +241,7 @@ panel after the accounts table when a token is configured.
The dedicated Accounts page keeps the full columns for scanning inside zellij:
```text
Name | Provider | Group | Daily | Today | Tokens | Req | Kind | 5h | 7d | Reset | Status | Availability
Name | Provider | Group | Daily | Today | Tokens | Req | Kind | 5h | 5h Bal | 7d | 7d Bal | Reset | Status | Availability
```
`Provider` distinguishes `openai` and `anthropic` accounts from the public
@@ -250,6 +250,11 @@ Name | Provider | Group | Daily | Today | Tokens | Req | Kind | 5h | 7d | Reset
`Daily` is shown as `used/limit` when Sub2API has `quota_daily_*` fields in
`accounts.extra`; otherwise it is `-`.
`5h` / `7d` retain the used/remaining percentages, while `5h Bal` / `7d Bal` show
that same window's derived remaining USD balance from the token-safe account
feed. A missing window stays `-`; the client does not invent a cross-window
total or currency conversion.
`Group` is the derived Sub2API tier alias group. Higher tiers win when multiple
aliases exist: `id < slow < fast < sfast`. The table shows `sfast` first, then
`fast`, `slow`, `id`, and ungrouped accounts.