Skip to content

Commit 863a5b9

Browse files
authored
fix(react-client): Chat settings won't be resumed when resuming thread (#1929)
Signed-off-by: Adam Tao <tcx4c70@gmail.com>
1 parent 5f2f131 commit 863a5b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libs/react-client/src/useChatSession.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const useChatSession = () => {
6262
const setIsAiSpeaking = useSetRecoilState(isAiSpeakingState);
6363
const setAudioConnection = useSetRecoilState(audioConnectionState);
6464
const resetChatSettingsValue = useResetRecoilState(chatSettingsValueState);
65+
const setChatSettingsValue = useSetRecoilState(chatSettingsValueState);
6566
const setFirstUserInteraction = useSetRecoilState(firstUserInteraction);
6667
const setLoading = useSetRecoilState(loadingState);
6768
const wavStreamPlayer = useRecoilValue(wavStreamPlayerState);
@@ -190,6 +191,9 @@ const useChatSession = () => {
190191
if (thread.metadata?.chat_profile) {
191192
setChatProfile(thread.metadata?.chat_profile);
192193
}
194+
if (thread.metadata?.chat_settings) {
195+
setChatSettingsValue(thread.metadata?.chat_settings);
196+
}
193197
setMessages(messages);
194198
const elements = thread.elements || [];
195199
setTasklists(

0 commit comments

Comments
 (0)