Skip to content

The agent that grows with you

fix(web): session search hits carry the row's last_active

teknium1e3e485452250
diff --git a/hermes_cli/web_routers/sessions.py b/hermes_cli/web_routers/sessions.py
index 48431813f22..a89097ee0a3 100644
--- a/hermes_cli/web_routers/sessions.py
+++ b/hermes_cli/web_routers/sessions.py
@@ -357,9 +357,13 @@ async def search_sessions(
seen[root] = payload
def hit_payload(row: dict, snippet: str, role, session_started) -> dict:
+ # `last_active` rides only on id-match rows (sessions table); FTS
+ # hits have no row recency and leave it null so the desktop can
+ # fall back to session_started instead of inventing one.
return {
"snippet": snippet, "role": role, "source": row.get("source"),
- "model": row.get("model"), "session_started": session_started}
+ "model": row.get("model"), "session_started": session_started,
+ "last_active": row.get("last_active")}
# Direct ID matches first (pasted ids never appear in message text).
for row in db.search_sessions_by_id(