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

@ -148,8 +148,9 @@ def _safe_rel_avatar_name(name: str) -> str:
def _api_lang(store: SqliteStore) -> str:
v = str(store.get_setting("ui_lang") or "zh").strip().lower()
return v if v in ("zh", "en") else "zh"
from runtime.lang import resolve_runtime_lang
return resolve_runtime_lang(store=store)
def _init_gateway_executor(