feat(monitor): 控制台新增「闭环探索日志」卡片——/api/explore 读取 docs/探索日志.md,Edge headless 截图验证渲染正常(http://127.0.0.1:8100)
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user