"use client"; import { useEffect, useRef } from "react"; import { useChatStore } from "@/lib/store"; import { MessageBubble } from "./MessageBubble"; import { Bot } from "lucide-react"; interface ChatWindowProps { conversationId: string; } export function ChatWindow({ conversationId }: ChatWindowProps) { const bottomRef = useRef(null); const { conversations } = useChatStore(); const conversation = conversations.find((c) => c.id === conversationId); const messages = conversation?.messages ?? []; useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: "smooth" }); }, [messages.length]); if (messages.length === 0) { return (

How can I help?

Start a conversation with Claude Code

); } return (
{messages.map((message) => ( ))}
); }