forked from XiaoMo/ChatGPT-Next-Web
fix: updating the array using push in zustand does not actually trigger component updates
This commit is contained in:
parent
e636d486f5
commit
1d42e955fc
@ -317,8 +317,10 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
botMessage.streaming = false;
|
botMessage.streaming = false;
|
||||||
userMessage.isError = !isAborted;
|
userMessage.isError = !isAborted;
|
||||||
botMessage.isError = !isAborted;
|
botMessage.isError = !isAborted;
|
||||||
|
get().updateCurrentSession((session) => {
|
||||||
set(() => ({}));
|
session.messages = session.messages.concat();
|
||||||
|
});
|
||||||
|
// set(() => ({}));
|
||||||
ChatControllerPool.remove(
|
ChatControllerPool.remove(
|
||||||
sessionIndex,
|
sessionIndex,
|
||||||
botMessage.id ?? messageIndex,
|
botMessage.id ?? messageIndex,
|
||||||
|
Loading…
Reference in New Issue
Block a user