perf: 小优化组 + 恢复浏览器页签

1. MCP 空闲睡眠 50ms -> 10ms:#187 后单轮 drain 约 0.3ms,
   100 次/s 空闲迭代约 3% 单核,请求与远控输入拾取延迟
   从平均 25ms 降到 5ms。
2. stream 轮询 50ms -> 20ms。
3. stream payload 加 url/title;面板 stream 处理合并 url/
   title,5 秒 state 轮询只在未观看时跑(观看时 stream 已
   全量覆盖,轮询纯冗余;不观看时保留轮询,避免会话开始
   后页眉 stale)。
4. 恢复浏览器页签:#176(ccb5a86)改写 TaskDetailPanel
   页签时顺带删了 BrowserPanel 的挂载,导致线上控制台
   自 #176 起就没有浏览器页签(面板文件一直在,只是不
   被 import,构建产物因此不变)。本次把 import、页签
   与 Card 原样挂回;构建产物含“开始观看”标记可证。
console.html 由 npm run build:console 重打(342484 字节)。
console-redesign/ 为构建脚本审阅产物,不进仓库。
This commit is contained in:
host committed 2026-10-30 14:09:02 +08:00
1 parent 5e562d8413
commit cbf5e65a7a
7 files changed
+79 -40

No files matched your search

+5 -1
View File
@@ -450,7 +450,11 @@ def main():
if drained:
break
if not lines:
time.sleep(0.05)
# 10ms idle cadence: a pending request or remote input
# is picked up within ~10ms, and a drain round costs
# ~0.3ms (change-gated writes since #187), so 100
# idle iterations/s burn ~3% of one CPU.
time.sleep(0.01)
def _handle_line(line, browser):