diff options
Diffstat (limited to 'frontend/src/components/Sidebar.tsx')
| -rw-r--r-- | frontend/src/components/Sidebar.tsx | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index aeb164b..8bb5fcb 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx @@ -810,20 +810,32 @@ const Sidebar: React.FC<SidebarProps> = ({ isOpen, onToggle, onInteract }) => { } break; } - case 'convergence_check': { + case 'model_eliminated': { const lastRound2 = debateRounds[debateRounds.length - 1]; if (lastRound2) { - lastRound2.converged = evt.data.converged; - updateNodeData(runningNodeId, { - debateData: { - rounds: [...debateRounds], - finalVerdict: null, - config: { judgeMode, format: debateFormat, maxRounds }, - }, + if (!lastRound2.eliminated) lastRound2.eliminated = []; + lastRound2.eliminated.push({ + model: evt.data.model, + convincedBy: evt.data.convinced_by, + reasoning: evt.data.reasoning, }); } - if (evt.data.converged) { - setDebateStage('Consensus reached!'); + setDebateStage(`${evt.data.model} concedes to ${evt.data.convinced_by || 'another'}...`); + break; + } + case 'convergence_status': { + const remaining = evt.data.remaining as string[]; + updateNodeData(runningNodeId, { + debateData: { + rounds: [...debateRounds], + finalVerdict: null, + config: { judgeMode, format: debateFormat, maxRounds }, + }, + }); + if (remaining.length <= 1) { + setDebateStage(`${remaining[0] || 'Winner'} is the last one standing!`); + } else { + setDebateStage(`${remaining.length} models remaining...`); } break; } |
