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 grouping by field https://github.com/siyuan-note/siyuan/issues/10964
Daniela6f5705681f2
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 1b0f017fd1..5577459ce0 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -1799,35 +1799,42 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {return relativeDateGroups[i].GroupValue < relativeDateGroups[j].GroupValue})- var idx int- thisMonth := todayStart.Format("2006-01")- for i, monthGroup := range relativeDateGroups {- if monthGroup.GroupValue > thisMonth {- idx = i- break- }+ var lastNext30Days []*av.View+ if nil != last30Days {+ lastNext30Days = append(lastNext30Days, last30Days)}-- if nil != next30Days {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, next30Days)+ if nil != last7Days {+ lastNext30Days = append(lastNext30Days, last7Days)}- if nil != next7Days {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, next7Days)+ if nil != yesterday {+ lastNext30Days = append(lastNext30Days, yesterday)+ }+ if nil != today {+ lastNext30Days = append(lastNext30Days, today)}if nil != tomorrow {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, tomorrow)+ lastNext30Days = append(lastNext30Days, tomorrow)}- if nil != today {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, today)+ if nil != next7Days {+ lastNext30Days = append(lastNext30Days, next7Days)}- if nil != yesterday {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, yesterday)+ if nil != next30Days {+ lastNext30Days = append(lastNext30Days, next30Days)}- if nil != last7Days {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, last7Days)++ startIdx := -1+ thisMonth := todayStart.Format("2006-01")+ for i, monthGroup := range relativeDateGroups {+ if monthGroup.GroupValue > thisMonth {+ startIdx = i+ }}- if nil != last30Days {- relativeDateGroups = util.InsertElem(relativeDateGroups, idx, last30Days)+ if -1 == startIdx {+ slices.Reverse(lastNext30Days)+ startIdx = 0+ }+ for _, g := range lastNext30Days {+ relativeDateGroups = util.InsertElem(relativeDateGroups, startIdx, g)}view.Groups = relativeDateGroups} else {