From 39f5d263f9accef4f131f8d0d2e4f62e2f76067c Mon Sep 17 00:00:00 2001 From: dakai Date: Mon, 14 Oct 2024 02:33:28 +0800 Subject: [PATCH] follow the rabbit to fix potential issues --- app/components/chat.tsx | 12 +++++------- app/styles/globals.scss | 9 +++++---- app/utils.ts | 13 ------------- app/utils/audio.ts | 3 +++ 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 855b6bf3f..d3f568257 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1122,12 +1122,11 @@ function _Chat() { }; const updateMessageAudio = (msgId?: string, audio_url?: string) => { - chatStore.updateCurrentSession( - (session) => - (session.messages = session.messages.map((m) => - m.id === msgId ? { ...m, audio_url } : m, - )), - ); + chatStore.updateCurrentSession((session) => { + session.messages = session.messages.map((m) => + m.id === msgId ? { ...m, audio_url } : m, + ); + }); }; const onDelete = (msgId: string) => { @@ -1903,7 +1902,6 @@ function _Chat() { )} {message.audio_url && (