• Returns {
        messages: Message[];
        isTyping: boolean;
        sendMessage: (
            text: string,
            providerType: ProviderType,
            apiKey: null | string,
            options?: { baseUrl?: string; modelName?: string },
        ) => Promise<void>;
        handlePageContext: (content: string, isSelection?: boolean) => void;
        generatePromptFromAction: (action: string) => string;
        lastPageContext: string;
        addMessage: (role: Role, content: string, actions?: any[]) => Message;
        updateLastMessage: (content: string) => void;
        setIsTyping: Dispatch<SetStateAction<boolean>>;
    }