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 Ding1275a4bf1661
diff --git a/kernel/model/repository.go b/kernel/model/repository.goindex e7f6edc33b..6042f1c808 100644--- a/kernel/model/repository.go+++ b/kernel/model/repository.go@@ -24,6 +24,7 @@ import ("fmt""math""os"+ "path/filepath""strings""time"@@ -637,7 +638,7 @@ func subscribeEvents() {indexWalkDataCount := 0eventbus.Subscribe(dejavu.EvtIndexWalkData, func(context map[string]interface{}, path string) {- msg := fmt.Sprintf(Conf.Language(158), path)+ msg := fmt.Sprintf(Conf.Language(158), filepath.Base(path))if 0 == indexWalkDataCount%512 {util.SetBootDetails(msg)contextPushMsg(context, msg)@@ -665,7 +666,7 @@ func subscribeEvents() {})indexUpsertFileCount := 0eventbus.Subscribe(dejavu.EvtIndexUpsertFile, func(context map[string]interface{}, path string) {- msg := fmt.Sprintf(Conf.Language(160), path)+ msg := fmt.Sprintf(Conf.Language(160), filepath.Base(path))if 0 == indexUpsertFileCount%128 {util.SetBootDetails(msg)contextPushMsg(context, msg)@@ -680,7 +681,7 @@ func subscribeEvents() {})coWalkDataCount := 0eventbus.Subscribe(dejavu.EvtCheckoutWalkData, func(context map[string]interface{}, path string) {- msg := fmt.Sprintf(Conf.Language(161), path)+ msg := fmt.Sprintf(Conf.Language(161), filepath.Base(path))if 0 == coWalkDataCount%512 {util.SetBootDetails(msg)contextPushMsg(context, msg)@@ -696,7 +697,7 @@ func subscribeEvents() {})coUpsertFileCount := 0eventbus.Subscribe(dejavu.EvtCheckoutUpsertFile, func(context map[string]interface{}, path string) {- msg := fmt.Sprintf(Conf.Language(162), path)+ msg := fmt.Sprintf(Conf.Language(162), filepath.Base(path))util.IncBootProgress(bootProgressPart, msg)if 0 == coUpsertFileCount%128 {contextPushMsg(context, msg)@@ -711,7 +712,7 @@ func subscribeEvents() {})coRemoveFileCount := 0eventbus.Subscribe(dejavu.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) {- msg := fmt.Sprintf(Conf.Language(163), path)+ msg := fmt.Sprintf(Conf.Language(163), filepath.Base(path))util.IncBootProgress(bootProgressPart, msg)if 0 == coRemoveFileCount%512 {contextPushMsg(context, msg)diff --git a/kernel/util/working.go b/kernel/util/working.goindex 35ae8df790..a525e51822 100644--- a/kernel/util/working.go+++ b/kernel/util/working.go@@ -110,11 +110,15 @@ func Boot() {go cleanOld()}+func setBootDetails(details string) {+ bootDetails = "v" + Ver + " " + details+}+func SetBootDetails(details string) {if 100 <= bootProgress {return}- bootDetails = details+ setBootDetails(details)}func IncBootProgress(progress float64, details string) {@@ -122,7 +126,7 @@ func IncBootProgress(progress float64, details string) {return}bootProgress += progress- bootDetails = details+ setBootDetails(details)}func IsBooted() bool {@@ -138,7 +142,7 @@ func GetBootProgress() float64 {}func SetBooted() {- bootDetails = "Finishing boot..."+ setBootDetails("Finishing boot...")bootProgress = 100logging.LogInfof("kernel booted")}