diff --git a/client/src/components/ChatBox/ContextModal.tsx b/client/src/components/ChatBox/ContextModal.tsx index 0a1c46408..d9be2a5a7 100644 --- a/client/src/components/ChatBox/ContextModal.tsx +++ b/client/src/components/ChatBox/ContextModal.tsx @@ -13,7 +13,14 @@ const ContextModal = ({ const theme = useTheme(); return ( - + {context.map((item, i) => ( - - - 知识库引用({rawSearch.length}条) - - 注意: 修改知识库内容成功后,此处不会显示变更情况。点击编辑后,会显示知识库最新的内容。 - - + + 知识库引用({rawSearch.length}条) + + 注意: 修改知识库内容成功后,此处不会显示变更情况。点击编辑后,会显示知识库最新的内容。 + + + } + > {rawSearch.map((item) => ( diff --git a/client/src/components/MyModal/index.tsx b/client/src/components/MyModal/index.tsx index e74d214a7..9c9cbfe5f 100644 --- a/client/src/components/MyModal/index.tsx +++ b/client/src/components/MyModal/index.tsx @@ -5,9 +5,9 @@ import { ModalContent, ModalHeader, ModalCloseButton, - ModalContentProps + ModalContentProps, + Box } from '@chakra-ui/react'; -import { DefaultTFuncReturn } from 'i18next'; interface Props extends ModalContentProps { showCloseBtn?: boolean; @@ -32,16 +32,20 @@ const MyModal = ({ {!!title && {title}} - {showCloseBtn && } - {children} + + {showCloseBtn && } + {children} + ); diff --git a/client/src/pages/app/detail/components/KBSelectModal.tsx b/client/src/pages/app/detail/components/KBSelectModal.tsx index 9e4c70195..4d3f40d47 100644 --- a/client/src/pages/app/detail/components/KBSelectModal.tsx +++ b/client/src/pages/app/detail/components/KBSelectModal.tsx @@ -132,10 +132,10 @@ export const KbParamsModal = ({ }); return ( - + - + 相似度 diff --git a/client/src/pages/kb/detail/components/InputDataModal.tsx b/client/src/pages/kb/detail/components/InputDataModal.tsx index 6a4284030..06c2a0589 100644 --- a/client/src/pages/kb/detail/components/InputDataModal.tsx +++ b/client/src/pages/kb/detail/components/InputDataModal.tsx @@ -130,8 +130,9 @@ const InputDataModal = ({ title={defaultValues.dataId ? '变更数据' : '手动导入数据'} w={'90vw'} maxW={'90vw'} + h={'90vh'} > - + { return process.env.ONEAPI_KEY || process.env.OPENAIKEY || ''; diff --git a/client/src/service/mongo.ts b/client/src/service/mongo.ts index 0951923cb..723dd1e1b 100644 --- a/client/src/service/mongo.ts +++ b/client/src/service/mongo.ts @@ -50,7 +50,7 @@ export async function connectToDatabase(): Promise { minPoolSize: 2 }); - initRootUser(); + await initRootUser(); initPg(); console.log('mongo connected'); } catch (error) { @@ -84,7 +84,6 @@ async function initRootUser() { }); } catch (error) { console.log('init root user error', error); - initRootUser(); } } async function initPg() { @@ -108,7 +107,6 @@ async function initPg() { console.log('init pg successful'); } catch (error) { console.log('init pg error', error); - initPg(); } }