=== SwiftHare AI Chat ===
Contributors: swifthare
Tags: ai chat, live chat, chatbot, customer support, gemini
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 3.0.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Hybrid AI + live chat plugin powered by Gemini, Claude &amp; OpenAI. Includes a frontend staff dashboard, multilingual support, and cache compatibility.

== Description ==

"SwiftHare AI Chat" is a highly advanced hybrid chat solution that seamlessly bridges the gap between a 24/7 AI assistant and human-led live chat. Designed with security and performance in mind, it operates flawlessly even in cached environments.

= Key Features =
* **Hybrid Support:** Effortlessly switch between automated responses from the latest AI models (Gemini, Claude, OpenAI) and manual staff intervention.
* **Secure Image Uploads:** Features forced server-side re-encoding (sanitization) to block malicious code hidden in images (steganography).
* **Frontend Staff Dashboard:** Agents can manage chats via a dedicated frontend page without needing WordPress admin access.
* **Cache Compatibility:** Real-time dashboard performance that works perfectly with WP Rocket, LiteSpeed Cache, and others.
* **Full Customization:** Personalize brand colors, SVG icons, and welcome messages to fit your site's identity.

== Installation ==

1. Go to your WordPress Admin Dashboard > Plugins > Add New.
2. Click **Upload Plugin**, choose the `swifthare-ai-chat.zip` file, and click **Install Now**.
3. Activate the plugin.
4. Access the **SwiftHare AI Chat** menu on the left sidebar to begin configuration.

== Instructions ==

= How to Use =
1. **General Configuration:** Enter your API key in the General tab to activate AI capabilities.
2. **Shop Knowledge (AI Training):** Input your business data here to train the AI for accurate, context-aware responses.
3. **Language Management:** Add multiple languages to ensure a global reach.
4. **Design Customization:** Adjust colors, fonts, and text in the Design tab.
5. **Live Chat Setup:** Configure agent availability and notification settings in the Live Chat tab.
6. **Data Management:** Use the **Tools** section to Export or Restore your settings easily.

= Setting Up Your AI Persona (System Prompt) =
In the "Shop Knowledge" tab, you define the absolute rules for your AI. We recommend keeping these three "Golden Rules" intact (replacing the bracketed text with your shop name):

1. **Act as a helpful staff member of [Your Shop Name]:** This gives the AI a professional persona.
2. **Respond in the user's language:** Automatically enables multilingual support by matching the guest's language.
3. **Suggest alternatives:** If the AI cannot fulfill a request, it will gracefully guide users to live chat or a contact form.

== Shortcodes ==

* `[swifthare_ai_chat]` - Manually place the chat widget on specific pages (Note: If globally enabled in settings, this is not required).
* `[swifthare_staff_dashboard]` - Displays the frontend agent dashboard (PHP-auth). Use this on a private page and share the URL with your staff.
* `[swifthare_ai_live_chat]` - Alternative frontend staff dashboard (AJAX/cookie-auth). Suitable for passwordless login via session cookies.

== Frequently Asked Questions ==

= Why don't my changes appear immediately? =
If you use a caching plugin (like LiteSpeed), please clear your site cache and refresh your browser.

= Does it work with Ad Blockers? =
Some ad blockers may hide the "Welcome Tooltip." Users may need to whitelist the site if they cannot see the tooltip.

== Screenshots ==

1. The General Settings dashboard.
2. Training the AI in the Shop Knowledge tab.
3. Language management and multilingual support.
4. Design customization options for the chat widget.
5. Live chat agent availability settings.
6. The Frontend Staff Dashboard in action.

== External Services ==

This plugin communicates with the following external third-party services. By using these features, you agree to their respective Terms and Privacy Policies.

= Google Gemini AI =
When the Gemini provider is selected, your customer's message and conversation history are sent to Google's Generative Language API to generate a response.
* API Endpoint: https://generativelanguage.googleapis.com
* Privacy Policy: https://policies.google.com/privacy
* Terms of Service: https://policies.google.com/terms

= Anthropic Claude AI =
When the Claude provider is selected, your customer's message and conversation history are sent to the Anthropic API.
* API Endpoint: https://api.anthropic.com
* Privacy Policy: https://www.anthropic.com/privacy
* Terms of Service: https://www.anthropic.com/legal/consumer-terms

= OpenAI =
When the OpenAI provider is selected, your customer's message and conversation history are sent to the OpenAI API.
* API Endpoint: https://api.openai.com
* Privacy Policy: https://openai.com/policies/privacy-policy
* Terms of Service: https://openai.com/policies/terms-of-use

= Google Maps =
If you use the `[swifthare_map]` shortcode feature, the Google Maps JavaScript API is loaded from Google's servers.
* Service: https://maps.googleapis.com
* Privacy Policy: https://policies.google.com/privacy
* Terms of Service: https://cloud.google.com/maps-platform/terms

== Brand & Ownership Notice ==

"SwiftHare AI Chat" is developed and maintained by Datto Web Works.
* Official Website: https://datto-webworks.com/
* Contact: info@datto-webworks.com

== Changelog ==

= 3.0.2 =
* Initial official release.
* Added support for Gemini, Claude, and OpenAI.
* Enhanced security with server-side image re-encoding.
