turning data recipes on for mac (#4454)

This commit is contained in:
Manan Shah 2026-03-19 02:11:27 -05:00 committed by GitHub
commit e793c378db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -15,10 +15,16 @@ import { AppProvider } from "../provider";
const CHAT_ONLY_ALLOWED = new Set(["/", "/chat", "/login", "/signup", "/change-password"]);
function isChatOnlyAllowed(pathname: string): boolean {
if (CHAT_ONLY_ALLOWED.has(pathname)) return true;
if (pathname === "/data-recipes" || pathname.startsWith("/data-recipes/")) return true;
return false;
}
export const Route = createRootRoute({
beforeLoad: ({ location }) => {
const chatOnly = usePlatformStore.getState().isChatOnly();
if (chatOnly && !CHAT_ONLY_ALLOWED.has(location.pathname)) {
if (chatOnly && !isChatOnlyAllowed(location.pathname)) {
throw redirect({ to: "/chat" });
}
},

View file

@ -93,7 +93,7 @@ export function Navbar() {
const disabledByTraining =
isTrainingRunning && item.href !== "/studio";
const disabledByDevice =
chatOnly && item.href !== "/chat";
chatOnly && item.href !== "/chat" && item.href !== "/data-recipes";
if (!item.enabled || disabledByTraining || disabledByDevice) {
return (
<span
@ -240,7 +240,7 @@ export function Navbar() {
const disabledByTraining =
isTrainingRunning && item.href !== "/studio";
const disabledByDevice =
chatOnly && item.href !== "/chat";
chatOnly && item.href !== "/chat" && item.href !== "/data-recipes";
if (disabledByTraining || disabledByDevice) {
return (
<span