diff --git a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx index 6517feca268ef..c3f1285256496 100644 --- a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx +++ b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx @@ -100,7 +100,7 @@ const DeploymentDropdownContent: FC = ({ )} {canViewAIBridge && ( - AI Sessions + AI Sessions )} {canViewHealth && ( diff --git a/site/src/pages/AIBridgePage/ListSessionsPage/ListSessionsPage.tsx b/site/src/pages/AIBridgePage/ListSessionsPage/ListSessionsPage.tsx index 0ccba38c80822..9ba32bc54c399 100644 --- a/site/src/pages/AIBridgePage/ListSessionsPage/ListSessionsPage.tsx +++ b/site/src/pages/AIBridgePage/ListSessionsPage/ListSessionsPage.tsx @@ -86,7 +86,7 @@ const AISessionListPage: FC = () => { sessions={sessionsQuery.data?.sessions} sessionsQuery={sessionsQuery} onSessionRowClick={(sessionId) => - navigate(`/aibridge/sessions/${sessionId}`) + navigate(`/ai-gateway/sessions/${sessionId}`) } filterProps={{ filter, diff --git a/site/src/pages/AIBridgePage/SessionThreadsPage/SessionThreadsPage.tsx b/site/src/pages/AIBridgePage/SessionThreadsPage/SessionThreadsPage.tsx index 6be7d09896ae2..0b57d51570ae1 100644 --- a/site/src/pages/AIBridgePage/SessionThreadsPage/SessionThreadsPage.tsx +++ b/site/src/pages/AIBridgePage/SessionThreadsPage/SessionThreadsPage.tsx @@ -52,7 +52,7 @@ const SessionThreadsPage: FC = () => { // is a previous page in the history stack, navigate back. otherwise, // navigate to the sessions list page without params if (location.key === "default") { - navigate("/aibridge/sessions"); + navigate("/ai-gateway/sessions"); } else { navigate(-1); } diff --git a/site/src/router.tsx b/site/src/router.tsx index 7a6f0cee4b11d..5445e48f0b3d4 100644 --- a/site/src/router.tsx +++ b/site/src/router.tsx @@ -7,6 +7,7 @@ import { Route, ScrollRestoration, useLocation, + useParams, } from "react-router"; import { GlobalErrorBoundary } from "./components/ErrorBoundary/GlobalErrorBoundary"; import { Loader } from "./components/Loader/Loader"; @@ -530,6 +531,12 @@ const NavigateWithSearch = ({ to }: { to: string }) => { return ; }; +/** Redirect /aibridge/sessions/:sessionId to /ai-gateway/sessions/:sessionId. */ +const RedirectAIBridgeSession = () => { + const { sessionId } = useParams() as { sessionId: string }; + return ; +}; + export const router = createBrowserRouter( createRoutesFromChildren( } errorElement={}> @@ -702,18 +709,35 @@ export const router = createBrowserRouter( - }> + }> } + element={} /> - }> + } + > } /> } /> + {/* Legacy /aibridge routes redirect to /ai-gateway */} + } + /> + } + /> + } + /> + }> }> } />