fix: handle NaN percentage values and rename opus to sonnet

- Show 'N/A' and dim card when percentage is NaN/invalid
- Use gray progress bar for invalid values
- Rename opusWeekly* properties to sonnetWeekly* to match server types
This commit is contained in:
Mohamad Yahia
2025-12-21 08:32:30 +04:00
parent 6533a15653
commit f2582c4453
3 changed files with 31 additions and 23 deletions

View File

@@ -528,9 +528,9 @@ export interface ClaudeUsage {
weeklyResetTime: string;
weeklyResetText: string;
opusWeeklyTokensUsed: number;
opusWeeklyPercentage: number;
opusResetText: string;
sonnetWeeklyTokensUsed: number;
sonnetWeeklyPercentage: number;
sonnetResetText: string;
costUsed: number | null;
costLimit: number | null;