=== NetArz AI — هوش مصنوعی نِت اَرز ===
Contributors: netarz
Tags: ai, live chat, support tickets, chatbot, ai writer
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI live-support chat with human handoff, a support-ticket system and AI writing tools — powered by your NetArz AI API key.

== Description ==

چت پشتیبانی هوشمند، تیکتینگ و ابزارهای نوشتن برای وردپرس، با یک کلید API نِت اَرز.

* Live chat widget whose assistant answers from your own notes and your published posts, pages and WooCommerce products, and hands the conversation to a person when it is not sure.
* Operator inbox in wp-admin with AI reply suggestions, per-conversation AI switch and chat-to-ticket.
* Support tickets for members and guests: departments, priorities, attachments, canned replies, internal notes, auto-close, ratings, WooCommerce "My account" tab, AI drafts or confident auto-answers, AI summaries.
* Writer tools in the block and classic editors: articles, outlines, rewriting, proofreading, translation, excerpts, titles, tags, FAQ, SEO title/description (Yoast, Rank Math, AIOSEO and SEOPress aware), WooCommerce product copy, featured images, alt text, comment replies.
* Credit and usage dashboard for your NetArz account.

= External service =

This plugin sends AI requests to the NetArz AI gateway at https://netarz.ir/api/ai/v1 (or, if you choose it in Settings, the same gateway at https://gisoo.pro/api/v1 or https://ir.gisoo.pro/api/v1) using the API key you enter. For chat and ticket answers it sends the customer's message and short excerpts of your published content that match it; for writer tools it sends the text you ask it to work on. Terms of service: https://netarz.ir/terms

== Installation ==

1. Upload the plugin to `/wp-content/plugins/netarz-ai` and activate it.
2. Create a project API key at https://netarz.ir/ai (it starts with `sk-ntz-v1-`).
3. Open AI → Settings, paste the key and save.
4. Turn on the chat widget in the "Chat" tab and fill in "Custom knowledge".

= Site on a server inside Iran? =

Many Iranian data centres cannot reach netarz.ir since October 2026. In AI → Settings → "Connection", set the API address to gisoo.pro. Gisoo is NetArz's AI brand: same key, credit and models.

== Changelog ==

= 1.1.6 =
* New setting "Chat window on phones": full screen (as before) or a floating window. The floating window is smaller, leaves the page visible and scrollable around it, and closes with the X at its top.

= 1.1.5 =
* The "API address" setting now offers ir.gisoo.pro, the same service on an address inside Iran. Same key, credit and models.
* A failed connection suggests the ir.gisoo.pro address.

= 1.1.4 =
* The interface is in English, with a full Persian translation: a site in English sees English, a site in Persian sees Persian.
* Default chat and ticket texts follow the site language.
* The ticket assistant answers in the customer's language.

= 1.1.2 =
* Chat: an unrecognised decision from the model now hands the conversation to a person instead of being shown as an answer.
* Writer: the "create draft" and "save SEO" routes refuse while the writer module is switched off, like the other writer routes.
* New filters netarz_ai_chat_request and netarz_ai_chat_tool_call let a companion plugin add function calling (tools) to the chat assistant, with limits on rounds, calls, size and time; anything unexpected goes to a person. Nothing changes without them.

= 1.1.1 =
* No request reaches the AI service before an API key is entered (the model list used to be fetched anonymously on the settings screen).
* Generated images returned as a link are downloaded with wp_safe_remote_get().
* The settings page picker uses an enqueued script instead of an inline <script> tag; the dashboard icon is escaped with wp_kses().
* `./build.sh wporg` builds the WordPress.org package of the Gisoo edition (text domain gisoo-ai, English header, fa_IR header translation, no Update URI).

= 1.1.0 =
* New setting "API address": netarz.ir (default) or gisoo.pro, for sites on servers inside Iran. Same key, credit and models.
* A failed connection to netarz.ir now suggests the gisoo.pro address.
* The same code also builds the "Gisoo AI" edition (gisoo-ai). If both are active, one stands down with a notice instead of a fatal error, and uninstalling one keeps the shared data while the other is installed.

= 1.0.0 =
* First release.
