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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -8
View File
@@ -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":
+1 -1
View File
File diff suppressed because one or more lines are too long
+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;
}
-12
View File
@@ -702,10 +702,6 @@ textarea {
background: var(--raised);
}
.tool-group.errored {
border-color: var(--danger);
}
.tool-count {
color: var(--muted);
}
@@ -727,10 +723,6 @@ textarea {
color: var(--muted);
}
.tool.errored {
border-color: var(--danger);
}
.tool-input,
.tool-result pre {
background: var(--raised);
@@ -748,10 +740,6 @@ textarea {
padding: 4px 0;
}
.tool-result.error pre {
color: var(--danger);
}
.turn-end,
.note {
font-size: 11px;