feat(monitor): 控制台新增「闭环探索日志」卡片——/api/explore 读取 docs/探索日志.md,Edge headless 截图验证渲染正常(http://127.0.0.1:8100)

This commit is contained in:
cbb
2026-10-20 05:35:42 +08:00
parent fe48b4e777
commit 29f3887be1
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -608,6 +608,11 @@ class H(BaseHTTPRequestHandler):
if u.path == '/api/status': return self.send(200, json.dumps(status()), 'application/json')
if u.path == '/api/job': return self.send(200, json.dumps(JOB.state()), 'application/json')
if u.path == '/api/console': return self.send(200, json.dumps(console(int(q.get('offset', ['0'])[0]))), 'application/json')
if u.path == '/api/explore': # 2026-10-20:闭环探索日志(docs/探索日志.md)回写控制台
try:
with open(os.path.join(ROOT, 'docs', '探索日志.md'), encoding='utf-8') as f: md = f.read()
except Exception: md = ''
return self.send(200, json.dumps({'md': md}), 'application/json')
self.send(404, 'not found', 'text/plain')
except Exception as e:
self.send(500, json.dumps({'error': str(e)}), 'application/json')