### What problem does this PR solve? feat: change all file names to lowercase #1574 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useCallback } from 'react';
|
||||
import { useDispatch } from 'umi';
|
||||
import { useGetKnowledgeSearchParams } from './routeHook';
|
||||
import { useGetKnowledgeSearchParams } from './route-hook';
|
||||
|
||||
interface PayloadType {
|
||||
doc_id: string;
|
||||
@@ -6,8 +6,8 @@ import { UploadFile } from 'antd';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { IHighlight } from 'react-pdf-highlighter';
|
||||
import { useDispatch, useSelector } from 'umi';
|
||||
import { useGetKnowledgeSearchParams } from './routeHook';
|
||||
import { useOneNamespaceEffectsLoading } from './storeHooks';
|
||||
import { useGetKnowledgeSearchParams } from './route-hook';
|
||||
import { useOneNamespaceEffectsLoading } from './store-hooks';
|
||||
|
||||
export const useGetDocumentUrl = (documentId?: string) => {
|
||||
const getDocumentUrl = useCallback(
|
||||
@@ -1,9 +1,11 @@
|
||||
import { useShowDeleteConfirm } from '@/hooks/commonHooks';
|
||||
import { useShowDeleteConfirm } from '@/hooks/common-hooks';
|
||||
import { IKnowledge } from '@/interfaces/database/knowledge';
|
||||
import kbService from '@/services/knowledge-service';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { useDispatch, useSearchParams, useSelector } from 'umi';
|
||||
import { useGetKnowledgeSearchParams } from './routeHook';
|
||||
import { useOneNamespaceEffectsLoading } from './storeHooks';
|
||||
import { useGetKnowledgeSearchParams } from './route-hook';
|
||||
import { useOneNamespaceEffectsLoading } from './store-hooks';
|
||||
|
||||
export const useKnowledgeBaseId = (): string => {
|
||||
const [searchParams] = useSearchParams();
|
||||
@@ -158,6 +160,23 @@ export const useFetchKnowledgeList = (
|
||||
return { list, loading, fetchList };
|
||||
};
|
||||
|
||||
export const useNextFetchKnowledgeList = (): {
|
||||
data: any[];
|
||||
loading: boolean;
|
||||
} => {
|
||||
const { data, isFetching: loading } = useQuery({
|
||||
queryKey: ['fetchKnowledgeList'],
|
||||
initialData: [],
|
||||
queryFn: async () => {
|
||||
const { data } = await kbService.getList();
|
||||
|
||||
return data?.data ?? [];
|
||||
},
|
||||
});
|
||||
|
||||
return { data, loading };
|
||||
};
|
||||
|
||||
export const useSelectFileThumbnails = () => {
|
||||
const fileThumbnails: Record<string, string> = useSelector(
|
||||
(state: any) => state.kFModel.fileThumbnails,
|
||||
@@ -20,15 +20,15 @@ import {
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch } from 'umi';
|
||||
import { useSetModalState, useTranslate } from './commonHooks';
|
||||
import { useSetDocumentParser } from './documentHooks';
|
||||
import { useFetchLlmList } from './llmHooks';
|
||||
import { useOneNamespaceEffectsLoading } from './storeHooks';
|
||||
import { useSetModalState, useTranslate } from './common-hooks';
|
||||
import { useSetDocumentParser } from './document-hooks';
|
||||
import { useFetchLlmList } from './llm-hooks';
|
||||
import { useOneNamespaceEffectsLoading } from './store-hooks';
|
||||
import {
|
||||
useFetchTenantInfo,
|
||||
useSaveSetting,
|
||||
useSelectTenantInfo,
|
||||
} from './userSettingHook';
|
||||
} from './user-setting-hooks';
|
||||
|
||||
export const useChangeDocumentParser = (documentId: string) => {
|
||||
const setDocumentParser = useSetDocumentParser();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ITenantInfo } from '@/interfaces/database/knowledge';
|
||||
import { ISystemStatus, IUserInfo } from '@/interfaces/database/userSetting';
|
||||
import userService from '@/services/userService';
|
||||
import userService from '@/services/user-service';
|
||||
import authorizationUtil from '@/utils/authorizationUtil';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { history, useDispatch, useSelector } from 'umi';
|
||||
Reference in New Issue
Block a user