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:
38
frontend/src/api/memory.d.ts
vendored
Normal file
38
frontend/src/api/memory.d.ts
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
export interface DailyDigestKeyPoint {
|
||||
content: string
|
||||
source: string
|
||||
}
|
||||
|
||||
export interface DailyDigestSuggestion {
|
||||
text: string
|
||||
type?: 'action' | 'info' | 'warning'
|
||||
}
|
||||
|
||||
export interface DailyDigestItem {
|
||||
date: string
|
||||
summary: string
|
||||
keyPoints: DailyDigestKeyPoint[]
|
||||
suggestions: DailyDigestSuggestion[]
|
||||
}
|
||||
|
||||
export interface DailyDigestListResponse {
|
||||
items: DailyDigestItem[]
|
||||
}
|
||||
|
||||
export interface DueReminderItem {
|
||||
id: string
|
||||
content?: string
|
||||
title?: string
|
||||
trigger_at?: string
|
||||
}
|
||||
|
||||
export interface DueReminderListResponse {
|
||||
items: DueReminderItem[]
|
||||
}
|
||||
|
||||
export function getDailyDigest(date: string): Promise<{ data: DailyDigestItem }>
|
||||
export function getRecentDigests(limit?: number): Promise<{ data: DailyDigestListResponse }>
|
||||
export function createReminder(content: string, triggerAt: string, triggerType?: string): Promise<unknown>
|
||||
export function snoozeReminder(id: string, minutes: number): Promise<unknown>
|
||||
export function dismissReminder(id: string): Promise<unknown>
|
||||
export function getDueReminders(): Promise<{ data: DueReminderListResponse }>
|
||||
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