From 194fee982be9c06c56a5c3cfe2d3720e4c53453a Mon Sep 17 00:00:00 2001
From: log
Date: Sat, 11 Jul 2026 07:51:56 +0800
Subject: [PATCH] fix: report actual ML optimization status

---
 code/system/system_manager.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/code/system/system_manager.py b/code/system/system_manager.py
index 6dcd148..e32834e 100644
--- a/code/system/system_manager.py
+++ b/code/system/system_manager.py
@@ -339,11 +339,13 @@
         if report['components']:
             for component in report['components']:
                 status = report['health']['components'].get(component, {'status': 'unknown'})
-                status_str = status['status']
+                status_str = status.get('status', 'unknown')
                 if status_str == 'ok':
                     status_str = '✅ 正常'
                 elif status_str == 'error':
                     status_str = f"❌ 错误: {status.get('message', '未知错误')}"
+                elif status_str == 'disabled':
+                    status_str = '⏸️ 禁用'
                 lines.append(f"- **{component}:** {status_str}\n")
         else:
             lines.append("无组件\n")

--
Gitblit v1.8.0