Show error alert in sendMessage function

This commit is contained in:
2026-04-17 13:03:59 +02:00
parent cecbc24f26
commit aac254ec23

View File

@@ -2675,6 +2675,8 @@ async function sendMessage() {
) )
setInput(composerSnapshot) setInput(composerSnapshot)
setComposerAttachments(attachmentSnapshot) setComposerAttachments(attachmentSnapshot)
window.alert(getErrorText(error))
return
} }
const errorMsg = { role: 'assistant', content: 'Error: ' + getErrorText(error), id: `msg-${Date.now()}-${Math.random()}` } const errorMsg = { role: 'assistant', content: 'Error: ' + getErrorText(error), id: `msg-${Date.now()}-${Math.random()}` }
setChatSessions(prevSessions => setChatSessions(prevSessions =>