Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 消息提示支持显示多条 https://github.com/siyuan-note/siyuan/issues/4875

Liang Ding27c80da76d45
diff --git a/kernel/api/history.go b/kernel/api/history.go
index b9c08320de..0255a09ead 100644
--- a/kernel/api/history.go
+++ b/kernel/api/history.go
@@ -62,7 +62,7 @@ func clearWorkspaceHistory(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
- util.PushMsg(model.Conf.Language(100), 1000*60*15)
+ msgId := util.PushMsg(model.Conf.Language(100), 1000*60*15)
time.Sleep(3 * time.Second)
err := model.ClearWorkspaceHistory()
if nil != err {
@@ -70,6 +70,7 @@ func clearWorkspaceHistory(c *gin.Context) {
ret.Msg = err.Error()
return
}
+ util.PushClearMsg(msgId)
util.PushMsg(model.Conf.Language(99), 1000*5)
}
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index 3f07737c8d..28da39525b 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -370,8 +370,11 @@ func saveWorkspaceAssets(assets []string) {
}
func RemoveUnusedAssets() (ret []string) {
- util.PushMsg(Conf.Language(100), 30*1000)
- defer util.PushMsg(Conf.Language(99), 3000)
+ msgId := util.PushMsg(Conf.Language(100), 30*1000)
+ defer func() {
+ util.PushClearMsg(msgId)
+ util.PushMsg(Conf.Language(99), 3000)
+ }()
ret = []string{}
unusedAssets := UnusedAssets()