codebee 0.1.53 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,12 +87,15 @@ def render_share_html(run, task, report_text):
87
87
 
88
88
  steps_rows = ""
89
89
  for s in run.get("steps") or []:
90
+ who = s.get("agent_label") or s.get("agent") or ""
91
+ if s.get("model"):
92
+ who += " · " + str(s["model"])
90
93
  steps_rows += (
91
94
  '<div class="step"><span class="n">%02d</span>'
92
95
  '<span class="role">%s</span><span class="who">%s</span>'
93
96
  '<span class="sum">%s</span><span class="st %s">%s</span></div>'
94
97
  % (s.get("n") or 0, _esc(s.get("role") or ""),
95
- _esc(s.get("agent_label") or s.get("agent") or ""),
98
+ _esc(who),
96
99
  _esc((s.get("summary") or "")[:220]), _esc(s.get("status") or ""),
97
100
  _esc(s.get("status") or "")))
98
101
 
package/app/core/store.py CHANGED
@@ -1537,7 +1537,7 @@ def update_task_params(task_id, patch):
1537
1537
  return True, ""
1538
1538
 
1539
1539
 
1540
- def add_step(run_id, role, agent_id, agent_label, note=""):
1540
+ def add_step(run_id, role, agent_id, agent_label, note="", model=""):
1541
1541
  with LOCK:
1542
1542
  run = _RUNS.get(run_id)
1543
1543
  if not run:
@@ -1546,6 +1546,9 @@ def add_step(run_id, role, agent_id, agent_label, note=""):
1546
1546
  step = {
1547
1547
  "n": n, "role": role, "agent": agent_id, "agent_label": agent_label,
1548
1548
  "note": note,
1549
+ # 起跑即记解析到的模型:运行中蜂巢卡/步骤列表就能看到「在用哪个模型」,
1550
+ # 不必等 finish_step 用实际结果覆盖(换将成功后以实际为准)
1551
+ "model": str(model or "")[:80],
1549
1552
  "status": "running", "started_at": time.strftime("%H:%M:%S"),
1550
1553
  "ended_at": None, "duration_s": None, "exit_code": None,
1551
1554
  "summary": "", "log": None, "cost_usd": 0.0, "tokens": 0,
package/app/main.py CHANGED
@@ -30,7 +30,7 @@ if os.environ.get("TUTTI_ISOLATE_HOME", "").strip() == "1":
30
30
  os.environ["USERPROFILE"] = _fake_home
31
31
  os.environ["HOME"] = _fake_home
32
32
 
33
- from core import automation, catalog, flows, jobs, manager, market, market_remote, preview, registry, remote, settings, store
33
+ from core import automation, board, catalog, flows, jobs, manager, market, market_remote, preview, registry, remote, settings, store
34
34
  from core import paths
35
35
  from core import health
36
36
  import pick_dialog
@@ -235,6 +235,9 @@ class Handler(BaseHTTPRequestHandler):
235
235
  if path == "/api/health":
236
236
  from core import health
237
237
  return self._json(200, health.snapshot())
238
+ if path == "/api/board":
239
+ # 任务驾驶舱大屏的轻量聚合(KB 级;别让它去拉 /api/state 全量)
240
+ return self._json(200, board.payload())
238
241
  if path == "/api/connect":
239
242
  # 供设置页「手机连接」弹框生成二维码;远程打开需令牌,天然受保护
240
243
  return self._json(200, {"urls": remote.build_connect_urls(PORT),