fix(frontend): 移除运行时演示数据并接入真实后端状态

This commit is contained in:
2026-09-04 07:47:05 +08:00
parent 499b4ecec8
commit 44fb29c97a
32 changed files with 307 additions and 862 deletions
+4 -1
View File
@@ -126,9 +126,12 @@ async def rebuild(request: IndexRebuildRequest) -> IndexJob:
def get_status() -> IndexStatus:
counts = repository.stats()
if _active_job_id is not None:
return IndexStatus(status="running", pending_jobs=0, active_job_id=_active_job_id)
return IndexStatus(status="running", pending_jobs=0, active_job_id=_active_job_id,
total_notes=counts["notes"], total_blocks=counts["blocks"])
return IndexStatus(
total_notes=counts["notes"], total_blocks=counts["blocks"],
status="failed" if _last_error else "idle",
pending_jobs=0,
last_completed_at=_last_completed_at,