fix(tui): suppress Bot Mode silence markers

This commit is contained in:
KoNit-K
2026-09-14 19:12:26 +08:00
committed by Teknium
parent 182ec5c28d
commit 50a834fa2a
4 changed files with 116 additions and 1 deletions
+6 -1
View File
@@ -147,7 +147,12 @@ def _(rid, params: dict, _root=_relay_root, _run=_run_delivery) -> dict:
detail = _detail(proc)
return _err(rid, 5092, f"delivery turn failed: {detail or proc.returncode}",
data={"reason": classify_agent_error(detail)})
return _ok(rid, {"reply": (proc.stdout or "").strip()})
# Use the same canonical whole-response predicate as live Bot Chat
# completion. A marker remains a successful turn, but is never sent
# back to the relay caller as visible prose.
from tui_gateway.prompt_turn import _bot_mode_delivery_text
reply = _bot_mode_delivery_text((proc.stdout or "").strip(), successful=True)
return _ok(rid, {"reply": reply})
except subprocess.TimeoutExpired:
return _err(rid, 5093, "delivery turn timed out")
except Exception as e: