An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/siyuan/issues/6393
Vanessa0531591755ba
diff --git a/app/src/dialog/message.ts b/app/src/dialog/message.tsindex 18d22f3b20..8691b0339b 100644--- a/app/src/dialog/message.ts+++ b/app/src/dialog/message.ts@@ -55,9 +55,7 @@ export const showMessage = (message: string, timeout = 6000, type = "info", mess}, timeout);messageHTML = messageHTML.replace("<div data-id", `<div data-timeoutid="${timeoutId}" data-id`);}- if (messagesElement.childElementCount === 0) {- messagesElement.parentElement.classList.add("b3-snackbars--show");- }+ messagesElement.parentElement.classList.add("b3-snackbars--show");messagesElement.insertAdjacentHTML("afterbegin", messageHTML + "</div>");setTimeout(() => {messagesElement.querySelectorAll(".b3-snackbar--hide").forEach(item => {@@ -83,9 +81,21 @@ export const hideMessage = (id?: string) => {messageElement.classList.add("b3-snackbar--hide");setTimeout(() => {messageElement.remove();+ if (messagesElement.childElementCount === 0) {+ hideMessage();+ }}, Constants.TIMEOUT_INPUT);}- if (messagesElement.childElementCount < 2) {+ let hasShowItem = false+ Array.from(messagesElement.children).find(item => {+ if (!item.classList.contains("b3-snackbar--hide")) {+ hasShowItem = true+ return true;+ }+ })+ if (hasShowItem) {+ messagesElement.parentElement.classList.add("b3-snackbars--show");+ } else {messagesElement.parentElement.classList.remove("b3-snackbars--show");}} else {diff --git a/app/src/protyle/upload/index.ts b/app/src/protyle/upload/index.tsindex 09e7c4168f..2b13cd6ec5 100644--- a/app/src/protyle/upload/index.ts+++ b/app/src/protyle/upload/index.ts@@ -68,7 +68,7 @@ const validateFile = (protyle: IProtyle, files: File[]) => {}let msgId;if (errorTip !== "" || uploadingStr !== "") {- msgId = showMessage(`<ul>${errorTip}${uploadingStr}</ul>`);+ msgId = showMessage(`<ul>${errorTip}${uploadingStr}</ul>`, -1);}return {files: uploadFileList, msgId};