From d7027109a5f3894cc4f4f90cd571092a5b8b75d4 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 11 Nov 2024 21:14:56 -0800 Subject: [PATCH] And null handling for response output_files in code output --- .../web/app/components/referencePanel/referencePanel.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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}