feat: sort sessions by latest message time instead of creation time
Use `last_active` from SQLite (max message timestamp) for accurate sorting, with fallback chain: last_active → ended_at → started_at. CLI mode lacks last_active so falls back to ended_at. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -151,7 +151,7 @@ function mapHermesSession(s: SessionSummary): Session {
|
||||
source: s.source || undefined,
|
||||
messages: [],
|
||||
createdAt: Math.round(s.started_at * 1000),
|
||||
updatedAt: Math.round((s.ended_at || s.started_at) * 1000),
|
||||
updatedAt: Math.round((s.last_active || s.ended_at || s.started_at) * 1000),
|
||||
model: s.model,
|
||||
provider: (s as any).billing_provider || '',
|
||||
messageCount: s.message_count,
|
||||
|
||||
Reference in New Issue
Block a user