|
|
|
|
@ -3,6 +3,7 @@ import type { FC } from 'react'
|
|
|
|
|
import React from 'react'
|
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
|
import { SegmentIndexTag } from '../../documents/detail/completed'
|
|
|
|
|
import Dot from '../../documents/detail/completed/common/dot'
|
|
|
|
|
import Score from './score'
|
|
|
|
|
import ChildChunksItem from './child-chunks-item'
|
|
|
|
|
import Modal from '@/app/components/base/modal'
|
|
|
|
|
@ -10,6 +11,7 @@ import type { HitTesting } from '@/models/datasets'
|
|
|
|
|
import FileIcon from '@/app/components/base/file-uploader/file-type-icon'
|
|
|
|
|
import type { FileAppearanceTypeEnum } from '@/app/components/base/file-uploader/types'
|
|
|
|
|
import cn from '@/utils/classnames'
|
|
|
|
|
import Tag from '@/app/components/datasets/documents/detail/completed/common/tag'
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
payload: HitTesting
|
|
|
|
|
@ -44,7 +46,7 @@ const ChunkDetailModal: FC<Props> = ({
|
|
|
|
|
positionId={position}
|
|
|
|
|
className={cn('w-fit group-hover:opacity-100')}
|
|
|
|
|
/>
|
|
|
|
|
<div className='text-xs font-medium text-text-quaternary'>·</div>
|
|
|
|
|
<Dot />
|
|
|
|
|
<div className='flex items-center space-x-1'>
|
|
|
|
|
<FileIcon type={extension} size='sm' />
|
|
|
|
|
<span className='grow w-0 truncate text-text-secondary text-[13px] font-normal'>{document.name}</span>
|
|
|
|
|
@ -58,9 +60,11 @@ const ChunkDetailModal: FC<Props> = ({
|
|
|
|
|
{!isParentChildRetrieval && keywords && keywords.length > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
<div>{t('dataset.keywords')}</div>
|
|
|
|
|
{keywords.map(keyword => (
|
|
|
|
|
<div key={keyword} className='inline-block px-1 py-0.5 bg-components-tag-bg text-components-tag-text text-xs rounded-md mr-1'>{keyword}</div>
|
|
|
|
|
))}
|
|
|
|
|
<div className='flex flex-wrap'>
|
|
|
|
|
{keywords.map(keyword => (
|
|
|
|
|
<Tag key={keyword} text={keyword} className='mr-2' />
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|