diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 40f479ab4..c0afbccf8 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -49,15 +49,23 @@ The model also has to successfully apply all its changes to the source file with + {% assign max_cost = 0 %} + {% for row in site.data.polyglot_leaderboard %} + {% if row.total_cost > max_cost %} + {% assign max_cost = row.total_cost %} + {% endif %} + {% endfor %} + {% if max_cost == 0 %}{% assign max_cost = 1 %}{% endif %} {# Avoid division by zero #} {% assign edit_sorted = site.data.polyglot_leaderboard | sort: 'pass_rate_2' | reverse %} {% for row in edit_sorted %} - {{ row.model }} - {{ row.pass_rate_2 }}% - {{ row.percent_cases_well_formed }}% - {{ row.command }} - {{ row.edit_format }} - {% if row.total_cost == 0 %}?{% else %}${{ row.total_cost | times: 1.0 | round: 2 }}{% endif %} + {{ row.model }} + {{ row.pass_rate_2 }}% + {{ row.percent_cases_well_formed }}% + {{ row.command }} + {{ row.edit_format }} + {% assign cost_percent = row.total_cost | times: 100.0 | divided_by: max_cost %} + {% if row.total_cost == 0 %}?{% else %}${{ row.total_cost | times: 1.0 | round: 2 }}{% endif %} {% endfor %} @@ -96,6 +104,16 @@ The model also has to successfully apply all its changes to the source file with display: none; } } + .bar-cell { + position: relative; /* Needed for z-index stacking */ + background-image: linear-gradient(to right, rgba(54, 162, 235, 0.2) var(--percent), transparent var(--percent)); + background-repeat: no-repeat; + background-position: left center; + } + .bar-cell span { + position: relative; + z-index: 1; /* Ensure text is above the gradient */ + }