import { createFileRoute, Link } from "@tanstack/react-router"; import { LinkIcon, PlusIcon } from "lucide-react"; import { NoActiveThreadState } from "../components/NoActiveThreadState"; import { Button } from "../components/ui/button"; import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "../components/ui/empty"; import { SidebarInset, SidebarTrigger } from "../components/ui/sidebar"; import { useEnvironments } from "../state/environments"; import { APP_DISPLAY_NAME } from "~/branding"; import { hasCloudPublicConfig } from "~/cloud/publicConfig"; function ChatIndexRouteView() { const { authGateState } = Route.useRouteContext(); const { environments } = useEnvironments(); if (authGateState.status === "hosted-static" && environments.length === 0) { return ; } return ; } export const Route = createFileRoute("/_chat/")({ component: ChatIndexRouteView, }); function HostedStaticOnboardingState() { const cloudEnabled = hasCloudPublicConfig(); return (
{APP_DISPLAY_NAME}
Connect an environment to get started {cloudEnabled ? "Sign in to T3 Connect to connect a linked environment through its managed tunnel, or add a reachable backend manually." : "Add a reachable backend manually to start working from this browser."}
); }