=== Smart AI Chatbot with OpenRouter by Jayanta ===
Contributors: jayanta77
Tags: ai, chatbot, openrouter, support, site search
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A floating, site-aware AI chatbot for WordPress powered by your own OpenRouter API key.

== Description ==

Smart AI Chatbot with OpenRouter by Jayanta adds a production-ready AI assistant to your public WordPress site. It reads published public content, finds relevant pages for each visitor question, and asks OpenRouter to answer using only that site context.

Features:

* Floating frontend chat widget.
* Answers grounded in published site content.
* Session chat history stored in the visitor browser session.
* Admin settings for API key, model, widget copy, color, indexed post types, source limits, token limits, temperature, rate limits, and logs.
* Server-side OpenRouter calls so API keys are not exposed.
* WordPress nonce protection for chat requests.
* Hourly per-visitor rate limiting.
* Compact admin chat logs.
* Manual content index rebuild.
* Automatic scheduled index rebuild after published content changes.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin from the WordPress Plugins screen.
3. Go to Settings > Smart AI Chatbot.
4. Add your OpenRouter API key and choose a model.
5. Click Rebuild Index.
6. Visit the public site and open the floating chat button.

== Frequently Asked Questions ==

= Does the plugin include OpenRouter credits? =

No. You need your own OpenRouter API key.

= Can visitors see my API key? =

No. Requests are sent from the WordPress server through `admin-ajax.php`.

= Does it read private drafts or admin-only content? =

No. The index uses published public post types only.

= Where is chat history stored? =

Visitor conversation history is stored in browser `sessionStorage`, so it lasts for the current browser session.

== Changelog ==

= 1.0.0 =
* Initial release.
