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

Function renderTurn

docs/src/javascripts/lifecycle.js:1086–1106  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

1084 host.appendChild(foot);
1085
1086 function renderTurn(t) {
1087 if (t.kind === "user") {
1088 const w = htmlEl("div", { class: "lc-row lc-row--right" });
1089 w.appendChild(htmlEl("div", { class: "lc-bubble lc-bubble--user" }, t.text));
1090 return w;
1091 }
1092 if (t.kind === "tool") {
1093 const w = htmlEl("div", { class: "lc-row" });
1094 const c = htmlEl("div", { class: "lc-tool" });
1095 c.appendChild(htmlEl("div", { class: "lc-tool__sig" }, [
1096 htmlEl("span", { class: "lc-tool__name" }, t.tool),
1097 htmlEl("span", { class: "lc-muted" }, "(" + t.args + ")"),
1098 ]));
1099 c.appendChild(htmlEl("div", { class: "lc-tool__result" }, "↳ " + t.result));
1100 w.appendChild(c);
1101 return w;
1102 }
1103 const w = htmlEl("div", { class: "lc-row" });
1104 w.appendChild(htmlEl("div", { class: "lc-bubble lc-bubble--agent" }, t.text));
1105 return w;
1106 }
1107
1108 let step = 0;
1109 function next() {

Callers 1

nextFunction · 0.85

Calls 1

htmlElFunction · 0.85

Tested by

no test coverage detected