=== ColorWhistle AI ChatBot ===
Contributors: colorwhistlecw, WHLEABT
Tags: chatbot, ai, openai, knowledge-base, assistant
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

ColorWhistle AI ChatBot is an intelligent assistant that indexes your WordPress content and uses OpenAI + Pinecone for context-aware answers.

== Description ==

**ColorWhistle AI ChatBot** transforms your WordPress site into a knowledgeable AI assistant. Leveraging **OpenAI** and **Pinecone**, it provides accurate, context-aware answers to visitors.

### Key Features
*   **Smart Indexing**: Syncs content to Pinecone.
*   **Context-Aware AI**: RAG architecture retrieval.
*   **Customizable Widget**: Fully customizable design.
*   **Lead Capture Forms**: Collect visitor information seamlessly within the chat.
*   **Chat History**: Track and manage all AI conversations from the admin dashboard.
*   **Built-in Protection**: Rate limiting and honeypot anti-spam protection.
*   **Source Citations**: AI links to sources.
*   **Secure**: Best practices followed.

== Installation ==

1.  Upload `colorwhistle-ai-chatbot` folder to `/wp-content/plugins/`.
2.  Activate through 'Plugins' menu.
3.  Go to **ColorWhistle AI ChatBot** settings.
4.  Enter API Keys.
5.  Sync content in **Knowledge Base**.
6.  Enable widget in **General Settings**.

== Frequently Asked Questions ==

= Do I need an OpenAI account? =
Yes, for embeddings and chat.

= Do I need a Pinecone account? =
Yes, for vector storage.

= Does it support CPTs? =
Yes, configurable in settings.

= What personal data is collected? =
If the Lead Capture form is enabled, any details submitted by the visitor (such as name, email, or phone number) are collected and stored securely in your local WordPress database. Additionally, IP addresses may be temporarily cached for rate-limiting purposes to prevent spam.

= What data is sent to external services? =
When a visitor sends a chat message, the message text is sent to OpenAI to generate a response. Your site content (post titles and text) is sent to OpenAI (to create embeddings) and stored in Pinecone (as vector data) during the sync process. We do not intentionally send personally identifiable information to external APIs unless the user voluntarily types it into the chat box.

== External Services ==

This plugin connects to OpenAI API to generate chatbot responses.
Data sent: user input messages.
Purpose: AI-generated responses.

OpenAI Privacy Policy: https://openai.com/privacy
OpenAI Terms of Service: https://openai.com/policies/terms-of-use/

This plugin also connects to Pinecone for vector storage.
Data sent: embeddings or chatbot data.
Purpose: semantic search and retrieval.

Pinecone Privacy Policy: https://www.pinecone.io/privacy/
Pinecone Terms of Service: https://www.pinecone.io/terms-of-service/

= Google Fonts =
*   **What it does:** Loads the Manrope font and Material Symbols icon set used by the chat widget and admin panel.
*   **Data sent:** The visitor's IP address and browser information (standard HTTP request). No personal data beyond what a normal web request contains.
*   **Service URL:** https://fonts.google.com/
*   **Privacy Policy:** https://policies.google.com/privacy
*   **Terms of Service:** https://policies.google.com/terms

== Screenshots ==

1. Admin Settings Page
2. Knowledge Base Sync
3. Chat Widget Frontend
4. Chat History Log
5. Lead Management

== Changelog ==

= 1.2.0 =
* Added automatic email notification support for successfully captured leads, sent to the configured email address.
* Implemented chat session persistence to retain conversation history across page reloads.
* Added conversation-based trigger conditions for displaying the lead capture form.
* Enhanced lead capture logic to bypass redundant form triggers once a lead has been submitted.
* Improved frontend rendering of the "Thank You" screen to respect backend WYSIWYG formatting and alignments.

= 1.1.1 =
* Fixed an issue where the main plugin menu was not displayed after installation.

= 1.1.0 =
* Added Chat History module to store and manage chatbot conversations.
* Added Chat History administration page with conversation viewing capabilities.
* Added Lead Management module.
* Added Lead Capture Form builder with configurable form fields.
* Added multi-step lead capture flow inside the chatbot widget.
* Added custom database tables for storing leads and chat history.
* Added lead submission tracking and management tools.
* Improved chatbot user experience and conversation workflow.
* Performance improvements and code optimizations.
* Fixed minor bugs and UI issues.

= 1.0.0 =
* Initial release.