feat: Add color variation to cost bars in leaderboards

This commit is contained in:
Paul Gauthier (aider) 2025-04-12 20:21:38 -07:00
parent 199b59fdb9
commit 4db963182d

View file

@ -70,7 +70,7 @@ The model also has to successfully apply all its changes to the source file with
</td>
{% assign cost_percent = row.total_cost | times: 100.0 | divided_by: max_cost %}
<td class="bar-cell">
<div class="bar-viz" style="width: {{ cost_percent }}%;"></div>
<div class="bar-viz" style="width: {{ cost_percent }}%; background-color: {% if cost_percent >= 80 %}rgba(111, 66, 193, 0.3){% elsif cost_percent >= 50 %}rgba(111, 66, 193, 0.2){% else %}rgba(111, 66, 193, 0.1){% endif %}; border-right: 1px solid {% if cost_percent >= 80 %}rgba(111, 66, 193, 0.5){% elsif cost_percent >= 50 %}rgba(111, 66, 193, 0.4){% else %}rgba(111, 66, 193, 0.3){% endif %};"></div>
<span>{% if row.total_cost == 0 %}?{% else %}${{ row.total_cost | times: 1.0 | round: 2 }}{% endif %}</span>
</td>
<td style="padding: 8px;"><span><code>{{ row.command }}</code></span></td>