From 49741761872c21df82b2ca6c0a64988c31212a3f Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 14 Mar 2025 11:35:30 -0600 Subject: [PATCH] add chat sidebar handler --- web/src/middleware/publicPageMiddleware.ts | 3 ++- web/src/routes/helpers.tsx | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/middleware/publicPageMiddleware.ts b/web/src/middleware/publicPageMiddleware.ts index 14be4f468..899186f55 100644 --- a/web/src/middleware/publicPageMiddleware.ts +++ b/web/src/middleware/publicPageMiddleware.ts @@ -5,7 +5,8 @@ import { NextRequest } from 'next/server'; const assetCheckPages: BusterRoutes[] = [ BusterRoutes.APP_METRIC_ID, BusterRoutes.APP_DASHBOARD_ID, - BusterRoutes.APP_DASHBOARD_METRICS_ID + BusterRoutes.APP_DASHBOARD_METRICS_ID, + BusterRoutes.APP_CHAT ]; const publicPages: BusterRoutes[] = [ diff --git a/web/src/routes/helpers.tsx b/web/src/routes/helpers.tsx index d126c13dc..3ea2d9d58 100644 --- a/web/src/routes/helpers.tsx +++ b/web/src/routes/helpers.tsx @@ -6,6 +6,13 @@ export const pathNameToRoute = (pathName: string, params: any): BusterRoutes => }); const paramRoutesToParent: Record = { + [BusterRoutes.APP_CHAT_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_DASHBOARD_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_METRIC_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_COLLECTION_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_REASONING_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_TERM_ID]: BusterRoutes.APP_CHAT, + [BusterRoutes.APP_CHAT_ID_VALUE_ID]: BusterRoutes.APP_CHAT, [BusterRoutes.APP_METRIC_ID]: BusterRoutes.APP_METRIC, [BusterRoutes.APP_DASHBOARD_METRICS_ID]: BusterRoutes.APP_DASHBOARDS, [BusterRoutes.APP_DASHBOARD_ID]: BusterRoutes.APP_DASHBOARDS,