From a3ad12b259b2d9f499bedcdffa3737d7a364cf92 Mon Sep 17 00:00:00 2001 From: moe-berri Date: Tue, 6 Oct 2026 14:17:28 -0700 Subject: [PATCH] refactor(lens): keep attempt rendering within lint budgets --- .../traces/detail/conversation/TraceConversation.tsx | 11 +++++------ .../lens/traces/detail/conversation/conversation.ts | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.tsx b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.tsx index b1c260f7a8c..880289c717c 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.tsx @@ -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 (
diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/conversation.ts b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/conversation.ts index 3d4d7ac7df6..b36f1da44fa 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/conversation.ts +++ b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/conversation.ts @@ -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; }