feat: show response generation time on assistant messages
Track how long each assistant response took to generate and display it subtly next to the timestamp (e.g. '· 12.3s'). The timing is measured from the first streaming delta to the final state, and preserved across the history reload that follows stream completion. Only visible for messages generated during the current session.
This commit is contained in:
@@ -10,6 +10,10 @@ export interface ChatMessage {
|
||||
metadata?: Record<string, unknown>;
|
||||
/** Optimistic send status for user messages */
|
||||
sendStatus?: 'sending' | 'sent' | 'error';
|
||||
/** Timestamp (ms) when streaming started for this message */
|
||||
streamStartedAt?: number;
|
||||
/** Total generation time in milliseconds (set when streaming ends) */
|
||||
generationTimeMs?: number;
|
||||
}
|
||||
|
||||
export type MessageBlock =
|
||||
|
||||
Reference in New Issue
Block a user