Optimize the structure and naming of projects (#335)

This commit is contained in:
Archer
2023-09-21 14:49:56 +08:00
committed by GitHub
parent a3c77480f7
commit 823f4b7ad1
97 changed files with 882 additions and 821 deletions

View File

@@ -4,7 +4,7 @@ import { Box, Flex, IconButton, useTheme } from '@chakra-ui/react';
import { useToast } from '@/hooks/useToast';
import { useForm } from 'react-hook-form';
import { useQuery } from '@tanstack/react-query';
import { KbItemType } from '@/types/plugin';
import { DatasetItemType } from '@/types/core/dataset';
import { getErrText } from '@/utils/tools';
import { useGlobalStore } from '@/store/global';
import { type ComponentRef } from './components/Info';
@@ -15,9 +15,9 @@ import SideTabs from '@/components/SideTabs';
import PageContainer from '@/components/PageContainer';
import Avatar from '@/components/Avatar';
import Info from './components/Info';
import { serviceSideProps } from '@/utils/i18n';
import { serviceSideProps } from '@/utils/web/i18n';
import { useTranslation } from 'react-i18next';
import { getTrainingQueueLen } from '@/api/plugins/kb';
import { getTrainingQueueLen } from '@/api/core/dataset/data';
import { delDatasetEmptyFiles } from '@/api/core/dataset/file';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
@@ -72,7 +72,7 @@ const Detail = ({ kbId, currentTab }: { kbId: string; currentTab: `${TabEnum}` }
[kbId, router]
);
const form = useForm<KbItemType>({
const form = useForm<DatasetItemType>({
defaultValues: kbDetail
});