fix: languages config, update-password

This commit is contained in:
jialin
2024-06-25 11:50:55 +08:00
parent bd6b3dcbe3
commit 9edce7116e
21 changed files with 435 additions and 128 deletions
+2 -2
View File
@@ -41,8 +41,8 @@ export const receiveChatStream = async (
}
let chunk = decoder.decode(value, { stream: true });
if (chunk.startsWith('data: ')) {
chunk = chunk.substring('data: '.length);
if (chunk.startsWith('data:')) {
chunk = chunk.substring('data:'.length);
}
const item = JSON.parse(chunk?.trim());
callback(item);
@@ -43,9 +43,6 @@ const MessageList: React.FC<MessageProps> = (props) => {
const systemRef = useRef<any>(null);
const contentRef = useRef<any>('');
const handleReceiveMessage = (data: any) => {
console.log('event source message: ', { data });
};
const handleSystemMessageChange = (e: any) => {
setSystemMessage(e.target.value);
};