Skip to content

Commit

Permalink
fix: Fix last message not saving into chat history
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Oct 30, 2024
1 parent a446abc commit 54fdf44
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/hooks/internal/useBotEffectsInternal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { preProcessBlock } from "../../services/BlockService/BlockService";
import {
clearHistoryMessages,
getHistoryMessages,
saveChatHistory,
setHistoryStorageValues
} from "../../services/ChatHistoryService";
import { createMessage } from "../../utils/messageBuilder";
Expand Down Expand Up @@ -42,7 +41,6 @@ export const useBotEffectsInternal = () => {
injectMessage,
removeMessage,
streamMessage,
messages,
replaceMessages,
} = useMessagesInternal();

Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 54fdf44

Please sign in to comment.