feat: add message timestamps with smart formatting

- Added timestamp field to Message struct in Rust backend
- Timestamps automatically captured on message creation
- Smart relative time formatting (Just now, Xm ago, time, date)
- Timestamps display below message content with subtle styling
- Fixed avatar squishing issue with flex-shrink: 0
- Backward compatible with existing messages via serde(default)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-14 12:07:19 -07:00
parent ab6ae14bbc
commit 4694114ff9
3 changed files with 93 additions and 3 deletions

View File

@@ -86,6 +86,7 @@ body {
border: 1px solid var(--border);
background-size: cover;
background-position: center;
flex-shrink: 0;
}
.avatar-circle-large {
@@ -287,6 +288,24 @@ body {
margin-top: 12px;
}
/* Message timestamp */
.message-timestamp {
font-size: 10px;
color: var(--text-secondary);
opacity: 0.6;
margin-top: 4px;
user-select: none;
}
.message.user .message-timestamp {
text-align: right;
}
.message.assistant .message-timestamp {
text-align: left;
margin-left: 4px;
}
/* Message action buttons */
.message-actions {
position: absolute;