diff --git a/src/interface/web/app/components/referencePanel/referencePanel.tsx b/src/interface/web/app/components/referencePanel/referencePanel.tsx index e8942bb4..a907a2a9 100644 --- a/src/interface/web/app/components/referencePanel/referencePanel.tsx +++ b/src/interface/web/app/components/referencePanel/referencePanel.tsx @@ -220,7 +220,8 @@ function CodeContextReferenceCard(props: CodeContextReferenceCardProps) { > {sanitizedCodeSnippet} - {renderOutputFiles(props.output_files, false)} + {props.output_files?.length > 0 && + renderOutputFiles(props.output_files, false)} @@ -236,7 +237,7 @@ function CodeContextReferenceCard(props: CodeContextReferenceCardProps) { code {props.output_files?.length > 0 ? "artifact" : ""} - {(props.output_files.length > 0 && + {(props.output_files?.length > 0 && renderOutputFiles(props.output_files?.slice(0, 1), true)) || (
                                 {sanitizedCodeSnippet}