Sohay — full release history
============================

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

= 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.
