Add session duration computation to discovery pipeline
Extend SessionEntry with an optional duration field (milliseconds) computed from the delta between created and modified timestamps. The computeDuration helper handles missing or invalid dates gracefully, returning 0 for any edge case. This enables downstream UI to show how long each session lasted without additional API calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ export interface SessionEntry {
|
||||
modified: string;
|
||||
messageCount: number;
|
||||
path: string;
|
||||
duration?: number; // Duration in milliseconds from first to last message
|
||||
}
|
||||
|
||||
export interface SessionListResponse {
|
||||
|
||||
Reference in New Issue
Block a user