From baa75d4e07d5c37d5ea74181eb5b44289f1c5696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=96=8B=E7=89=A9?= Date: Mon, 16 Mar 2026 09:04:16 +0800 Subject: [PATCH] =?UTF-8?q?improve(daily-briefing):=20=E5=84=AA=E5=8C=96?= =?UTF-8?q?=E6=96=87=E6=A1=88=E8=88=87=E7=84=A1=E5=BE=85=E8=BE=A6=E6=99=82?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/daily-briefing/handler.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/skills/daily-briefing/handler.ts b/skills/daily-briefing/handler.ts index ba8c81f..0256403 100644 --- a/skills/daily-briefing/handler.ts +++ b/skills/daily-briefing/handler.ts @@ -76,6 +76,9 @@ export async function handler(ctx: any) { const now = new Date(); const dateStr = formatDate(now); const weekday = getWeekday(now); + const yesterday = new Date(now); + yesterday.setDate(yesterday.getDate() - 1); + const yesterdayStr = formatDate(yesterday); // 讀取設定 const userMd = readWorkspaceFile(workspace, 'USER.md'); @@ -87,7 +90,7 @@ export async function handler(ctx: any) { // 讀取待辦與行程 const todoContent = readWorkspaceFile(workspace, 'TODO.md'); const scheduleContent = readWorkspaceFile(workspace, 'SCHEDULE.md'); - const memoryContent = readWorkspaceFile(workspace, `memory/${dateStr}.md`); + const memoryContent = readWorkspaceFile(workspace, `memory/${yesterdayStr}.md`); const todos = parseTodos(todoContent); const schedule = parseTodaySchedule(scheduleContent, dateStr); @@ -103,20 +106,20 @@ export async function handler(ctx: any) { if (schedule.length > 0) { sections.push(`📅 **今日行程**\n${schedule.map(s => `• ${s}`).join('\n')}`); } else { - sections.push(`📅 **今日行程**\n• 暫無排程`); + sections.push(`📅 **今日行程**\n• 今日無排程,享受自由時光!`); } if (todos.length > 0) { sections.push(`✅ **待辦事項(${todos.length} 項)**\n${todos.map(t => `• ${t}`).join('\n')}`); } else { - sections.push(`✅ **待辦事項**\n• 今日無待辦,保持輕鬆!`); + sections.push(`✅ **待辦事項**\n• 目前無待辦,繼續保持!`); } if (memoryContent) { - sections.push(`📝 **昨日記錄**\n${memoryContent.slice(0, 200)}...`); + sections.push(`📝 **昨日回顧**\n${memoryContent.slice(0, 200)}...`); } - sections.push(`\n有什麼想先處理的嗎?`); + sections.push(`\n💡 *有什麼想先處理的嗎?我隨時為您服務。*`); return { reply: sections.join('\n\n'),