Commit 5b01d799 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix: openai notification issue

parent 5ef478a1
...@@ -951,25 +951,25 @@ ...@@ -951,25 +951,25 @@
messages = messages; messages = messages;
} }
if ($settings.notificationEnabled && !document.hasFocus()) { if (autoScroll) {
const notification = new Notification(`OpenAI ${model}`, { scrollToBottom();
body: responseMessage.content,
icon: `${WEBUI_BASE_URL}/static/favicon.png`
});
} }
}
if ($settings.responseAutoCopy) { if ($settings.notificationEnabled && !document.hasFocus()) {
copyToClipboard(responseMessage.content); const notification = new Notification(`OpenAI ${model}`, {
} body: responseMessage.content,
icon: `${WEBUI_BASE_URL}/static/favicon.png`
});
}
if ($settings.responseAutoPlayback) { if ($settings.responseAutoCopy) {
await tick(); copyToClipboard(responseMessage.content);
document.getElementById(`speak-button-${responseMessage.id}`)?.click(); }
}
if (autoScroll) { if ($settings.responseAutoPlayback) {
scrollToBottom(); await tick();
} document.getElementById(`speak-button-${responseMessage.id}`)?.click();
} }
if (lastUsage) { if (lastUsage) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment