From 5565fdcafc3f57143839c2e8ef9ec8edaa74a7dd Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Wed, 17 Dec 2025 04:39:38 +0000 Subject: [PATCH] Hide chatbot on the operating system page Prevent the chatbot from rendering on the /os route by conditionally returning null within the Chatbot component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 7c484b61-ca16-4748-a3ba-621170ab915f Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/jIK7HfC Replit-Helium-Checkpoint-Created: true --- client/src/components/Chatbot.tsx | 7 +++++++ 1 file changed, 7 insertions(+) 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;