mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 08:56:47 +08:00
### What problem does this PR solve? feat(search): Optimized search functionality and user interface #3221 ### Type of change - Added similarity threshold adjustment function - Optimized mind map display logic - Adjusted search settings interface layout - Fixed related search and document viewing functions - Optimized time display and node selection logic - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -217,7 +217,11 @@ export const useTestRetrieval = (
|
||||
};
|
||||
};
|
||||
|
||||
export const useShowMindMapDrawer = (kbIds: string[], question: string) => {
|
||||
export const useShowMindMapDrawer = (
|
||||
kbIds: string[],
|
||||
question: string,
|
||||
searchId = '',
|
||||
) => {
|
||||
const { visible, showModal, hideModal } = useSetModalState();
|
||||
const ref = useRef<any>();
|
||||
|
||||
@ -228,7 +232,7 @@ export const useShowMindMapDrawer = (kbIds: string[], question: string) => {
|
||||
} = useSearchFetchMindMap();
|
||||
|
||||
const handleShowModal = useCallback(() => {
|
||||
const searchParams = { question: trim(question), kb_ids: kbIds };
|
||||
const searchParams = { question: trim(question), kb_ids: kbIds, searchId };
|
||||
if (
|
||||
!isEmpty(searchParams.question) &&
|
||||
!isEqual(searchParams, ref.current)
|
||||
@ -237,7 +241,7 @@ export const useShowMindMapDrawer = (kbIds: string[], question: string) => {
|
||||
fetchMindMap(searchParams);
|
||||
}
|
||||
showModal();
|
||||
}, [fetchMindMap, showModal, question, kbIds]);
|
||||
}, [fetchMindMap, showModal, question, kbIds, searchId]);
|
||||
|
||||
return {
|
||||
mindMap,
|
||||
|
||||
Reference in New Issue
Block a user