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: Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049
Danielbd91c04eeb50
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex f77d07d8c1..b61bd6f529 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -3107,16 +3107,13 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID string, valueDabindBlockAv(tx, avID, val.BlockID)} else { // 之前绑定的块和现在绑定的块一样content := strings.TrimSpace(val.Block.Content)- node, tree, getErr := getNodeByBlockID(tx, val.BlockID)+ node, tree, _ := getNodeByBlockID(tx, val.BlockID)if "" == content {_, val.Block.Content = getNodeAvBlockText(node)- } else {- // 设置静态锚文本 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049- if nil != getErr || nil == node {- return- }- updateBlockValueStaticText(tx, node, tree, avID, content)}++ // 设置静态锚文本 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049+ updateBlockValueStaticText(tx, node, tree, avID, content)}}}@@ -3286,6 +3283,10 @@ func bindBlockAv0(tx *Transaction, avID string, node *ast.Node, tree *parse.Tree}func updateBlockValueStaticText(tx *Transaction, node *ast.Node, tree *parse.Tree, avID, text string) {+ if nil == node {+ return+ }+attrs := parse.IAL2Map(node.KramdownIAL)attrs[av.NodeAttrViewStaticText+"-"+avID] = textvar err error