=== Rapls AI Chatbot – Changelog (1.15.4 and earlier) === The changelog for recent versions is in readme.txt. = 1.15.4 = * Fixed: the plugin header still read 1.15.2 while every other file said 1.15.3, so an installed 1.15.3 reported itself as 1.15.2 and WordPress kept offering the same update over and over. The header is the version WordPress compares, and it is now correct. The release check now compares all three places a version is written, so this cannot recur. * Display name shortened to "Rapls AI Chatbot – Self-Hosted RAG & MCP Server". The previous title ran to 92 characters, said "Chatbot" twice and listed four AI vendors — past the 80 the directory allows and into what the guidelines call readme spam. The vendor names have moved to the description, where they are still indexed. * The description in the plugin header no longer differs from the one in this readme; the Plugins screen and the directory now say the same thing. = 1.15.3 = * Fixed: On some themes a "Choose file / No file selected" upload control could appear at the bottom of the public chat widget. That control is a hidden image-upload input used only by the Pro add-on; it was kept out of sight by the HTML `hidden` attribute alone, which a theme's own CSS could override. It is now hidden with an explicit rule, matching the neighboring buttons, so it stays out of the visitor-facing chat regardless of theme. = 1.15.2 = * Fixed: With the Pro add-on active, a JavaScript error ("raplsaichLsGet is not defined") could appear as a chat message right after the bot replied. The consent-gated storage helpers live inside the free plugin's script scope and were not reachable from the Pro script; they are now shared through the public `RaplsaichChatbot` object. Affected Pro features included chat bookmarks, lead forms, offline messages, and conversion tracking. * Fixed: An error thrown by a Pro extension hook is no longer rendered as a bot message in the conversation. Hooks now run in isolation and failures are logged to the browser console instead. = 1.15.1 = * Changed: The Gemini fallback model (used by Model Fallback when the selected model hits its quota) is now `gemini-2.5-flash-lite` instead of the older `gemini-2.0-flash-lite`, so fallback stays on a current model generation. Override with the `raplsaich_fallback_model` filter. = 1.15.0 = * Added: Provider error visibility for admins — failed AI calls are classified (rate limit, timeout, authentication, quota/billing, server, unknown) and recorded with type, time, provider, model, and HTTP status only. The response body and API keys are never stored. * Added: In the admin conversation view, the message that triggered a failed AI call now carries an error badge; hovering shows the time, provider, model, and HTTP status. * Added: System Health now includes an "AI provider errors (24h)" row — counts by type plus the last occurrence and the model in use, so recurring provider problems surface without waiting for visitor reports. * Added: When rate-limit errors occur while a Gemini 3 preview model is selected, System Health shows a dismissible suggestion to switch to a stable model (such as Gemini 2.5 Flash) or enable Model Fallback. = 1.14.1 = * Fixed: Server-side chat errors (invalid API key, unavailable model, provider outage, quota exceeded) were all shown to visitors as the same generic "A temporary error occurred" message. Each cause now shows its own specific message, so site owners can tell immediately whether the API key, the model, or the provider is the problem. * Fixed: The custom quota error message (Settings → Messages) was never displayed in the chat widget — the generic server error masked it. It now reaches visitors as intended. * Improved: The default quota error message no longer says "Currently recharging" (which read like a service outage) — it now explains that the AI has reached its usage limit and suggests trying again later or contacting the site. = 1.14.0 = * Added: "Add to knowledge" button on every Unanswered Questions row — opens the knowledge form with the question prefilled, closing the record → improve loop in one click. * Added: "Create draft page" button for the generated FAQ — saves the draft as a WordPress page (draft status) and links straight to the editor. * Added: System Health panel on the dashboard — API key, cron schedules, crawl freshness, WP-Cron availability, content index, PHP mbstring, and a live REST API reachability probe. * Fixed: The dashboard FAQ generator now uses its own AJAX action (raplsaich_generate_faq_draft) so it no longer collides with the Pro knowledge-gap FAQ generator. = 1.13.0 = * Added: Visitor history deletion (Settings → Data Management, off by default) — shows a "Delete my chat history" button in the widget so each visitor can permanently remove their own stored conversation (privacy / GDPR friendly). * Added: Unanswered Questions report on the dashboard — questions the bot could not answer from site content are recorded (latest 50) with counts, so you know exactly which pages or knowledge entries to add next. * Added: FAQ draft generator on the dashboard — one click clusters the last 30 days of real visitor questions into an editable Markdown FAQ draft using your configured AI provider. * Added: The weekly summary email now includes the questions the bot could not answer this week (content-gap report). * Added: Google Analytics 4 events (Settings → Data Management, off by default) — fires chat open / message sent / response received events through your site's existing gtag.js. The plugin never loads gtag.js itself. * Added: WP-CLI commands — `wp raplsaich status`, `wp raplsaich cleanup`, `wp raplsaich crawl`, and `wp raplsaich unanswered [--clear]`. * Fixed: The weekly summary cron event is now cleared on uninstall. = 1.12.0 = * Added: Setup checklist on the dashboard — shows which of the three first-run steps (connect a provider, run site learning, first conversation) are done and links to the next one. Disappears once setup is complete. * Added: Demo preview in the "Start for free" panel — a scripted sample conversation shows how the widget looks and behaves before any API key is set. * Added: Industry starter templates (Settings → Chat Settings) — one click applies a ready-made system prompt and preset questions for hotels/tourism, shops, clinics/salons, professional services, or company sites. * Added: Page Context (Settings → AI Settings, on by default) — the page the visitor is currently viewing is included as context, so questions like "does this product ship overseas?" resolve against the right page. * Added: Monthly Cost Guard (Settings → Security) — set a monthly budget (USD); when the estimated month-to-date API cost reaches it, the bot replies with a fixed message instead of calling the AI and resumes next month. Admin notice from 80% of budget. * Added: Model Fallback (Settings → AI Settings, off by default) — when the selected model hits its quota, the reply is retried once with the same provider's lightweight model instead of showing an error to the visitor. * Added: Weekly Summary Email (Settings → Data Management, off by default) — conversation count, AI replies, estimated cost, and recent visitor questions, mailed to the site admin once a week. * Improved: The review request is now shown only after the chatbot has actually handled conversations (usage-based, dismissible once, plugin screens only) instead of purely time-based. = 1.11.1 = * Improved: When a message is blocked by a limit, the reply now explains which limit was hit — monthly message quota, credits (Pro), token limit (Pro), the daily per-visitor cap, or the short-term rate limit — instead of a single generic message. Each message is translatable and filterable (`rapls_usage_reason_message`). Optional setting to show the remaining allowance (off by default). = 1.11.0 = * Added: "Grounded Answers Only" mode (Settings → AI Settings). When on, if the knowledge base and site learning have no content relevant to a question, the bot replies that it could not find the information instead of answering from the model's general knowledge — reducing hallucination. The relevance threshold and the "not found" message are configurable; works across keyword and vector (RAG) search. Off by default; ignored when Web Search is on. * Added: "Usage Control" (Settings → Security) — an optional safety valve for your own API spend (BYOK) when the chatbot is open to guests or members. Caps total daily usage per guest and per logged-in user (separate from the per-IP rate limit). Counts are kept server-side and cannot be bypassed by the client; guests are identified by a salted hash (never a raw IP) with a configurable retention period and automatic cleanup. Role-based limits, per-user credits, and a usage dashboard are available in Pro. = 1.10.0 = * Added: "AI-smell score" for Japanese bot replies in the Conversations log. When enabled (Settings → Chat Settings), each Japanese reply gets a read-only score and a category breakdown (stiff connectives, over-emphatic vocabulary, monotone endings, and more) with in-text highlighting, so you can spot wording that sounds machine-written. It only detects and scores — replies are never altered, non-Japanese replies are skipped, and it makes no external calls. Banned vocabulary and weights are customizable via the `rapls_humanizer_*` filters. = 1.9.4 = * Changed: The feedback buttons (👍👎) on bot messages now default to OFF on new installs. You can turn them on anytime in Settings → Chat Settings → "Show feedback buttons". Existing sites keep their current setting. = 1.9.3 = * Added: Support for Google's new "AQ." Gemini API keys. Google AI Studio now issues keys in the new auth-key format (`AQ.Ab…`) instead of the legacy "AIza" standard keys, which Google is retiring (unrestricted standard keys rejected from 2026-06-19, all standard keys from 2026-09). Onboarding, key validation, and every Gemini API call (chat, model list, and site-learning embeddings) now accept and work with both formats. * Changed: Gemini requests now send the key in the `x-goog-api-key` header instead of the `?key=` query string — Google's recommended method, required for the new "AQ." keys, and it keeps the key out of server/proxy/CDN logs. * Added: An admin notice warns when your saved Gemini key is a legacy "AIza" standard key, with the retirement dates and how to migrate to an "AQ." key (or restrict the existing one). It clears automatically once an "AQ." key is saved. = 1.9.2 = * Added: The "Start for free" onboarding now offers two no-credit-card paths — OpenRouter free models and the Google Gemini free tier — so new users can pick the provider that fits. Either choice validates the key, runs a connection test, and auto-selects a working free model (Gemini defaults to `gemini-2.5-flash`). * Added: Clear in-panel disclosure for each free option, shown before you choose. The Gemini free tier may use submitted content to improve Google's models; the panel says so and points to paid tiers or other providers if you want your data excluded. OpenRouter free models carry an equivalent note that upstream data-handling varies. * Docs: Refreshed the description, Getting Started, and FAQ for the two free paths, and added a "Is my data private on the free options?" FAQ entry. = 1.9.1 = * Fixed: Chat window froze with no reply shown when the AI answered with a markdown table. The table separator-row regex rejected the standard GFM trailing pipe (`|---|---|`), and the paragraph fallback then looped forever on the unconsumed line, exhausting browser memory. Tables now render, and the renderer always makes forward progress on any input. * Fixed: Literal `
` tags that AI models emit inside markdown table cells now render as line breaks instead of showing as raw text. * Fixed: The Remove button for the OpenAI / Gemini API key had no effect on WordPress 7.0 sites. The "WordPress AI Client" RAG section renders duplicate hidden fields with the same names later in the DOM, so its delete-flag "0" and empty key field overrode the visible section's values on submit. Hidden provider sections are now excluded from form submission. * Improved: After the onboarding connection test succeeds, a prominent "Reload this page now" button appears (with auto-scroll and focus) so the saved provider and model are applied before any further edits to the settings form. = 1.9.0 = * Added: "Start for free" onboarding panel that appears on the Settings page when no provider API key has been saved. Walks new users from zero to a working chatbot in about a minute using an OpenRouter free API key (no credit card required). Key is encrypted (AES-256-GCM), provider auto-set to OpenRouter, and a concrete free model id (e.g. `openai/gpt-oss-120b:free`) is picked from the live `/v1/models` catalog and saved as the active model. * Added: Automatic 429 fallback for free models. When the active `:free` model is throttled upstream (Venice / NVIDIA / etc), the active model is marked as throttled for 10 minutes, an alternative `:free` model is picked from the catalog, persisted to settings, and the chat request is retried once. Paid models pass quota errors through unchanged. * Changed: Plugin description and search tags repositioned from "Claude-native RAG chatbot" to "self-hosted, BYOK, multi-provider" so the listing reflects the actual feature set (OpenAI, Anthropic Claude, Google Gemini, OpenRouter). Two new FAQ entries: "Do I need an API key?" and "Can I use it for free?". * Hardened: OpenRouter key validation now requires the `sk-or-` prefix and hits `/v1/auth/key` (real auth check) instead of `/v1/models` (which returns 200 for any string). The existing per-provider Test Connection button shares the fix. * Fixed: Rate-limit countdown badge no longer wipes the paper-plane SVG icon (the icon is restored when the cooldown ends), and the remaining-seconds text is now high-contrast white on the brand-color disc instead of blending with the disabled-gray background. * Added: Free-version manual (Japanese and English) gains a "Quick Start (run it for free)" section explaining the onboarding flow and rate-limit notes. = 1.8.2 = * Documentation: refreshed the plugin description, feature list, FAQ, and search tags. No functional changes. = 1.8.1 = * Fixed: "Undefined array key link_target" PHP warning emitted by the chatbot widget on sites where the link-target option had never been saved. = 1.8.0 = * Added: WordPress 7.0 "AI Client (Connectors)" provider — chat routes through wp_ai_client_prompt(); API keys and models are managed in Settings → Connectors instead of the plugin. * Added: Curated cross-provider model dropdown, plus an automatic one-shot retry without temperature for models (GPT-5 / o-series) that reject a custom value. * Fixed: API-key-decryption "please re-enter" notice now fires only when the active provider's own key is broken; the wpai path skips the plugin-side key pre-check. * Tested up to: WordPress 7.0. = 1.5.6 = * Response Language setting fix * Recommended for all users = 1.5.0 = * Major update: Gutenberg block, Abilities API, language auto-detect, OpenRouter = 1.4.0 = * Web search, cross-site embed, PDF/DOCX knowledge, vector embedding hybrid search = 1.3.0 = * Response caching, audit logs, conversion tracking, offline messages = 1.0.0 = * Initial release