Skip to content

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

:art: Improve av https://github.com/siyuan-note/siyuan/issues/15591

Daniel9ee427d56761
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index cbe33c7ba2..21b27babec 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -209,6 +209,12 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
return
}
+ if nil != nearItem && filterKeyIDs[groupKey.ID] {
+ // 临近项不为空并且分组字段和过滤字段相同时,优先使用临近项 https://github.com/siyuan-note/siyuan/issues/15591
+ ret[groupKey.ID] = getNewValueByNearItem(nearItem, groupKey, addingItemID)
+ return
+ }
+
if nil != newValue && !filterKeyIDs[groupKey.ID] /* 命中了过滤条件的话就不重复处理了 */ {
ret[groupKey.ID] = newValue
}