nexus/ui/src/api/assistantMemory.ts
Nexus Dev 7bb72a5a2f feat(33-01,33-02): memory service + sanitizer, personal assistant page
33-01: memory-sanitizer, assistant-memory service, REST routes, 17 tests
33-02: useNexusMode hook, PersonalAssistantPage, sidebar nav, route wiring

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 03:55:49 +00:00

22 lines
648 B
TypeScript

// [nexus] API client for assistant memory endpoints
import { api } from "./client";
export interface AssistantMemory {
companyId: string;
facts: string[];
updatedAt: string | null;
}
export const assistantMemoryApi = {
getMemory(companyId: string): Promise<AssistantMemory> {
return api.get<AssistantMemory>(`/assistant-memory/${companyId}`);
},
appendFact(companyId: string, fact: string): Promise<AssistantMemory> {
return api.patch<AssistantMemory>(`/assistant-memory/${companyId}`, { fact });
},
clearMemory(companyId: string): Promise<void> {
return api.delete<void>(`/assistant-memory/${companyId}`);
},
};