fix: also filter session_meta in /session switch restore path

The original PR missed the third CLI restore path — the /session switch
command that loads history via get_messages_as_conversation() without
stripping session_meta entries.
This commit is contained in:
Teknium
2026-04-03 14:50:01 -07:00
committed by Teknium
parent 6bf5946bbe
commit 3f2180037c

5
cli.py
View File

@@ -3261,9 +3261,10 @@ class HermesCLI:
self._resumed = True
self._pending_title = None
# Load conversation history
# Load conversation history (strip transcript-only metadata entries)
restored = self._session_db.get_messages_as_conversation(target_id)
self.conversation_history = restored or []
restored = [m for m in (restored or []) if m.get("role") != "session_meta"]
self.conversation_history = restored
# Re-open the target session so it's not marked as ended
try: