mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
feat: Add polka dot pattern to Deepseek diff bars
This commit is contained in:
parent
aa7949467c
commit
4b6dd92f73
1 changed files with 22 additions and 2 deletions
|
@ -71,8 +71,12 @@ o1-preview as Senior and Deepseek as Junior, raising the SOTA from 79.7% up to 8
|
||||||
labels.push("{{ item.junior_model | default: "(No Junior)" }} {{ item.junior_edit_format | default: item.edit_format }}");
|
labels.push("{{ item.junior_model | default: "(No Junior)" }} {{ item.junior_edit_format | default: item.edit_format }}");
|
||||||
data.push({{ item.pass_rate_2 }});
|
data.push({{ item.pass_rate_2 }});
|
||||||
var bgColor = colorMapping["{{ item.model }}"];
|
var bgColor = colorMapping["{{ item.model }}"];
|
||||||
if ("{{ item.junior_model }}" === "deepseek" && "{{ item.junior_edit_format }}" === "whole") {
|
if ("{{ item.junior_model }}" === "deepseek") {
|
||||||
bgColor = createStripedPattern(bgColor);
|
if ("{{ item.junior_edit_format }}" === "whole") {
|
||||||
|
bgColor = createStripedPattern(bgColor);
|
||||||
|
} else if ("{{ item.junior_edit_format }}" === "diff") {
|
||||||
|
bgColor = createPolkaDotPattern(bgColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
backgroundColors.push(bgColor);
|
backgroundColors.push(bgColor);
|
||||||
borderColors.push(borderColorMapping["{{ item.model }}"]);
|
borderColors.push(borderColorMapping["{{ item.model }}"]);
|
||||||
|
@ -94,6 +98,20 @@ o1-preview as Senior and Deepseek as Junior, raising the SOTA from 79.7% up to 8
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
return ctx.createPattern(canvas, 'repeat');
|
return ctx.createPattern(canvas, 'repeat');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createPolkaDotPattern(color) {
|
||||||
|
var canvas = document.createElement('canvas');
|
||||||
|
var ctx = canvas.getContext('2d');
|
||||||
|
canvas.width = 10;
|
||||||
|
canvas.height = 10;
|
||||||
|
ctx.fillStyle = color;
|
||||||
|
ctx.fillRect(0, 0, 10, 10);
|
||||||
|
ctx.fillStyle = 'white';
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(5, 5, 2, 0, Math.PI * 2);
|
||||||
|
ctx.fill();
|
||||||
|
return ctx.createPattern(canvas, 'repeat');
|
||||||
|
}
|
||||||
new Chart(ctx, {
|
new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: {
|
data: {
|
||||||
|
@ -156,6 +174,8 @@ o1-preview as Senior and Deepseek as Junior, raising the SOTA from 79.7% up to 8
|
||||||
var fillStyle = colorMapping[key];
|
var fillStyle = colorMapping[key];
|
||||||
if (chart.data.labels.some(label => label.includes('deepseek whole'))) {
|
if (chart.data.labels.some(label => label.includes('deepseek whole'))) {
|
||||||
fillStyle = createStripedPattern(fillStyle);
|
fillStyle = createStripedPattern(fillStyle);
|
||||||
|
} else if (chart.data.labels.some(label => label.includes('deepseek diff'))) {
|
||||||
|
fillStyle = createPolkaDotPattern(fillStyle);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
text: key,
|
text: key,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue