Skip to content

Commit

Permalink
hotfix for update target session
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Nov 7, 2024
1 parent db060d7 commit 8deb7a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/realtime-chat/realtime-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function RealtimeChat({
await Promise.all([textTask(), audioTask()]);
}
// update message.content
chatStore.updateTargetSession((session) => {
chatStore.updateTargetSession(session, (session) => {
session.messages = session.messages.concat();
});
}
Expand All @@ -166,7 +166,7 @@ export function RealtimeChat({
botMessage.audio_url = audio_url;
// botMessage.date = new Date().toLocaleString();
// update text and audio_url
chatStore.updateTargetSession((session) => {
chatStore.updateTargetSession(session, (session) => {
session.messages = session.messages.concat();
});
});
Expand Down Expand Up @@ -194,7 +194,7 @@ export function RealtimeChat({
);
uploadImage(blob).then((audio_url) => {
userMessage.audio_url = audio_url;
chatStore.updateTargetSession((session) => {
chatStore.updateTargetSession(session, (session) => {
session.messages = session.messages.concat();
});
});
Expand Down

0 comments on commit 8deb7a9

Please sign in to comment.