mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00:00
And null handling for response output_files in code output
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user