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/5451
Liang Ding20fe3affc11f
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex dc79c89a9b..4a1ec4f7e0 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -917,8 +917,8 @@"159": "Indexing data repo, getting the latest file %v","160": "Indexing data repo, inserting file %v","161": "Checking out of data repo, walking data %s",- "162": "Checking out data repo, inserting file %s",- "163": "Checking out data repo, deleting file %s",+ "162": "Checking out data repo, inserting file %v",+ "163": "Checking out data repo, deleting file %v","164": "Downloading data repo snapshot %s","165": "Downloading data repo file %v","166": "Downloading data repo chunk %v",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 1c3c3ffb89..4fa21a7b19 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -917,8 +917,8 @@"159": "Indexando repositorio de datos, obteniendo el último archivo %v","160": "Indexando repositorio de datos, insertando archivo %v","161": "Revisando el repositorio de datos, recorriendo datos %s",- "162": "Revisando el repositorio de datos, insertando el archivo %s",- "163": "Revisando el repositorio de datos, eliminando el archivo %s",+ "162": "Revisando el repositorio de datos, insertando el archivo %v",+ "163": "Revisando el repositorio de datos, eliminando el archivo %v","164": "Descargando instantánea de repositorio de datos %s","165": "Descargando archivo de repositorio de datos %v","166": "Descargando parte de repositorio de datos %v",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 3b2f7d3413..023b55bd10 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -917,8 +917,8 @@"159": "Indexation du référentiel de données, obtention du dernier fichier %v","160": "Indexation du référentiel de données, insertion du fichier %v","161": "Vérification du référentiel de données, données piétonnes %s",- "162": "Vérification du référentiel de données, insertion du fichier %s",- "163": "Vérification du référentiel de données, suppression du fichier %s",+ "162": "Vérification du référentiel de données, insertion du fichier %v",+ "163": "Vérification du référentiel de données, suppression du fichier %v","164": "Téléchargement du l'instantané du référentiel de données %s","165": "Téléchargement du fichier de référentiel de données %v","166": "Téléchargement du bloc de dépôt de données %v",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 8a6424afaf..f9c3e3d2ac 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -916,8 +916,8 @@"159": "正在索引數據倉庫,獲取最新文件 %v","160": "正在索引數據倉庫,插入文件 %v","161": "正在遷出數據倉庫,遍歷數據 %s",- "162": "正在遷出數據倉庫,插入文件 %s",- "163": "正在遷出數據倉庫,刪除文件 %s",+ "162": "正在遷出數據倉庫,插入文件 %v",+ "163": "正在遷出數據倉庫,刪除文件 %v","164": "正在下載數據倉庫快照 %s","165": "正在下載數據倉庫文件 %v","166": "正在下載數據倉庫分塊 %v",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex cd5023439e..c48d21e023 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -918,8 +918,8 @@"159": "正在索引数据仓库,获取最新文件 %v","160": "正在索引数据仓库,插入文件 %v","161": "正在迁出数据仓库,遍历数据 %s",- "162": "正在迁出数据仓库,插入文件 %s",- "163": "正在迁出数据仓库,删除文件 %s",+ "162": "正在迁出数据仓库,插入文件 %v",+ "163": "正在迁出数据仓库,删除文件 %v","164": "正在下载数据仓库快照 %s","165": "正在下载数据仓库文件 %v","166": "正在下载数据仓库分块 %v",diff --git a/kernel/go.mod b/kernel/go.modindex 837f541348..1aa0cd8876 100644--- a/kernel/go.mod+++ b/kernel/go.mod@@ -39,7 +39,7 @@ require (github.com/panjf2000/ants/v2 v2.5.0github.com/patrickmn/go-cache v2.1.0+incompatiblegithub.com/radovskyb/watcher v1.0.7- github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7+ github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdcgithub.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771fgithub.com/siyuan-note/filelock v0.0.0-20220704090116-54dfb035283fdiff --git a/kernel/go.sum b/kernel/go.sumindex 0068f460b8..a551c97d22 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -514,8 +514,8 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDgithub.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=-github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7 h1:fwArXZt5uFHIy7osjyn2iz+1j7gn4LEbCpcZDTdo+PE=-github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7/go.mod h1:0VEmTSMPoFer5yCQ4ozkjC0YX1rpK7BEJ0IwXI2cqf0=+github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdc h1:zM32iRe7JPQVkzrQ/kRgJelmgJb5SST0w1S6Zxh70FA=+github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdc/go.mod h1:0VEmTSMPoFer5yCQ4ozkjC0YX1rpK7BEJ0IwXI2cqf0=github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f h1:JMobMNZ7AqaKKyEK+WeWFhix/2TDQXgPZDajU00IybU=diff --git a/kernel/model/repository.go b/kernel/model/repository.goindex 241eb3956b..69095c8a4a 100644--- a/kernel/model/repository.go+++ b/kernel/model/repository.go@@ -643,19 +643,32 @@ func subscribeEvents() {contextPushMsg(context, msg)}})+ var bootProgressPart float64+ eventbus.Subscribe(dejavu.EvtCheckoutUpsertFiles, func(context map[string]interface{}, files []*entity.File) {+ msg := fmt.Sprintf(Conf.Language(162), len(files))+ util.SetBootDetails(msg)+ bootProgressPart = 10 / float64(len(files))+ contextPushMsg(context, msg)+ })eventbus.Subscribe(dejavu.EvtCheckoutUpsertFile, func(context map[string]interface{}, path string) {msg := fmt.Sprintf(Conf.Language(162), path)+ util.IncBootProgress(bootProgressPart, msg)count++if 0 == count%32 {- util.SetBootDetails(msg)contextPushMsg(context, msg)}})+ eventbus.Subscribe(dejavu.EvtCheckoutRemoveFiles, func(context map[string]interface{}, files []*entity.File) {+ msg := fmt.Sprintf(Conf.Language(163), files)+ util.SetBootDetails(msg)+ bootProgressPart = 10 / float64(len(files))+ contextPushMsg(context, msg)+ })eventbus.Subscribe(dejavu.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) {msg := fmt.Sprintf(Conf.Language(163), path)+ util.IncBootProgress(bootProgressPart, msg)count++if 0 == count%32 {- util.SetBootDetails(msg)contextPushMsg(context, msg)}})@@ -666,7 +679,6 @@ func subscribeEvents() {contextPushMsg(context, msg)})- var bootProgressPart float64eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadFiles, func(context map[string]interface{}, ids []string) {msg := fmt.Sprintf(Conf.Language(165), len(ids))util.SetBootDetails(msg)