mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
fix: move session window hint to usage indicator
This commit is contained in:
@@ -28,7 +28,6 @@ type UsageError = {
|
|||||||
// Fixed refresh interval (45 seconds)
|
// Fixed refresh interval (45 seconds)
|
||||||
const REFRESH_INTERVAL_SECONDS = 45;
|
const REFRESH_INTERVAL_SECONDS = 45;
|
||||||
const CLAUDE_SESSION_WINDOW_HOURS = 5;
|
const CLAUDE_SESSION_WINDOW_HOURS = 5;
|
||||||
const CLAUDE_SESSION_WINDOW_BADGE = `${CLAUDE_SESSION_WINDOW_HOURS}h`;
|
|
||||||
|
|
||||||
// Helper to format reset time for Codex
|
// Helper to format reset time for Codex
|
||||||
function formatCodexResetTime(unixTimestamp: number): string {
|
function formatCodexResetTime(unixTimestamp: number): string {
|
||||||
@@ -265,17 +264,16 @@ export function UsagePopover() {
|
|||||||
const statusColor = getStatusInfo(tabInfo.percentage).color;
|
const statusColor = getStatusInfo(tabInfo.percentage).color;
|
||||||
const ProviderIcon = tabInfo.icon;
|
const ProviderIcon = tabInfo.icon;
|
||||||
|
|
||||||
|
const indicatorTitle =
|
||||||
|
activeTab === 'claude' ? `Session usage (${CLAUDE_SESSION_WINDOW_HOURS}h window)` : 'Usage';
|
||||||
|
|
||||||
const trigger = (
|
const trigger = (
|
||||||
<Button variant="ghost" size="sm" className="h-9 gap-2 bg-secondary border border-border px-3">
|
<Button variant="ghost" size="sm" className="h-9 gap-2 bg-secondary border border-border px-3">
|
||||||
{(claudeUsage || codexUsage) && <ProviderIcon className={cn('w-4 h-4', statusColor)} />}
|
{(claudeUsage || codexUsage) && <ProviderIcon className={cn('w-4 h-4', statusColor)} />}
|
||||||
<span className="text-sm font-medium">Usage</span>
|
<span className="text-sm font-medium">Usage</span>
|
||||||
{activeTab === 'claude' && (
|
|
||||||
<span className="text-[10px] font-medium text-muted-foreground">
|
|
||||||
{CLAUDE_SESSION_WINDOW_BADGE}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{(claudeUsage || codexUsage) && (
|
{(claudeUsage || codexUsage) && (
|
||||||
<div
|
<div
|
||||||
|
title={indicatorTitle}
|
||||||
className={cn(
|
className={cn(
|
||||||
'h-1.5 w-16 bg-muted-foreground/20 rounded-full overflow-hidden transition-opacity',
|
'h-1.5 w-16 bg-muted-foreground/20 rounded-full overflow-hidden transition-opacity',
|
||||||
tabInfo.isStale && 'opacity-60'
|
tabInfo.isStale && 'opacity-60'
|
||||||
|
|||||||
Reference in New Issue
Block a user