import { useEffect, useRef } from "react"; import PanelFrame from "./PanelFrame.jsx"; export default function ChatStream({ chat, session, headerExtra = null }) { const scrollerRef = useRef(null); useEffect(() => { const node = scrollerRef.current; if (!node) { return; } node.scrollTop = node.scrollHeight; }, [chat]); const isEmpty = !chat.trim(); return (
{isEmpty ? (
NO ACTIVE SESSION PRESS START TO BOOT CLAUDE CONSOLE {session.runtime?.anthropicBaseUrl ? ROUTE: {session.runtime.anthropicBaseUrl} : null}
) : (
{chat}
)}
); }