mirror of https://github.com/langgenius/dify.git
Merge branch 'feat/parent-child-retrieval' of github.com:langgenius/dify into feat/parent-child-retrieval
This commit is contained in:
commit
330cfaf6d6
|
|
@ -656,7 +656,7 @@ const StepTwo = ({
|
|||
/>
|
||||
<div className='flex items-center gap-1'>
|
||||
<label className="ml-2 system-sm-regular cursor-pointer text-text-secondary">
|
||||
{t('datasetCreation.stepTwo.QALanguage')}
|
||||
{t('datasetCreation.stepTwo.useQALanguage')}
|
||||
</label>
|
||||
<div className='z-50 relative'>
|
||||
<LanguageSelect
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ const ChildSegmentList: FC<IChildSegmentCardProps> = ({
|
|||
</div>
|
||||
{isLoading ? <FullDocListSkeleton /> : null}
|
||||
{((isFullDocMode && !isLoading) || !collapsed)
|
||||
? <div className={classNames('flex items-center gap-x-0.5', isFullDocMode ? 'grow' : '')}>
|
||||
? <div className={classNames('flex items-center gap-x-0.5', isFullDocMode ? 'grow mb-6' : '')}>
|
||||
{isParagraphMode && (
|
||||
<div className='self-stretch my-0.5'>
|
||||
<Divider type='vertical' className='w-[2px] mx-[7px] bg-text-accent-secondary' />
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ const ActionButtons: FC<IActionButtonsProps> = ({
|
|||
})
|
||||
|
||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.s`, (e) => {
|
||||
e.preventDefault()
|
||||
if (loading)
|
||||
return
|
||||
e.preventDefault()
|
||||
handleSave()
|
||||
}
|
||||
, { exactMatch: true, useCapture: true })
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ const Completed: FC<ICompletedProps> = ({
|
|||
{
|
||||
isFullDocMode
|
||||
? <div className={cn(
|
||||
'flex flex-col grow relative overflow-x-hidden',
|
||||
'flex flex-col grow overflow-x-hidden',
|
||||
(isLoadingSegmentList || isLoadingChildSegmentList) ? 'overflow-y-hidden' : 'overflow-y-auto',
|
||||
)}>
|
||||
<SegmentCard
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ const ChildChunks: FC<Props> = ({
|
|||
<div
|
||||
className={!isShowAll ? 'line-clamp-2' : ''}
|
||||
>
|
||||
<div className='inline-flex items-center relative top-[-3px]'>
|
||||
<div className='flex items-center h-[24px] bg-state-accent-solid system-2xs-semibold-uppercase text-text-primary-on-surface px-1'>C-{position}</div>
|
||||
<div className='inline-flex items-center relative top-[-2px]'>
|
||||
<div className='flex items-center h-[20.5px] bg-state-accent-solid system-2xs-semibold-uppercase text-text-primary-on-surface px-1'>C-{position}</div>
|
||||
<Score value={score} besideChunkName />
|
||||
</div>
|
||||
<SliceContent className='bg-state-accent-hover group-hover:bg-state-accent-hover text-text-secondary font-normal'>{content}</SliceContent>
|
||||
<SliceContent className='py-0.5 bg-state-accent-hover group-hover:bg-state-accent-hover text-sm text-text-secondary font-normal'>{content}</SliceContent>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ const ChunkDetailModal: FC<Props> = ({
|
|||
onClose={onHide}
|
||||
className={cn(isParentChildRetrieval ? '!min-w-[1200px]' : '!min-w-[720px]')}
|
||||
>
|
||||
<div className='mt-4 flex pb-6'>
|
||||
<div>
|
||||
<div className='mt-4 flex'>
|
||||
<div className='w-full'>
|
||||
{/* Meta info */}
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='grow flex items-center space-x-2'>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const Score: FC<Props> = ({
|
|||
besideChunkName,
|
||||
}) => {
|
||||
return (
|
||||
<div className={cn('relative items-center px-[5px] border border-components-progress-bar-border overflow-hidden', besideChunkName ? 'border-l-0 h-[25px]' : 'h-[20px] rounded-md')}>
|
||||
<div className={cn('relative items-center px-[5px] border border-components-progress-bar-border overflow-hidden', besideChunkName ? 'border-l-0 h-[20.5px]' : 'h-[20px] rounded-md')}>
|
||||
<div className={cn('absolute top-0 left-0 h-full bg-util-colors-blue-brand-blue-brand-100 border-r-[1.5px] border-components-progress-brand-progress', value === 1 && 'border-r-0')} style={{ width: `${value * 100}%` }} />
|
||||
<div className={cn('relative flex items-center h-full space-x-0.5 text-util-colors-blue-brand-blue-brand-700')}>
|
||||
<div className='system-2xs-medium-uppercase'>score</div>
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ const translation = {
|
|||
QATitle: 'Segmenting in Question & Answer format',
|
||||
QATip: 'Enable this option will consume more tokens',
|
||||
QALanguage: 'Segment using',
|
||||
useQALanguage: 'Chunk using Q&A format in',
|
||||
estimateCost: 'Estimation',
|
||||
estimateSegment: 'Estimated chunks',
|
||||
segmentCount: 'chunks',
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ const translation = {
|
|||
QATitle: '采用 Q&A 分段模式',
|
||||
QATip: '开启后将会消耗额外的 token',
|
||||
QALanguage: '分段使用',
|
||||
useQALanguage: '使用 Q&A 分段,语言',
|
||||
estimateCost: '执行嵌入预估消耗',
|
||||
estimateSegment: '预估分段数',
|
||||
segmentCount: '段',
|
||||
|
|
|
|||
Loading…
Reference in New Issue