/** * useMemory Hook * Manage a single memory with CRUD operations */ import type { UseMemoryResult } from '../types'; /** * Hook to manage a single memory * * @example * ```tsx * function MemoryDetail({ memoryId }: { memoryId: string }) { * const { memory, isLoading, error, update, remove, refetch } = useMemory(memoryId); * * if (isLoading) { * return ; * } * * if (error) { * return Error: {error.message}; * } * * if (!memory) { * return Memory not found; * } * * return ( * * {memory.content} * Type: {memory.memory_type} * Confidence: {memory.confidence} *