diff --git a/ui/desktop/src/components/ToolCallWithResponse.tsx b/ui/desktop/src/components/ToolCallWithResponse.tsx index ce1926dc8b3d..6fed12cbb0c5 100644 --- a/ui/desktop/src/components/ToolCallWithResponse.tsx +++ b/ui/desktop/src/components/ToolCallWithResponse.tsx @@ -100,7 +100,9 @@ function ToolResultView({ result }: ToolResultViewProps) { const shouldShowExpanded = (item: Content, index: number) => { return ( - (item.annotations.priority !== undefined && item.annotations.priority >= 0.5) || + (item.annotations && + item.annotations.priority !== undefined && + item.annotations.priority >= 0.5) || expandedItems.includes(index) ); }; @@ -110,7 +112,9 @@ function ToolResultView({ result }: ToolResultViewProps) { {filteredResults.map((item, index) => { const isExpanded = shouldShowExpanded(item, index); const shouldMinimize = - item.annotations.priority === undefined || item.annotations.priority < 0.5; + !item.annotations || + item.annotations.priority === undefined || + item.annotations.priority < 0.5; return (
{shouldMinimize && (