4.8.5 test fix (#1835)

* faq

* perf: navbar name and fix dataset selector

* feat: app tag

* perf: icon

* fix: update workflow bug

* perf: dataset ui

* perf: menu

* fix: ts

* fix: auth file and app list ui

* app list

* app list

* perf: init api

* update per

* log level
This commit is contained in:
Archer
2024-06-25 10:10:24 +08:00
committed by GitHub
parent d902d29c71
commit 5c8c7fb9f2
50 changed files with 9331 additions and 12025 deletions

View File

@@ -11,6 +11,7 @@ import { getErrText } from '@fastgpt/global/common/error/utils';
import { useContextSelector } from 'use-context-selector';
import { DatasetImportContext } from '../Context';
import { importType2ReadType } from '@fastgpt/global/core/dataset/read';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
const PreviewChunks = ({
previewSource,
@@ -25,9 +26,8 @@ const PreviewChunks = ({
(v) => v
);
const { data = [], isLoading } = useQuery(
['previewSource'],
() => {
const { data = [], loading: isLoading } = useRequest2(
async () => {
if (importSource === ImportDataSourceEnum.fileCustom) {
const customSplitChar = processParamsForm.getValues('customSplitChar');
const { chunks } = splitText2Chunks({
@@ -66,12 +66,7 @@ const PreviewChunks = ({
});
},
{
onError(err) {
toast({
status: 'warning',
title: getErrText(err)
});
}
manual: false
}
);

View File

@@ -26,7 +26,7 @@ import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
import DefaultPermissionList from '@/components/support/permission/DefaultPerList';
import {
DatasetDefaultPermission,
DatasetDefaultPermissionVal,
DatasetPermissionList
} from '@fastgpt/global/support/permission/dataset/constant';
import MemberManager from '../../component/MemberManager';
@@ -202,10 +202,16 @@ const Info = ({ datasetId }: { datasetId: string }) => {
{datasetDetail.type === DatasetTypeEnum.externalFile && (
<>
<Flex w={'100%'} alignItems={'center'}>
<HStack fontSize={['sm', 'md']} flex={['0 0 90px', '0 0 160px']} w={0}>
<FormLabel
display={'flex'}
flex={['0 0 90px', '0 0 160px']}
w={0}
gap={1}
alignItems={'center'}
>
<Box>{datasetT('External read url')}</Box>
<QuestionTip label={datasetT('External read url tip')} />
</HStack>
</FormLabel>
<Input
flex={[1, '0 0 320px']}
placeholder="https://test.com/read?fileId={{fileId}}"
@@ -246,6 +252,8 @@ const Info = ({ datasetId }: { datasetId: string }) => {
{datasetDetail.permission.hasManagePer && (
<>
<MyDivider my={6} h={'2px'} maxW={'500px'} />
<Flex mt={5} alignItems={'center'} w={'100%'} flexWrap={'wrap'} maxW="500px">
<FormLabel flex={['0 0 90px', '0 0 160px']} w={0}>
{commonT('permission.Default permission')}
@@ -253,7 +261,7 @@ const Info = ({ datasetId }: { datasetId: string }) => {
<DefaultPermissionList
w="320px"
per={defaultPermission}
defaultPer={DatasetDefaultPermission}
defaultPer={DatasetDefaultPermissionVal}
onChange={(v) => setValue('defaultPermission', v)}
/>
</Flex>