瀏覽代碼

fix: openai notification issue

Timothy J. Baek 11 月之前
父節點
當前提交
5b01d7994a
共有 1 個文件被更改,包括 15 次插入15 次删除
  1. 15 15
      src/lib/components/chat/Chat.svelte

+ 15 - 15
src/lib/components/chat/Chat.svelte

@@ -951,25 +951,25 @@
 						messages = messages;
 						messages = messages;
 					}
 					}
 
 
-					if ($settings.notificationEnabled && !document.hasFocus()) {
-						const notification = new Notification(`OpenAI ${model}`, {
-							body: responseMessage.content,
-							icon: `${WEBUI_BASE_URL}/static/favicon.png`
-						});
+					if (autoScroll) {
+						scrollToBottom();
 					}
 					}
+				}
 
 
-					if ($settings.responseAutoCopy) {
-						copyToClipboard(responseMessage.content);
-					}
+				if ($settings.notificationEnabled && !document.hasFocus()) {
+					const notification = new Notification(`OpenAI ${model}`, {
+						body: responseMessage.content,
+						icon: `${WEBUI_BASE_URL}/static/favicon.png`
+					});
+				}
 
 
-					if ($settings.responseAutoPlayback) {
-						await tick();
-						document.getElementById(`speak-button-${responseMessage.id}`)?.click();
-					}
+				if ($settings.responseAutoCopy) {
+					copyToClipboard(responseMessage.content);
+				}
 
 
-					if (autoScroll) {
-						scrollToBottom();
-					}
+				if ($settings.responseAutoPlayback) {
+					await tick();
+					document.getElementById(`speak-button-${responseMessage.id}`)?.click();
 				}
 				}
 
 
 				if (lastUsage) {
 				if (lastUsage) {