mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 11:36:44 +08:00
### What problem does this PR solve? feat: add file icon to table of FileManager #345 fix: modify datasetDescription ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -127,13 +127,13 @@ export const useFetchKnowledgeBaseConfiguration = () => {
|
||||
|
||||
export const useFetchKnowledgeList = (
|
||||
shouldFilterListWithoutDocument: boolean = false,
|
||||
): { list: IKnowledge[]; loading: boolean } => {
|
||||
) => {
|
||||
const dispatch = useDispatch();
|
||||
const loading = useOneNamespaceEffectsLoading('knowledgeModel', ['getList']);
|
||||
|
||||
const knowledgeModel = useSelector((state: any) => state.knowledgeModel);
|
||||
const { data = [] } = knowledgeModel;
|
||||
const list = useMemo(() => {
|
||||
const list: IKnowledge[] = useMemo(() => {
|
||||
return shouldFilterListWithoutDocument
|
||||
? data.filter((x: IKnowledge) => x.chunk_num > 0)
|
||||
: data;
|
||||
@ -149,7 +149,7 @@ export const useFetchKnowledgeList = (
|
||||
fetchList();
|
||||
}, [fetchList]);
|
||||
|
||||
return { list, loading };
|
||||
return { list, loading, fetchList };
|
||||
};
|
||||
|
||||
export const useSelectFileThumbnails = () => {
|
||||
|
||||
Reference in New Issue
Block a user