diff --git a/client/src/components/Chatbot.tsx b/client/src/components/Chatbot.tsx index dd5e3f5..de576d4 100644 --- a/client/src/components/Chatbot.tsx +++ b/client/src/components/Chatbot.tsx @@ -1,6 +1,7 @@ import { useState, useRef, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { MessageCircle, X, Send, Bot, User, Loader2 } from "lucide-react"; +import { useLocation } from "wouter"; interface Message { id: string; @@ -10,6 +11,7 @@ interface Message { } export function Chatbot() { + const [location] = useLocation(); const [isOpen, setIsOpen] = useState(false); const [messages, setMessages] = useState([ { @@ -27,6 +29,11 @@ export function Chatbot() { messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }); }, [messages]); + // Don't render chatbot on the OS page - it has its own environment + if (location === "/os") { + return null; + } + const sendMessage = async () => { if (!input.trim() || isLoading) return;