fix(dashboard): new model columns now appear after live research

- updateCell(): auto-create agent entry in reportData.agents if missing
- updateCell(): add model to allAvailableModels for modal checkboxes
- mergeCachedResults(): auto-create agent entry, normalize model names via modelShort()
- mergeCachedResults(): add new models to allAvailableModels for modal picker
- MODEL_BENCHMARKS: add deepseek-v4-pro (was missing, only had deepseek-v4-pro-max)
This commit is contained in:
Deploy Bot
2026-05-28 12:05:25 +01:00
parent 4071551476
commit 56eb5c7eb6

View File

@@ -130,7 +130,7 @@ const API_BASE='http://localhost:3004';
const $=id=>document.getElementById(id);
const MODEL_BENCHMARKS={
"qwen3.5-122b":91,"qwen3-coder-480b":88,"deepseek-v4-pro-max":89,
"qwen3.5-122b":91,"qwen3-coder-480b":88,"deepseek-v4-pro":89,"deepseek-v4-pro-max":89,
"deepseek-v4-flash":86,"kimi-k2.6":91,"kimi-k2.5":90,
"minimax-m2.5":82,"minimax-m2.7":80,"glm-5.1":90,
"glm-5":90,"nemotron-3-super":78,"nemotron-3-nano":68,
@@ -299,10 +299,18 @@ function mergeCachedResults(){
try{
const store=JSON.parse(localStorage.getItem('__researchResults')||'{}');
for(const[agent,rec] of Object.entries(store)){
if(!reportData.agents[agent]) continue;
if(!reportData.agents[agent]){
reportData.agents[agent]={name:agent,evaluations:{},info:[],best_model:'',best_score:0};
}
for(const r of (rec.models||[])){
reportData.agents[agent].evaluations[r.model]=r.score;
if(!allModels.includes(r.model)) allModels.push(r.model);
const shortM=modelShort(r.model);
reportData.agents[agent].evaluations[shortM]=r.score;
if(r.score>reportData.agents[agent].best_score){
reportData.agents[agent].best_model=shortM;
reportData.agents[agent].best_score=r.score;
}
if(!allModels.includes(shortM)) allModels.push(shortM);
if(!allAvailableModels.includes(shortM)) allAvailableModels.push(shortM);
}
}
allModels.sort();
@@ -331,13 +339,18 @@ function renderTable(){
}
function updateCell(agent,model,score){
if(reportData.agents[agent]){
reportData.agents[agent].evaluations[model]=score;
const short=modelShort(model);
if(!reportData.agents[agent]){
reportData.agents[agent]={name:agent,evaluations:{},info:[],best_model:model,best_score:0};
}
if(!allModels.includes(model)){
allModels.push(model);
reportData.agents[agent].evaluations[short]=score;
reportData.agents[agent].best_model=short;
reportData.agents[agent].best_score=score;
if(!allModels.includes(short)){
allModels.push(short);
allModels.sort();
}
if(!allAvailableModels.includes(short)) allAvailableModels.push(short);
renderTable();
}