From 4cde25325d5541d6dcba321e3b2577fa4e264b8b Mon Sep 17 00:00:00 2001 From: zhayujie Date: Mon, 15 Jun 2026 22:04:52 +0800 Subject: [PATCH] fix(evolution): pin review summary language via i18n hint --- agent/evolution/prompts.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/evolution/prompts.py b/agent/evolution/prompts.py index 2335ca9d..1ba95995 100644 --- a/agent/evolution/prompts.py +++ b/agent/evolution/prompts.py @@ -151,6 +151,11 @@ def build_review_user_message(transcript: str, protected_skills: list = None) -> "\n\nPROTECTED skills (built-in — never edit these): " f"{names}\n" ) + try: + from common import i18n + lang_name = "中文" if i18n.is_zh() else "English" + except Exception: + lang_name = "中文" return ( "Here is the conversation transcript that just went idle. Review it per " "your instructions. Acting is the exception: the main value is fixing or " @@ -158,6 +163,7 @@ def build_review_user_message(transcript: str, protected_skills: list = None) -> "rare last resorts — stay [SILENT] unless there is a clear, durable signal " "not already covered." f"{protected_note}\n" + f"The summary should preferably be written in: {lang_name}\n" "\n" f"{transcript}\n" ""