"use client" import PageHeader from './PageHeader' import ProviderFilter from './ProviderFilter' import TimeRangeFilter from './TimeRangeFilter' import type { ToolTheme, ProviderId } from '@/app/ai/theme' import type { TimeRangeKey } from '@/lib/types' interface LoadingSkeletonProps { theme: ToolTheme selectedProvider?: ProviderId timeRange?: TimeRangeKey } const hexToRgba = (hex: string, alpha: number): string => { const normalized = hex.replace('#', '') const value = normalized.length === 3 ? normalized.split('').map((char) => `${char}${char}`).join('') : normalized.padEnd(6, '0') const num = parseInt(value, 16) const r = (num >> 16) & 255 const g = (num >> 8) & 255 const b = num & 255 return `rgba(${r}, ${g}, ${b}, ${alpha})` } const buildSkeletonStyles = (theme: ToolTheme) => { const accentBase = theme.id === 'codex' ? theme.accentContrast : theme.accent const softAccent = hexToRgba(accentBase, 0.14) const mediumAccent = hexToRgba(accentBase, 0.22) const strongAccent = hexToRgba(accentBase, 0.35) return { cardBorder: hexToRgba(accentBase, 0.28), chipBorder: hexToRgba(accentBase, 0.4), solid: { backgroundColor: mediumAccent }, gradient: { backgroundImage: `linear-gradient(90deg, ${softAccent}, ${strongAccent}, ${softAccent})`, backgroundColor: softAccent, }, subtle: { backgroundColor: softAccent }, } } export default function LoadingSkeleton({ theme, selectedProvider = 'all', timeRange = '1m' }: LoadingSkeletonProps) { const placeholderStyles = buildSkeletonStyles(theme) return (

Total Cost

Total Tokens

Days Active

Avg Daily Cost

Activity

Chart

Model Usage Distribution

{[...Array(3)].map((_, i) => (
))}
Total Models Used
Most Used

By Token Type

Token Composition

Recent Sessions

{[...Array(5)].map((_, index) => ( ))}
Date Models Used Total Tokens Cost
) }