fix(sessions): return None instead of 'unknown' for missing gateway session model (fixes #443)

This commit is contained in:
Nathan Esquenazi
2026-04-14 19:06:22 +00:00
committed by Hermes Agent
parent 3776b09f4a
commit f1590fdb07
3 changed files with 260 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ def _get_agent_sessions_from_db() -> list:
sessions.append({
'session_id': row['id'],
'title': row['title'] or 'Agent Session',
'model': row['model'] or 'unknown',
'model': row['model'] or None,
'message_count': row['message_count'] or 0,
'created_at': row['started_at'],
'updated_at': row['last_activity'] or row['started_at'],

View File

@@ -309,7 +309,7 @@ def get_cli_sessions() -> list:
'session_id': sid,
'title': _display_title,
'workspace': str(get_last_workspace()),
'model': row['model'] or 'unknown',
'model': row['model'] or None,
'message_count': row['message_count'] or 0,
'created_at': row['started_at'],
'updated_at': raw_ts,