feat(search): Optimized search functionality and user interface #3221 (#9535)

### 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:
chanx
2025-08-19 09:39:48 +08:00
committed by GitHub
parent 188c0f614b
commit 2b9ed935f3
18 changed files with 231 additions and 104 deletions

View File

@ -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,