Skip to content

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

:art: 新增内核启动参数 `mode` https://github.com/siyuan-note/siyuan/issues/5064

Liang Ding5ff6b4610ae2
diff --git a/DEV.md b/DEV.md
index d81d56b1c1..2b57cc6bb6 100644
--- a/DEV.md
+++ b/DEV.md
@@ -27,7 +27,7 @@ NPM mirror:
* `cd kernel`
* `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
-* `SiYuan-Kernel.exe --wd=D:/siyuan/app`
+* `SiYuan-Kernel.exe --wd=D:/siyuan/app --mode=dev`
### iOS
diff --git a/DEV_zh_CN.md b/DEV_zh_CN.md
index d057922ddf..c4c8153fa9 100644
--- a/DEV_zh_CN.md
+++ b/DEV_zh_CN.md
@@ -27,7 +27,7 @@ NPM 镜像:
* `cd kernel`
* `go build --tags "fts5" -o "../app/kernel/SiYuan-Kernel.exe"`
-* `SiYuan-Kernel.exe --wd=D:/siyuan/app`
+* `SiYuan-Kernel.exe --wd=D:/siyuan/app --mode=dev`
### iOS
diff --git a/kernel/util/working.go b/kernel/util/working.go
index dd672f74e4..14a90718c7 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -63,7 +63,7 @@ func Boot() {
accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
ssl := flag.Bool("ssl", false, "for https and wss")
lang := flag.String("lang", "en_US", "zh_CN/zh_CHT/en_US/fr_FR")
-
+ mode := flag.String("mode", "prod", "dev/prod")
flag.Parse()
if "" != *wdPath {
@@ -72,6 +72,7 @@ func Boot() {
if "" != *lang {
Lang = *lang
}
+ Mode = *mode
Resident = *resident
ReadOnly = *readOnly
AccessAuthCode = *accessAuthCode