Show each helper's strength and effort as colored level badges

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-26 06:03:07 -07:00
1 parent b99a1a701f
commit 765d2b3536
7 files changed
+100 -7

No files matched your search

+18 -1
View File
@@ -724,7 +724,24 @@ export function renderSubagents(main) {
head.appendChild(pill);
item.appendChild(head);
item.appendChild(el("p", "sa-ask", row.ask));
if (row.strengthLine) item.appendChild(el("p", "sa-strength", row.strengthLine));
if (row.strengthLine) {
// Badges for the eye, the plain line for screen readers and the tooltip.
const strength = el("p", "sa-strength");
strength.setAttribute("aria-label", row.strengthLine);
strength.title = row.strengthLine;
for (const badge of row.badges) {
const chip = el("span", `sa-badge is-${badge.kind} lvl-${badge.level}`);
chip.setAttribute("aria-hidden", "true");
if (badge.level) {
const bars = el("span", "sa-bars");
for (let i = 1; i <= 3; i++) bars.appendChild(el("i", i <= badge.level ? "on" : null));
chip.appendChild(bars);
}
chip.appendChild(document.createTextNode(badge.label));
strength.appendChild(chip);
}
item.appendChild(strength);
}
if (row.result) item.appendChild(el("p", "sa-result", row.result));
list.appendChild(item);
}