mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00: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}
|
{sanitizedCodeSnippet}
|
||||||
</pre>
|
</pre>
|
||||||
{renderOutputFiles(props.output_files, false)}
|
{props.output_files?.length > 0 &&
|
||||||
|
renderOutputFiles(props.output_files, false)}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
|
@ -236,7 +237,7 @@ function CodeContextReferenceCard(props: CodeContextReferenceCardProps) {
|
||||||
code {props.output_files?.length > 0 ? "artifact" : ""}
|
code {props.output_files?.length > 0 ? "artifact" : ""}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
{(props.output_files.length > 0 &&
|
{(props.output_files?.length > 0 &&
|
||||||
renderOutputFiles(props.output_files?.slice(0, 1), true)) || (
|
renderOutputFiles(props.output_files?.slice(0, 1), true)) || (
|
||||||
<pre className="text-xs border-t mt-1 pt-1 verflow-hidden line-clamp-10">
|
<pre className="text-xs border-t mt-1 pt-1 verflow-hidden line-clamp-10">
|
||||||
{sanitizedCodeSnippet}
|
{sanitizedCodeSnippet}
|
||||||
|
|
Loading…
Add table
Reference in a new issue