fix(chat): honor ui_lang on WebSocket turns; ops NE display by host_name

Resolve runtime language from ui_lang and chat.send lang instead of hardcoding zh.
Align generalist/ops prompts with user language and require host_name (not ne_id) in ops outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-19 22:14:44 +08:00
parent 3a467704d6
commit f1626195f7
12 changed files with 86 additions and 27 deletions

View file

@ -75,6 +75,7 @@ def build_gateway_context(
"acp_parent_run_id": str(p.get("acp_parent_run_id") or ""),
"acp_child_run_id": str(p.get("acp_child_run_id") or ""),
"runId": rid,
"lang": str(p.get("lang") or "").strip().lower() or None,
}
async def _delayed() -> None:
await asyncio.sleep(0.05)
@ -113,6 +114,7 @@ def build_gateway_context(
"acp_parent_run_id": str(p.get("acp_parent_run_id") or ""),
"acp_child_run_id": str(p.get("acp_child_run_id") or ""),
"runId": run_id,
"lang": str(p.get("lang") or "").strip().lower() or None,
}
with abort_lock:
active_run_session[str(run_id)] = str(session_id)