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: Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
Daniel558e18f52fc9
diff --git a/kernel/api/block.go b/kernel/api/block.goindex 70c87c13ba..2e93286119 100644--- a/kernel/api/block.go+++ b/kernel/api/block.go@@ -456,8 +456,13 @@ func getRefIDsByFileAnnotationID(c *gin.Context) {id := arg["id"].(string)refIDs := model.GetBlockRefIDsByFileAnnotationID(id)- ret.Data = map[string][]string{- "refIDs": refIDs,+ var retRefDefs []model.RefDefs+ for _, blockID := range refIDs {+ retRefDefs = append(retRefDefs, model.RefDefs{RefID: blockID, DefIDs: []string{}})+ }++ ret.Data = map[string]any{+ "refDefs": retRefDefs,}}@@ -478,7 +483,14 @@ func getBlockDefIDsByRefText(c *gin.Context) {}excludeIDs = nil // 不限制虚拟引用搜索自己 https://ld246.com/article/1633243424177ids := model.GetBlockDefIDsByRefText(anchor, excludeIDs)- ret.Data = ids+ var retRefDefs []model.RefDefs+ for _, id := range ids {+ retRefDefs = append(retRefDefs, model.RefDefs{RefID: id, DefIDs: []string{}})+ }++ ret.Data = map[string]any{+ "refDefs": retRefDefs,+ }}func getBlockBreadcrumb(c *gin.Context) {