Replace cap-based estimation with PTY-driven 'claude /usage' parser

The widget now spawns 'claude' via portable-pty, sends /usage, parses the
three rendered bars (Current session / Current week all / Current week
Sonnet), and shows the real percentages in the ring + weekly bars. A
background task refreshes every 5 minutes; the title-bar refresh button
forces an immediate fetch.

Drops the cap-tuning UI and tier card from Settings; adds a 'claude command'
override (e.g. 'wsl.exe -- claude' for Windows-host widgets reading WSL
credentials) and a refresh-interval setting. Fixes title-bar buttons getting
swallowed as drag attempts via data-tauri-drag-region="false".
This commit is contained in:
megaproxy 2026-05-09 01:40:44 +01:00
parent 18e55cd139
commit db9a10a4c2
13 changed files with 656 additions and 166 deletions

View file

@ -35,6 +35,8 @@ once_cell = "1"
parking_lot = "0.12"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
portable-pty = "0.8"
regex = "1"
[target.'cfg(windows)'.dependencies]
windows = { version = "0.58", features = ["Win32_System_Console"] }