mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
Refactor: Remove edit-format column from leaderboards
This commit is contained in:
parent
ea1239efef
commit
d33a571f7d
2 changed files with 6 additions and 23 deletions
|
@ -15,15 +15,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
label: 'Percent completed correctly',
|
label: 'Percent completed correctly',
|
||||||
data: [],
|
data: [],
|
||||||
backgroundColor: function(context) {
|
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] || '';
|
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)';
|
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) {
|
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)';
|
return (label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase())) ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)';
|
||||||
},
|
},
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
|
@ -46,7 +42,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
model: '{{ row.model }}',
|
model: '{{ row.model }}',
|
||||||
pass_rate: {{ row[pass_rate_field] }},
|
pass_rate: {{ row[pass_rate_field] }},
|
||||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }},
|
percent_cases_well_formed: {{ row.percent_cases_well_formed }},
|
||||||
edit_format: '{{ row.edit_format | default: "diff" }}',
|
|
||||||
total_cost: {{ row.total_cost | default: 0 }}
|
total_cost: {{ row.total_cost | default: 0 }}
|
||||||
});
|
});
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -85,10 +80,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
const isHighlighted = label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase());
|
const isHighlighted = label && HIGHLIGHT_MODEL && label.toLowerCase().includes(HIGHLIGHT_MODEL.toLowerCase());
|
||||||
|
|
||||||
if (isHighlighted) {
|
if (isHighlighted) {
|
||||||
if (row && row.edit_format === 'whole') return redDiagonalPattern;
|
return 'rgba(255, 99, 132, 0.2)';
|
||||||
else return 'rgba(255, 99, 132, 0.2)';
|
|
||||||
} else if (row && row.edit_format === 'whole') {
|
|
||||||
return blueDiagonalPattern;
|
|
||||||
} else {
|
} else {
|
||||||
return 'rgba(54, 162, 235, 0.2)';
|
return 'rgba(54, 162, 235, 0.2)';
|
||||||
}
|
}
|
||||||
|
@ -126,12 +118,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
strokeStyle: 'rgba(54, 162, 235, 1)',
|
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||||
lineWidth: 1
|
lineWidth: 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: 'Whole format',
|
|
||||||
fillStyle: blueDiagonalPattern,
|
|
||||||
strokeStyle: 'rgba(54, 162, 235, 1)',
|
|
||||||
lineWidth: 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text: 'Total Cost ($)',
|
text: 'Total Cost ($)',
|
||||||
fillStyle: 'rgba(153, 102, 255, 1)',
|
fillStyle: 'rgba(153, 102, 255, 1)',
|
||||||
|
|
|
@ -27,7 +27,6 @@ Aider works best with high-scoring models, though it [can connect to almost any
|
||||||
<th style="padding: 8px; text-align: center;">Percent correct</th>
|
<th style="padding: 8px; text-align: center;">Percent correct</th>
|
||||||
<th style="padding: 8px; text-align: center;">Cost (log scale)</th>
|
<th style="padding: 8px; text-align: center;">Cost (log scale)</th>
|
||||||
<th style="padding: 8px; text-align: left;">Command</th>
|
<th style="padding: 8px; text-align: left;">Command</th>
|
||||||
<th style="padding: 8px; text-align: center;">Edit format</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -54,7 +53,6 @@ Aider works best with high-scoring models, though it [can connect to almost any
|
||||||
<span>{% if row.total_cost == 0 or rounded_cost == 0.00 %}?{% else %}${{ rounded_cost }}{% endif %}</span>
|
<span>{% if row.total_cost == 0 or rounded_cost == 0.00 %}?{% else %}${{ rounded_cost }}{% endif %}</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 8px;"><span><code>{{ row.command }}</code></span></td>
|
<td style="padding: 8px;"><span><code>{{ row.command }}</code></span></td>
|
||||||
<td style="padding: 8px; text-align: center;"><span>{{ row.edit_format }}</span></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -86,14 +84,13 @@ Aider works best with high-scoring models, though it [can connect to almost any
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-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;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide command and edit format columns on mobile */
|
/* Hide command column on mobile */
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
th:nth-child(4), td:nth-child(4), /* Command column */
|
th:nth-child(4), td:nth-child(4) { /* Command column */
|
||||||
th:nth-child(5), td:nth-child(5) { /* Edit format column */
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue