diff --git a/agenta-web/src/components/pages/observability/drawer/TraceContent.tsx b/agenta-web/src/components/pages/observability/drawer/TraceContent.tsx index a81f7d2b0e..e213792080 100644 --- a/agenta-web/src/components/pages/observability/drawer/TraceContent.tsx +++ b/agenta-web/src/components/pages/observability/drawer/TraceContent.tsx @@ -75,7 +75,7 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ })) const TraceContent = ({activeTrace}: TraceContentProps) => { - const {data, key, children, ...filteredTrace} = activeTrace + const {key, children, ...filteredTrace} = activeTrace const classes = useStyles() const [tab, setTab] = useState("overview") const {icon, bgColor, color} = statusMapper(activeTrace.node.type) @@ -131,16 +131,16 @@ const TraceContent = ({activeTrace}: TraceContentProps) => { )} - {data && data?.inputs ? ( + {activeTrace.data && activeTrace.data?.inputs ? ( {activeTrace.node.type !== "chat" ? ( ) : ( - Object.entries(transformDataInputs(data.inputs)).map( + Object.entries(transformDataInputs(activeTrace.data?.inputs)).map( ([key, values]) => { if (key === "prompt") { return Array.isArray(values) @@ -171,16 +171,16 @@ const TraceContent = ({activeTrace}: TraceContentProps) => { ) : null} - {data && data?.outputs ? ( + {activeTrace.data && activeTrace.data?.outputs ? ( {activeTrace.node.type !== "chat" ? ( ) : ( - Object.values(data.outputs).map((item) => + Object.values(activeTrace.data.outputs).map((item) => Array.isArray(item) ? item.map((param, index) => !!param.content && @@ -206,12 +206,12 @@ const TraceContent = ({activeTrace}: TraceContentProps) => { ) : null} - {data && data?.internals && ( + {activeTrace.data && activeTrace.data?.internals && ( {activeTrace.node.type !== "chat" && ( )}