An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 云端同步上传大量文件时不新增通知 https://github.com/siyuan-note/siyuan/issues/5112
Liang Ding2dd16cac9ab9
diff --git a/kernel/model/osssync.go b/kernel/model/osssync.goindex 83172ea53a..d27aa93951 100644--- a/kernel/model/osssync.go+++ b/kernel/model/osssync.go@@ -388,6 +388,7 @@ func ossUpload(isBackup bool, localDirPath, cloudDirPath, cloudDevice string, boif poolSize > len(localUpserts) {poolSize = len(localUpserts)}+ msgId := gulu.Rand.String(7)p, _ := ants.NewPoolWithFunc(poolSize, func(arg interface{}) {defer waitGroup.Done()if nil != uploadErr {@@ -400,7 +401,7 @@ func ossUpload(isBackup bool, localDirPath, cloudDirPath, cloudDevice string, boreturn}if needPushProgress {- util.PushMsg(fmt.Sprintf(Conf.Language(104), wroteFiles, len(localUpserts)-wroteFiles), 1000*60*10)+ util.PushUpdateMsg(msgId, fmt.Sprintf(Conf.Language(104), wroteFiles, len(localUpserts)-wroteFiles), 1000*60*10)}if boot {msg := fmt.Sprintf("Uploading data to the cloud %d/%d", wroteFiles, len(localUpserts))diff --git a/kernel/util/websocket.go b/kernel/util/websocket.goindex c1b19eab8b..1b002722bc 100644--- a/kernel/util/websocket.go+++ b/kernel/util/websocket.go@@ -127,6 +127,11 @@ func PushTxErr(msg string, code int, data interface{}) {BroadcastByType("main", "txerr", code, msg, data)}+func PushUpdateMsg(msgId string, msg string, timeout int) {+ BroadcastByType("main", "msg", 0, msg, map[string]interface{}{"id": msgId, "closeTimeout": timeout})+ return+}+func PushMsg(msg string, timeout int) (msgId string) {msgId = gulu.Rand.String(7)BroadcastByType("main", "msg", 0, msg, map[string]interface{}{"id": msgId, "closeTimeout": timeout})