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: 更新版本后自动打开用户指南 Fix https://github.com/siyuan-note/siyuan/issues/7469
Liang Ding0b7598df3b25
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.tsindex 6497ee3f7e..dffcbfca41 100644--- a/app/src/mobile/util/initFramework.ts+++ b/app/src/mobile/util/initFramework.ts@@ -128,7 +128,7 @@ export const initFramework = () => {closePanel();});initEditorName();- if (window.siyuan.config.newbie) {+ if (window.siyuan.config.openHelp) {mountHelp();}const transactionTipElement = document.getElementById("transactionTip");diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex a4776a015d..b8baeb8516 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -413,7 +413,7 @@ declare interface IConfig {api: {token: string}- newbie: boolean+ openHelp: booleansystem: {networkProxy: {host: stringdiff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.tsindex db7b34fcbe..921244ab27 100644--- a/app/src/util/onGetConfig.ts+++ b/app/src/util/onGetConfig.ts@@ -176,7 +176,7 @@ export const onGetConfig = (isStart: boolean) => {resizeDrag();}, 200);});- if (window.siyuan.config.newbie) {+ if (window.siyuan.config.openHelp) {mountHelp();}addGA();diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex eae65a00eb..3aee764c80 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -70,7 +70,7 @@ type AppConf struct {Stat *conf.Stat `json:"stat"` // 统计Api *conf.API `json:"api"` // APIRepo *conf.Repo `json:"repo"` // 数据仓库- Newbie bool `json:"newbie"` // 是否是安装后第一次启动+ OpenHelp bool `json:"openHelp"` // 启动后是否需要打开用户指南}func InitConf() {@@ -211,7 +211,9 @@ func InitConf() {}if nil == Conf.System {Conf.System = conf.NewSystem()+ Conf.OpenHelp = true} else {+ Conf.OpenHelp = Conf.System.KernelVersion != util.VerConf.System.KernelVersion = util.VerConf.System.IsInsider = util.IsInsider}@@ -237,7 +239,6 @@ func InitConf() {}Conf.System.OS = runtime.GOOSConf.System.OSPlatform, _ = util.GetOSPlatform()- Conf.Newbie = util.IsNewbieif "" != Conf.UserData {Conf.User = loadUserFromConf()diff --git a/kernel/model/mount.go b/kernel/model/mount.goindex 06b419bfbc..40eb6a6e3d 100644--- a/kernel/model/mount.go+++ b/kernel/model/mount.go@@ -162,8 +162,8 @@ func Mount(boxID string) (alreadyMount bool, err error) {box.SaveConf(boxConf)}- if Conf.Newbie {- Conf.Newbie = false+ if Conf.OpenHelp {+ Conf.OpenHelp = falseConf.Save()}diff --git a/kernel/util/working.go b/kernel/util/working.goindex 5a45fa5b4a..00a1c31120 100644--- a/kernel/util/working.go+++ b/kernel/util/working.go@@ -180,15 +180,12 @@ var (SnippetsPath string // 数据目录下的 snippets/ 路径UIProcessIDs = sync.Map{} // UI 进程 ID-- IsNewbie bool // 是否是第一次安装)func initWorkspaceDir(workspaceArg string) {userHomeConfDir := filepath.Join(HomeDir, ".config", "siyuan")workspaceConf := filepath.Join(userHomeConfDir, "workspace.json")if !gulu.File.IsExist(workspaceConf) {- IsNewbie = ContainerStd == Container // 只有桌面端需要设置新手标识,前端自动挂载帮助文档if err := os.MkdirAll(userHomeConfDir, 0755); nil != err && !os.IsExist(err) {log.Printf("create user home conf folder [%s] failed: %s", userHomeConfDir, err)os.Exit(ExitCodeCreateConfDirErr)