From 54fdf447f79a2599703f8374910437c11bedb8d8 Mon Sep 17 00:00:00 2001 From: tjtanjin Date: Thu, 31 Oct 2024 04:01:43 +0800 Subject: [PATCH] fix: Fix last message not saving into chat history --- src/hooks/internal/useBotEffectsInternal.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/hooks/internal/useBotEffectsInternal.tsx b/src/hooks/internal/useBotEffectsInternal.tsx index 1181be22..04bb14e8 100644 --- a/src/hooks/internal/useBotEffectsInternal.tsx +++ b/src/hooks/internal/useBotEffectsInternal.tsx @@ -5,7 +5,6 @@ import { preProcessBlock } from "../../services/BlockService/BlockService"; import { clearHistoryMessages, getHistoryMessages, - saveChatHistory, setHistoryStorageValues } from "../../services/ChatHistoryService"; import { createMessage } from "../../utils/messageBuilder"; @@ -42,7 +41,6 @@ export const useBotEffectsInternal = () => { injectMessage, removeMessage, streamMessage, - messages, replaceMessages, } = useMessagesInternal(); @@ -258,7 +256,6 @@ export const useBotEffectsInternal = () => { // auto cleanup streaming and save messages on path change (not ideal) // todo: remove this in v3, users should call `params.endStreamMessage()` streamMessageMap.current.clear(); - saveChatHistory(messages); } callNewBlock(currPath, block, params); }, [paths]);