Skip to content

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

:art: Improve open/remove notebook

Daniel8a0762f27b51
diff --git a/kernel/model/outline.go b/kernel/model/outline.go
index 2606e06597..0067b93dc9 100644
--- a/kernel/model/outline.go
+++ b/kernel/model/outline.go
@@ -132,7 +132,12 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
}
targetNode.InsertAfter(heading)
} else {
- return
+ // 移到最前
+ for i := len(headingChildren) - 1; i >= 0; i-- {
+ child := headingChildren[i]
+ tree.Root.PrependChild(child)
+ }
+ tree.Root.PrependChild(heading)
}
if err = tx.writeTree(tree); nil != err {