feat: preview reference image

This commit is contained in:
billchen 2024-02-28 13:44:20 +08:00
parent afeb7fddc3
commit 7bf4753493
2 changed files with 18 additions and 4 deletions

View file

@ -47,3 +47,7 @@
.referenceChunkImage {
width: 10vw;
}
.referenceImagePreview {
width: 600px;
}

View file

@ -66,10 +66,20 @@ const MessageItem = ({
gap={10}
className={styles.referencePopoverWrapper}
>
<Image
id={chunkItem?.img_id}
className={styles.referenceChunkImage}
></Image>
<Popover
placement="topRight"
content={
<Image
id={chunkItem?.img_id}
className={styles.referenceImagePreview}
></Image>
}
>
<Image
id={chunkItem?.img_id}
className={styles.referenceChunkImage}
></Image>
</Popover>
<Space direction={'vertical'}>
<div>{chunkItem?.content_with_weight}</div>
{documentId && (