(
agentPubkey: string | null | undefined,
options?: { enabled?: boolean },
)
| 82 | * worker-ize this if the numbers warrant). |
| 83 | */ |
| 84 | export function useAgentMemoryGraph( |
| 85 | agentPubkey: string | null | undefined, |
| 86 | options?: { enabled?: boolean }, |
| 87 | ): { |
| 88 | query: ReturnType<typeof useAgentMemoryQuery>; |
| 89 | graph: MemoryGraph | null; |
| 90 | } { |
| 91 | const query = useAgentMemoryQuery(agentPubkey, options); |
| 92 | const graph = React.useMemo<MemoryGraph | null>(() => { |
| 93 | if (!query.data) return null; |
| 94 | return buildMemoryGraph(query.data); |
| 95 | }, [query.data]); |
| 96 | return { query, graph }; |
| 97 | } |
no test coverage detected