feat(session): add per-message created_at timestamps

- Persistence layer (jsonl.go addMsg/SetHistory) normalizes CreatedAt
  when missing so the invariant is guaranteed at the storage boundary
- API layer (session.go) exposes created_at on all transcript message
  types with session.updated fallback for legacy messages
- Frontend uses per-message timestamps when available
- messagesContentEqual ignores CreatedAt for tail-matching after
  JSONL roundtrip

Fixes #2787
This commit is contained in:
LiusCraft committed 2026-05-22 13:15:56 +08:00
1 parent 2992eccbf0
commit 81bbef62b1
10 files changed
+206 -14

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ export interface SessionDetail {
messages: {
role: "user" | "assistant"
content: string
created_at?: string
kind?: "normal" | "thought" | "tool_calls"
model_name?: string
media?: string[]