Skip to content

Commit 007fce2

Browse files
authored
system title (#526)
1 parent abc1e57 commit 007fce2

File tree

10 files changed

+24
-11
lines changed

10 files changed

+24
-11
lines changed

packages/global/core/module/template/system/classifyQuestion.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export const ClassifyQuestionModule: FlowModuleTemplateType = {
4242
label: '背景知识',
4343
description:
4444
'你可以添加一些特定内容的介绍,从而更好的识别用户的问题类型。这个内容通常是给模型介绍一个它不知道的内容。',
45-
placeholder: '例如: \n1. Laf 是一个云函数开发平台……\n2. Sealos 是一个集群操作系统',
45+
placeholder:
46+
'例如: \n1. AIGC(人工智能生成内容)是指使用人工智能技术自动或半自动地生成数字内容,如文本、图像、音乐、视频等。\n2. AIGC技术包括但不限于自然语言处理、计算机视觉、机器学习和深度学习。这些技术可以创建新内容或修改现有内容,以满足特定的创意、教育、娱乐或信息需求。',
4647
showTargetInApp: true,
4748
showTargetInPlugin: true
4849
},

projects/app/src/components/ChatBox/MessageInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ const MessageInput = ({
9292
);
9393
} catch (error) {
9494
setFileList((state) => state.filter((item) => item.id !== file.id));
95+
console.log(error);
96+
9597
toast({
9698
status: 'error',
9799
title: t('common.Upload File Failed')

projects/app/src/components/Radio/index.tsx renamed to projects/app/src/components/common/MyRadio/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const MyRadio = ({
4444
}
4545
: {
4646
_hover: {
47-
bg: 'white'
47+
bg: 'myBlue.100',
48+
borderColor: 'myBlue.600'
4849
}
4950
})}
5051
_after={{

projects/app/src/components/core/module/DatasetParamsModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { reRankModelList } from '@/web/common/system/staticData';
1111

1212
import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
1313
import { DatasetSearchModeMap } from '@fastgpt/global/core/dataset/constant';
14-
import MyRadio from '@/components/Radio';
14+
import MyRadio from '@/components/common/MyRadio';
1515

1616
type DatasetParamsProps = {
1717
similarity?: number;

projects/app/src/components/core/module/Flow/components/modules/VariableEdit.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ const VariableEdit = ({
223223
fontWeight: 'bold'
224224
}
225225
: {
226+
color: 'myGray.600',
226227
_hover: {
227228
boxShadow: 'md'
228229
},

projects/app/src/components/support/permission/Radio/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import MyRadio from '@/components/Radio';
2+
import MyRadio from '@/components/common/MyRadio';
33
import { PermissionTypeEnum } from '@fastgpt/global/support/permission/constant';
44
import { useTranslation } from 'next-i18next';
55

projects/app/src/pages/_app.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useState } from 'react';
1+
import { useEffect, useRef, useState } from 'react';
22
import type { AppProps } from 'next/app';
33
import Script from 'next/script';
44
import Head from 'next/head';
@@ -39,16 +39,18 @@ function App({ Component, pageProps }: AppProps) {
3939
const router = useRouter();
4040
const { hiId } = router.query as { hiId?: string };
4141
const { i18n } = useTranslation();
42-
const { setLastRoute } = useSystemStore();
4342
const [scripts, setScripts] = useState<FeConfigsType['scripts']>([]);
43+
const [title, setTitle] = useState(process.env.SYSTEM_NAME || 'AI');
4444

4545
useEffect(() => {
4646
// get init data
4747
(async () => {
4848
const {
49-
feConfigs: { scripts, isPlus }
49+
feConfigs: { scripts, isPlus, systemTitle }
5050
} = await clientInitData();
5151

52+
setTitle(systemTitle || 'FastGPT');
53+
5254
// log fastgpt
5355
!isPlus &&
5456
console.log(
@@ -90,8 +92,6 @@ function App({ Component, pageProps }: AppProps) {
9092
hiId && localStorage.setItem('inviterId', hiId);
9193
}, [hiId]);
9294

93-
const title = feConfigs?.systemTitle || process.env.SYSTEM_NAME || '';
94-
9595
return (
9696
<>
9797
<Head>

projects/app/src/pages/api/common/file/uploadImage.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
2626
});
2727
}
2828
}
29+
30+
export const config = {
31+
api: {
32+
bodyParser: {
33+
sizeLimit: '16mb'
34+
}
35+
}
36+
};

projects/app/src/pages/app/detail/components/OutLink/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Box, useTheme } from '@chakra-ui/react';
44
import { OutLinkTypeEnum } from '@fastgpt/global/support/outLink/constant';
55
import dynamic from 'next/dynamic';
66

7-
import MyRadio from '@/components/Radio';
7+
import MyRadio from '@/components/common/MyRadio';
88
import Share from './Share';
99
const API = dynamic(() => import('./API'));
1010

projects/app/src/pages/dataset/detail/components/Import/ImportModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useMemo, useState } from 'react';
22
import { Box, type BoxProps, Flex, useTheme, ModalCloseButton } from '@chakra-ui/react';
3-
import MyRadio from '@/components/Radio/index';
3+
import MyRadio from '@/components/common/MyRadio/index';
44
import dynamic from 'next/dynamic';
55
import ChunkImport from './Chunk';
66
import { useTranslation } from 'next-i18next';

0 commit comments

Comments
 (0)