Highlight error
This commit is contained in:
Vendored
+1
-8
@@ -145,9 +145,6 @@ export function mountTranscript(root) {
|
||||
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);
|
||||
@@ -577,12 +574,8 @@ function renderEvent(ev, ctx) {
|
||||
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;
|
||||
}
|
||||
case "turn.ended":
|
||||
|
||||
Reference in New Issue
Block a user