mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 21:23:07 +00:00
fix: drive usage indicator by active provider window
This commit is contained in:
@@ -244,11 +244,14 @@ export function UsagePopover() {
|
||||
return 'bg-green-500';
|
||||
};
|
||||
|
||||
// Determine which provider icon and percentage to show on the header button
|
||||
const hasClaudeUsage = Boolean(claudeUsage);
|
||||
const hasCodexUsage = Boolean(codexUsage);
|
||||
const useClaudeIndicator = hasClaudeUsage || (!hasCodexUsage && isClaudeAuthenticated);
|
||||
const indicatorInfo = useClaudeIndicator
|
||||
const codexWindowMinutes = codexUsage?.rateLimits?.primary?.windowDurationMins ?? null;
|
||||
const codexWindowLabel = codexWindowMinutes
|
||||
? getCodexWindowLabel(codexWindowMinutes).title
|
||||
: 'Window';
|
||||
|
||||
// Determine which provider icon and percentage to show based on active tab
|
||||
const indicatorInfo =
|
||||
activeTab === 'claude'
|
||||
? {
|
||||
icon: AnthropicIcon,
|
||||
percentage: claudeSessionPercentage,
|
||||
@@ -259,7 +262,7 @@ export function UsagePopover() {
|
||||
icon: OpenAIIcon,
|
||||
percentage: codexMaxPercentage,
|
||||
isStale: isCodexStale,
|
||||
title: 'Usage',
|
||||
title: `Usage (${codexWindowLabel})`,
|
||||
};
|
||||
|
||||
const statusColor = getStatusInfo(indicatorInfo.percentage).color;
|
||||
|
||||
Reference in New Issue
Block a user