Commit a409db95 by archer

perf: icon

parent 11f42ad9
......@@ -23,8 +23,7 @@ export const streamFetch = ({ url, data, onMessage, abortSignal }: StreamFetchPr
if (!reader) return;
if (res.status !== 200) {
console.log(res);
return reject('chat error');
throw new Error(res.statusText);
}
const decoder = new TextDecoder();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -36,6 +36,7 @@ import MyIcon from '@/components/Icon';
import { throttle } from 'lodash';
import { Types } from 'mongoose';
import Markdown from '@/components/Markdown';
import { HUMAN_ICON, LOGO_ICON } from '@/constants/chat';
const SlideBar = dynamic(() => import('./components/SlideBar'));
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'}>
<Image
className="avatar"
src={
item.obj === 'Human'
? '/icon/human.png'
: chatData.avatar || '/icon/logo.png'
}
src={item.obj === 'Human' ? HUMAN_ICON : chatData.avatar || LOGO_ICON}
alt="avatar"
w={['20px', '30px']}
maxH={'50px'}
......
......@@ -19,7 +19,7 @@ const ModelSchema = new Schema({
},
avatar: {
type: String,
default: '/icon/logo.png'
default: ''
},
status: {
type: String,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment