Skip to content

Commit

Permalink
feat(chat-window): clear storage after error
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed May 5, 2024
1 parent 6e61c88 commit 94ea6c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ const useSocket = (url: string) => {
const parsedData = JSON.parse(e.data);
if (parsedData.type === 'error') {
toast.error(parsedData.data);
if (parsedData.key === 'INVALID_MODEL_SELECTED') {
localStorage.clear();
}
}
};
};
Expand Down

0 comments on commit 94ea6c3

Please sign in to comment.