mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 09:25:06 +01:00
And null handling for response output_files in code output
This commit is contained in:
parent
d68243a3fb
commit
d7027109a5
1 changed files with 3 additions and 2 deletions
|
@ -220,7 +220,8 @@ function CodeContextReferenceCard(props: CodeContextReferenceCardProps) {
|
|||
>
|
||||
{sanitizedCodeSnippet}
|
||||
</pre>
|
||||
{renderOutputFiles(props.output_files, false)}
|
||||
{props.output_files?.length > 0 &&
|
||||
renderOutputFiles(props.output_files, false)}
|
||||
</div>
|
||||
</Card>
|
||||
</PopoverTrigger>
|
||||
|
@ -236,7 +237,7 @@ function CodeContextReferenceCard(props: CodeContextReferenceCardProps) {
|
|||
code {props.output_files?.length > 0 ? "artifact" : ""}
|
||||
</h3>
|
||||
</div>
|
||||
{(props.output_files.length > 0 &&
|
||||
{(props.output_files?.length > 0 &&
|
||||
renderOutputFiles(props.output_files?.slice(0, 1), true)) || (
|
||||
<pre className="text-xs border-t mt-1 pt-1 verflow-hidden line-clamp-10">
|
||||
{sanitizedCodeSnippet}
|
||||
|
|
Loading…
Reference in a new issue