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":
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user