Cost Summary
Today
{costs.today}
This Week
{costs.week}
This Month
{costs.month}
{#if isLoading}
Loading...
{:else if summary}
Total Cost
{formatCost(summary.total_cost)}
Average Daily
{formatCost(summary.average_daily_cost)}
Messages
{summary.total_messages.toLocaleString()}
Sessions
{summary.total_sessions.toLocaleString()}
Input Tokens
{summary.total_input_tokens.toLocaleString()}
Output Tokens
{summary.total_output_tokens.toLocaleString()}
{#if summary.daily_breakdown.length > 0}
Daily Spending
{#each summary.daily_breakdown.slice(-14) as day (day.date)}
{@const maxCost = Math.max(...summary.daily_breakdown.map((d) => d.cost_usd), 0.01)}
{@const height = (day.cost_usd / maxCost) * 100}
{/each}
{/if}
{/if}
{#if showThresholdSettings}
{/if}