MCPcopy Create free account
hub / github.com/google/agents-cli / setRevealed

Function setRevealed

docs/src/javascripts/lifecycle.js:773–789  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

771 svg.appendChild(scoreLabel);
772
773 function setRevealed(n) {
774 revealed = Math.max(1, Math.min(EVAL_HISTORY.length, n));
775 const frac = (revealed - 1) / (EVAL_HISTORY.length - 1);
776 line.setAttribute("stroke-dashoffset", String(1 - frac));
777 dots.forEach((c, i) => {
778 const isVisible = i < revealed;
779 const isLast = i === revealed - 1;
780 c.setAttribute("r", isVisible ? (isLast ? "5.5" : "4.5") : "0");
781 });
782 const last = EVAL_HISTORY[revealed - 1];
783 // Slide the score label
784 const targetX = xScale(last.iter) + 8;
785 const targetY = yScale(last.score) + 4;
786 scoreLabel.setAttribute("x", targetX);
787 scoreLabel.setAttribute("y", targetY);
788 scoreLabel.textContent = last.score.toFixed(2);
789 }
790 setRevealed(1);
791
792 let revealTimer = null;

Callers 3

initEvalLoopFunction · 0.85
animateRevealFunction · 0.85
resetFunction · 0.85

Calls 2

xScaleFunction · 0.85
yScaleFunction · 0.85

Tested by

no test coverage detected