File size: 330 Bytes
7c5ed63 | 1 2 3 4 5 6 7 8 9 10 11 | import { useQuery } from '@tanstack/react-query';
import { api } from '../api';
export function useAgentTree(sessionId: string | undefined, enabled = true) {
return useQuery({
queryKey: ['session', sessionId, 'agents'] as const,
queryFn: () => api.getAgentTree(sessionId!),
enabled: !!sessionId && enabled,
});
}
|