Skip to content

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

:art: 不记录用户指南滚动位置

Liang Ding8286c463654d
diff --git a/kernel/api/attr.go b/kernel/api/attr.go
index 09373b1ec1..bc91a3e8cb 100644
--- a/kernel/api/attr.go
+++ b/kernel/api/attr.go
@@ -57,10 +57,9 @@ func setBlockAttrs(c *gin.Context) {
id := arg["id"].(string)
attrs := arg["attrs"].(map[string]interface{})
- if 1 == len(attrs) && "" != attrs["scroll"] && "dev" == util.Mode {
- // 开发环境不记录用户指南滚动位置
- b := treenode.GetBlockTree(id)
- if nil != b && (model.IsUserGuide(b.BoxID)) {
+ if 1 == len(attrs) && "" != attrs["scroll"] {
+ // 不记录用户指南滚动位置
+ if b := treenode.GetBlockTree(id); nil != b && (model.IsUserGuide(b.BoxID)) {
attrs["scroll"] = ""
}
}