feat: add file icon to table of FileManager #345 (#543)

### 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:
balibabu
2024-04-25 19:06:24 +08:00
committed by GitHub
parent 26003b5076
commit 1dcd439c58
19 changed files with 317 additions and 154 deletions

View File

@ -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 = () => {