fix: test chunk by @tanstack/react-query #1306 (#1719)

### What problem does this PR solve?

fix: test chunk by @tanstack/react-query #1306

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-26 19:00:19 +08:00
committed by GitHub
parent 79c873344b
commit 549d67e281
11 changed files with 120 additions and 167 deletions

View File

@ -1,10 +1,10 @@
import Rerank from '@/components/rerank';
import SimilaritySlider from '@/components/similarity-slider';
import { useTranslate } from '@/hooks/common-hooks';
import { useOneNamespaceEffectsLoading } from '@/hooks/store-hooks';
import { Button, Card, Divider, Flex, Form, Input } from 'antd';
import { FormInstance } from 'antd/lib';
import { useChunkIsTesting } from '@/hooks/knowledge-hooks';
import styles from './index.less';
type FieldType = {
@ -20,9 +20,7 @@ interface IProps {
const TestingControl = ({ form, handleTesting }: IProps) => {
const question = Form.useWatch('question', { form, preserve: true });
const loading = useOneNamespaceEffectsLoading('testingModel', [
'testDocumentChunk',
]);
const loading = useChunkIsTesting();
const { t } = useTranslate('knowledgeDetails');
const buttonDisabled =