mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
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:
5
cli.py
5
cli.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user