diff --git a/workspaces/augment/plugins/augment/src/components/CommandCenter/OpsOverview.tsx b/workspaces/augment/plugins/augment/src/components/CommandCenter/OpsOverview.tsx index e0c7faf565..c8fbdfaa77 100644 --- a/workspaces/augment/plugins/augment/src/components/CommandCenter/OpsOverview.tsx +++ b/workspaces/augment/plugins/augment/src/components/CommandCenter/OpsOverview.tsx @@ -56,25 +56,30 @@ export function OpsOverview({ namespace, onNavigate }: OpsOverviewProps) { useEffect(() => { let cancelled = false; - setLoading(true); - Promise.all([ - api.listAgents().catch(() => []), - api - .listKagentiTools(namespace) - .then(r => r.tools ?? []) - .catch(() => []), - ]) - .then(([a, t]) => { - if (!cancelled) { - setAgents(a as ChatAgent[]); - setTools(t); - } - }) - .finally(() => { - if (!cancelled) setLoading(false); - }); + const load = () => { + setLoading(true); + Promise.all([ + api.listAgents().catch(() => []), + api + .listKagentiTools(namespace) + .then(r => r.tools ?? []) + .catch(() => []), + ]) + .then(([a, t]) => { + if (!cancelled) { + setAgents(a as ChatAgent[]); + setTools(t); + } + }) + .finally(() => { + if (!cancelled) setLoading(false); + }); + }; + load(); + const interval = setInterval(load, 30_000); return () => { cancelled = true; + clearInterval(interval); }; }, [api, namespace]); diff --git a/workspaces/augment/plugins/augment/src/components/CommandCenter/ReviewQueue.tsx b/workspaces/augment/plugins/augment/src/components/CommandCenter/ReviewQueue.tsx index 18307a0a95..b90542877e 100644 --- a/workspaces/augment/plugins/augment/src/components/CommandCenter/ReviewQueue.tsx +++ b/workspaces/augment/plugins/augment/src/components/CommandCenter/ReviewQueue.tsx @@ -59,6 +59,8 @@ export function ReviewQueue() { useEffect(() => { loadAgents(); + const interval = setInterval(loadAgents, 30_000); + return () => clearInterval(interval); }, [loadAgents]); const handleApprove = useCallback(