updates on the hook and endpoints for the ai agents
This commit is contained in:
@@ -865,6 +865,18 @@ export const useUpdateAiAgent = () =>
|
||||
});
|
||||
|
||||
// Read-only, and it changes as agents work: refetched every minute while open.
|
||||
// The banner's source of truth; re-checked every 30 s so it turns green on its
|
||||
// own once AI_engine starts reading the registry.
|
||||
export const useAiStatus = (options) =>
|
||||
useQuery({
|
||||
queryKey: [...KEYS.aiRegistry, 'status'],
|
||||
queryFn: api.getAiStatus,
|
||||
staleTime: 15_000,
|
||||
refetchInterval: 30_000,
|
||||
retry: false,
|
||||
...options,
|
||||
});
|
||||
|
||||
export const useAiInsights = (days = 7, options) =>
|
||||
useQuery({
|
||||
queryKey: [...KEYS.aiRegistry, 'insights', days],
|
||||
|
||||
Reference in New Issue
Block a user