Commit Graph

14 Commits

Author SHA1 Message Date
shujakuin 082c8f22fe style: color dashboard sections 2026-07-27 03:48:07 +08:00
shujakuin 42b2e63a97 feat: show daily key usage in dashboard 2026-07-27 03:39:10 +08:00
shujakuin 69f72c09b5 feat: add compact unified dashboard 2026-07-27 03:26:32 +08:00
shujakuin 0e9b53dc79 feat: per-key today usage panel under the accounts table
- accounts page gains a #keys DataTable below the accounts table showing
  each API key's usage today: Key | Today | Tokens | Req, sorted by cost
- data comes from the Sub2API admin dashboard api-keys-trend (requests,
  tokens, key names) plus api-keys-usage (today_actual_cost), derived
  from the configured logs url and reusing the same admin API key
- key names use the same stable per-key colors as the logs page
- --once prints the same panel after the accounts snapshot; failures or
  a missing token surface in the status line without touching accounts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 12:32:10 +08:00
shujakuin fd4e3256d4 feat: reorder first/latency in seconds, add effort column
- logs columns are now Key | Account | Model | Effort | Type | Tokens |
  Cost | First | Latency | Tok/s | Time
- First and Latency render in seconds (5.3s) instead of milliseconds
- Effort shows the request reasoning_effort (- when absent) and is
  filterable; the detail line appends it to the model as model (effort)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 11:45:19 +08:00
shujakuin 2d3d433f4f feat: show first-token latency, decode tok/s, per-key colors
- logs page adds First (first_token_ms) and Tok/s columns; Tok/s is
  output_tokens / (latency - first_token) over the decode window
- detail line shows the same rate after first-token latency
- API key names render in a stable per-key color (crc32 over a 10-color
  palette) so rows from the same key group visually; --once stays plain
- --once --logs prints the new first/tok-s columns

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 11:19:06 +08:00
shujakuin b68d801024 feat: add sub2apicn request logs page
- new logs page (press l / a to switch, or start with --logs) reading the
  latest 100 requests from the Sub2API admin usage API on sub2apicn
- columns: Key, Account, Model, Type, Tokens, Cost, Latency, Time with a
  per-row detail line (token buckets, actual cost, first-token latency)
- refreshes every 60s by default (--logs-refresh-seconds, --logs-limit)
- admin API key read from SHUSUB2_LOGS_TOKEN or ~/.config/shusub2/logs-token;
  --save-config now persists logs-url/logs-token too
- --once --logs prints a one-shot logs snapshot

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:18:47 +08:00
shujakuin 6e7831da7c feat: persist config from uvx bootstrap 2026-06-09 17:20:57 +08:00
shujakuin 01aa4a6012 feat: infer status url and check updates 2026-06-09 16:45:17 +08:00
shujakuin 3b9d092c06 fix: hide daily quota without limit 2026-06-09 16:23:13 +08:00
shujakuin 98410b0fe0 feat: show monitor availability column 2026-06-09 16:09:26 +08:00
shujakuin 16f50172ca feat: bind monitors by base url hash 2026-06-09 15:59:44 +08:00
shujakuin a59ae55783 feat: show channel monitor health 2026-06-09 15:28:10 +08:00
shujakuin ffde69aee6 feat: publish shusub2 tui 2026-06-09 15:06:26 +08:00