diff --git a/public/components/assistant.html b/public/components/assistant.html index b3a2a6c..c20dbc5 100644 --- a/public/components/assistant.html +++ b/public/components/assistant.html @@ -1,7 +1,6 @@

AI Clinical Assistant

-

Ask focused clinical questions over indexed Nextcloud books/resources, or ask for a teaching image directly in the chat box.

diff --git a/public/js/clinicalAssistant.js b/public/js/clinicalAssistant.js index 48f2af7..8db3435 100644 --- a/public/js/clinicalAssistant.js +++ b/public/js/clinicalAssistant.js @@ -656,7 +656,20 @@ import { function clearConversation(event) { if (assistantBusy && !activeAssistantRequest) return; - if (event && messages.length && !window.confirm('Start a new chat? Save or download this conversation first if you want to keep it.')) return; + if (event && messages.length) { + // Use the site's standard inline dialog instead of the native confirm(). + if (typeof showConfirm === 'function') { + showConfirm('Start a new chat? Save or download this conversation first if you want to keep it.', function() { + performClearConversation(); + }); + return; + } + if (!window.confirm('Start a new chat? Save or download this conversation first if you want to keep it.')) return; + } + performClearConversation(); + } + + function performClearConversation() { if (activeAssistantRequest) cancelAssistantSearch(); messages = []; attachments = [];