refactor: tighten session recency cleanup

maintainer edit: remove defensive branches that normal session storage cannot produce and keep the idle-expiry helper direct.
This commit is contained in:
chengyongru authored and Xubin Ren committed 2026-06-30 23:38:32 +08:00
1 parent 840ba5af33
commit a6a489e0fa
2 files changed
+5 -18

No files matched your search

-2
View File
@@ -284,8 +284,6 @@ def _scan_session_row(session_manager: SessionManager, path: Path) -> dict[str,
if not line.strip():
continue
item = json.loads(line)
if item.get("_type") == "metadata":
continue
timestamp = _visible_message_timestamp(item)
if timestamp is not None:
visible_message_at = _latest_updated_at(visible_message_at, timestamp)