Highlight error

This commit is contained in:
Ian Gulliver
2026-10-14 21:16:05 -07:00
parent 4a2bbe0859
commit 73f6dd73d2
11 changed files with 105 additions and 130 deletions
+1 -8
View File
@@ -185,9 +185,6 @@ export function mountTranscript(root: HTMLElement): () => void {
const group = h("details", { class: "tool-group" }, summary, body);
run.first.replaceWith(group);
body.append(run.first);
if (run.first.classList.contains("errored")) {
group.classList.add("errored");
}
run.group = { el: group, summary, body };
}
run.group.body.append(el);
@@ -667,12 +664,8 @@ function renderEvent(ev: ByreEvent, ctx: Ctx): HTMLElement | null {
if (!target) {
return h("div", { class: "tool-result orphan" }, body);
}
target.className = p["is_error"] ? "tool-result error" : "tool-result";
target.className = "tool-result";
replace(target, body);
if (p["is_error"]) {
target.closest("details.tool")?.classList.add("errored");
target.closest("details.tool-group")?.classList.add("errored");
}
return null;
}