|
|
|
@ -53,14 +53,15 @@ const Popup: FC<PopupProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</PortalToFollowElemTrigger>
|
|
|
|
</PortalToFollowElemTrigger>
|
|
|
|
<PortalToFollowElemContent style={{ zIndex: 1000 }}>
|
|
|
|
<PortalToFollowElemContent style={{ zIndex: 1000 }}>
|
|
|
|
<div className='w-[360px] bg-gray-50 rounded-xl shadow-lg'>
|
|
|
|
<div className='max-w-[360px] bg-gray-50 rounded-xl shadow-lg'>
|
|
|
|
<div className='px-4 pt-3 pb-2'>
|
|
|
|
<div className='px-4 pt-3 pb-2'>
|
|
|
|
<div className='flex items-center h-[18px]'>
|
|
|
|
<div className='flex items-center h-[18px]'>
|
|
|
|
<FileIcon type={fileType} className='shrink-0 mr-1 w-4 h-4' />
|
|
|
|
<FileIcon type={fileType} className='shrink-0 mr-1 w-4 h-4' />
|
|
|
|
<div className='text-xs font-medium text-gray-600 truncate'>{data.documentName}</div>
|
|
|
|
<div className='text-xs font-medium text-gray-600 truncate'>{data.documentName}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='px-4 py-0.5 max-h-[450px] bg-white rounded-lg overflow-auto'>
|
|
|
|
<div className='px-4 py-0.5 max-h-[450px] bg-white rounded-lg overflow-y-auto'>
|
|
|
|
|
|
|
|
<div className='w-full'>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data.sources.map((source, index) => (
|
|
|
|
data.sources.map((source, index) => (
|
|
|
|
<Fragment key={index}>
|
|
|
|
<Fragment key={index}>
|
|
|
|
@ -83,10 +84,10 @@ const Popup: FC<PopupProps> = ({
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='text-[13px] text-gray-800'>{source.content}</div>
|
|
|
|
<div className='text-[13px] text-gray-800 break-words'>{source.content}</div>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
showHitInfo && (
|
|
|
|
showHitInfo && (
|
|
|
|
<div className='flex items-center mt-2 text-xs font-medium text-gray-500'>
|
|
|
|
<div className='flex items-center mt-2 text-xs font-medium text-gray-500 flex-wrap'>
|
|
|
|
<Tooltip
|
|
|
|
<Tooltip
|
|
|
|
text={t('common.chat.citation.characters')}
|
|
|
|
text={t('common.chat.citation.characters')}
|
|
|
|
data={source.word_count}
|
|
|
|
data={source.word_count}
|
|
|
|
@ -121,6 +122,7 @@ const Popup: FC<PopupProps> = ({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</PortalToFollowElemContent>
|
|
|
|
</PortalToFollowElemContent>
|
|
|
|
</PortalToFollowElem>
|
|
|
|
</PortalToFollowElem>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|