feat: Retrieval chunks by page #2247 (#2373)

### What problem does this PR solve?

feat: Retrieval chunks by page #2247

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-09-11 19:48:11 +08:00
committed by GitHub
parent b0e0e1fdd0
commit 8052cbc70e
5 changed files with 99 additions and 18 deletions

View File

@ -3,19 +3,22 @@ import { Collapse, Flex, Space } from 'antd';
import SelectFiles from './select-files';
import { useSelectTestingResult } from '@/hooks/knowledge-hooks';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import styles from './index.less';
interface IProps {
selectedDocumentIdsLength?: number;
onTesting(documentIds: string[]): void;
setSelectedDocumentIds(documentIds: string[]): void;
selectedDocumentIds: string[];
}
const RetrievalDocuments = ({ onTesting }: IProps) => {
const RetrievalDocuments = ({
onTesting,
selectedDocumentIds,
setSelectedDocumentIds,
}: IProps) => {
const { t } = useTranslation();
const { documents } = useSelectTestingResult();
const [selectedDocumentIds, setSelectedDocumentIds] = useState<string[]>([]);
return (
<Collapse