Highlight error
This commit is contained in:
+1
-8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user