import { useState, useEffect } from "react"; import { useLLM } from "../hooks/useLLM"; import { BrandMark } from "./BrandMark"; import { ChatApp } from "./ChatApp"; export function AppShell() { const { status } = useLLM(); const isReady = status.state === "ready"; const [showChat, setShowChat] = useState(false); useEffect(() => { if (isReady) { const timeoutId = setTimeout(() => setShowChat(true), 300); return () => clearTimeout(timeoutId); } }, [isReady]); const progressPercent = status.state === "ready" ? 100 : status.state === "loading" ? (status.progress ?? 0) : 0; return ( <>
Loading Model
); }