From d33a571f7de3319981f6f9721cf209141b61d26b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sat, 12 Apr 2025 23:40:54 -0700 Subject: [PATCH] Refactor: Remove edit-format column from leaderboards --- aider/website/_includes/leaderboard.js | 18 ++---------------- aider/website/docs/leaderboards/index.md | 11 ++++------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/aider/website/_includes/leaderboard.js b/aider/website/_includes/leaderboard.js index 0f991b8b7..a8ef32621 100644 --- a/aider/website/_includes/leaderboard.js +++ b/aider/website/_includes/leaderboard.js @@ -15,15 +15,11 @@ document.addEventListener('DOMContentLoaded', function () { label: 'Percent completed correctly', data: [], backgroundColor: function(context) { - const row = allData[context.dataIndex]; - if (row && row.edit_format === 'whole') { - return redDiagonalPattern; // Use red pattern for highlighted whole format - } const label = leaderboardData.labels[context.dataIndex] || ''; return (label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase())) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)'; }, borderColor: function(context) { - const label = context.chart.data.labels[context.dataIndex] || ''; + const label = leaderboardData.labels[context.dataIndex] || ''; return (label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase())) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)'; }, borderWidth: 1 @@ -46,7 +42,6 @@ document.addEventListener('DOMContentLoaded', function () { model: '{{ row.model }}', pass_rate: {{ row[pass_rate_field] }}, percent_cases_well_formed: {{ row.percent_cases_well_formed }}, - edit_format: '{{ row.edit_format | default: "diff" }}', total_cost: {{ row.total_cost | default: 0 }} }); {% endfor %} @@ -85,10 +80,7 @@ document.addEventListener('DOMContentLoaded', function () { const isHighlighted = label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase()); if (isHighlighted) { - if (row && row.edit_format === 'whole') return redDiagonalPattern; - else return 'rgba(255, 99, 132, 0.2)'; - } else if (row && row.edit_format === 'whole') { - return blueDiagonalPattern; + return 'rgba(255, 99, 132, 0.2)'; } else { return 'rgba(54, 162, 235, 0.2)'; } @@ -126,12 +118,6 @@ document.addEventListener('DOMContentLoaded', function () { strokeStyle: 'rgba(54, 162, 235, 1)', lineWidth: 1 }, - { - text: 'Whole format', - fillStyle: blueDiagonalPattern, - strokeStyle: 'rgba(54, 162, 235, 1)', - lineWidth: 1 - }, { text: 'Total Cost ($)', fillStyle: 'rgba(153, 102, 255, 1)', diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index e6a3ed3ae..6e984f057 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -27,7 +27,6 @@ Aider works best with high-scoring models, though it [can connect to almost any Percent correct Cost (log scale) Command - Edit format @@ -54,7 +53,6 @@ Aider works best with high-scoring models, though it [can connect to almost any {% if row.total_cost == 0 or rounded_cost == 0.00 %}?{% else %}${{ rounded_cost }}{% endif %} {{ row.command }} - {{ row.edit_format }} {% endfor %} @@ -86,14 +84,13 @@ Aider works best with high-scoring models, though it [can connect to almost any word-wrap: break-word; overflow-wrap: break-word; } - td:nth-child(4), td:nth-child(5) { /* Command and Edit Format columns */ + td:nth-child(4) { /* Command column */ font-size: 12px; } - - /* Hide command and edit format columns on mobile */ + + /* Hide command column on mobile */ @media screen and (max-width: 767px) { - th:nth-child(4), td:nth-child(4), /* Command column */ - th:nth-child(5), td:nth-child(5) { /* Edit format column */ + th:nth-child(4), td:nth-child(4) { /* Command column */ display: none; } }