feat: Add pending tasks and active status to WikiStats
- Introduced `pending_tasks` and `is_active` fields in the `WikiStats` interface to track the number of tasks waiting for processing and the current activity status of the wiki ingestion. - Updated localization files for English, Korean, Russian, and Chinese to include a new message for displaying the number of pending tasks in the wiki queue. - Enhanced the `WikiBrowser` component to display the queue status, improving user awareness of ongoing tasks. - Implemented polling logic to refresh wiki stats periodically when there are pending tasks or active ingestion, ensuring up-to-date information is presented. These changes enhance the functionality and user experience of the wiki management system by providing real-time insights into task status.
This commit is contained in:
@@ -17,7 +17,6 @@ const (
|
||||
TypeManualProcess = "manual:process" // 手工知识更新任务(cleanup + 重新索引)
|
||||
TypeDataSourceSync = "datasource:sync" // 数据源同步任务
|
||||
TypeWikiIngest = "wiki:ingest" // Wiki 页面同步任务
|
||||
TypeWikiRetract = "wiki:retract" // Wiki 内容回收任务(文档删除时)
|
||||
)
|
||||
|
||||
// ExtractChunkPayload represents the extract chunk task payload
|
||||
|
||||
@@ -168,4 +168,6 @@ type WikiStats struct {
|
||||
TotalLinks int64 `json:"total_links"`
|
||||
OrphanCount int64 `json:"orphan_count"` // pages with no inbound links
|
||||
RecentUpdates []*WikiPage `json:"recent_updates"` // last N updated pages
|
||||
PendingTasks int64 `json:"pending_tasks"` // number of documents waiting to be ingested
|
||||
IsActive bool `json:"is_active"` // whether wiki ingestion is currently running
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user