From f0b2d9abfb846787c93c251561f543985c81270b Mon Sep 17 00:00:00 2001 From: Jackson Yu Date: Fri, 1 May 2026 16:09:26 -0400 Subject: [PATCH] fix: use path-contains match for ADK route detection The live site serves pages under /docs/adk/..., not /adk/..., so the anchored regex ^\/adk\/.+ never matched. Co-Authored-By: Claude Sonnet 4.6 --- assistant.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assistant.js b/assistant.js index bf354d63..fd555ad8 100644 --- a/assistant.js +++ b/assistant.js @@ -66,10 +66,9 @@ const ADK_BOT_URL = 'https://botpress.github.io/docs-bot/adk-bot-frontend/' function isAdkRoute() { - // Only swap to the ADK assistant on actual reference pages - // (/adk/). The bare /adk and /adk/ are teaser routes inside - // the Docs tab, so they should keep using the default docs bot. - return /^\/adk\/.+/.test(window.location.pathname) + // Match /docs/adk/ on the live site (pathname includes /docs/ prefix). + // The bare /adk and /adk/ teaser routes keep using the default docs bot. + return /\/adk\/.+/.test(window.location.pathname) } function botUrlForCurrentRoute() {