From 0c08e8a0347b55351a14ecd2ace7190a484f610a Mon Sep 17 00:00:00 2001 From: gavrielc Date: Sat, 31 Jan 2026 19:33:11 +0200 Subject: [PATCH] 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 --- src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 12546b0..06d90f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -94,8 +94,10 @@ async function processMessage(msg: NewMessage): Promise { // Build prompt with conversation history const lines = missedMessages.map(m => { - const time = new Date(m.timestamp).toLocaleTimeString(); - return `[${time}] ${m.sender_name}: ${m.content}`; + const d = new Date(m.timestamp); + 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');