Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
igorbkz authored May 30, 2024
1 parent 8c5c2cc commit 168452c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,11 @@
});

clearChatButton.addEventListener('click', () => {
conversationHistory = [];
localStorage.removeItem('conversationHistory');
messagesContainer.innerHTML = '';
if (confirm("Tem certeza de que deseja reiniciar a conversa? Todos os dados serão perdidos.")) {
conversationHistory = [];
localStorage.removeItem('conversationHistory');
messagesContainer.innerHTML = '';
}
});

window.addEventListener('load', () => {
Expand Down

0 comments on commit 168452c

Please sign in to comment.