mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:30:48 +08:00
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:
parent
f1626195f7
commit
0de5f7bc98
9 changed files with 151 additions and 19 deletions
14
tests/test_ops_role_system_en.py
Normal file
14
tests/test_ops_role_system_en.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from runtime.agent_context.loader import build_role_system_context
|
||||
|
||||
|
||||
def test_ops_role_system_en_prefers_localized_file() -> None:
|
||||
zh = build_role_system_context("ops", lang="zh")
|
||||
en = build_role_system_context("ops", lang="en")
|
||||
assert "运维专家" in zh or "oclaw智能运维" in zh
|
||||
assert "ops specialist" in en.lower()
|
||||
assert "reply entirely in the user's language" in en.lower()
|
||||
assert "运维专家" not in en
|
||||
Loading…
Add table
Add a link
Reference in a new issue