refactor: remove legacy history and proxy migrations (#6518)

This commit is contained in:
chengyongru authored and GitHub committed 2026-10-29 18:28:44 +08:00
1 parent 1c28b20c7e
commit cb3ba45317
47 files changed
+207 -1925

No files matched your search

-40
View File
@@ -350,46 +350,6 @@ async def test_sidebar_allocates_handles_then_reads_during_pending_write(tmp_pat
await state.aclose()
def test_webui_session_list_fallback_time_when_missing(tmp_path: Path) -> None:
legacy = tmp_path / "sessions"
legacy.mkdir()
path = legacy / "websocket_missing-time.jsonl"
path.write_text(
'{"_type": "metadata", "key": "websocket:missing-time"}\n'
'{"_type": "message", "role": "user", "content": "hello"}\n',
encoding="utf-8",
)
manager = SessionManager(tmp_path)
rows = list_webui_sessions(manager)
assert len(rows) == 1
assert rows[0]["key"] == "websocket:missing-time"
assert rows[0]["created_at"] is not None
assert rows[0]["updated_at"] is not None
datetime.fromisoformat(rows[0]["created_at"])
datetime.fromisoformat(rows[0]["updated_at"])
def test_session_manager_list_sessions_fallback_time_when_missing(tmp_path: Path) -> None:
legacy = tmp_path / "sessions"
legacy.mkdir()
path = legacy / "websocket_missing-time2.jsonl"
path.write_text(
'{"_type": "metadata", "key": "websocket:missing-time2"}\n'
'{"_type": "message", "role": "user", "content": "hello"}\n',
encoding="utf-8",
)
manager = SessionManager(tmp_path)
sessions = manager.list_sessions()
assert len(sessions) == 1
assert sessions[0]["key"] == "websocket:missing-time2"
assert sessions[0]["created_at"] is not None
assert sessions[0]["updated_at"] is not None
datetime.fromisoformat(sessions[0]["created_at"])
datetime.fromisoformat(sessions[0]["updated_at"])
def test_sidebar_uses_durable_display_summary_and_filters_private_sessions(history):
sessions = history.sessions
sessions.types.register(SessionType("internal", needs_handle=False, public_history=False))