fix: complete ensure_ascii=False and UTF-8 encoding migration

This commit is contained in:
Re-bin committed 2026-02-20 07:59:32 +00:00
commit 73fdd0dd45
25 files changed
+356 -235

No files matched your search

+2 -3
View File
@@ -110,7 +110,7 @@ class SessionManager:
if legacy_path.exists():
import shutil
shutil.move(str(legacy_path), str(path))
logger.info(f"Migrated session {key} from legacy path")
logger.info("Migrated session {} from legacy path", key)
if not path.exists():
return None
@@ -144,7 +144,7 @@ class SessionManager:
last_consolidated=last_consolidated
)
except Exception as e:
logger.warning(f"Failed to load session {key}: {e}")
logger.warning("Failed to load session {}: {}", key, e)
return None
def save(self, session: Session) -> None:
@@ -163,7 +163,6 @@ class SessionManager:
for msg in session.messages:
f.write(json.dumps(msg, ensure_ascii=False) + "\n")
self._cache[session.key] = session
def invalidate(self, key: str) -> None: