{# HTMX partial: cost breakdown panel. Loaded on click of the cost stat card. #} {% set month_spend = cost_stats.month %} {% set budget_pct = (month_spend / budget_cap * 100) if budget_cap > 0 else 0 %} {% if budget_pct >= 100 %} {% set bar_color = "bg-red-500" %} {% set pct_text = "text-red-400" %} {% elif budget_pct >= 80 %} {% set bar_color = "bg-amber-500" %} {% set pct_text = "text-amber-400" %} {% else %} {% set bar_color = "bg-emerald-500" %} {% set pct_text = "text-emerald-400" %} {% endif %}
| Feature | Calls | Spend |
|---|---|---|
| {{ item.purpose }} | {{ item.calls }} | ${{ "%.4f" | format(item.spend) }} |
No API calls recorded yet.
{% endif %}