From 9384419c9d35817cc21885448cffabb118d9f9ee Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Sat, 18 Mar 2023 00:53:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A8=A1=E5=9E=8B=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=82=E6=BB=9A=E5=8A=A8=E6=9D=A1=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/api/model/create.ts | 4 +- src/pages/chat/components/SlideBar.tsx | 57 ++++++++++++++------------ 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/pages/api/model/create.ts b/src/pages/api/model/create.ts index 79af70d47..bb8b60d31 100644 --- a/src/pages/api/model/create.ts +++ b/src/pages/api/model/create.ts @@ -43,8 +43,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< const authCount = await Model.countDocuments({ userId }); - if (authCount >= 5) { - throw new Error('上限5个模型'); + if (authCount >= 10) { + throw new Error('上限 10 个模型'); } // 创建模型 diff --git a/src/pages/chat/components/SlideBar.tsx b/src/pages/chat/components/SlideBar.tsx index b2cdfd42f..6341e7815 100644 --- a/src/pages/chat/components/SlideBar.tsx +++ b/src/pages/chat/components/SlideBar.tsx @@ -98,17 +98,18 @@ const SlideBar = ({ flexDirection={'column'} w={'100%'} h={'100%'} - p={3} + py={3} backgroundColor={'blackAlpha.800'} color={'white'} > {/* 新对话 */} {getToken() && (