mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-14 04:09:09 +00:00
refactor(lens): keep attempt rendering within lint budgets
This commit is contained in:
parent
320b209221
commit
a3ad12b259
2 changed files with 8 additions and 8 deletions
|
|
@ -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")}>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue