fix: ui;perf: docs

This commit is contained in:
archer 2023-05-14 22:04:19 +08:00
parent d31bdf0ee0
commit ca99837dab
No known key found for this signature in database
GPG Key ID: 569A5660D2379E28
6 changed files with 20 additions and 14 deletions

View File

@ -35,7 +35,7 @@ wx: fastgpt123
## 👀 其他 ## 👀 其他
- [FastGpt 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh) - [FastGpt 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
- [FastGpt + Laf 最佳实践,将知识库装入公众号,点击去 Laf 公众号体验效果](https://hnvacz-laf-upload-ai.oss.laf.run/3ffd528ee2f9ae1dcd3508fe9994dd9.png) - [FastGpt + Laf 最佳实践,将知识库装入公众号,点击去 Laf 公众号体验效果](https://b4jky7-fastgpt.oss.laf.run/lafercode.png)
- [FastGpt V3.4 更新集合](https://www.bilibili.com/video/BV1Lo4y147Qh/?vd_source=92041a1a395f852f9d89158eaa3f61b4) - [FastGpt V3.4 更新集合](https://www.bilibili.com/video/BV1Lo4y147Qh/?vd_source=92041a1a395f852f9d89158eaa3f61b4)
- [FastGpt 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/) - [FastGpt 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/)

View File

@ -1,8 +1,4 @@
### Fast GPT V3.4 ### Fast GPT V3.6
- 新增 - 全新的交互 UI - 新增 - 分享免登录聊天框。可以直接为模型生成一个分享链接,其他人可以通过这个链接直接使用对话。
- 新增 - 用户自定义头像 - 优化 - UI 细节。
- 优化 - 知识库搜索,会将上一个问题并入搜索范围。
- 优化 - 模型结构设计,不再区分知识库和对话模型,而是通过开关的形式,手动选择手否需要进行知识库搜索。
- 新增 - 模型共享市场,可以使用其他用户分享的模型。
- 新增 - 邀请好友注册功能。

View File

@ -5,7 +5,7 @@ const Loading = ({ fixed = true }: { fixed?: boolean }) => {
return ( return (
<Flex <Flex
position={fixed ? 'fixed' : 'absolute'} position={fixed ? 'fixed' : 'absolute'}
zIndex={10000} zIndex={1000}
backgroundColor={'rgba(255,255,255,0.5)'} backgroundColor={'rgba(255,255,255,0.5)'}
top={0} top={0}
left={0} left={0}

View File

@ -1,6 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next'; import type { NextApiRequest, NextApiResponse } from 'next';
import { jsonRes } from '@/service/response'; import { jsonRes } from '@/service/response';
import { Chat, Model, connectToDatabase, Collection } from '@/service/mongo'; import { Chat, Model, connectToDatabase, Collection, ShareChat } from '@/service/mongo';
import { authToken } from '@/service/utils/auth'; import { authToken } from '@/service/utils/auth';
import { PgClient } from '@/service/pg'; import { PgClient } from '@/service/pg';
import { authModel } from '@/service/utils/auth'; import { authModel } from '@/service/utils/auth';
@ -40,6 +40,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
modelId modelId
}); });
// 删除分享链接
await ShareChat.deleteMany({
modelId
});
// 删除模型 // 删除模型
await Model.deleteOne({ await Model.deleteOne({
_id: modelId, _id: modelId,

View File

@ -97,7 +97,7 @@ const PcSliderBar = ({
{isPc && ( {isPc && (
<Box <Box
className={styles.newChat} className={styles.newChat}
zIndex={1000} zIndex={1001}
w={'90%'} w={'90%'}
h={'40px'} h={'40px'}
my={5} my={5}
@ -117,7 +117,7 @@ const PcSliderBar = ({
<Box <Box
className={styles.modelListContainer} className={styles.modelListContainer}
position={'absolute'} position={'absolute'}
w={'110%'} w={'115%'}
left={0} left={0}
top={'40px'} top={'40px'}
transition={'0.15s ease-out'} transition={'0.15s ease-out'}

View File

@ -681,7 +681,12 @@ const Chat = ({
color={'white'} color={'white'}
/> />
</Flex> </Flex>
<Box position={'relative'} h={'100%'} bg={'white'} overflow={'hidden'}> <Box
position={'relative'}
h={'100%'}
bg={'white'}
overflow={foldSliderBar ? 'hidden' : 'visible'}
>
<History <History
onclickDelHistory={onclickDelHistory} onclickDelHistory={onclickDelHistory}
onclickExportChat={onclickExportChat} onclickExportChat={onclickExportChat}
@ -967,7 +972,7 @@ const Chat = ({
{ {
<Modal isOpen={!!showSystemPrompt} onClose={() => setShowSystemPrompt('')}> <Modal isOpen={!!showSystemPrompt} onClose={() => setShowSystemPrompt('')}>
<ModalOverlay /> <ModalOverlay />
<ModalContent maxW={'min(90vw, 600px)'} pr={2} maxH={'80vh'} overflowY={'auto'}> <ModalContent pt={5} maxW={'min(90vw, 600px)'} h={'80vh'} overflow={'overlay'}>
<ModalCloseButton /> <ModalCloseButton />
<ModalBody pt={5} whiteSpace={'pre-wrap'} textAlign={'justify'}> <ModalBody pt={5} whiteSpace={'pre-wrap'} textAlign={'justify'}>
{showSystemPrompt} {showSystemPrompt}