mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 21:29:08 +00:00
Include code snippets in the reference panel
This commit is contained in:
@@ -455,6 +455,7 @@ export function TeaserReferencesSection(props: TeaserReferenceSectionProps) {
|
||||
<ReferencePanel
|
||||
notesReferenceCardData={props.notesReferenceCardData}
|
||||
onlineReferenceCardData={props.onlineReferenceCardData}
|
||||
codeReferenceCardData={props.codeReferenceCardData}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -465,6 +466,7 @@ export function TeaserReferencesSection(props: TeaserReferenceSectionProps) {
|
||||
interface ReferencePanelDataProps {
|
||||
notesReferenceCardData: NotesContextReferenceData[];
|
||||
onlineReferenceCardData: OnlineReferenceData[];
|
||||
codeReferenceCardData: CodeReferenceData[];
|
||||
}
|
||||
|
||||
export default function ReferencePanel(props: ReferencePanelDataProps) {
|
||||
@@ -502,6 +504,15 @@ export default function ReferencePanel(props: ReferencePanelDataProps) {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{props.codeReferenceCardData.map((code, index) => {
|
||||
return (
|
||||
<CodeContextReferenceCard
|
||||
showFullContent={true}
|
||||
{...code}
|
||||
key={`code-${index}`}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
|
||||
Reference in New Issue
Block a user