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

Function next

docs/src/javascripts/lifecycle.js:1109–1125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1107
1108 let step = 0;
1109 function next() {
1110 if (step >= PLAYGROUND_TURNS.length) {
1111 // reset
1112 step = 0;
1113 body.innerHTML = "";
1114 counter.textContent = "0/" + PLAYGROUND_TURNS.length;
1115 advance.textContent = "▶ Send the first prompt";
1116 return;
1117 }
1118 const node = renderTurn(PLAYGROUND_TURNS[step]);
1119 node.classList.add("lc-fade-in");
1120 body.appendChild(node);
1121 body.scrollTop = body.scrollHeight;
1122 step += 1;
1123 counter.textContent = step + "/" + PLAYGROUND_TURNS.length;
1124 advance.textContent = step >= PLAYGROUND_TURNS.length ? "↺ Replay" : "→ Next turn";
1125 }
1126 advance.addEventListener("click", next);
1127 }
1128

Callers 2

createFunction · 0.85
_find_existing_agentFunction · 0.85

Calls 1

renderTurnFunction · 0.85

Tested by

no test coverage detected