Skip to content

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

:art: Improve tag panel refresh https://github.com/siyuan-note/siyuan/issues/14593

Daniel10d1735688ce
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 13492699e2..b4aa121157 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -799,6 +799,8 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
if "" == n.TextMarkTextContent {
unlinks = append(unlinks, n)
}
+
+ util.PushReloadTag()
} else if n.IsTextMarkType("u") {
if !replaceTypes["u"] {
return ast.WalkContinue
diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go
index 6ba7242664..a0638d5b08 100644
--- a/kernel/util/websocket.go
+++ b/kernel/util/websocket.go
@@ -182,6 +182,10 @@ func PushReloadFiletree() {
BroadcastByType("filetree", "reloadFiletree", 0, "", nil)
}
+func PushReloadTag() {
+ BroadcastByType("main", "reloadTag", 0, "", nil)
+}
+
type BlockStatResult struct {
RuneCount int `json:"runeCount"`
WordCount int `json:"wordCount"`