Sohaychat — full release history
============================

readme.txt lists the most recent releases; this file keeps every release
since 1.0.0.

= 1.4.0 =

* New — quick replies. Save the answers your team types over and over, then drop one into a reply from the lightning-bolt button in the composer or by typing `/` in an empty draft; inserting fills the draft and never sends on its own. Managed under **Sohaychat → Quick replies**, shared across the site, with four starter replies you can edit or delete.
* New — choose what a visitor must share before somebody from your team joins their chat: sign in, give a name and email, or nothing. Set it under **Sohaychat → Settings**. The chatbot still answers everyone; the widget asks only when somebody asks for a person, on its own screen, and not again if they gave their details in an earlier chat. Upgrading sites keep allowing anonymous chats; new installs start on sign-in.
* New — an optional marketing opt-in beside the name and email fields, with wording you write yourself. What a visitor agreed to is stored with the exact wording they were shown.
* New — order history in the chat. On a WooCommerce store, a signed-in customer can ask the chatbot about their own orders — status, dates, contents. Signing in is always required for this, whichever option you picked above: the chatbot takes the customer from the current login and cannot be pointed at anybody else's orders. Addresses, phone numbers and payment details are never sent to the chatbot.
* New — email visitors when you reply. Answer a chat the visitor has already left and Sohaychat can email them your reply. Off by default, under **Sohaychat → Settings**. It sends only when they aren't still reading the chat, at most once per conversation every 15 minutes, always with a one-click link to stop further emails about that conversation. It needs an address, so it does nothing unless the visitor is signed in or you are asking for a name and email; with it on, the name-and-email screen tells visitors the details are so you can reply after they leave.
* New — **Sohaychat → Conversations** shows visitors by the name they gave — in the list, the customer panel and the dashboard — with their email and, where they opted in, when they agreed to marketing. Visitors who shared nothing still read as "Guest".
* Changed — a visitor asked to sign in before reaching your team keeps their chat; signing in used to clear the guest session and take the conversation with it.
* Changed — names, email addresses and marketing consent given in the chat are included in a visitor's personal-data export and removed by an erasure request, including for visitors who were never registered users. An export keeps chats owned by the requester's account apart from chats that merely carry their email address; the widget cannot verify a typed address, so that second group is labelled unverified and may contain somebody else's conversation.
* Changed — the plugin is now called **Sohaychat**, matching its address on WordPress.org, and is listed as "Sohaychat – AI Chatbot & Support Agent for WooCommerce". Only the name changes: your settings, API keys, saved conversations and Knowledge Base articles are untouched, the update installs over your existing copy, and visitors see no difference.
* Changed — in **Sohaychat → Conversations**, the search box now sits in the page header and the sort control beside the "Inbox" title, giving the conversation list its full height. The header shows the logo mark on its own.
* Changed — the header of the Dashboard, Conversations and Quick replies screens now shows which version of Sohaychat is installed, and **Sohaychat → Diagnostics** lists it at the top of the health card along with the database schema version. The WordPress footer is hidden on these screens, so until now the version was only on the Plugins list.
* Removed — the `getInformation` alias for the Knowledge Base lookup tool. Since 1.1.0 every chat request offered the chatbot that tool twice, once under its old name; only `sohaychat-kb__get-information` is offered now. Older conversations keep their citations. If a **Custom System Prompt** under **Sohaychat → KB Sync** tells the assistant to call `getInformation`, change that to `sohaychat-kb__get-information`.
* Fixed — a site on Google with the model left on **Use built-in default** got a chat that failed on every message, because newly issued Gemini API keys can no longer use `gemini-2.5-flash`. The default is now `gemini-3.6-flash`, Google's named replacement, and sites on the default pick it up with this update. If you selected `gemini-2.5-flash` yourself, nothing changes — older keys can still use it; if yours cannot, pick another model under **Sohaychat → AI Settings**.
* Fixed — table cells in the Sohaychat admin screens now use the plugin's own font size and line height.
* Fixed — deactivating or uninstalling the plugin now clears every event it had scheduled with WordPress's cron; the per-article Knowledge Base sync and the notification emails used to be left behind, doing nothing but never going away.
* Fixed — on a short or zoomed browser window, scrolling the page to reach the bottom of the WordPress admin menu no longer pushes the Conversations workspace off the top; the workspace stays under the admin bar and only the menu scrolls.
* For developers — four new filters: `sohaychat_quick_replies_max_body_length` and `sohaychat_quick_reply_seed_defaults` for quick replies, `sohaychat_login_url` for sites whose sign-in lives somewhere other than the WooCommerce My Account page or `wp-login.php`, and `sohaychat_visitor_notification_body` for the wording of the visitor reply email. Managing quick replies needs the `sohaychat_manage` capability; reading them — all the composer picker does — needs only `sohaychat_view_conversations`. This release also runs a one-time, automatic database update on upgrade.

