sync: collector/ 同步自 inkstone/arcrun-rag@10eb2cb(桌面小幫手 0.18.53)

This commit is contained in:
2026-09-14 07:05:34 +08:00
parent bce422f6fe
commit e4327ecd37
13 changed files with 820 additions and 22 deletions
+3 -1
View File
@@ -126,6 +126,8 @@ type syncStatus struct {
// 同上:形狀定義在 collector/progress.gosync_status.go,這裡原樣接住。
// 這是資料夾那一列打不打勾的**唯一**依據(見 folder_badge.go)。
FolderProgress map[string]collector.SyncProgress `json:"folder_progress,omitempty"`
// arcrun-rag#200:一輪還沒跑完時做到哪(形狀定義在 collector/sync_status.go)。
InRound *collector.RoundProgress `json:"in_round,omitempty"`
}
type skippedDoc struct {
@@ -649,7 +651,7 @@ func describeStatus(s syncStatus) (syncing bool, big, sub string) {
return false, "同步引擎沒有在跑", sub
}
if collectorSyncing() {
return true, "同步中… 正在讀檔並整理成知識卡", "請稍候,完成後會顯示整理了幾份"
return true, "同步中… 正在讀檔並整理成知識卡", syncingSub(s.InRound, time.Now(), accountLabelFor)
}
if s.ExtractorError != "" && !s.ExtractorOK {
return false, "需要你處理一下", "⚠ " + s.ExtractorError