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/6763
Liang Ding47063f4afc07
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex a9e05eecbf..7163a796db 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -966,7 +966,7 @@"130": "Starting new version installer...","131": "This operation is not supported, please go to the cloud storage provider management console to operate","132": "The current search method does not support the replace operation, please use the [Keyword] or [Regex] search method",- "133": "TODO",+ "133": "Downloading update installation package [%s]","134": "In order to prevent the newly restored data from being overwritten by synchronization, the data synchronization function has been automatically suspended","135": "Unable to decrypt data. Make sure to use the same key on multiple devices, then create a new cloud directory to sync","136": "Initializing data repository key...",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 22092f6e02..25a12ff640 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -966,7 +966,7 @@"130": "Iniciando instalador de nueva versión...","131": "Esta solicitud no es compatible, vaya a la consola de administración del proveedor de almacenamiento en la nube para operar","132": "El método de búsqueda actual no admite la operación de reemplazo, utilice el método de búsqueda [Palabra clave] o [Regex]",- "133": "TODO",+ "133": "Descargando paquete de instalación de actualización [%s]","134": "Para evitar que los datos recién restaurados sean sobrescritos por la sincronización, se ha suspendido automáticamente la función de sincronización de datos","135": "No se pueden descifrar los datos. Asegúrese de usar la misma clave en varios dispositivos, luego cree un nuevo directorio en la nube para sincronizar","136": "Inicializando la clave del repositorio de datos...",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 49010ddfa6..7026505378 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -966,7 +966,7 @@"130": "Démarrage du programme d'installation de la nouvelle version...","131": "Cette opération n'est pas prise en charge, veuillez vous rendre sur la console de gestion du fournisseur de stockage cloud pour opérer","132": "La méthode de recherche actuelle ne prend pas en charge l'opération de remplacement, veuillez utiliser la méthode de recherche [Mot-clé] ou [Regex]",- "133": "TODO",+ "133": "Téléchargement du package d'installation de la mise à jour [%s]","134": "Afin d'éviter que les données nouvellement restaurées ne soient écrasées par la synchronisation, la fonction de synchronisation des données a été automatiquement suspendue","135": "Impossible de déchiffrer les données. Assurez-vous d'utiliser la même clé sur plusieurs appareils, puis créez un nouveau répertoire cloud à synchroniser","136": "Initialisation de la clé du référentiel de données...",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 0892be438b..9edf17004a 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -966,7 +966,7 @@"130": "正在啟動新版本安裝程序...","131": "不支持該操作,請到雲端存儲提供商管理控制台進行操作","132": "當前搜索方式下不支持替換操作,請使用 [關鍵字] 或 [正則表達式] 搜索方式",- "133": "TODO",+ "133": "正在下載更新安裝包 [%s]","134": "為避免剛恢復的數據被同步覆蓋,數據同步功能已被自動暫停","135": "無法解密數據。請確保多個設備上使用相同的密鑰,然後創建新的雲端目錄進行同步","136": "初始化數據倉庫密鑰...",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 1f24f52b83..474fc1c723 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -966,7 +966,7 @@"130": "正在启动新版本安装程序...","131": "不支持该操作,请到云端存储提供商管理控制台进行操作","132": "当前搜索方式下不支持替换操作,请使用 [关键字] 或 [正则表达式] 搜索方式",- "133": "TODO",+ "133": "正在下载更新安装包 [%s]","134": "为避免刚恢复的数据被同步覆盖,数据同步功能已被自动暂停","135": "无法解密数据。请确保多个设备上使用相同的密钥,然后创建新的云端目录进行同步","136": "初始化数据仓库密钥...",diff --git a/kernel/go.sum b/kernel/go.sumindex 9fd7999d02..420221893a 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -17,8 +17,6 @@ github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5 h1:8HdZozCsXSgithub.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798 h1:sR/s/Y9wyl79ZRCUERwLPo9zqaB3KhNRodCMTJ4ozEU=github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=-github.com/88250/lute v1.7.5-0.20221127023213-58e68b736ec6 h1:PPvmmr+yKBI9pkGvbyTwYjEWySrd0zKLRV8z6mkJlTs=-github.com/88250/lute v1.7.5-0.20221127023213-58e68b736ec6/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=github.com/88250/lute v1.7.5-0.20221129095549-dbe2b67d3205 h1:PqqI3Ny0WWvwGjHEGGQK2BObrBh8KP2oD3iq6Mg+kLg=github.com/88250/lute v1.7.5-0.20221129095549-dbe2b67d3205/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=diff --git a/kernel/model/updater.go b/kernel/model/updater.goindex ff43d3cfa5..a9c19176f1 100644--- a/kernel/model/updater.go+++ b/kernel/model/updater.go@@ -138,12 +138,12 @@ func getUpdatePkg() (downloadPkgURLs []string, checksum string, err error) {}pkg := "siyuan-" + ver + "-" + suffix- url := "https://github.com/siyuan-note/siyuan/releases/download/v" + ver + "/" + pkg- downloadPkgURLs = append(downloadPkgURLs, url)- url = "https://ghproxy.com/" + url- downloadPkgURLs = append(downloadPkgURLs, url)- url = "https://release.b3log.org/siyuan/" + pkg- downloadPkgURLs = append(downloadPkgURLs, url)+ b3logURL := "https://release.b3log.org/siyuan/" + pkg+ downloadPkgURLs = append(downloadPkgURLs, b3logURL)+ githubURL := "https://github.com/siyuan-note/siyuan/releases/download/v" + ver + "/" + pkg+ ghproxyURL := "https://ghproxy.com/" + githubURL+ downloadPkgURLs = append(downloadPkgURLs, ghproxyURL)+ downloadPkgURLs = append(downloadPkgURLs, githubURL)checksums := result["checksums"].(map[string]interface{})checksum = checksums[pkg].(string)@@ -173,9 +173,11 @@ func downloadInstallPkg(pkgURL, checksum string) (err error) {logging.LogInfof("downloading install package [%s]", pkgURL)client := req.C().SetTLSHandshakeTimeout(7 * time.Second).SetTimeout(10 * time.Minute)callback := func(info req.DownloadInfo) {- //logging.LogDebugf("downloading install package [%s %.2f%%]", pkgURL, float64(info.DownloadedSize)/float64(info.Response.ContentLength)*100.0)+ progress := fmt.Sprintf("%.2f%%", float64(info.DownloadedSize)/float64(info.Response.ContentLength)*100.0)+ // logging.LogDebugf("downloading install package [%s %s]", pkgURL, progress)+ util.PushStatusBar(fmt.Sprintf(Conf.Language(133), progress))}- _, err = client.R().SetOutputFile(savePath).SetDownloadCallback(callback).Get(pkgURL)+ _, err = client.R().SetOutputFile(savePath).SetDownloadCallbackWithInterval(callback, 1*time.Second).Get(pkgURL)if nil != err {logging.LogErrorf("download install package [%s] failed: %s", pkgURL, err)return@@ -187,6 +189,7 @@ func downloadInstallPkg(pkgURL, checksum string) (err error) {return}logging.LogInfof("downloaded install package [%s] to [%s]", pkgURL, savePath)+ util.PushStatusBar(Conf.Language(62))return}