fix(gateway): pass encoding="utf-8" to read_text/write_text in update path (#37423)

This commit is contained in:
Rod Boev 2026-06-04 08:16:15 -04:00 committed by Teknium
parent cbb1457606
commit 5b76ce169b
9 changed files with 81 additions and 30 deletions

View file

@ -2180,7 +2180,7 @@ class FeishuAdapter(BasePlatformAdapter):
def _write_update_prompt_response(answer: str) -> None:
response_path = get_hermes_home() / ".update_response"
tmp_path = response_path.with_suffix(".tmp")
tmp_path.write_text(answer)
tmp_path.write_text(answer, encoding="utf-8")
tmp_path.replace(response_path)
async def send_voice(