Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

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

balibabu468e4042c262
diff --git a/web/src/components/markdown-content/index.tsx b/web/src/components/markdown-content/index.tsx
index d0c0bf42f3..56e7a954e6 100644
--- a/web/src/components/markdown-content/index.tsx
+++ b/web/src/components/markdown-content/index.tsx
@@ -217,20 +217,23 @@ const MarkdownContent = ({
const docType = chunkItem?.doc_type;
return showImage(docType) ? (
- <Image
- id={imageId}
- className={styles.referenceInnerChunkImage}
- onClick={
- documentId
- ? handleDocumentButtonClick(
- documentId,
- chunkItem,
- fileExtension === 'pdf',
- documentUrl,
- )
- : () => {}
- }
- ></Image>
+ <section>
+ <Image
+ id={imageId}
+ className={styles.referenceInnerChunkImage}
+ onClick={
+ documentId
+ ? handleDocumentButtonClick(
+ documentId,
+ chunkItem,
+ fileExtension === 'pdf',
+ documentUrl,
+ )
+ : () => {}
+ }
+ ></Image>
+ <span className="text-accent-primary"> {imageId}</span>
+ </section>
) : (
<HoverCard key={i}>
<HoverCardTrigger>
diff --git a/web/src/components/next-markdown-content/index.tsx b/web/src/components/next-markdown-content/index.tsx
index 8e114f593b..71d4611b41 100644
--- a/web/src/components/next-markdown-content/index.tsx
+++ b/web/src/components/next-markdown-content/index.tsx
@@ -220,20 +220,23 @@ function MarkdownContent({
const docType = chunkItem?.doc_type;
return showImage(docType) ? (
- <Image
- id={imageId}
- className={styles.referenceInnerChunkImage}
- onClick={
- documentId
- ? handleDocumentButtonClick(
- documentId,
- chunkItem,
- fileExtension === 'pdf',
- documentUrl,
- )
- : () => {}
- }
- ></Image>
+ <section>
+ <Image
+ id={imageId}
+ className={styles.referenceInnerChunkImage}
+ onClick={
+ documentId
+ ? handleDocumentButtonClick(
+ documentId,
+ chunkItem,
+ fileExtension === 'pdf',
+ documentUrl,
+ )
+ : () => {}
+ }
+ ></Image>
+ <span className="text-accent-primary">{imageId}</span>
+ </section>
) : (
<HoverCard key={i}>
<HoverCardTrigger>