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: 记录操作系统平台
Liang Ding08641595ae07
diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex 195cb6f6e2..722d61040c 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -236,7 +236,7 @@ func InitConf() {logging.LogInfof("using Microsoft Store edition")}Conf.System.OS = runtime.GOOS- Conf.System.OSPlatform = util.GetOSPlatform()+ Conf.System.OSPlatform, _ = util.GetOSPlatform()Conf.Newbie = util.IsNewbieif "" != Conf.UserData {diff --git a/kernel/util/os.go b/kernel/util/os.goindex b133b9b7ce..77063519aa 100644--- a/kernel/util/os.go+++ b/kernel/util/os.go@@ -23,11 +23,11 @@ import ("github.com/siyuan-note/logging")-func GetOSPlatform() (ret string) {- ret, _, _, err := host.PlatformInformation()+func GetOSPlatform() (plat, ver string) {+ plat, _, ver, err := host.PlatformInformation()if nil != err {logging.LogWarnf("get os platform failed: %s", err)- return "Unknown"+ return "Unknown", ""}return}diff --git a/kernel/util/os_mobile.go b/kernel/util/os_mobile.goindex 0fd367d4d8..dc48ac4b1d 100644--- a/kernel/util/os_mobile.go+++ b/kernel/util/os_mobile.go@@ -18,12 +18,12 @@package util-func GetOSPlatform() (ret string) {+func GetOSPlatform() (plat, ver string) {if ContainerIOS == Container {- return "iOS"+ return "iOS", ""}if ContainerAndroid == Container {- return "Android"+ return "Android", ""}- return "Unknown"+ return "Unknown", ""}diff --git a/kernel/util/runtime.go b/kernel/util/runtime.goindex 0bcae5562a..6ebea77869 100644--- a/kernel/util/runtime.go+++ b/kernel/util/runtime.go@@ -46,6 +46,11 @@ const (var IsExiting = falsefunc logBootInfo() {+ plat, platVer := GetOSPlatform()+ osInfo := plat+ if "" != platVer {+ osInfo += "/" + platVer+ }logging.LogInfof("kernel is booting:\n"+" * ver [%s]\n"+" * arch [%s]\n"+@@ -57,7 +62,7 @@ func logBootInfo() {" * container [%s]\n"+" * database [ver=%s]\n"+" * workspace directory [%s]",- Ver, runtime.GOARCH, GetOSPlatform(), os.Getpid(), Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir)+ Ver, runtime.GOARCH, osInfo, os.Getpid(), Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir)}func IsMutexLocked(m *sync.Mutex) bool {