feat: 实现四阶段进度显示

问题:
- 当前进度显示使用旧的处理器列表
- 显示了所有独立的处理步骤,而不是分阶段

解决方案:
- 将处理步骤聚合到四个主要阶段
- 实现阶段级进度计算
- 更新阶段名称显示

四阶段结构:
1. Processors (30%)
   - 包含所有处理器 (ASR, FACE, OCR, etc.)

2. Knowledge Graph (35%)
   - tkg_nodes
   - tkg_edges

3. Moment Extraction (6%)
   - vlm_summary
   - scene_vlm
   - moment_chunks

4. Integration (29%)
   - rule1_ingestion
   - rule2_ingestion
   - face_tracing
   - face_dedup

实现细节:
- loadPipelineStats() 中添加阶段聚合逻辑
- 根据步骤权重计算阶段进度
- 根据步骤状态确定阶段状态
- formatStageName() 更新阶段名称映射

进度计算:
- 阶段进度 = 加权平均步骤进度
- 阶段状态 = 优先级: failed > completed > running > pending
- 总体进度 = 加权阶段进度之和

显示效果:
- ✗ Processors: 0%
- ✓ Knowledge Graph: 100%
- ✗ Moment Extraction: 33%
- ✗ Integration: 50%

优势:
- 更清晰的阶段划分
- 更好的进度概览
- 更符合实际处理流程
This commit is contained in:
2026-10-14 20:23:42 +08:00
parent 86832229a9
commit f298626487
2 changed files with 61 additions and 19 deletions

View File

@@ -1179,6 +1179,10 @@ function getStageIcon(status: string): string {
function formatStageName(name: string): string {
const names: Record<string, string> = {
processors: 'Processors',
knowledge_graph: 'Knowledge Graph',
moment_extraction: 'Moment Extraction',
integration: 'Integration',
// Keep old names for backward compatibility
rule1_ingestion: 'Rule1 Ingestion',
face_tracing: 'Face Tracing',
face_dedup: 'Face Dedup',