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/insider/issues/1079
Liang Ding6afce77b1dc5
diff --git a/kernel/model/backlink.go b/kernel/model/backlink.goindex 546604f2ec..44e0649e39 100644--- a/kernel/model/backlink.go+++ b/kernel/model/backlink.go@@ -306,12 +306,13 @@ func GetBacklink2(id, keyword, mentionKeyword string) (boxID string, backlinks,if nil == sqlBlock {return}+ rootID := sqlBlock.RootIDboxID = sqlBlock.Boxrefs := sql.QueryRefsByDefID(id, true)refs = removeDuplicatedRefs(refs) // 同一个块中引用多个相同块时反链去重 https://github.com/siyuan-note/siyuan/issues/3317- linkRefs, linkRefsCount, excludeBacklinkIDs := buildLinkRefs(id, refs)+ linkRefs, linkRefsCount, excludeBacklinkIDs := buildLinkRefs(rootID, refs)tmpBacklinks := toFlatTree(linkRefs, 0, "backlink")for _, l := range tmpBacklinks {l.Blocks = nil@@ -461,6 +462,7 @@ func buildLinkRefs(defRootID string, refs []*sql.Ref) (ret []*Block, refsCount iqueryBlockIDs = append(queryBlockIDs, ref.DefBlockID)queryBlockIDs = append(queryBlockIDs, ref.BlockID)}+ queryBlockIDs = gulu.Str.RemoveDuplicatedElem(queryBlockIDs)querySQLBlocks := sql.GetBlocks(queryBlockIDs)defSQLBlocksCache := map[string]*sql.Block{}for _, defSQLBlock := range querySQLBlocks {