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:
37
frontend/src/api/memory.js
Normal file
37
frontend/src/api/memory.js
Normal 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')
|
||||
}
|
||||
Reference in New Issue
Block a user