Use date + time format in message timestamps

Format: [Jan 31 2:35 PM] instead of [14:35:00]
Date provides important context for ongoing conversations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-01-31 19:33:11 +02:00
parent 22bd3d7c58
commit 0c08e8a034

View File

@@ -94,8 +94,10 @@ async function processMessage(msg: NewMessage): Promise<void> {
// Build prompt with conversation history // Build prompt with conversation history
const lines = missedMessages.map(m => { const lines = missedMessages.map(m => {
const time = new Date(m.timestamp).toLocaleTimeString(); const d = new Date(m.timestamp);
return `[${time}] ${m.sender_name}: ${m.content}`; const date = d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
const time = d.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' });
return `[${date} ${time}] ${m.sender_name}: ${m.content}`;
}); });
const prompt = lines.join('\n'); const prompt = lines.join('\n');