mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-31 17:15:32 +08:00
Fix: File selection in Retrieval testing causes other options to disappear (#7759)
### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/7753 The internal is due to when the selected row keys change will trigger a testing, but I do not know why. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import { useFetchMindMap, useFetchRelatedQuestions } from '@/hooks/chat-hooks';
|
||||
import { useSetModalState } from '@/hooks/common-hooks';
|
||||
import { useTestChunkRetrieval } from '@/hooks/knowledge-hooks';
|
||||
import {
|
||||
useTestChunkAllRetrieval,
|
||||
useTestChunkRetrieval,
|
||||
} from '@/hooks/knowledge-hooks';
|
||||
import {
|
||||
useGetPaginationWithRouter,
|
||||
useSendMessageWithSse,
|
||||
@ -21,6 +24,7 @@ export const useSendQuestion = (kbIds: string[]) => {
|
||||
api.ask,
|
||||
);
|
||||
const { testChunk, loading } = useTestChunkRetrieval();
|
||||
const { testChunkAll, loading: loadingAll } = useTestChunkAllRetrieval();
|
||||
const [sendingLoading, setSendingLoading] = useState(false);
|
||||
const [currentAnswer, setCurrentAnswer] = useState({} as IAnswer);
|
||||
const { fetchRelatedQuestions, data: relatedQuestions } =
|
||||
@ -88,6 +92,15 @@ export const useSendQuestion = (kbIds: string[]) => {
|
||||
page,
|
||||
size,
|
||||
});
|
||||
|
||||
testChunkAll({
|
||||
kb_id: kbIds,
|
||||
highlight: true,
|
||||
question: q,
|
||||
doc_ids: [],
|
||||
page,
|
||||
size,
|
||||
});
|
||||
},
|
||||
[sendingLoading, searchStr, kbIds, testChunk, selectedDocumentIds],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user