mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: icon
This commit is contained in:
@@ -23,8 +23,7 @@ export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchPr
|
|||||||
if (!reader) return;
|
if (!reader) return;
|
||||||
|
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
console.log(res);
|
throw new Error(res.statusText);
|
||||||
return reject('chat error');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -36,6 +36,7 @@ import MyIcon from '@/components/Icon';
|
|||||||
import { throttle } from 'lodash';
|
import { throttle } from 'lodash';
|
||||||
import { Types } from 'mongoose';
|
import { Types } from 'mongoose';
|
||||||
import Markdown from '@/components/Markdown';
|
import Markdown from '@/components/Markdown';
|
||||||
|
import { HUMAN_ICON, LOGO_ICON } from '@/constants/chat';
|
||||||
|
|
||||||
const SlideBar = dynamic(() => import('./components/SlideBar'));
|
const SlideBar = dynamic(() => import('./components/SlideBar'));
|
||||||
const Empty = dynamic(() => import('./components/Empty'));
|
const Empty = dynamic(() => import('./components/Empty'));
|
||||||
@@ -482,11 +483,7 @@ const Chat = ({ modelId, chatId }: { modelId: string; chatId: string }) => {
|
|||||||
<MenuButton as={Box} mr={media(4, 1)} cursor={'pointer'}>
|
<MenuButton as={Box} mr={media(4, 1)} cursor={'pointer'}>
|
||||||
<Image
|
<Image
|
||||||
className="avatar"
|
className="avatar"
|
||||||
src={
|
src={item.obj === 'Human' ? HUMAN_ICON : chatData.avatar || LOGO_ICON}
|
||||||
item.obj === 'Human'
|
|
||||||
? '/icon/human.png'
|
|
||||||
: chatData.avatar || '/icon/logo.png'
|
|
||||||
}
|
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
w={['20px', '30px']}
|
w={['20px', '30px']}
|
||||||
maxH={'50px'}
|
maxH={'50px'}
|
||||||
|
@@ -19,7 +19,7 @@ const ModelSchema = new Schema({
|
|||||||
},
|
},
|
||||||
avatar: {
|
avatar: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '/icon/logo.png'
|
default: ''
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
|
Reference in New Issue
Block a user