=== SailWP AI Co-pilot ===
Contributors: joost321
Tags: ai, page builder, assistant, design, chat
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.48.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An AI co-pilot for WordPress: chat to design pages, rewrite text, swap images and build complete features. No jargon, nothing to learn.

== Description ==

SailWP AI Co-pilot adds a small chat rail to your WordPress admin and (for logged-in editors) your site's front end. Open the page you want to work on, click the boat in the bottom-right corner, and say what you want in plain language:

* **Redesign a page** — "make this page feel warm and professional" produces a full, brand-aware design you can preview, accept or discard.
* **Edit anything in place** — rewrite headlines, tidy headings, swap images, change colors. You can also click any text on a designed page and just type.
* **Build complete features** — "I need an events calendar" or "add a contact form" sets up a ready-made, brand-styled feature with its own page, in one go. These features are built from templates that ship inside this plugin and remain yours: they keep working even if you deactivate the Co-pilot.
* **Stay in control** — every destructive step is written to an audit log and can be rolled back. Previews are explicit: nothing goes live until you accept it.

The Co-pilot is built for people who don't want to learn WordPress jargon — no blocks, shortcodes or template talk. You describe the outcome; it does the work.

= Free plan and paid plans =

The Co-pilot works with the SailWP AI service. Every site gets a free plan automatically the first time you use the chat — no signup, no email address required. The free plan includes a monthly allowance of heavy AI actions (full page designs); light edits are unlimited. Paid plans with larger allowances are available at [sailwp.com](https://sailwp.com/).

== External services ==

This plugin connects to the SailWP AI service (ai.sailwp.com), operated by the plugin author. It is required for all AI functionality — the AI models do not run on your WordPress server.

**What is sent, and when:**

* **When you send a chat message:** your message, relevant context about the page you are working on (its content and structure), your site URL and locale are sent to ai.sailwp.com so the AI can answer and perform the edits you asked for.
* **On your first AI action:** the site registers itself for a free plan. Your site URL, WordPress version, active theme name, plugin version and locale are sent, and a license key is stored on your site. Nothing is sent on plugin activation or on normal page loads — only when you first use the chat.
* **When you use generation tools:** prompts for images, music or video you request are processed via the same service.
* **Usage signals:** the plugin reports basic service events (for example "preview applied" or a feature install completing) tied to your license key, so quota and rollback state stay correct.

AI requests are processed by the SailWP service using third-party AI model providers (such as Anthropic and Google) as subprocessors. Page content you work on is shared with those providers solely to fulfil your request.

* Service provider: SailWP — [Terms of Service](https://sailwp.com/legal/terms) · [Privacy Policy](https://sailwp.com/legal/privacy)

If you connect a newsletter provider (Mailchimp, Kit, MailerLite or Buttondown) through the newsletter feature, your site communicates directly with that provider's API using the credentials you supply. Those connections are optional and configured by you.

== Frequently Asked Questions ==

= Does this plugin work with my theme? =

Yes. The Co-pilot is theme-agnostic: designed pages render self-contained, and the feature modules (events, contact form, newsletter, services) style themselves from your site's brand colors.

= Where does the AI run? =

On the SailWP service (ai.sailwp.com), not on your server. See the External services section for exactly what is sent and when. Your WordPress site never shares your database or admin credentials with the service.

= What are "feature modules" (events calendar, contact form, …)? =

Ready-made features the Co-pilot can set up in chat. The code for these ships inside this plugin (in the `recipe-templates` folder) and is installed locally on your site, filled in with your own labels and brand colors — nothing is downloaded. They are standard GPL plugins you own: they keep working even with the Co-pilot deactivated, and every install can be rolled back from the chat.

= Do I need an account? =

No. A free plan is provisioned automatically on first use. Paid plans exist for heavier use and are managed at sailwp.com.

= What happens when I deactivate or delete the plugin? =

Pages the Co-pilot designed keep rendering (they are self-contained). Feature modules keep working independently. Deleting the plugin removes its own settings, license key, preview drafts and scheduled tasks from your database; your content stays.

== Screenshots ==

1. The Co-pilot rail on a page — say what you want in plain language.
2. A full page design preview: accept it or discard it, nothing goes live silently.
3. Click-and-type editing on a designed page, with the brand color palette.
4. Building an events calendar from chat — installed, branded and filled in one step.
5. The Co-pilot dashboard card with your plan and usage.

== Changelog ==

= 0.48.3 =
* Change one thing on a designed page (an image, an illustration, a colour, a block) without regenerating the whole page — the rest stays exactly as it was.

= 0.48.2 =
* Credit top-up packs now show how many tweaks/designs you get, next to the price.

= 0.48.1 =
* Redesigned feature pages (e.g. a contact page) now render their working form/list instead of showing the raw shortcode.
* Buy credit top-ups directly inside the Co-pilot rail — no more bouncing out to the website.
* More reliable chat: tool conversations are normalised before each request, and a single error can no longer interrupt your session.
* Security hardening: stricter input sanitisation, output escaping, and capability checks.

= 0.47.0 =
* Feature modules (events, contact form, newsletter, services, directory) are now built entirely from the templates bundled inside the plugin — no more remote bundle download.
* The free license is now provisioned on your first chat message instead of on plugin activation; nothing is sent to the SailWP service before you start using it.
* First release submitted to WordPress.org.

= 0.46.x =
* Feature pages now arrive fully designed (branded page shells, light/dark variants).
* Click-and-type editing on events and services pages; text color palette in the editor toolbar.
* Fixed theme global-styles bleeding through AI page designs.

= 0.45.x =
* Choice buttons in chat, real-content conversations after a feature install, automatic template refresh for installed features.

== Upgrade Notice ==

= 0.47.0 =
Feature modules now build locally from bundled templates, and the free license is only provisioned on first use.
