/** * @fileoverview Main chatbot hook providing unified access to all chatbot functionality * @module hooks/useChatbot */ import { useContext } from "react"; import { ChatbotContext, type ChatbotContextType, } from "../core/contexts/ChatbotContext"; /** * Re-export the main chatbot hook from the context * This provides a unified interface to all chatbot functionality * * @returns {ChatbotContextType} Chatbot state and methods * * @example * ```typescript * function MyComponent() { * const { * isInitialized, * config, * initialize, * sendMessage, * uploadDocument, * searchSimilarDocuments, * lastError, * clearError * } = useChatbot(); * * useEffect(() => { * if (!isInitialized) { * initialize(); * } * }, [isInitialized, initialize]); * * return ( *