feat(frontend): add memory components, temple/war-room pages, and composables

- Add DailyDigestCard and ReminderToast memory components
- Add temple and war-room page routes
- Add memory API module with TypeScript definitions
- Add chat composables: useClientTime, useDailyDigest, useSidebarPlan
- Simplify chat/logs/settings pages (remove unused code)
- Add settingsPage.css
This commit is contained in:
2026-04-05 20:45:16 +08:00
parent e24092f3ab
commit 472528e708
18 changed files with 4435 additions and 3796 deletions

View File

@@ -0,0 +1,37 @@
import api from './index'
/**
* Daily Digest API
*/
export async function getDailyDigest(date) {
return api.get(`/api/memory/daily-digest/${date}`)
}
export async function getRecentDigests(limit = 7) {
return api.get('/api/memory/daily-digests', { params: { limit } })
}
/**
* Reminder API
*/
export async function createReminder(content, triggerAt, triggerType = 'time') {
return api.post('/api/memory/reminders', {
content,
trigger_at: triggerAt,
trigger_type: triggerType,
})
}
export async function snoozeReminder(id, minutes) {
return api.post(`/api/memory/reminders/${id}/snooze`, { minutes })
}
export async function dismissReminder(id) {
return api.delete(`/api/memory/reminders/${id}`)
}
export async function getDueReminders() {
return api.get('/api/memory/reminders/due')
}