mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:34:02 +00:00
Add OAuth usage visualization for Claude OAuth accounts while maintaining existing Setup Token session window display. Accounts show different UI based on authorization type detected via scopes. Changes: - Add loadClaudeUsage() for async OAuth usage data loading - Add isClaudeOAuth() to detect auth type (checks user:profile + user:inference scopes) - Add OAuth helpers: formatClaudeUsagePercent, getClaudeUsageWidth, getClaudeUsageBarClass, formatClaudeRemaining - Display three OAuth windows (5h, 7d, 7d-Opus) for OAuth accounts - Maintain original session window display for Setup Token accounts - Color-coded progress bars (blue < 60%, yellow 60-90%, red >= 90%) - Update tooltip with OAuth documentation - Remove duplicate Claude fallback branch - Apply to desktop and mobile views