Feat: Display the ID of the code image in the dialog. #10427 (#11746)

### What problem does this PR solve?

Feat: Display the ID of the code image in the dialog.   #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-12-04 18:49:55 +08:00
committed by GitHub
parent af1344033d
commit 468e4042c2
2 changed files with 34 additions and 28 deletions

View File

@ -217,20 +217,23 @@ const MarkdownContent = ({
const docType = chunkItem?.doc_type; const docType = chunkItem?.doc_type;
return showImage(docType) ? ( return showImage(docType) ? (
<Image <section>
id={imageId} <Image
className={styles.referenceInnerChunkImage} id={imageId}
onClick={ className={styles.referenceInnerChunkImage}
documentId onClick={
? handleDocumentButtonClick( documentId
documentId, ? handleDocumentButtonClick(
chunkItem, documentId,
fileExtension === 'pdf', chunkItem,
documentUrl, fileExtension === 'pdf',
) documentUrl,
: () => {} )
} : () => {}
></Image> }
></Image>
<span className="text-accent-primary"> {imageId}</span>
</section>
) : ( ) : (
<HoverCard key={i}> <HoverCard key={i}>
<HoverCardTrigger> <HoverCardTrigger>

View File

@ -220,20 +220,23 @@ function MarkdownContent({
const docType = chunkItem?.doc_type; const docType = chunkItem?.doc_type;
return showImage(docType) ? ( return showImage(docType) ? (
<Image <section>
id={imageId} <Image
className={styles.referenceInnerChunkImage} id={imageId}
onClick={ className={styles.referenceInnerChunkImage}
documentId onClick={
? handleDocumentButtonClick( documentId
documentId, ? handleDocumentButtonClick(
chunkItem, documentId,
fileExtension === 'pdf', chunkItem,
documentUrl, fileExtension === 'pdf',
) documentUrl,
: () => {} )
} : () => {}
></Image> }
></Image>
<span className="text-accent-primary">{imageId}</span>
</section>
) : ( ) : (
<HoverCard key={i}> <HoverCard key={i}>
<HoverCardTrigger> <HoverCardTrigger>