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: 使用第三方同步盘时弹出提示并退出内核 https://github.com/siyuan-note/siyuan/issues/7683
Liang Ding6b43dbad4b5a
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex f0d631c59e..65929f856a 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -1118,6 +1118,7 @@"192": "Rebuilding historical data index, please wait...","193": "Please refer to the [Artificial Intelligence] chapter of the User Guide for configuration","194": "There are restrictions on the Nutstore interface, please use other WebDAV services",- "195": "The system time is incorrect, please calibrate the system time and try again"+ "195": "The system time is incorrect, please calibrate the system time and try again",+ "196": "Do not set the workspace under the path of a third-party sync disk, otherwise the data will be damaged (OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)"}}diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex f519940641..d45901647e 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -1118,6 +1118,7 @@"192": "Reconstruyendo el índice de datos históricos, espere...","193": "Consulte el capítulo [Inteligencia artificial] de la guía del usuario para la configuración","194": "Existen restricciones en la interfaz de Nutstore, utilice otros servicios WebDAV",- "195": "La hora del sistema es incorrecta, calibre la hora del sistema y vuelva a intentarlo"+ "195": "La hora del sistema es incorrecta, calibre la hora del sistema y vuelva a intentarlo",+ "196": "No configure el espacio de trabajo bajo la ruta de un disco de sincronización de terceros, de lo contrario, los datos se dañarán (OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)"}}diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 9ea12b5b7c..a6f6f20602 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -1118,6 +1118,7 @@"192": "Reconstruction de l'index des données historiques, veuillez patienter...","193": "Veuillez vous référer au chapitre [Intelligence Artificielle] du guide de l'utilisateur pour la configuration","194": "Il existe des restrictions sur l'interface Nutstore, veuillez utiliser d'autres services WebDAV",- "195": "L'heure du système est incorrecte, veuillez calibrer l'heure du système et réessayer"+ "195": "L'heure du système est incorrecte, veuillez calibrer l'heure du système et réessayer",+ "196": "Ne définissez pas l'espace de travail sous le chemin d'un disque de synchronisation tiers, sinon les données seront endommagées (OneDrive/Dropbox/Google Drive/Nutstore/Baidu Netdisk/Tencent Weiyun, etc.)"}}diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 43b2893d5a..b31d9443fe 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -1118,6 +1118,7 @@"192": "正在重建歷史數據索引,請稍等...","193": "請先參考用戶指南 [人工智能] 章節進行配置","194": "堅果雲接口存在限制,請使用其他 WebDAV 服務",- "195": "系統時間不正確,請校準系統時間後再試"+ "195": "系統時間不正確,請校準系統時間後再試",+ "196": "請勿將工作空間設置在第三方同步盤路徑下,否則數據會被損壞(OneDrive/Dropbox/Google Drive/堅果雲/百度網盤/騰訊微雲等)"}}diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 448202b734..18d1002eaa 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -1118,6 +1118,7 @@"192": "正在重建历史数据索引,请稍等...","193": "请先参考用户指南 [人工智能] 章节进行配置","194": "坚果云接口存在限制,请使用其他 WebDAV 服务",- "195": "系统时间不正确,请校准系统时间后再试"+ "195": "系统时间不正确,请校准系统时间后再试",+ "196": "请勿将工作空间设置在第三方同步盘路径下,否则数据会被损坏(OneDrive/Dropbox/Google Drive/坚果云/百度网盘/腾讯微云等)"}}diff --git a/kernel/api/workspace.go b/kernel/api/workspace.goindex 3b6b1510c3..7ae5aaa526 100644--- a/kernel/api/workspace.go+++ b/kernel/api/workspace.go@@ -197,6 +197,13 @@ func setWorkspaceDir(c *gin.Context) {return}+ if util.IsCloudDrivePath(path) {+ ret.Code = -1+ ret.Msg = model.Conf.Language(196)+ ret.Data = map[string]interface{}{"closeTimeout": 7000}+ return+ }+if gulu.OS.IsWindows() {// 改进判断工作空间路径实现 https://github.com/siyuan-note/siyuan/issues/7569installDirLower := strings.ToLower(filepath.Dir(util.WorkingDir))diff --git a/kernel/util/runtime.go b/kernel/util/runtime.goindex 2b2d78b7b9..e38f25646e 100644--- a/kernel/util/runtime.go+++ b/kernel/util/runtime.go@@ -146,9 +146,7 @@ func CheckFileSysStatus() {for {<-thirdPartySyncCheckTicker.C- workspaceDirLower := strings.ToLower(WorkspaceDir)- if strings.Contains(workspaceDirLower, "onedrive") || strings.Contains(workspaceDirLower, "dropbox") ||- strings.Contains(workspaceDirLower, "google drive") || strings.Contains(workspaceDirLower, "pcloud") {+ if IsCloudDrivePath(WorkspaceDir) {reportFileSysFatalError(fmt.Errorf("workspace dir [%s] is in third party sync dir", WorkspaceDir))continue}@@ -231,3 +229,9 @@ func CheckFileSysStatus() {}}}++func IsCloudDrivePath(absPath string) bool {+ absPathLower := strings.ToLower(absPath)+ return strings.Contains(absPathLower, "onedrive") || strings.Contains(absPathLower, "dropbox") ||+ strings.Contains(absPathLower, "google drive") || strings.Contains(absPathLower, "pcloud")+}