= 1.3.0 =

* New — a real person can take over a chat. When the chatbot isn't enough, one of your team can step into the conversation: the visitor sees that person's name and picture on the replies, new messages arrive without a page reload, and the chatbot stays quiet until the chat is handed back. Switched off by default — turn it on under Sohay → Settings.
* Three ways a handoff starts — a "Talk to a person" button in the chat, the chatbot asking for someone when it can't resolve a question, and a "Take over" button on the conversation. Replying to a conversation takes it over as well.
* Set the hours your team is around, week by week, in your site's own timezone, with your own message for visitors who ask outside them. A request nobody answers goes back to the chatbot after a timeout you set, and the visitor waits out a short cooldown before asking again.
* New "Waiting for a Person" and "Handled by a Person" views in Sohay → Conversations, each with a count. Waiting lists the longest wait first, so nobody jumps ahead of someone who has waited longer.
* Four ways to notice a waiting visitor — the Waiting view, a count in the browser tab, a banner on the conversation, and an email to addresses you choose (falling back to whoever the chat is assigned to, then the site admin). One email per conversation, and none at all if a colleague has already picked it up.
* New — the Knowledge Base has a real index. It now has a landing page of its own: your categories as cards with an article count on each, a search box, and the articles filed under each category. Category pages and Knowledge Base searches get matching pages. Until now these addresses fell through to whatever your theme does with an archive, which for most themes meant a bare reverse-chronological list of titles.
* New — the Knowledge Base address is yours to choose. **Sohay → KB Settings → Settings** has a **URL Base** field: set it to `docs`, `help`, `support`, whatever suits. The index and every article move together and the URL rules rebuild themselves, with no need to re-save your permalinks. A base already taken by one of your pages, another plugin, or WordPress itself is refused with an explanation rather than quietly breaking that address. Sites that never touch the setting stay on `/knowledge-base/`.
* Your theme can replace any of the new Knowledge Base pages — copy a template out of the plugin's `templates/` folder into a `sohaychat/` folder in your theme and Sohay uses yours instead. Block themes that already define their own Knowledge Base template keep it untouched.
* Changed — Knowledge Base addresses no longer sit under your permalink prefix. On sites whose permalinks start with a fixed prefix such as `/blog/`, the Knowledge Base was being served from `/blog/knowledge-base/`; it now sits at `/knowledge-base/`. Most sites, which use a prefix-free permalink structure, are unaffected. If the old addresses are linked or already indexed, add redirects for them.
* Fixed — replies you type in **Sohay → Conversations** were coming back labelled "AI Draft" with the chatbot's avatar, so your own message looked like machine output. They now carry your name and picture, on both the admin thread and the visitor's.
* Fixed — PHP 8.4 was printing a deprecation notice on every request that loaded the chatbot's tools.
* Fixed — WordPress was printing a "translation loaded too early" notice above every page, front end and admin alike, on sites with debugging switched on.
* Security — the message endpoint no longer takes a staff identity from the visitor's browser, so a crafted request can't post a message that renders as coming from a named member of your team, nor fake a "joined the conversation" event. The chat endpoint also drops any instructions a crafted client tries to slip in alongside your own chatbot instructions.
* For developers — eight new hooks for handoff (`sohaychat_handoff_available`, `sohaychat_handoff_timeout`, `sohaychat_handoff_poll_intervals`, `sohaychat_handoff_notify_recipients`, `sohaychat_handoff_rate_limit_options`, `sohaychat_handoff_requested`, `sohaychat_handoff_started`, `sohaychat_handoff_ended`) and four for the Knowledge Base index (`sohaychat_kb_slug`, `sohaychat_kb_category_slug`, `sohaychat_kb_reserved_slugs`, `sohaychat_kb_articles_per_section`). This release also runs a one-time, automatic database update on upgrade.

