Skip to content

Commit

Permalink
ISSUE 282 reload history from storage before other actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Peelman committed Dec 9, 2024
1 parent ba945e3 commit e0bea37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/internal/useFlowInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export const useFlowInternal = () => {
* Restarts the conversation flow for the chatbot.
*/
const restartFlow = useCallback(() => {
//reload the chat history from storage
setHistoryStorageValues(settings)

replaceMessages([]);
replaceToasts([]);
replacePaths(["start"]);

//reload the chat history from storage
setHistoryStorageValues(settings)
}, [replaceMessages, replaceToasts, replacePaths, setHistoryStorageValues]);

/**
Expand Down

0 comments on commit e0bea37

Please sign in to comment.