From 2a94352d3db258e0524d47961a7ad93fd567249d Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 14 Oct 2025 01:51:33 +0000 Subject: [PATCH] Restore default SkipAgent enabling outside docs cgen-7baec6e4c0254f34ae1dbfb18cd34612 --- client/components/SkipAgentController.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/client/components/SkipAgentController.tsx b/client/components/SkipAgentController.tsx index 19eff476..68d8ead6 100644 --- a/client/components/SkipAgentController.tsx +++ b/client/components/SkipAgentController.tsx @@ -9,21 +9,15 @@ const SkipAgentController = () => { const location = useLocation(); useEffect(() => { - // Require an explicit opt-in to enable third-party agents. - // Set `window.__AETHEX_ENABLE_SKIP_AGENT = true` in the browser console or a hosting config - // to opt into loading partner SDKs outside of /docs pages. - const optedIn = typeof window !== "undefined" && (window as any).__AETHEX_ENABLE_SKIP_AGENT === true; const onDocs = location.pathname.startsWith(DOCS_PATH_PREFIX); - if (optedIn && !onDocs) { - void setSkipAgentActive(true); - } else { - // Ensure the agent is disabled by default or on docs routes + if (onDocs) { disableSkipAgent(); + } else { + void setSkipAgentActive(true); } return () => { - // Keep the agent disabled on unmount to avoid leaks across route changes disableSkipAgent(); }; }, [location.pathname]);