fix(ops): English replies from English prompts and ROLE_SYSTEM.en

Detect language from user message before UI hint, load ops ROLE_SYSTEM.en.md when en, and wire user_text through WS/HTTP/worker paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-19 22:41:46 +08:00
parent f1626195f7
commit 0de5f7bc98
9 changed files with 151 additions and 19 deletions

View file

@ -165,7 +165,11 @@ async def run_agent_turn_via_bridge(
ctx = conn.auth_ctx or {}
tenant_id = str(ctx.get("tenant_id") or "")
user_id = str(ctx.get("user_id") or "")
lang = resolve_runtime_lang(store=store, hint=str(p.get("lang") or ""))
lang = resolve_runtime_lang(
store=store,
hint=str(p.get("lang") or ""),
user_text=msg_text,
)
manager_agent = build_gateway_executor(
store,