refactor(lens): keep attempt rendering within lint budgets

This commit is contained in:
moe-berri 2026-10-06 14:17:28 -07:00
parent 320b209221
commit a3ad12b259
2 changed files with 8 additions and 8 deletions

View file

@ -306,12 +306,11 @@ function ConversationTool({ item, onOpenStep }: { item: ConversationItem; onOpen
const executionStatus = failed ? "Failed" : "Completed";
const [open, setOpen] = useState(failed);
const name = item.toolCall?.name ?? item.span.name;
const attemptStatus =
item.toolAttempt?.resultStatus === "recorded"
? "Result recorded"
: item.toolAttempt?.resultStatus === "conflicting"
? "Conflicting results"
: "Result not recorded";
const attemptStatus = {
recorded: "Result recorded",
conflicting: "Conflicting results",
not_recorded: "Result not recorded",
}[item.toolAttempt?.resultStatus ?? "not_recorded"];
const summary = toolSummary(item.toolCall?.args);
return (
<div className={cn("min-w-0 overflow-hidden rounded-md border", failed && "border-destructive/40")}>

View file

@ -346,14 +346,15 @@ export function buildConversation(
for (const result of unexecutedToolResults(details.get(span.span_id)!)) {
if (attempts.has(result.id)) continue;
attempts.add(result.id);
items.push({
const attempt: ConversationItem = {
id: `${span.span_id}-${result.id}`,
span,
messages: [],
toolCall: { name: "Tool attempt", args: { tool_call_id: result.id } },
toolAttempt: { isError: result.isError, resultStatus: "recorded" },
toolResult: result.content,
});
};
items.push(attempt);
}
continue;
}