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'),