= 1.2.0 =

* New — pick your AI provider. Choose OpenAI or Google (Gemini) under Sohay → AI Settings, paste that provider's API key, and choose its model. Each provider's key and model are stored separately, so switching back later doesn't mean re-entering anything. Existing sites keep using OpenAI, with no migration and no change in how the chatbot behaves.
* Knowledge Base users, please note — indexing and search always run on OpenAI, whichever provider answers the chat. If you select Gemini and use the Knowledge Base, keep an OpenAI key saved as well. Without one the chatbot still replies but stops consulting your articles, and the Knowledge Base lookup now switches itself off cleanly instead of failing partway through an answer.
* Changed — the chat widget now renders in an isolated container, so your theme can no longer change how the chat looks, and the chat can no longer change your site's fonts, colours, borders, or spacing. The trade-off is that plugins which scan your pages for content — translation plugins, session recorders, and accessibility overlays — no longer see inside the chat. Screen readers and keyboard navigation are unaffected. See the FAQ for the details.
* Fixed — right-to-left languages now get the mirrored layout. Arabic, Hebrew, Persian, and other RTL sites were being served the left-to-right stylesheet in both the chat widget and the Sohay admin screens.
* Changed — the plugin is now listed as "Sohay — AI Chatbot for Knowledge Base and WooCommerce", so the name says what it does on a store. Nothing under the name moves: your settings, saved conversations, Knowledge Base articles, and the Sohay admin menu are all unchanged, and the update installs over your existing copy with no migration.
* For developers — five new filters for choosing and configuring the service behind the chat: `sohaychat_allowed_ai_providers`, `sohaychat_default_ai_provider`, `sohaychat_provider_options`, `sohaychat_allowed_google_models`, and `sohaychat_default_google_model`.

= 1.1.0 =

* New — WooCommerce shopping tools. On stores running WooCommerce 7.0 or newer, the chatbot can help shoppers right inside the chat: search and browse your catalog, look up a specific product and its options, check live stock and prices, answer shipping, returns, refund, and payment questions from your store settings and Knowledge Base, and add, change, or remove items in the shopper's cart. Cart changes come with an Undo button, and every price, stock count, and product detail comes straight from your store — the chatbot never makes them up. On sites without WooCommerce the tools stay completely hidden.
* Tag Knowledge Base articles as "policy" or "faq" (under KB Articles) so the store-policy answers prefer them for shipping, returns, and refund questions.
* Faster, cheaper repeat lookups — read-only catalog and policy results are briefly cached on sites running a persistent object cache (Redis or Memcached), scoped per shopper so nothing leaks between visitors. Tunable via the new `sohaychat_tool_cache_ttl` filter.
* Improved default chatbot instructions — the built-in prompt now greets visitors, declines off-topic questions politely, cites Knowledge Base articles as links, and answers in the visitor's language. Custom prompts now recognise `{site_name}` and `{current_date}`; your own custom system prompt still takes priority.
* Fixed — the chat widget no longer briefly showed a false "Chat is temporarily unavailable" message right after a successful answer.
* Fixed — the Conversations inbox now lists chats by most recent activity with correct timestamps regardless of your site's timezone, and loading older chats no longer repeats rows.
* For developers — a new `sohaychat_system_prompt` filter, a tools/abilities foundation with new action and filter hooks, and a conversation tool-call audit table. This release also runs a one-time, automatic database update on upgrade.

= 1.0.0 =

* Initial release on WordPress.org.
