import type { WsClient } from '../../lib/ws-client'; import { useChat } from '../../hooks/useChat'; import MessageList from './MessageList'; import InputBar from './InputBar'; interface Props { ws: WsClient | null; onClearContext?: () => void; clearContextRef?: React.MutableRefObject<(() => void) | null>; whisperEnabled?: boolean; } export default function ChatView({ ws, clearContextRef, whisperEnabled }: Props) { const { messages, streaming, streamBuffer, tools, sendMessage, stopStreaming, clearContext } = useChat(ws); // Expose clearContext to parent via ref if (clearContextRef) clearContextRef.current = clearContext; return (