Skip to content

Commit 8deb7a9

Browse files
committedNov 7, 2024
hotfix for update target session
1 parent db060d7 commit 8deb7a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎app/components/realtime-chat/realtime-chat.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export function RealtimeChat({
156156
await Promise.all([textTask(), audioTask()]);
157157
}
158158
// update message.content
159-
chatStore.updateTargetSession((session) => {
159+
chatStore.updateTargetSession(session, (session) => {
160160
session.messages = session.messages.concat();
161161
});
162162
}
@@ -166,7 +166,7 @@ export function RealtimeChat({
166166
botMessage.audio_url = audio_url;
167167
// botMessage.date = new Date().toLocaleString();
168168
// update text and audio_url
169-
chatStore.updateTargetSession((session) => {
169+
chatStore.updateTargetSession(session, (session) => {
170170
session.messages = session.messages.concat();
171171
});
172172
});
@@ -194,7 +194,7 @@ export function RealtimeChat({
194194
);
195195
uploadImage(blob).then((audio_url) => {
196196
userMessage.audio_url = audio_url;
197-
chatStore.updateTargetSession((session) => {
197+
chatStore.updateTargetSession(session, (session) => {
198198
session.messages = session.messages.concat();
199199
});
200200
});

0 commit comments

Comments
 (0)
Please sign in to comment.