Plugin Directory

Changeset 3748372


Ignore:
Timestamp:
10/15/2026 11:59:49 AM (39 hours ago)
Author:
archivistai
Message:

Release 0.7.0: field mapping, answer instructions and full styling in Pro; readme refresh

Location:
archivist-ai
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • archivist-ai/tags/0.7.0/admin/class-arcai-admin.php

    r3748265 r3748372  
    1616                add_action( 'admin_init', array( $this, 'register_settings' ) );
    1717                add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) );
     18                add_action( 'admin_post_arcai_review_prompt', array( $this, 'handle_review_prompt' ) );
    1819                add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
    1920                add_action( 'wp_ajax_arcai_estimate_index', array( $this, 'ajax_estimate' ) );
    … …  
    191192                        'tone'  => $state['indexed_posts'] ? 'ok' : 'off',
    192193                );
     194
     195                $show_pro_hints = true;
    193196                ?>
    194197                <div class="wrap arcai-wrap">
    … …  
    197200                        <div class="arcai-columns">
    198201                        <div class="arcai-main">
     202
     203                        <?php $this->render_review_prompt(); ?>
    199204
    200205                        <form method="post" action="options.php" class="arcai-settings">
    … …  
    244249                                                        </td>
    245250                                                </tr>
     251                                                <?php if ( $show_pro_hints ) : ?>
     252                                                        <?php $this->render_pro_hint_row( __( 'Custom fields', 'archivist-ai' ), __( 'Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date.', 'archivist-ai' ) ); ?>
     253                                                <?php endif; ?>
    246254                                        </table>
     255                                        <?php
     256                                        ?>
    247257                                </section>
    248258
    … …  
    270280                                                        </td>
    271281                                                </tr>
    272                                                 <tr>
    273                                                         <th scope="row"><label for="arcai-chat-bg"><?php esc_html_e( 'Background color', 'archivist-ai' ); ?></label></th>
    274                                                         <td>
    275                                                                 <input type="color" id="arcai-chat-bg" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_bg]" value="<?php echo esc_attr( $settings['chat_bg'] ); ?>" />
    276                                                                 <p class="description"><?php esc_html_e( 'Text and lines switch to light automatically on a dark background.', 'archivist-ai' ); ?></p>
    277                                                         </td>
    278                                                 </tr>
    279                                                 <tr>
    280                                                         <th scope="row"><label for="arcai-chat-font"><?php esc_html_e( 'Font', 'archivist-ai' ); ?></label></th>
    281                                                         <td>
    282                                                                 <select id="arcai-chat-font" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_font]">
    283                                                                         <?php foreach ( Arcai_Settings::fonts() as $key => $label ) : ?>
    284                                                                                 <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $settings['chat_font'], $key ); ?>><?php echo esc_html( $label ); ?></option>
    285                                                                         <?php endforeach; ?>
    286                                                                 </select>
    287                                                                 <p class="description"><?php esc_html_e( 'For questions and answers. Small labels keep the monospace style.', 'archivist-ai' ); ?></p>
    288                                                         </td>
    289                                                 </tr>
    290                                                 <tr>
    291                                                         <th scope="row"><?php esc_html_e( 'Corners', 'archivist-ai' ); ?></th>
    292                                                         <td>
    293                                                                 <fieldset class="arcai-segmented">
    294                                                                         <legend class="screen-reader-text"><?php esc_html_e( 'Corners', 'archivist-ai' ); ?></legend>
    295                                                                         <?php foreach ( Arcai_Settings::corners() as $key => $label ) : ?>
    296                                                                                 <label>
    297                                                                                         <input type="radio" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_corners]" value="<?php echo esc_attr( $key ); ?>" <?php checked( $settings['chat_corners'], $key ); ?> />
    298                                                                                         <span class="arcai-corner-<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $label ); ?></span>
    299                                                                                 </label>
    300                                                                         <?php endforeach; ?>
    301                                                                 </fieldset>
    302                                                         </td>
    303                                                 </tr>
     282                                                <?php
     283                                                ?>
    304284                                                <tr>
    305285                                                        <th scope="row"><label for="arcai-greeting"><?php esc_html_e( 'Greeting message', 'archivist-ai' ); ?></label></th>
    … …  
    308288                                                <?php
    309289                                                ?>
     290                                                <?php if ( $show_pro_hints ) : ?>
     291                                                        <?php $this->render_pro_hint_row( __( 'Your style', 'archivist-ai' ), __( 'Background color, font and corner style, plus your own answer instructions: tone, language and house rules.', 'archivist-ai' ) ); ?>
     292                                                <?php endif; ?>
    310293                                        </table>
    311294                                        <?php $this->render_chat_preview( $settings ); ?>
    … …  
    428411                                        <p class="description"><?php esc_html_e( 'Computed from OpenAI list prices for the tokens each call used.', 'archivist-ai' ); ?></p>
    429412                                </section>
     413
     414                                <?php if ( $show_pro_hints ) : ?>
     415                                        <?php $this->render_pro_card(); ?>
     416                                <?php endif; ?>
    430417
    431418                        </div>
    … …  
    474461        }
    475462
     463        /**
     464         * A settings-table row pointing to a Pro feature.
     465         */
     466        private function render_pro_hint_row( $label, $text ) {
     467                ?>
     468                <tr class="arcai-pro-hint">
     469                        <th scope="row"><?php echo esc_html( $label ); ?></th>
     470                        <td>
     471                                <span class="arcai-pro-badge">Pro</span>
     472                                <?php echo esc_html( $text ); ?>
     473                                <a href="<?php echo esc_url( arcai_fs()->get_upgrade_url() ); ?>"><?php esc_html_e( 'See Pro', 'archivist-ai' ); ?></a>
     474                        </td>
     475                </tr>
     476                <?php
     477        }
     478
     479        /**
     480         * Sidebar summary of what Pro adds.
     481         */
     482        private function render_pro_card() {
     483                $features = array(
     484                        __( 'Reader questions report: what people ask, and what your archive could not answer', 'archivist-ai' ),
     485                        __( 'Custom fields, ACF fields and taxonomies in search', 'archivist-ai' ),
     486                        __( 'Your own answer instructions: tone, language, house rules', 'archivist-ai' ),
     487                        __( 'Full styling: background, font, corners', 'archivist-ai' ),
     488                        __( 'Answer caching and subscriber-only mode', 'archivist-ai' ),
     489                );
     490                ?>
     491                <section class="arcai-card arcai-pro-card">
     492                        <header class="arcai-card-head">
     493                                <p class="arcai-kicker">Pro</p>
     494                                <h2><?php esc_html_e( 'Go further', 'archivist-ai' ); ?></h2>
     495                        </header>
     496                        <ul>
     497                                <?php foreach ( $features as $feature ) : ?>
     498                                        <li><?php echo esc_html( $feature ); ?></li>
     499                                <?php endforeach; ?>
     500                        </ul>
     501                        <p class="arcai-actions">
     502                                <a class="button button-primary" href="<?php echo esc_url( arcai_fs()->get_upgrade_url() ); ?>"><?php esc_html_e( 'See Pro plans', 'archivist-ai' ); ?></a>
     503                        </p>
     504                </section>
     505                <?php
     506        }
     507
     508        /**
     509         * One-time request for a wordpress.org review, shown on this screen only
     510         * once the chat has answered enough questions to judge it.
     511         */
     512        private function render_review_prompt() {
     513                if ( 'done' === get_option( 'arcai_review_prompt' ) || Arcai_Usage::event_count( 'chat_answer' ) < 20 ) {
     514                        return;
     515                }
     516                $url = function ( $choice ) {
     517                        return wp_nonce_url( admin_url( 'admin-post.php?action=arcai_review_prompt&choice=' . $choice ), 'arcai_review_prompt' );
     518                };
     519                ?>
     520                <section class="arcai-card arcai-review">
     521                        <p>
     522                                <strong><?php esc_html_e( 'Your archive has answered over 20 questions.', 'archivist-ai' ); ?></strong>
     523                                <?php esc_html_e( 'If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it.', 'archivist-ai' ); ?>
     524                        </p>
     525                        <p class="arcai-actions">
     526                                <a class="button button-primary" href="<?php echo esc_url( $url( 'review' ) ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Leave a review', 'archivist-ai' ); ?></a>
     527                                <a class="button" href="<?php echo esc_url( $url( 'dismiss' ) ); ?>"><?php esc_html_e( 'No thanks', 'archivist-ai' ); ?></a>
     528                        </p>
     529                </section>
     530                <?php
     531        }
     532
     533        /**
     534         * Either choice hides the review prompt for good.
     535         */
     536        public function handle_review_prompt() {
     537                if ( ! current_user_can( 'manage_options' ) ) {
     538                        wp_die( esc_html__( 'Permission denied.', 'archivist-ai' ) );
     539                }
     540                check_admin_referer( 'arcai_review_prompt' );
     541                update_option( 'arcai_review_prompt', 'done', false );
     542
     543                $choice = isset( $_GET['choice'] ) ? sanitize_key( wp_unslash( $_GET['choice'] ) ) : '';
     544                if ( 'review' === $choice ) {
     545                        wp_redirect( 'https://wordpress.org/support/plugin/archivist-ai/reviews/#new-post' ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- fixed wordpress.org URL.
     546                        exit;
     547                }
     548                wp_safe_redirect( admin_url( 'admin.php?page=archivist-ai' ) );
     549                exit;
     550        }
     551
     552        /**
     553         * Background, font and corner rows (Pro appearance settings).
     554         */
     555
     556        /**
     557         * Custom answer instructions row (Pro).
     558         */
     559
     560        /**
     561         * Per post type: which custom fields and taxonomies to add to the indexed
     562         * text (Pro field mapping).
     563         */
     564
    476565
    477566        private function verify_ajax() {
  • archivist-ai/tags/0.7.0/archivist-ai.php

    r3748265 r3748372  
    11<?php
    22/**
    3  * Plugin Name:       Archivist AI
     3 * Plugin Name:       Archivist AI – AI Search & Chatbot for Your Articles
    44 * Plugin URI:        https://archivist-ai.com
    55 * Description:       AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.
    6  * Version:           0.6.5
     6 * Version:           0.7.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
    … …  
    1818}
    1919
    20 define( 'ARCAI_VERSION', '0.6.5' );
     20define( 'ARCAI_VERSION', '0.7.0' );
    2121define( 'ARCAI_PLUGIN_FILE', __FILE__ );
    2222define( 'ARCAI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • archivist-ai/tags/0.7.0/assets/css/admin.css

    r3724623 r3748372  
    399399}
    400400
     401/* --- Pro hints, Pro card, review prompt --- */
     402.arcai-pro-badge {
     403        display: inline-block;
     404        margin-right: 6px;
     405        padding: 1px 7px;
     406        border: 1px solid var(--arcai-lamp);
     407        font-family: var(--arcai-mono);
     408        font-size: 10px;
     409        letter-spacing: 0.12em;
     410        text-transform: uppercase;
     411        color: var(--arcai-lamp-dark);
     412        vertical-align: 1px;
     413}
     414
     415.arcai-pro-hint th {
     416        color: var(--arcai-muted);
     417        font-weight: 400;
     418}
     419
     420.arcai-pro-hint td {
     421        color: var(--arcai-muted);
     422}
     423
     424.arcai-pro-hint a {
     425        color: var(--arcai-lamp-dark);
     426        white-space: nowrap;
     427}
     428
     429.arcai-pro-card {
     430        background:
     431                radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232, 80, 42, 0.08), transparent 70%),
     432                var(--arcai-card);
     433        border-color: rgba(232, 80, 42, 0.35);
     434}
     435
     436.arcai-pro-card ul {
     437        margin: 14px 0 6px;
     438}
     439
     440.arcai-pro-card li {
     441        position: relative;
     442        margin: 0 0 8px;
     443        padding-left: 18px;
     444        line-height: 1.45;
     445}
     446
     447.arcai-pro-card li::before {
     448        content: "✓";
     449        position: absolute;
     450        left: 0;
     451        color: var(--arcai-lamp);
     452}
     453
     454.arcai-review {
     455        border-left: 3px solid var(--arcai-lamp);
     456}
     457
     458.arcai-review p:first-child {
     459        margin-top: 0;
     460}
     461
     462.arcai-review .arcai-actions {
     463        margin-bottom: 0;
     464}
     465
     466/* --- Field mapping (Pro) --- */
     467.arcai-fields {
     468        margin-top: 8px;
     469        padding-top: 16px;
     470        border-top: 1px solid var(--arcai-line);
     471}
     472
     473.arcai-field-group {
     474        margin: 14px 0 0;
     475        padding: 12px 16px 6px;
     476        border: 1px solid var(--arcai-line);
     477        background: #fff;
     478}
     479
     480.arcai-field-group legend {
     481        padding: 0 6px;
     482        font-weight: 600;
     483}
     484
     485.arcai-field-group .arcai-checks + .arcai-checks {
     486        margin-top: 8px;
     487        padding-top: 8px;
     488        border-top: 1px dashed var(--arcai-line);
     489}
     490
     491.arcai-checks-mono label {
     492        font-family: var(--arcai-mono);
     493        font-size: 12px;
     494}
     495
    401496/* --- Buttons --- */
    402497.arcai-wrap .button {
  • archivist-ai/tags/0.7.0/assets/js/admin.js

    r3724623 r3748372  
    124124                        return;
    125125                }
    126                 var accent = $( '#arcai-bubble-color' ).val();
    127                 var bg = $( '#arcai-chat-bg' ).val();
     126                // Fields missing from the page keep the chat's default look.
     127                var accent = $( '#arcai-bubble-color' ).val() || '#e8502a';
     128                var bg = $( '#arcai-chat-bg' ).val() || '#f6f1e4';
    128129                var lightBg = isLight( bg );
    129130                preview.style.setProperty( '--arcai-accent', accent );
    … …  
    132133                preview.style.setProperty( '--arcai-text', lightBg ? '#221d14' : '#f6f1e4' );
    133134                preview.style.setProperty( '--arcai-card', lightBg ? 'rgba(255, 255, 255, 0.55)' : 'rgba(255, 255, 255, 0.06)' );
    134                 preview.setAttribute( 'data-arcai-font', $( '#arcai-chat-font' ).val() );
     135                preview.setAttribute( 'data-arcai-font', $( '#arcai-chat-font' ).val() || 'theme' );
    135136                preview.setAttribute( 'data-arcai-corners', $( 'input[name$="[chat_corners]"]:checked' ).val() || 'square' );
    136137                $( '#arcai-preview-greeting' ).text( $( '#arcai-greeting' ).val() );
  • archivist-ai/tags/0.7.0/includes/class-arcai-chat-controller.php

    r3724460 r3748372  
    251251                        . 'Cite sources inline with their bracket numbers, e.g. [1], [2]. '
    252252                        . 'If the excerpts do not contain the answer, say so honestly and suggest a different question. '
    253                         . 'Never invent facts, articles, or dates. Keep answers under 200 words. '
    254                         . "Article excerpts:\n\n" . $context;
     253                        . 'Never invent facts, articles, or dates. Keep answers under 200 words. ';
     254
     255
     256                $system .= "Article excerpts:\n\n" . $context;
    255257
    256258                $messages   = array( array( 'role' => 'system', 'content' => $system ) );
  • archivist-ai/tags/0.7.0/includes/class-arcai-chunker.php

    r3724460 r3748372  
    4343        public static function plain_text( $post ) {
    4444                $text = $post->post_title . "\n" . $post->post_excerpt . "\n" . $post->post_content;
     45
     46                /**
     47                 * Filters the raw text of a post before it is cleaned up, chunked and
     48                 * embedded. Use it to make extra data searchable, e.g. custom fields
     49                 * or taxonomy terms ("Price: 49 EUR", "Venue: City Hall").
     50                 *
     51                 * @param string  $text Title, excerpt and content.
     52                 * @param WP_Post $post The post being indexed.
     53                 */
     54                $text = (string) apply_filters( 'arcai_post_index_text', $text, $post );
     55
    4556                $text = strip_shortcodes( $text );
    4657                $text = excerpt_remove_blocks( $text );
  • archivist-ai/tags/0.7.0/includes/class-arcai-frontend.php

    r3724623 r3748372  
    2929                wp_register_script( 'arcai-chat', ARCAI_PLUGIN_URL . 'assets/js/chat.js', array(), ARCAI_VERSION, true );
    3030
     31                $look = Arcai_Settings::appearance();
    3132                wp_localize_script(
    3233                        'arcai-chat',
    … …  
    3738                                'nonce'          => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '',
    3839                                'greeting'       => Arcai_Settings::get( 'greeting' ),
    39                                 'color'          => Arcai_Settings::get( 'bubble_color' ),
    40                                 'background'     => Arcai_Settings::get( 'chat_bg' ),
    41                                 'font'           => Arcai_Settings::get( 'chat_font' ),
    42                                 'corners'        => Arcai_Settings::get( 'chat_corners' ),
     40                                'color'          => $look['color'],
     41                                'background'     => $look['background'],
     42                                'font'           => $look['font'],
     43                                'corners'        => $look['corners'],
    4344                                'maxTurns'       => 10,
    4445                                'i18n'           => array(
  • archivist-ai/tags/0.7.0/includes/class-arcai-settings.php

    r3724623 r3748372  
    1010        public static function defaults() {
    1111                return array(
    12                         'api_key'         => '',
    13                         'chat_model'      => 'gpt-4o-mini',
    14                         'embedding_model' => 'text-embedding-3-small',
    15                         'post_types'      => array( 'post' ),
    16                         'daily_cap'       => 5.0,
    17                         'rate_limit'      => 20,
    18                         'bubble_enabled'  => 1,
    19                         'bubble_color'    => '#e8502a',
    20                         'chat_bg'         => '#f6f1e4',
    21                         'chat_font'       => 'theme',
    22                         'chat_corners'    => 'square',
    23                         'greeting'        => __( 'Hi! Ask me anything about our articles.', 'archivist-ai' ),
    24                         'require_login'   => 0,
     12                        'api_key'             => '',
     13                        'chat_model'          => 'gpt-4o-mini',
     14                        'embedding_model'     => 'text-embedding-3-small',
     15                        'post_types'          => array( 'post' ),
     16                        'daily_cap'           => 5.0,
     17                        'rate_limit'          => 20,
     18                        'bubble_enabled'      => 1,
     19                        'bubble_color'        => '#e8502a',
     20                        'chat_bg'             => '#f6f1e4',
     21                        'chat_font'           => 'theme',
     22                        'chat_corners'        => 'square',
     23                        'answer_instructions' => '',
     24                        'index_fields'        => array(),
     25                        'greeting'            => __( 'Hi! Ask me anything about our articles.', 'archivist-ai' ),
     26                        'require_login'       => 0,
    2527                );
    2628        }
    … …  
    4749                        'rounded' => __( 'Rounded', 'archivist-ai' ),
    4850                );
     51        }
     52
     53        /**
     54         * The chat's look as the frontend should render it.
     55         *
     56         * @return array { color, background, font, corners }
     57         */
     58        public static function appearance() {
     59                $defaults = self::defaults();
     60                $look     = array(
     61                        'color'      => self::get( 'bubble_color' ),
     62                        'background' => $defaults['chat_bg'],
     63                        'font'       => $defaults['chat_font'],
     64                        'corners'    => $defaults['chat_corners'],
     65                );
     66                return $look;
    4967        }
    5068
    … …  
    87105                        $clean['bubble_color'] = $defaults['bubble_color'];
    88106                }
    89                 $clean['chat_bg'] = isset( $input['chat_bg'] ) ? sanitize_hex_color( $input['chat_bg'] ) : $defaults['chat_bg'];
    90                 if ( ! $clean['chat_bg'] ) {
    91                         $clean['chat_bg'] = $defaults['chat_bg'];
    92                 }
    93                 $clean['chat_font']    = isset( $input['chat_font'] ) && array_key_exists( $input['chat_font'], self::fonts() ) ? $input['chat_font'] : $defaults['chat_font'];
    94                 $clean['chat_corners'] = isset( $input['chat_corners'] ) && array_key_exists( $input['chat_corners'], self::corners() ) ? $input['chat_corners'] : $defaults['chat_corners'];
     107                $clean['chat_bg']             = $defaults['chat_bg'];
     108                $clean['chat_font']           = $defaults['chat_font'];
     109                $clean['chat_corners']        = $defaults['chat_corners'];
     110                $clean['answer_instructions'] = $defaults['answer_instructions'];
     111                $clean['index_fields']        = $defaults['index_fields'];
    95112                $clean['greeting'] = isset( $input['greeting'] ) ? sanitize_text_field( $input['greeting'] ) : $defaults['greeting'];
    96113
    … …  
    98115                $clean['require_login'] = 0;
    99116
     117
    100118                return $clean;
    101119        }
     120
     121        /**
     122         * Pro settings: full appearance, custom answer instructions and the custom
     123         * field / taxonomy mapping used when indexing.
     124         */
    102125}
  • archivist-ai/tags/0.7.0/includes/class-arcai-usage.php

    r3724460 r3748372  
    5050        }
    5151
     52        /**
     53         * All-time number of logged events of one type, e.g. answers given.
     54         */
     55        public static function event_count( $event_type ) {
     56                global $wpdb;
     57                return (int) $wpdb->get_var(
     58                        $wpdb->prepare(
     59                                "SELECT COUNT(*) FROM {$wpdb->prefix}arcai_usage WHERE event_type = %s",
     60                                $event_type
     61                        )
     62                );
     63        }
     64
    5265        public static function over_daily_cap() {
    5366                $cap = (float) Arcai_Settings::get( 'daily_cap' );
  • archivist-ai/tags/0.7.0/languages/archivist-ai.pot

    r3748265 r3748372  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Archivist AI 0.6.5\n"
     5"Project-Id-Version: Archivist AI – AI Search & Chatbot for Your Articles 0.7.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/archivist-ai\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-15T11:12:27+00:00\n"
     12"POT-Creation-Date: 2026-10-15T11:59:00+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
    … …  
    1717#. Plugin Name of the plugin
    1818#: archivist-ai.php
    19 #: admin/class-arcai-admin.php:27
    20 #: admin/class-arcai-admin.php:28
    21 #: admin/class-arcai-admin.php:67
    22 #: admin/class-arcai-admin.php:195
    23 msgid "Archivist AI"
     19msgid "Archivist AI – AI Search & Chatbot for Your Articles"
    2420msgstr ""
    2521
    … …  
    3935msgstr ""
    4036
    41 #: admin/class-arcai-admin.php:55
     37#: admin/class-arcai-admin.php:28
     38#: admin/class-arcai-admin.php:29
     39#: admin/class-arcai-admin.php:68
     40#: admin/class-arcai-admin.php:198
     41msgid "Archivist AI"
     42msgstr ""
     43
     44#: admin/class-arcai-admin.php:56
    4245msgid "This site uses Archivist AI to answer questions about our published articles in a chat."
    4346msgstr ""
    4447
    4548#. translators: %s: link to OpenAI's privacy policy
    46 #: admin/class-arcai-admin.php:58
     49#: admin/class-arcai-admin.php:59
    4750#, php-format
    4851msgid "When you use the chat, the question you type and the recent messages of that conversation are sent to OpenAI, together with excerpts from our published articles, to generate an answer. We do not send your name, email address, IP address or account details to OpenAI. OpenAI processes this data under its own terms: %s."
    4952msgstr ""
    5053
    51 #: admin/class-arcai-admin.php:59
     54#: admin/class-arcai-admin.php:60
    5255msgid "OpenAI Privacy Policy"
    5356msgstr ""
    5457
    55 #: admin/class-arcai-admin.php:61
     58#: admin/class-arcai-admin.php:62
    5659msgid "To prevent abuse, we keep a one-way hash of your IP address for one hour to limit how many questions can be asked. Your conversation is kept only in your own browser for the current tab and is deleted when you close it."
    5760msgstr ""
    5861
    59 #: admin/class-arcai-admin.php:62
     62#: admin/class-arcai-admin.php:63
    6063msgid "Please do not enter personal or sensitive information in the chat."
    6164msgstr ""
    6265
    6366#. translators: 1: number of posts, 2: token count, 3: estimated cost in USD.
    64 #: admin/class-arcai-admin.php:95
     67#: admin/class-arcai-admin.php:96
    6568#, php-format
    6669msgid "Indexing %1$s posts will use roughly %2$s tokens. Estimated cost: %3$s. Continue?"
    6770msgstr ""
    6871
    69 #: admin/class-arcai-admin.php:96
     72#: admin/class-arcai-admin.php:97
    7073msgid "Request failed. Please try again."
    7174msgstr ""
    7275
    73 #: admin/class-arcai-admin.php:114
     76#: admin/class-arcai-admin.php:115
    7477msgid "AI search for your archive"
    7578msgstr ""
    7679
    77 #: admin/class-arcai-admin.php:151
     80#: admin/class-arcai-admin.php:152
    7881msgid "Indexing"
    7982msgstr ""
    8083
    81 #: admin/class-arcai-admin.php:152
     84#: admin/class-arcai-admin.php:153
    8285msgid "Understanding questions"
    8386msgstr ""
    8487
    85 #: admin/class-arcai-admin.php:153
     88#: admin/class-arcai-admin.php:154
    8689msgid "Searching the archive"
    8790msgstr ""
    8891
    89 #: admin/class-arcai-admin.php:154
     92#: admin/class-arcai-admin.php:155
    9093msgid "Writing answers"
    9194msgstr ""
    9295
    93 #: admin/class-arcai-admin.php:169
     96#: admin/class-arcai-admin.php:170
    9497msgid "Needs an API key"
    9598msgstr ""
    9699
    97 #: admin/class-arcai-admin.php:174
     100#: admin/class-arcai-admin.php:175
    98101msgid "Paused — daily cap reached"
    99102msgstr ""
    100103
    101 #: admin/class-arcai-admin.php:179
     104#: admin/class-arcai-admin.php:180
    102105msgid "Bubble off"
    103106msgstr ""
    104107
    105 #: admin/class-arcai-admin.php:184
     108#: admin/class-arcai-admin.php:185
    106109msgid "Chat live"
    107110msgstr ""
    108111
    109112#. translators: %s: number of indexed posts
    110 #: admin/class-arcai-admin.php:190
     113#: admin/class-arcai-admin.php:191
    111114#, php-format
    112115msgid "%s post indexed"
    … …  
    115118msgstr[1] ""
    116119
    117 #: admin/class-arcai-admin.php:206
     120#: admin/class-arcai-admin.php:211
    118121msgid "Connection"
    119122msgstr ""
    120123
    121 #: admin/class-arcai-admin.php:210
     124#: admin/class-arcai-admin.php:215
    122125msgid "OpenAI API key"
    123126msgstr ""
    124127
    125 #: admin/class-arcai-admin.php:213
     128#: admin/class-arcai-admin.php:218
    126129msgid "One key covers both indexing (embeddings) and answers. You pay OpenAI directly at list price."
    127130msgstr ""
    128131
    129 #: admin/class-arcai-admin.php:217
     132#: admin/class-arcai-admin.php:222
    130133msgid "Answer model"
    131134msgstr ""
    132135
    133 #: admin/class-arcai-admin.php:221
     136#: admin/class-arcai-admin.php:226
    134137msgid "Embedding model"
    135138msgstr ""
    136139
    137 #: admin/class-arcai-admin.php:230
     140#: admin/class-arcai-admin.php:235
    138141msgid "What to index"
    139142msgstr ""
    140143
    141 #: admin/class-arcai-admin.php:234
     144#: admin/class-arcai-admin.php:239
    142145msgid "Post types"
    143146msgstr ""
    144147
    145 #: admin/class-arcai-admin.php:243
     148#: admin/class-arcai-admin.php:248
    146149msgid "Only published, public, non-password-protected content is ever indexed."
    147150msgstr ""
    148151
    149152#: admin/class-arcai-admin.php:252
     153msgid "Custom fields"
     154msgstr ""
     155
     156#: admin/class-arcai-admin.php:252
     157msgid "Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date."
     158msgstr ""
     159
     160#: admin/class-arcai-admin.php:262
    150161msgid "Chat widget"
    151162msgstr ""
    152163
    153 #: admin/class-arcai-admin.php:256
     164#: admin/class-arcai-admin.php:266
    154165msgid "Chat bubble"
    155166msgstr ""
    156167
    157 #: admin/class-arcai-admin.php:260
     168#: admin/class-arcai-admin.php:270
    158169msgid "Show the floating chat bubble on the site"
    159170msgstr ""
    160171
    161 #: admin/class-arcai-admin.php:262
     172#: admin/class-arcai-admin.php:272
    162173msgid "Or place the chat inline with the Archivist AI block or the [archivist_ai] shortcode."
    163174msgstr ""
    164175
    165 #: admin/class-arcai-admin.php:266
     176#: admin/class-arcai-admin.php:276
    166177msgid "Accent color"
    167178msgstr ""
    168179
    169 #: admin/class-arcai-admin.php:269
     180#: admin/class-arcai-admin.php:279
    170181msgid "Used for the bubble, the send button and citation numbers."
    171182msgstr ""
    172183
    173 #: admin/class-arcai-admin.php:273
    174 msgid "Background color"
    175 msgstr ""
    176 
    177 #: admin/class-arcai-admin.php:276
    178 msgid "Text and lines switch to light automatically on a dark background."
    179 msgstr ""
    180 
    181 #: admin/class-arcai-admin.php:280
    182 msgid "Font"
    183 msgstr ""
    184 
    185 #: admin/class-arcai-admin.php:287
    186 msgid "For questions and answers. Small labels keep the monospace style."
     184#: admin/class-arcai-admin.php:285
     185msgid "Greeting message"
    187186msgstr ""
    188187
    189188#: admin/class-arcai-admin.php:291
    190 #: admin/class-arcai-admin.php:294
    191 msgid "Corners"
    192 msgstr ""
    193 
    194 #: admin/class-arcai-admin.php:305
    195 msgid "Greeting message"
    196 msgstr ""
    197 
    198 #: admin/class-arcai-admin.php:317
     189msgid "Your style"
     190msgstr ""
     191
     192#: admin/class-arcai-admin.php:291
     193msgid "Background color, font and corner style, plus your own answer instructions: tone, language and house rules."
     194msgstr ""
     195
     196#: admin/class-arcai-admin.php:300
    199197msgid "Limits & spending"
    200198msgstr ""
    201199
     200#: admin/class-arcai-admin.php:304
     201msgid "Daily spending cap"
     202msgstr ""
     203
     204#: admin/class-arcai-admin.php:307
     205msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."
     206msgstr ""
     207
     208#: admin/class-arcai-admin.php:311
     209msgid "Visitor rate limit"
     210msgstr ""
     211
     212#: admin/class-arcai-admin.php:314
     213msgid "chat turns per hour, per visitor IP"
     214msgstr ""
     215
    202216#: admin/class-arcai-admin.php:321
    203 msgid "Daily spending cap"
    204 msgstr ""
    205 
    206 #: admin/class-arcai-admin.php:324
    207 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."
    208 msgstr ""
    209 
    210 #: admin/class-arcai-admin.php:328
    211 msgid "Visitor rate limit"
    212 msgstr ""
    213 
    214 #: admin/class-arcai-admin.php:331
    215 msgid "chat turns per hour, per visitor IP"
    216 msgstr ""
    217 
    218 #: admin/class-arcai-admin.php:338
    219217msgid "Changes apply to the chat as soon as you save."
    220218msgstr ""
    221219
    222 #: admin/class-arcai-admin.php:339
     220#: admin/class-arcai-admin.php:322
    223221msgid "Save settings"
    224222msgstr ""
    225223
    226 #: admin/class-arcai-admin.php:349
     224#: admin/class-arcai-admin.php:332
    227225msgid "Index"
    228226msgstr ""
    229227
    230 #: admin/class-arcai-admin.php:350
     228#: admin/class-arcai-admin.php:333
    231229msgid "Your archive"
    232230msgstr ""
    233231
    234 #: admin/class-arcai-admin.php:354
     232#: admin/class-arcai-admin.php:337
    235233msgid "posts searchable"
    236234msgstr ""
    237235
     236#: admin/class-arcai-admin.php:345
     237msgid "Estimate cost & index"
     238msgstr ""
     239
     240#: admin/class-arcai-admin.php:348
     241msgid "Cancel"
     242msgstr ""
     243
     244#: admin/class-arcai-admin.php:351
     245msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically."
     246msgstr ""
     247
     248#: admin/class-arcai-admin.php:356
     249msgid "Usage"
     250msgstr ""
     251
     252#: admin/class-arcai-admin.php:357
     253msgid "What it costs you"
     254msgstr ""
     255
    238256#: admin/class-arcai-admin.php:362
    239 msgid "Estimate cost & index"
    240 msgstr ""
    241 
    242 #: admin/class-arcai-admin.php:365
    243 msgid "Cancel"
    244 msgstr ""
    245 
    246 #: admin/class-arcai-admin.php:368
    247 msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically."
    248 msgstr ""
    249 
    250 #: admin/class-arcai-admin.php:373
    251 msgid "Usage"
    252 msgstr ""
    253 
    254 #: admin/class-arcai-admin.php:374
    255 msgid "What it costs you"
    256 msgstr ""
    257 
    258 #: admin/class-arcai-admin.php:379
    259257msgid "Today"
    260258msgstr ""
    261259
    262 #: admin/class-arcai-admin.php:383
     260#: admin/class-arcai-admin.php:366
    263261msgid "30 days"
    264262msgstr ""
    265263
    266 #: admin/class-arcai-admin.php:387
     264#: admin/class-arcai-admin.php:370
    267265msgid "Answers"
    268266msgstr ""
    269267
    270268#. translators: 1: amount spent today, 2: daily cap
    271 #: admin/class-arcai-admin.php:399
     269#: admin/class-arcai-admin.php:382
    272270#, php-format
    273271msgid "%1$s of your %2$s daily cap used"
    274272msgstr ""
    275273
    276 #: admin/class-arcai-admin.php:410
     274#: admin/class-arcai-admin.php:393
    277275msgid "Last 30 days"
    278276msgstr ""
    279277
     278#: admin/class-arcai-admin.php:394
     279msgid "Calls"
     280msgstr ""
     281
     282#: admin/class-arcai-admin.php:395
     283msgid "Cost"
     284msgstr ""
     285
     286#: admin/class-arcai-admin.php:399
     287msgid "No usage yet."
     288msgstr ""
     289
    280290#: admin/class-arcai-admin.php:411
    281 msgid "Calls"
    282 msgstr ""
    283 
    284 #: admin/class-arcai-admin.php:412
    285 msgid "Cost"
    286 msgstr ""
    287 
    288 #: admin/class-arcai-admin.php:416
    289 msgid "No usage yet."
    290 msgstr ""
    291 
    292 #: admin/class-arcai-admin.php:428
    293291msgid "Computed from OpenAI list prices for the tokens each call used."
    294292msgstr ""
    295293
    296 #: admin/class-arcai-admin.php:444
     294#: admin/class-arcai-admin.php:431
    297295msgid "Live preview"
    298296msgstr ""
    299297
    300 #: admin/class-arcai-admin.php:449
    301 #: includes/class-arcai-frontend.php:50
     298#: admin/class-arcai-admin.php:436
     299#: includes/class-arcai-frontend.php:51
    302300msgid "Archive search"
    303301msgstr ""
    304302
    305 #: admin/class-arcai-admin.php:454
     303#: admin/class-arcai-admin.php:441
    306304msgid "What have we written about food retail this year?"
    307305msgstr ""
    308306
    309 #: admin/class-arcai-admin.php:456
     307#: admin/class-arcai-admin.php:443
    310308msgid "Two themes stand out: discount chains gaining share"
    311309msgstr ""
    312310
    313 #: admin/class-arcai-admin.php:456
     311#: admin/class-arcai-admin.php:443
    314312msgid "and a push into private-label ranges"
    315313msgstr ""
    316314
    317 #: admin/class-arcai-admin.php:458
     315#: admin/class-arcai-admin.php:445
     316#: includes/class-arcai-frontend.php:48
     317msgid "Sources"
     318msgstr ""
     319
     320#: admin/class-arcai-admin.php:446
     321msgid "The discount grocers’ quiet takeover"
     322msgstr ""
     323
     324#: admin/class-arcai-admin.php:447
     325msgid "Why every chain wants its own brand"
     326msgstr ""
     327
     328#: admin/class-arcai-admin.php:452
     329#: includes/class-arcai-frontend.php:46
     330msgid "Ask about our articles…"
     331msgstr ""
     332
     333#: admin/class-arcai-admin.php:453
    318334#: includes/class-arcai-frontend.php:47
    319 msgid "Sources"
    320 msgstr ""
    321 
    322 #: admin/class-arcai-admin.php:459
    323 msgid "The discount grocers’ quiet takeover"
    324 msgstr ""
    325 
    326 #: admin/class-arcai-admin.php:460
    327 msgid "Why every chain wants its own brand"
    328 msgstr ""
    329 
    330 #: admin/class-arcai-admin.php:465
    331 #: includes/class-arcai-frontend.php:45
    332 msgid "Ask about our articles…"
    333 msgstr ""
    334 
    335 #: admin/class-arcai-admin.php:466
    336 #: includes/class-arcai-frontend.php:46
    337335msgid "Send"
    338336msgstr ""
    339337
    340 #: admin/class-arcai-admin.php:479
     338#: admin/class-arcai-admin.php:473
     339msgid "See Pro"
     340msgstr ""
     341
     342#: admin/class-arcai-admin.php:484
     343msgid "Reader questions report: what people ask, and what your archive could not answer"
     344msgstr ""
     345
     346#: admin/class-arcai-admin.php:485
     347msgid "Custom fields, ACF fields and taxonomies in search"
     348msgstr ""
     349
     350#: admin/class-arcai-admin.php:486
     351msgid "Your own answer instructions: tone, language, house rules"
     352msgstr ""
     353
     354#: admin/class-arcai-admin.php:487
     355msgid "Full styling: background, font, corners"
     356msgstr ""
     357
     358#: admin/class-arcai-admin.php:488
     359msgid "Answer caching and subscriber-only mode"
     360msgstr ""
     361
     362#: admin/class-arcai-admin.php:494
     363msgid "Go further"
     364msgstr ""
     365
     366#: admin/class-arcai-admin.php:502
     367msgid "See Pro plans"
     368msgstr ""
     369
     370#: admin/class-arcai-admin.php:522
     371msgid "Your archive has answered over 20 questions."
     372msgstr ""
     373
     374#: admin/class-arcai-admin.php:523
     375msgid "If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it."
     376msgstr ""
     377
     378#: admin/class-arcai-admin.php:526
     379msgid "Leave a review"
     380msgstr ""
     381
     382#: admin/class-arcai-admin.php:527
     383msgid "No thanks"
     384msgstr ""
     385
     386#: admin/class-arcai-admin.php:538
     387#: admin/class-arcai-admin.php:568
    341388msgid "Permission denied."
    342389msgstr ""
    … …  
    354401msgstr ""
    355402
    356 #: includes/class-arcai-chat-controller.php:282
     403#: includes/class-arcai-chat-controller.php:284
    357404msgid "I couldn't find any articles matching that. Try rephrasing your question or broadening the time range."
    358405msgstr ""
    359406
    360 #: includes/class-arcai-chat-controller.php:398
     407#: includes/class-arcai-chat-controller.php:400
    361408msgid "The AI search is temporarily unavailable. Please try again in a moment."
    362409msgstr ""
    363410
    364 #: includes/class-arcai-frontend.php:48
     411#: includes/class-arcai-frontend.php:49
    365412msgid "Something went wrong. Please try again."
    366413msgstr ""
    367414
    368 #: includes/class-arcai-frontend.php:49
     415#: includes/class-arcai-frontend.php:50
    369416msgid "This conversation has reached its limit — refresh to start a new one."
    370417msgstr ""
    371418
    372 #: includes/class-arcai-frontend.php:79
     419#: includes/class-arcai-frontend.php:80
    373420msgid "Archivist AI: add your API key in the plugin settings to enable the chat."
    374421msgstr ""
    375422
    376423#. translators: %s: login URL
    377 #: includes/class-arcai-frontend.php:85
     424#: includes/class-arcai-frontend.php:86
    378425#, php-format
    379426msgid "Please <a href=\"%s\">log in</a> to use the archive search."
    … …  
    397444msgstr ""
    398445
    399 #: includes/class-arcai-settings.php:23
     446#: includes/class-arcai-settings.php:25
    400447msgid "Hi! Ask me anything about our articles."
    401448msgstr ""
    402449
    403 #: includes/class-arcai-settings.php:33
     450#: includes/class-arcai-settings.php:35
    404451msgid "Theme font (matches your site)"
    405452msgstr ""
    406453
    407 #: includes/class-arcai-settings.php:34
     454#: includes/class-arcai-settings.php:36
    408455msgid "Serif"
    409456msgstr ""
    410457
    411 #: includes/class-arcai-settings.php:35
     458#: includes/class-arcai-settings.php:37
    412459msgid "Sans-serif"
    413460msgstr ""
    414461
    415 #: includes/class-arcai-settings.php:36
     462#: includes/class-arcai-settings.php:38
    416463msgid "Monospace"
    417464msgstr ""
    418465
    419 #: includes/class-arcai-settings.php:45
     466#: includes/class-arcai-settings.php:47
    420467msgid "Square"
    421468msgstr ""
    422469
    423 #: includes/class-arcai-settings.php:46
     470#: includes/class-arcai-settings.php:48
    424471msgid "Soft"
    425472msgstr ""
    426473
    427 #: includes/class-arcai-settings.php:47
     474#: includes/class-arcai-settings.php:49
    428475msgid "Rounded"
    429476msgstr ""
  • archivist-ai/tags/0.7.0/readme.txt

    r3748265 r3748372  
    1 === Archivist AI ===
     1=== Archivist AI – AI Search & Chatbot for Your Articles ===
    22Contributors: archivistai
    3 Tags: ai, search, chat, archive, semantic search
     3Tags: ai search, chatbot, ai chatbot, semantic search, site search
    44Requires at least: 6.0
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.6.5
     7Stable tag: 0.7.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.
     11AI search and chatbot for your articles. Readers ask questions and get answers from your own posts, with sources cited. No login required.
    1212
    1313== Description ==
    1414
    15 Archivist AI turns your WordPress article archive into a conversational search engine. A floating chat bubble lets visitors ask natural-language questions — "What's been written about food retail trends since January?" — and get AI answers grounded in your own published articles, with links back to the sources.
     15Archivist AI adds an **AI search chatbot** to your WordPress site that answers readers' questions using only your own published articles. Readers ask in plain language — "What's been written about food retail trends since January?" — and get a short answer with numbered citations and links back to the source articles.
     16
     17It's built for **publishers, magazines, news sites, trade publications and content-heavy blogs**: years of articles become searchable by meaning, not just keywords. No hallucinated facts — if your archive doesn't cover a question, the chatbot says so.
    1618
    1719**For your readers:**
    … …  
    2931* You pay OpenAI directly at list price — no markup, no middleman
    3032* Only published, public posts are ever indexed
     33* Works with posts, pages and custom post types
     34* Floating chat bubble, or place the chat inline with a block or the `[archivist_ai]` shortcode
     35* Date-aware search: "last month", "in 2024" and "since January" become real date filters
     36* Answers stream in word by word
    3137
    32 The free version indexes your entire archive, shows full cost/usage reporting, and has no caps. Pro adds visitor-question analytics (what readers ask, and which questions your archive could not answer), smart answer caching, and subscriber-only mode.
     38= Free and Pro =
     39
     40**The free version is complete:** it indexes your entire archive with no limit on the number of articles, includes the full cost and usage dashboard, the daily spending cap, rate limiting, and all placements.
     41
     42**Pro adds** features for publishers who want more:
     43
     44* **Reader questions report** — the most-asked questions, and the ones your archive could not answer (ideas for what to write next), with CSV export
     45* **Custom fields and taxonomies in search** — make ACF fields, custom fields, categories and tags searchable, e.g. a product's price or an event's venue and date
     46* **Answer instructions** — your own tone, language and house rules for every answer
     47* **Full styling** — background color, font and corner style
     48* **Answer caching** and **subscriber-only mode**
    3349
    3450== External services ==
    … …  
    50661. Upload the plugin and activate it.
    51672. Go to Archivist AI in the admin menu and paste your OpenAI API key.
    52 3. Choose which post types to index and click "Estimate cost & index all posts".
     683. Choose which post types to index and click "Estimate cost & index".
    53694. The chat bubble appears on your site once indexing completes.
    5470
    5571== Frequently Asked Questions ==
     72
     73= Is there a limit on how many articles the free version indexes? =
     74
     75No. The free version indexes your whole archive. Pro adds extra features (reader-questions report, custom fields, answer instructions, styling); it does not unlock more articles.
    5676
    5777= Do my visitors need an account? =
    … …  
    7999
    80100== Changelog ==
     101
     102= 0.7.0 =
     103* New in Pro: custom fields, ACF fields and taxonomies can be added to search, per content type.
     104* New in Pro: answer instructions — set the tone, language and house rules for every answer.
     105* New: a developer filter, `arcai_post_index_text`, to add your own data to a post's searchable text.
     106* New: a one-time, dismissible request for a review after the chat has answered 20 questions.
     107* Readme: clearer description of the free and Pro versions.
    81108
    82109= 0.6.5 =
  • archivist-ai/trunk/admin/class-arcai-admin.php

    r3748265 r3748372  
    1616                add_action( 'admin_init', array( $this, 'register_settings' ) );
    1717                add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) );
     18                add_action( 'admin_post_arcai_review_prompt', array( $this, 'handle_review_prompt' ) );
    1819                add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
    1920                add_action( 'wp_ajax_arcai_estimate_index', array( $this, 'ajax_estimate' ) );
    … …  
    191192                        'tone'  => $state['indexed_posts'] ? 'ok' : 'off',
    192193                );
     194
     195                $show_pro_hints = true;
    193196                ?>
    194197                <div class="wrap arcai-wrap">
    … …  
    197200                        <div class="arcai-columns">
    198201                        <div class="arcai-main">
     202
     203                        <?php $this->render_review_prompt(); ?>
    199204
    200205                        <form method="post" action="options.php" class="arcai-settings">
    … …  
    244249                                                        </td>
    245250                                                </tr>
     251                                                <?php if ( $show_pro_hints ) : ?>
     252                                                        <?php $this->render_pro_hint_row( __( 'Custom fields', 'archivist-ai' ), __( 'Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date.', 'archivist-ai' ) ); ?>
     253                                                <?php endif; ?>
    246254                                        </table>
     255                                        <?php
     256                                        ?>
    247257                                </section>
    248258
    … …  
    270280                                                        </td>
    271281                                                </tr>
    272                                                 <tr>
    273                                                         <th scope="row"><label for="arcai-chat-bg"><?php esc_html_e( 'Background color', 'archivist-ai' ); ?></label></th>
    274                                                         <td>
    275                                                                 <input type="color" id="arcai-chat-bg" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_bg]" value="<?php echo esc_attr( $settings['chat_bg'] ); ?>" />
    276                                                                 <p class="description"><?php esc_html_e( 'Text and lines switch to light automatically on a dark background.', 'archivist-ai' ); ?></p>
    277                                                         </td>
    278                                                 </tr>
    279                                                 <tr>
    280                                                         <th scope="row"><label for="arcai-chat-font"><?php esc_html_e( 'Font', 'archivist-ai' ); ?></label></th>
    281                                                         <td>
    282                                                                 <select id="arcai-chat-font" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_font]">
    283                                                                         <?php foreach ( Arcai_Settings::fonts() as $key => $label ) : ?>
    284                                                                                 <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $settings['chat_font'], $key ); ?>><?php echo esc_html( $label ); ?></option>
    285                                                                         <?php endforeach; ?>
    286                                                                 </select>
    287                                                                 <p class="description"><?php esc_html_e( 'For questions and answers. Small labels keep the monospace style.', 'archivist-ai' ); ?></p>
    288                                                         </td>
    289                                                 </tr>
    290                                                 <tr>
    291                                                         <th scope="row"><?php esc_html_e( 'Corners', 'archivist-ai' ); ?></th>
    292                                                         <td>
    293                                                                 <fieldset class="arcai-segmented">
    294                                                                         <legend class="screen-reader-text"><?php esc_html_e( 'Corners', 'archivist-ai' ); ?></legend>
    295                                                                         <?php foreach ( Arcai_Settings::corners() as $key => $label ) : ?>
    296                                                                                 <label>
    297                                                                                         <input type="radio" name="<?php echo esc_attr( Arcai_Settings::OPTION ); ?>[chat_corners]" value="<?php echo esc_attr( $key ); ?>" <?php checked( $settings['chat_corners'], $key ); ?> />
    298                                                                                         <span class="arcai-corner-<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $label ); ?></span>
    299                                                                                 </label>
    300                                                                         <?php endforeach; ?>
    301                                                                 </fieldset>
    302                                                         </td>
    303                                                 </tr>
     282                                                <?php
     283                                                ?>
    304284                                                <tr>
    305285                                                        <th scope="row"><label for="arcai-greeting"><?php esc_html_e( 'Greeting message', 'archivist-ai' ); ?></label></th>
    … …  
    308288                                                <?php
    309289                                                ?>
     290                                                <?php if ( $show_pro_hints ) : ?>
     291                                                        <?php $this->render_pro_hint_row( __( 'Your style', 'archivist-ai' ), __( 'Background color, font and corner style, plus your own answer instructions: tone, language and house rules.', 'archivist-ai' ) ); ?>
     292                                                <?php endif; ?>
    310293                                        </table>
    311294                                        <?php $this->render_chat_preview( $settings ); ?>
    … …  
    428411                                        <p class="description"><?php esc_html_e( 'Computed from OpenAI list prices for the tokens each call used.', 'archivist-ai' ); ?></p>
    429412                                </section>
     413
     414                                <?php if ( $show_pro_hints ) : ?>
     415                                        <?php $this->render_pro_card(); ?>
     416                                <?php endif; ?>
    430417
    431418                        </div>
    … …  
    474461        }
    475462
     463        /**
     464         * A settings-table row pointing to a Pro feature.
     465         */
     466        private function render_pro_hint_row( $label, $text ) {
     467                ?>
     468                <tr class="arcai-pro-hint">
     469                        <th scope="row"><?php echo esc_html( $label ); ?></th>
     470                        <td>
     471                                <span class="arcai-pro-badge">Pro</span>
     472                                <?php echo esc_html( $text ); ?>
     473                                <a href="<?php echo esc_url( arcai_fs()->get_upgrade_url() ); ?>"><?php esc_html_e( 'See Pro', 'archivist-ai' ); ?></a>
     474                        </td>
     475                </tr>
     476                <?php
     477        }
     478
     479        /**
     480         * Sidebar summary of what Pro adds.
     481         */
     482        private function render_pro_card() {
     483                $features = array(
     484                        __( 'Reader questions report: what people ask, and what your archive could not answer', 'archivist-ai' ),
     485                        __( 'Custom fields, ACF fields and taxonomies in search', 'archivist-ai' ),
     486                        __( 'Your own answer instructions: tone, language, house rules', 'archivist-ai' ),
     487                        __( 'Full styling: background, font, corners', 'archivist-ai' ),
     488                        __( 'Answer caching and subscriber-only mode', 'archivist-ai' ),
     489                );
     490                ?>
     491                <section class="arcai-card arcai-pro-card">
     492                        <header class="arcai-card-head">
     493                                <p class="arcai-kicker">Pro</p>
     494                                <h2><?php esc_html_e( 'Go further', 'archivist-ai' ); ?></h2>
     495                        </header>
     496                        <ul>
     497                                <?php foreach ( $features as $feature ) : ?>
     498                                        <li><?php echo esc_html( $feature ); ?></li>
     499                                <?php endforeach; ?>
     500                        </ul>
     501                        <p class="arcai-actions">
     502                                <a class="button button-primary" href="<?php echo esc_url( arcai_fs()->get_upgrade_url() ); ?>"><?php esc_html_e( 'See Pro plans', 'archivist-ai' ); ?></a>
     503                        </p>
     504                </section>
     505                <?php
     506        }
     507
     508        /**
     509         * One-time request for a wordpress.org review, shown on this screen only
     510         * once the chat has answered enough questions to judge it.
     511         */
     512        private function render_review_prompt() {
     513                if ( 'done' === get_option( 'arcai_review_prompt' ) || Arcai_Usage::event_count( 'chat_answer' ) < 20 ) {
     514                        return;
     515                }
     516                $url = function ( $choice ) {
     517                        return wp_nonce_url( admin_url( 'admin-post.php?action=arcai_review_prompt&choice=' . $choice ), 'arcai_review_prompt' );
     518                };
     519                ?>
     520                <section class="arcai-card arcai-review">
     521                        <p>
     522                                <strong><?php esc_html_e( 'Your archive has answered over 20 questions.', 'archivist-ai' ); ?></strong>
     523                                <?php esc_html_e( 'If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it.', 'archivist-ai' ); ?>
     524                        </p>
     525                        <p class="arcai-actions">
     526                                <a class="button button-primary" href="<?php echo esc_url( $url( 'review' ) ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Leave a review', 'archivist-ai' ); ?></a>
     527                                <a class="button" href="<?php echo esc_url( $url( 'dismiss' ) ); ?>"><?php esc_html_e( 'No thanks', 'archivist-ai' ); ?></a>
     528                        </p>
     529                </section>
     530                <?php
     531        }
     532
     533        /**
     534         * Either choice hides the review prompt for good.
     535         */
     536        public function handle_review_prompt() {
     537                if ( ! current_user_can( 'manage_options' ) ) {
     538                        wp_die( esc_html__( 'Permission denied.', 'archivist-ai' ) );
     539                }
     540                check_admin_referer( 'arcai_review_prompt' );
     541                update_option( 'arcai_review_prompt', 'done', false );
     542
     543                $choice = isset( $_GET['choice'] ) ? sanitize_key( wp_unslash( $_GET['choice'] ) ) : '';
     544                if ( 'review' === $choice ) {
     545                        wp_redirect( 'https://wordpress.org/support/plugin/archivist-ai/reviews/#new-post' ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- fixed wordpress.org URL.
     546                        exit;
     547                }
     548                wp_safe_redirect( admin_url( 'admin.php?page=archivist-ai' ) );
     549                exit;
     550        }
     551
     552        /**
     553         * Background, font and corner rows (Pro appearance settings).
     554         */
     555
     556        /**
     557         * Custom answer instructions row (Pro).
     558         */
     559
     560        /**
     561         * Per post type: which custom fields and taxonomies to add to the indexed
     562         * text (Pro field mapping).
     563         */
     564
    476565
    477566        private function verify_ajax() {
  • archivist-ai/trunk/archivist-ai.php

    r3748265 r3748372  
    11<?php
    22/**
    3  * Plugin Name:       Archivist AI
     3 * Plugin Name:       Archivist AI – AI Search & Chatbot for Your Articles
    44 * Plugin URI:        https://archivist-ai.com
    55 * Description:       AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.
    6  * Version:           0.6.5
     6 * Version:           0.7.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
    … …  
    1818}
    1919
    20 define( 'ARCAI_VERSION', '0.6.5' );
     20define( 'ARCAI_VERSION', '0.7.0' );
    2121define( 'ARCAI_PLUGIN_FILE', __FILE__ );
    2222define( 'ARCAI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • archivist-ai/trunk/assets/css/admin.css

    r3724623 r3748372  
    399399}
    400400
     401/* --- Pro hints, Pro card, review prompt --- */
     402.arcai-pro-badge {
     403        display: inline-block;
     404        margin-right: 6px;
     405        padding: 1px 7px;
     406        border: 1px solid var(--arcai-lamp);
     407        font-family: var(--arcai-mono);
     408        font-size: 10px;
     409        letter-spacing: 0.12em;
     410        text-transform: uppercase;
     411        color: var(--arcai-lamp-dark);
     412        vertical-align: 1px;
     413}
     414
     415.arcai-pro-hint th {
     416        color: var(--arcai-muted);
     417        font-weight: 400;
     418}
     419
     420.arcai-pro-hint td {
     421        color: var(--arcai-muted);
     422}
     423
     424.arcai-pro-hint a {
     425        color: var(--arcai-lamp-dark);
     426        white-space: nowrap;
     427}
     428
     429.arcai-pro-card {
     430        background:
     431                radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232, 80, 42, 0.08), transparent 70%),
     432                var(--arcai-card);
     433        border-color: rgba(232, 80, 42, 0.35);
     434}
     435
     436.arcai-pro-card ul {
     437        margin: 14px 0 6px;
     438}
     439
     440.arcai-pro-card li {
     441        position: relative;
     442        margin: 0 0 8px;
     443        padding-left: 18px;
     444        line-height: 1.45;
     445}
     446
     447.arcai-pro-card li::before {
     448        content: "✓";
     449        position: absolute;
     450        left: 0;
     451        color: var(--arcai-lamp);
     452}
     453
     454.arcai-review {
     455        border-left: 3px solid var(--arcai-lamp);
     456}
     457
     458.arcai-review p:first-child {
     459        margin-top: 0;
     460}
     461
     462.arcai-review .arcai-actions {
     463        margin-bottom: 0;
     464}
     465
     466/* --- Field mapping (Pro) --- */
     467.arcai-fields {
     468        margin-top: 8px;
     469        padding-top: 16px;
     470        border-top: 1px solid var(--arcai-line);
     471}
     472
     473.arcai-field-group {
     474        margin: 14px 0 0;
     475        padding: 12px 16px 6px;
     476        border: 1px solid var(--arcai-line);
     477        background: #fff;
     478}
     479
     480.arcai-field-group legend {
     481        padding: 0 6px;
     482        font-weight: 600;
     483}
     484
     485.arcai-field-group .arcai-checks + .arcai-checks {
     486        margin-top: 8px;
     487        padding-top: 8px;
     488        border-top: 1px dashed var(--arcai-line);
     489}
     490
     491.arcai-checks-mono label {
     492        font-family: var(--arcai-mono);
     493        font-size: 12px;
     494}
     495
    401496/* --- Buttons --- */
    402497.arcai-wrap .button {
  • archivist-ai/trunk/assets/js/admin.js

    r3724623 r3748372  
    124124                        return;
    125125                }
    126                 var accent = $( '#arcai-bubble-color' ).val();
    127                 var bg = $( '#arcai-chat-bg' ).val();
     126                // Fields missing from the page keep the chat's default look.
     127                var accent = $( '#arcai-bubble-color' ).val() || '#e8502a';
     128                var bg = $( '#arcai-chat-bg' ).val() || '#f6f1e4';
    128129                var lightBg = isLight( bg );
    129130                preview.style.setProperty( '--arcai-accent', accent );
    … …  
    132133                preview.style.setProperty( '--arcai-text', lightBg ? '#221d14' : '#f6f1e4' );
    133134                preview.style.setProperty( '--arcai-card', lightBg ? 'rgba(255, 255, 255, 0.55)' : 'rgba(255, 255, 255, 0.06)' );
    134                 preview.setAttribute( 'data-arcai-font', $( '#arcai-chat-font' ).val() );
     135                preview.setAttribute( 'data-arcai-font', $( '#arcai-chat-font' ).val() || 'theme' );
    135136                preview.setAttribute( 'data-arcai-corners', $( 'input[name$="[chat_corners]"]:checked' ).val() || 'square' );
    136137                $( '#arcai-preview-greeting' ).text( $( '#arcai-greeting' ).val() );
  • archivist-ai/trunk/includes/class-arcai-chat-controller.php

    r3724460 r3748372  
    251251                        . 'Cite sources inline with their bracket numbers, e.g. [1], [2]. '
    252252                        . 'If the excerpts do not contain the answer, say so honestly and suggest a different question. '
    253                         . 'Never invent facts, articles, or dates. Keep answers under 200 words. '
    254                         . "Article excerpts:\n\n" . $context;
     253                        . 'Never invent facts, articles, or dates. Keep answers under 200 words. ';
     254
     255
     256                $system .= "Article excerpts:\n\n" . $context;
    255257
    256258                $messages   = array( array( 'role' => 'system', 'content' => $system ) );
  • archivist-ai/trunk/includes/class-arcai-chunker.php

    r3724460 r3748372  
    4343        public static function plain_text( $post ) {
    4444                $text = $post->post_title . "\n" . $post->post_excerpt . "\n" . $post->post_content;
     45
     46                /**
     47                 * Filters the raw text of a post before it is cleaned up, chunked and
     48                 * embedded. Use it to make extra data searchable, e.g. custom fields
     49                 * or taxonomy terms ("Price: 49 EUR", "Venue: City Hall").
     50                 *
     51                 * @param string  $text Title, excerpt and content.
     52                 * @param WP_Post $post The post being indexed.
     53                 */
     54                $text = (string) apply_filters( 'arcai_post_index_text', $text, $post );
     55
    4556                $text = strip_shortcodes( $text );
    4657                $text = excerpt_remove_blocks( $text );
  • archivist-ai/trunk/includes/class-arcai-frontend.php

    r3724623 r3748372  
    2929                wp_register_script( 'arcai-chat', ARCAI_PLUGIN_URL . 'assets/js/chat.js', array(), ARCAI_VERSION, true );
    3030
     31                $look = Arcai_Settings::appearance();
    3132                wp_localize_script(
    3233                        'arcai-chat',
    … …  
    3738                                'nonce'          => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '',
    3839                                'greeting'       => Arcai_Settings::get( 'greeting' ),
    39                                 'color'          => Arcai_Settings::get( 'bubble_color' ),
    40                                 'background'     => Arcai_Settings::get( 'chat_bg' ),
    41                                 'font'           => Arcai_Settings::get( 'chat_font' ),
    42                                 'corners'        => Arcai_Settings::get( 'chat_corners' ),
     40                                'color'          => $look['color'],
     41                                'background'     => $look['background'],
     42                                'font'           => $look['font'],
     43                                'corners'        => $look['corners'],
    4344                                'maxTurns'       => 10,
    4445                                'i18n'           => array(
  • archivist-ai/trunk/includes/class-arcai-settings.php

    r3724623 r3748372  
    1010        public static function defaults() {
    1111                return array(
    12                         'api_key'         => '',
    13                         'chat_model'      => 'gpt-4o-mini',
    14                         'embedding_model' => 'text-embedding-3-small',
    15                         'post_types'      => array( 'post' ),
    16                         'daily_cap'       => 5.0,
    17                         'rate_limit'      => 20,
    18                         'bubble_enabled'  => 1,
    19                         'bubble_color'    => '#e8502a',
    20                         'chat_bg'         => '#f6f1e4',
    21                         'chat_font'       => 'theme',
    22                         'chat_corners'    => 'square',
    23                         'greeting'        => __( 'Hi! Ask me anything about our articles.', 'archivist-ai' ),
    24                         'require_login'   => 0,
     12                        'api_key'             => '',
     13                        'chat_model'          => 'gpt-4o-mini',
     14                        'embedding_model'     => 'text-embedding-3-small',
     15                        'post_types'          => array( 'post' ),
     16                        'daily_cap'           => 5.0,
     17                        'rate_limit'          => 20,
     18                        'bubble_enabled'      => 1,
     19                        'bubble_color'        => '#e8502a',
     20                        'chat_bg'             => '#f6f1e4',
     21                        'chat_font'           => 'theme',
     22                        'chat_corners'        => 'square',
     23                        'answer_instructions' => '',
     24                        'index_fields'        => array(),
     25                        'greeting'            => __( 'Hi! Ask me anything about our articles.', 'archivist-ai' ),
     26                        'require_login'       => 0,
    2527                );
    2628        }
    … …  
    4749                        'rounded' => __( 'Rounded', 'archivist-ai' ),
    4850                );
     51        }
     52
     53        /**
     54         * The chat's look as the frontend should render it.
     55         *
     56         * @return array { color, background, font, corners }
     57         */
     58        public static function appearance() {
     59                $defaults = self::defaults();
     60                $look     = array(
     61                        'color'      => self::get( 'bubble_color' ),
     62                        'background' => $defaults['chat_bg'],
     63                        'font'       => $defaults['chat_font'],
     64                        'corners'    => $defaults['chat_corners'],
     65                );
     66                return $look;
    4967        }
    5068
    … …  
    87105                        $clean['bubble_color'] = $defaults['bubble_color'];
    88106                }
    89                 $clean['chat_bg'] = isset( $input['chat_bg'] ) ? sanitize_hex_color( $input['chat_bg'] ) : $defaults['chat_bg'];
    90                 if ( ! $clean['chat_bg'] ) {
    91                         $clean['chat_bg'] = $defaults['chat_bg'];
    92                 }
    93                 $clean['chat_font']    = isset( $input['chat_font'] ) && array_key_exists( $input['chat_font'], self::fonts() ) ? $input['chat_font'] : $defaults['chat_font'];
    94                 $clean['chat_corners'] = isset( $input['chat_corners'] ) && array_key_exists( $input['chat_corners'], self::corners() ) ? $input['chat_corners'] : $defaults['chat_corners'];
     107                $clean['chat_bg']             = $defaults['chat_bg'];
     108                $clean['chat_font']           = $defaults['chat_font'];
     109                $clean['chat_corners']        = $defaults['chat_corners'];
     110                $clean['answer_instructions'] = $defaults['answer_instructions'];
     111                $clean['index_fields']        = $defaults['index_fields'];
    95112                $clean['greeting'] = isset( $input['greeting'] ) ? sanitize_text_field( $input['greeting'] ) : $defaults['greeting'];
    96113
    … …  
    98115                $clean['require_login'] = 0;
    99116
     117
    100118                return $clean;
    101119        }
     120
     121        /**
     122         * Pro settings: full appearance, custom answer instructions and the custom
     123         * field / taxonomy mapping used when indexing.
     124         */
    102125}
  • archivist-ai/trunk/includes/class-arcai-usage.php

    r3724460 r3748372  
    5050        }
    5151
     52        /**
     53         * All-time number of logged events of one type, e.g. answers given.
     54         */
     55        public static function event_count( $event_type ) {
     56                global $wpdb;
     57                return (int) $wpdb->get_var(
     58                        $wpdb->prepare(
     59                                "SELECT COUNT(*) FROM {$wpdb->prefix}arcai_usage WHERE event_type = %s",
     60                                $event_type
     61                        )
     62                );
     63        }
     64
    5265        public static function over_daily_cap() {
    5366                $cap = (float) Arcai_Settings::get( 'daily_cap' );
  • archivist-ai/trunk/languages/archivist-ai.pot

    r3748265 r3748372  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Archivist AI 0.6.5\n"
     5"Project-Id-Version: Archivist AI – AI Search & Chatbot for Your Articles 0.7.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/archivist-ai\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-15T11:12:27+00:00\n"
     12"POT-Creation-Date: 2026-10-15T11:59:00+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
    … …  
    1717#. Plugin Name of the plugin
    1818#: archivist-ai.php
    19 #: admin/class-arcai-admin.php:27
    20 #: admin/class-arcai-admin.php:28
    21 #: admin/class-arcai-admin.php:67
    22 #: admin/class-arcai-admin.php:195
    23 msgid "Archivist AI"
     19msgid "Archivist AI – AI Search & Chatbot for Your Articles"
    2420msgstr ""
    2521
    … …  
    3935msgstr ""
    4036
    41 #: admin/class-arcai-admin.php:55
     37#: admin/class-arcai-admin.php:28
     38#: admin/class-arcai-admin.php:29
     39#: admin/class-arcai-admin.php:68
     40#: admin/class-arcai-admin.php:198
     41msgid "Archivist AI"
     42msgstr ""
     43
     44#: admin/class-arcai-admin.php:56
    4245msgid "This site uses Archivist AI to answer questions about our published articles in a chat."
    4346msgstr ""
    4447
    4548#. translators: %s: link to OpenAI's privacy policy
    46 #: admin/class-arcai-admin.php:58
     49#: admin/class-arcai-admin.php:59
    4750#, php-format
    4851msgid "When you use the chat, the question you type and the recent messages of that conversation are sent to OpenAI, together with excerpts from our published articles, to generate an answer. We do not send your name, email address, IP address or account details to OpenAI. OpenAI processes this data under its own terms: %s."
    4952msgstr ""
    5053
    51 #: admin/class-arcai-admin.php:59
     54#: admin/class-arcai-admin.php:60
    5255msgid "OpenAI Privacy Policy"
    5356msgstr ""
    5457
    55 #: admin/class-arcai-admin.php:61
     58#: admin/class-arcai-admin.php:62
    5659msgid "To prevent abuse, we keep a one-way hash of your IP address for one hour to limit how many questions can be asked. Your conversation is kept only in your own browser for the current tab and is deleted when you close it."
    5760msgstr ""
    5861
    59 #: admin/class-arcai-admin.php:62
     62#: admin/class-arcai-admin.php:63
    6063msgid "Please do not enter personal or sensitive information in the chat."
    6164msgstr ""
    6265
    6366#. translators: 1: number of posts, 2: token count, 3: estimated cost in USD.
    64 #: admin/class-arcai-admin.php:95
     67#: admin/class-arcai-admin.php:96
    6568#, php-format
    6669msgid "Indexing %1$s posts will use roughly %2$s tokens. Estimated cost: %3$s. Continue?"
    6770msgstr ""
    6871
    69 #: admin/class-arcai-admin.php:96
     72#: admin/class-arcai-admin.php:97
    7073msgid "Request failed. Please try again."
    7174msgstr ""
    7275
    73 #: admin/class-arcai-admin.php:114
     76#: admin/class-arcai-admin.php:115
    7477msgid "AI search for your archive"
    7578msgstr ""
    7679
    77 #: admin/class-arcai-admin.php:151
     80#: admin/class-arcai-admin.php:152
    7881msgid "Indexing"
    7982msgstr ""
    8083
    81 #: admin/class-arcai-admin.php:152
     84#: admin/class-arcai-admin.php:153
    8285msgid "Understanding questions"
    8386msgstr ""
    8487
    85 #: admin/class-arcai-admin.php:153
     88#: admin/class-arcai-admin.php:154
    8689msgid "Searching the archive"
    8790msgstr ""
    8891
    89 #: admin/class-arcai-admin.php:154
     92#: admin/class-arcai-admin.php:155
    9093msgid "Writing answers"
    9194msgstr ""
    9295
    93 #: admin/class-arcai-admin.php:169
     96#: admin/class-arcai-admin.php:170
    9497msgid "Needs an API key"
    9598msgstr ""
    9699
    97 #: admin/class-arcai-admin.php:174
     100#: admin/class-arcai-admin.php:175
    98101msgid "Paused — daily cap reached"
    99102msgstr ""
    100103
    101 #: admin/class-arcai-admin.php:179
     104#: admin/class-arcai-admin.php:180
    102105msgid "Bubble off"
    103106msgstr ""
    104107
    105 #: admin/class-arcai-admin.php:184
     108#: admin/class-arcai-admin.php:185
    106109msgid "Chat live"
    107110msgstr ""
    108111
    109112#. translators: %s: number of indexed posts
    110 #: admin/class-arcai-admin.php:190
     113#: admin/class-arcai-admin.php:191
    111114#, php-format
    112115msgid "%s post indexed"
    … …  
    115118msgstr[1] ""
    116119
    117 #: admin/class-arcai-admin.php:206
     120#: admin/class-arcai-admin.php:211
    118121msgid "Connection"
    119122msgstr ""
    120123
    121 #: admin/class-arcai-admin.php:210
     124#: admin/class-arcai-admin.php:215
    122125msgid "OpenAI API key"
    123126msgstr ""
    124127
    125 #: admin/class-arcai-admin.php:213
     128#: admin/class-arcai-admin.php:218
    126129msgid "One key covers both indexing (embeddings) and answers. You pay OpenAI directly at list price."
    127130msgstr ""
    128131
    129 #: admin/class-arcai-admin.php:217
     132#: admin/class-arcai-admin.php:222
    130133msgid "Answer model"
    131134msgstr ""
    132135
    133 #: admin/class-arcai-admin.php:221
     136#: admin/class-arcai-admin.php:226
    134137msgid "Embedding model"
    135138msgstr ""
    136139
    137 #: admin/class-arcai-admin.php:230
     140#: admin/class-arcai-admin.php:235
    138141msgid "What to index"
    139142msgstr ""
    140143
    141 #: admin/class-arcai-admin.php:234
     144#: admin/class-arcai-admin.php:239
    142145msgid "Post types"
    143146msgstr ""
    144147
    145 #: admin/class-arcai-admin.php:243
     148#: admin/class-arcai-admin.php:248
    146149msgid "Only published, public, non-password-protected content is ever indexed."
    147150msgstr ""
    148151
    149152#: admin/class-arcai-admin.php:252
     153msgid "Custom fields"
     154msgstr ""
     155
     156#: admin/class-arcai-admin.php:252
     157msgid "Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date."
     158msgstr ""
     159
     160#: admin/class-arcai-admin.php:262
    150161msgid "Chat widget"
    151162msgstr ""
    152163
    153 #: admin/class-arcai-admin.php:256
     164#: admin/class-arcai-admin.php:266
    154165msgid "Chat bubble"
    155166msgstr ""
    156167
    157 #: admin/class-arcai-admin.php:260
     168#: admin/class-arcai-admin.php:270
    158169msgid "Show the floating chat bubble on the site"
    159170msgstr ""
    160171
    161 #: admin/class-arcai-admin.php:262
     172#: admin/class-arcai-admin.php:272
    162173msgid "Or place the chat inline with the Archivist AI block or the [archivist_ai] shortcode."
    163174msgstr ""
    164175
    165 #: admin/class-arcai-admin.php:266
     176#: admin/class-arcai-admin.php:276
    166177msgid "Accent color"
    167178msgstr ""
    168179
    169 #: admin/class-arcai-admin.php:269
     180#: admin/class-arcai-admin.php:279
    170181msgid "Used for the bubble, the send button and citation numbers."
    171182msgstr ""
    172183
    173 #: admin/class-arcai-admin.php:273
    174 msgid "Background color"
    175 msgstr ""
    176 
    177 #: admin/class-arcai-admin.php:276
    178 msgid "Text and lines switch to light automatically on a dark background."
    179 msgstr ""
    180 
    181 #: admin/class-arcai-admin.php:280
    182 msgid "Font"
    183 msgstr ""
    184 
    185 #: admin/class-arcai-admin.php:287
    186 msgid "For questions and answers. Small labels keep the monospace style."
     184#: admin/class-arcai-admin.php:285
     185msgid "Greeting message"
    187186msgstr ""
    188187
    189188#: admin/class-arcai-admin.php:291
    190 #: admin/class-arcai-admin.php:294
    191 msgid "Corners"
    192 msgstr ""
    193 
    194 #: admin/class-arcai-admin.php:305
    195 msgid "Greeting message"
    196 msgstr ""
    197 
    198 #: admin/class-arcai-admin.php:317
     189msgid "Your style"
     190msgstr ""
     191
     192#: admin/class-arcai-admin.php:291
     193msgid "Background color, font and corner style, plus your own answer instructions: tone, language and house rules."
     194msgstr ""
     195
     196#: admin/class-arcai-admin.php:300
    199197msgid "Limits & spending"
    200198msgstr ""
    201199
     200#: admin/class-arcai-admin.php:304
     201msgid "Daily spending cap"
     202msgstr ""
     203
     204#: admin/class-arcai-admin.php:307
     205msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."
     206msgstr ""
     207
     208#: admin/class-arcai-admin.php:311
     209msgid "Visitor rate limit"
     210msgstr ""
     211
     212#: admin/class-arcai-admin.php:314
     213msgid "chat turns per hour, per visitor IP"
     214msgstr ""
     215
    202216#: admin/class-arcai-admin.php:321
    203 msgid "Daily spending cap"
    204 msgstr ""
    205 
    206 #: admin/class-arcai-admin.php:324
    207 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."
    208 msgstr ""
    209 
    210 #: admin/class-arcai-admin.php:328
    211 msgid "Visitor rate limit"
    212 msgstr ""
    213 
    214 #: admin/class-arcai-admin.php:331
    215 msgid "chat turns per hour, per visitor IP"
    216 msgstr ""
    217 
    218 #: admin/class-arcai-admin.php:338
    219217msgid "Changes apply to the chat as soon as you save."
    220218msgstr ""
    221219
    222 #: admin/class-arcai-admin.php:339
     220#: admin/class-arcai-admin.php:322
    223221msgid "Save settings"
    224222msgstr ""
    225223
    226 #: admin/class-arcai-admin.php:349
     224#: admin/class-arcai-admin.php:332
    227225msgid "Index"
    228226msgstr ""
    229227
    230 #: admin/class-arcai-admin.php:350
     228#: admin/class-arcai-admin.php:333
    231229msgid "Your archive"
    232230msgstr ""
    233231
    234 #: admin/class-arcai-admin.php:354
     232#: admin/class-arcai-admin.php:337
    235233msgid "posts searchable"
    236234msgstr ""
    237235
     236#: admin/class-arcai-admin.php:345
     237msgid "Estimate cost & index"
     238msgstr ""
     239
     240#: admin/class-arcai-admin.php:348
     241msgid "Cancel"
     242msgstr ""
     243
     244#: admin/class-arcai-admin.php:351
     245msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically."
     246msgstr ""
     247
     248#: admin/class-arcai-admin.php:356
     249msgid "Usage"
     250msgstr ""
     251
     252#: admin/class-arcai-admin.php:357
     253msgid "What it costs you"
     254msgstr ""
     255
    238256#: admin/class-arcai-admin.php:362
    239 msgid "Estimate cost & index"
    240 msgstr ""
    241 
    242 #: admin/class-arcai-admin.php:365
    243 msgid "Cancel"
    244 msgstr ""
    245 
    246 #: admin/class-arcai-admin.php:368
    247 msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically."
    248 msgstr ""
    249 
    250 #: admin/class-arcai-admin.php:373
    251 msgid "Usage"
    252 msgstr ""
    253 
    254 #: admin/class-arcai-admin.php:374
    255 msgid "What it costs you"
    256 msgstr ""
    257 
    258 #: admin/class-arcai-admin.php:379
    259257msgid "Today"
    260258msgstr ""
    261259
    262 #: admin/class-arcai-admin.php:383
     260#: admin/class-arcai-admin.php:366
    263261msgid "30 days"
    264262msgstr ""
    265263
    266 #: admin/class-arcai-admin.php:387
     264#: admin/class-arcai-admin.php:370
    267265msgid "Answers"
    268266msgstr ""
    269267
    270268#. translators: 1: amount spent today, 2: daily cap
    271 #: admin/class-arcai-admin.php:399
     269#: admin/class-arcai-admin.php:382
    272270#, php-format
    273271msgid "%1$s of your %2$s daily cap used"
    274272msgstr ""
    275273
    276 #: admin/class-arcai-admin.php:410
     274#: admin/class-arcai-admin.php:393
    277275msgid "Last 30 days"
    278276msgstr ""
    279277
     278#: admin/class-arcai-admin.php:394
     279msgid "Calls"
     280msgstr ""
     281
     282#: admin/class-arcai-admin.php:395
     283msgid "Cost"
     284msgstr ""
     285
     286#: admin/class-arcai-admin.php:399
     287msgid "No usage yet."
     288msgstr ""
     289
    280290#: admin/class-arcai-admin.php:411
    281 msgid "Calls"
    282 msgstr ""
    283 
    284 #: admin/class-arcai-admin.php:412
    285 msgid "Cost"
    286 msgstr ""
    287 
    288 #: admin/class-arcai-admin.php:416
    289 msgid "No usage yet."
    290 msgstr ""
    291 
    292 #: admin/class-arcai-admin.php:428
    293291msgid "Computed from OpenAI list prices for the tokens each call used."
    294292msgstr ""
    295293
    296 #: admin/class-arcai-admin.php:444
     294#: admin/class-arcai-admin.php:431
    297295msgid "Live preview"
    298296msgstr ""
    299297
    300 #: admin/class-arcai-admin.php:449
    301 #: includes/class-arcai-frontend.php:50
     298#: admin/class-arcai-admin.php:436
     299#: includes/class-arcai-frontend.php:51
    302300msgid "Archive search"
    303301msgstr ""
    304302
    305 #: admin/class-arcai-admin.php:454
     303#: admin/class-arcai-admin.php:441
    306304msgid "What have we written about food retail this year?"
    307305msgstr ""
    308306
    309 #: admin/class-arcai-admin.php:456
     307#: admin/class-arcai-admin.php:443
    310308msgid "Two themes stand out: discount chains gaining share"
    311309msgstr ""
    312310
    313 #: admin/class-arcai-admin.php:456
     311#: admin/class-arcai-admin.php:443
    314312msgid "and a push into private-label ranges"
    315313msgstr ""
    316314
    317 #: admin/class-arcai-admin.php:458
     315#: admin/class-arcai-admin.php:445
     316#: includes/class-arcai-frontend.php:48
     317msgid "Sources"
     318msgstr ""
     319
     320#: admin/class-arcai-admin.php:446
     321msgid "The discount grocers’ quiet takeover"
     322msgstr ""
     323
     324#: admin/class-arcai-admin.php:447
     325msgid "Why every chain wants its own brand"
     326msgstr ""
     327
     328#: admin/class-arcai-admin.php:452
     329#: includes/class-arcai-frontend.php:46
     330msgid "Ask about our articles…"
     331msgstr ""
     332
     333#: admin/class-arcai-admin.php:453
    318334#: includes/class-arcai-frontend.php:47
    319 msgid "Sources"
    320 msgstr ""
    321 
    322 #: admin/class-arcai-admin.php:459
    323 msgid "The discount grocers’ quiet takeover"
    324 msgstr ""
    325 
    326 #: admin/class-arcai-admin.php:460
    327 msgid "Why every chain wants its own brand"
    328 msgstr ""
    329 
    330 #: admin/class-arcai-admin.php:465
    331 #: includes/class-arcai-frontend.php:45
    332 msgid "Ask about our articles…"
    333 msgstr ""
    334 
    335 #: admin/class-arcai-admin.php:466
    336 #: includes/class-arcai-frontend.php:46
    337335msgid "Send"
    338336msgstr ""
    339337
    340 #: admin/class-arcai-admin.php:479
     338#: admin/class-arcai-admin.php:473
     339msgid "See Pro"
     340msgstr ""
     341
     342#: admin/class-arcai-admin.php:484
     343msgid "Reader questions report: what people ask, and what your archive could not answer"
     344msgstr ""
     345
     346#: admin/class-arcai-admin.php:485
     347msgid "Custom fields, ACF fields and taxonomies in search"
     348msgstr ""
     349
     350#: admin/class-arcai-admin.php:486
     351msgid "Your own answer instructions: tone, language, house rules"
     352msgstr ""
     353
     354#: admin/class-arcai-admin.php:487
     355msgid "Full styling: background, font, corners"
     356msgstr ""
     357
     358#: admin/class-arcai-admin.php:488
     359msgid "Answer caching and subscriber-only mode"
     360msgstr ""
     361
     362#: admin/class-arcai-admin.php:494
     363msgid "Go further"
     364msgstr ""
     365
     366#: admin/class-arcai-admin.php:502
     367msgid "See Pro plans"
     368msgstr ""
     369
     370#: admin/class-arcai-admin.php:522
     371msgid "Your archive has answered over 20 questions."
     372msgstr ""
     373
     374#: admin/class-arcai-admin.php:523
     375msgid "If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it."
     376msgstr ""
     377
     378#: admin/class-arcai-admin.php:526
     379msgid "Leave a review"
     380msgstr ""
     381
     382#: admin/class-arcai-admin.php:527
     383msgid "No thanks"
     384msgstr ""
     385
     386#: admin/class-arcai-admin.php:538
     387#: admin/class-arcai-admin.php:568
    341388msgid "Permission denied."
    342389msgstr ""
    … …  
    354401msgstr ""
    355402
    356 #: includes/class-arcai-chat-controller.php:282
     403#: includes/class-arcai-chat-controller.php:284
    357404msgid "I couldn't find any articles matching that. Try rephrasing your question or broadening the time range."
    358405msgstr ""
    359406
    360 #: includes/class-arcai-chat-controller.php:398
     407#: includes/class-arcai-chat-controller.php:400
    361408msgid "The AI search is temporarily unavailable. Please try again in a moment."
    362409msgstr ""
    363410
    364 #: includes/class-arcai-frontend.php:48
     411#: includes/class-arcai-frontend.php:49
    365412msgid "Something went wrong. Please try again."
    366413msgstr ""
    367414
    368 #: includes/class-arcai-frontend.php:49
     415#: includes/class-arcai-frontend.php:50
    369416msgid "This conversation has reached its limit — refresh to start a new one."
    370417msgstr ""
    371418
    372 #: includes/class-arcai-frontend.php:79
     419#: includes/class-arcai-frontend.php:80
    373420msgid "Archivist AI: add your API key in the plugin settings to enable the chat."
    374421msgstr ""
    375422
    376423#. translators: %s: login URL
    377 #: includes/class-arcai-frontend.php:85
     424#: includes/class-arcai-frontend.php:86
    378425#, php-format
    379426msgid "Please <a href=\"%s\">log in</a> to use the archive search."
    … …  
    397444msgstr ""
    398445
    399 #: includes/class-arcai-settings.php:23
     446#: includes/class-arcai-settings.php:25
    400447msgid "Hi! Ask me anything about our articles."
    401448msgstr ""
    402449
    403 #: includes/class-arcai-settings.php:33
     450#: includes/class-arcai-settings.php:35
    404451msgid "Theme font (matches your site)"
    405452msgstr ""
    406453
    407 #: includes/class-arcai-settings.php:34
     454#: includes/class-arcai-settings.php:36
    408455msgid "Serif"
    409456msgstr ""
    410457
    411 #: includes/class-arcai-settings.php:35
     458#: includes/class-arcai-settings.php:37
    412459msgid "Sans-serif"
    413460msgstr ""
    414461
    415 #: includes/class-arcai-settings.php:36
     462#: includes/class-arcai-settings.php:38
    416463msgid "Monospace"
    417464msgstr ""
    418465
    419 #: includes/class-arcai-settings.php:45
     466#: includes/class-arcai-settings.php:47
    420467msgid "Square"
    421468msgstr ""
    422469
    423 #: includes/class-arcai-settings.php:46
     470#: includes/class-arcai-settings.php:48
    424471msgid "Soft"
    425472msgstr ""
    426473
    427 #: includes/class-arcai-settings.php:47
     474#: includes/class-arcai-settings.php:49
    428475msgid "Rounded"
    429476msgstr ""
  • archivist-ai/trunk/readme.txt

    r3748265 r3748372  
    1 === Archivist AI ===
     1=== Archivist AI – AI Search & Chatbot for Your Articles ===
    22Contributors: archivistai
    3 Tags: ai, search, chat, archive, semantic search
     3Tags: ai search, chatbot, ai chatbot, semantic search, site search
    44Requires at least: 6.0
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.6.5
     7Stable tag: 0.7.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.
     11AI search and chatbot for your articles. Readers ask questions and get answers from your own posts, with sources cited. No login required.
    1212
    1313== Description ==
    1414
    15 Archivist AI turns your WordPress article archive into a conversational search engine. A floating chat bubble lets visitors ask natural-language questions — "What's been written about food retail trends since January?" — and get AI answers grounded in your own published articles, with links back to the sources.
     15Archivist AI adds an **AI search chatbot** to your WordPress site that answers readers' questions using only your own published articles. Readers ask in plain language — "What's been written about food retail trends since January?" — and get a short answer with numbered citations and links back to the source articles.
     16
     17It's built for **publishers, magazines, news sites, trade publications and content-heavy blogs**: years of articles become searchable by meaning, not just keywords. No hallucinated facts — if your archive doesn't cover a question, the chatbot says so.
    1618
    1719**For your readers:**
    … …  
    2931* You pay OpenAI directly at list price — no markup, no middleman
    3032* Only published, public posts are ever indexed
     33* Works with posts, pages and custom post types
     34* Floating chat bubble, or place the chat inline with a block or the `[archivist_ai]` shortcode
     35* Date-aware search: "last month", "in 2024" and "since January" become real date filters
     36* Answers stream in word by word
    3137
    32 The free version indexes your entire archive, shows full cost/usage reporting, and has no caps. Pro adds visitor-question analytics (what readers ask, and which questions your archive could not answer), smart answer caching, and subscriber-only mode.
     38= Free and Pro =
     39
     40**The free version is complete:** it indexes your entire archive with no limit on the number of articles, includes the full cost and usage dashboard, the daily spending cap, rate limiting, and all placements.
     41
     42**Pro adds** features for publishers who want more:
     43
     44* **Reader questions report** — the most-asked questions, and the ones your archive could not answer (ideas for what to write next), with CSV export
     45* **Custom fields and taxonomies in search** — make ACF fields, custom fields, categories and tags searchable, e.g. a product's price or an event's venue and date
     46* **Answer instructions** — your own tone, language and house rules for every answer
     47* **Full styling** — background color, font and corner style
     48* **Answer caching** and **subscriber-only mode**
    3349
    3450== External services ==
    … …  
    50661. Upload the plugin and activate it.
    51672. Go to Archivist AI in the admin menu and paste your OpenAI API key.
    52 3. Choose which post types to index and click "Estimate cost & index all posts".
     683. Choose which post types to index and click "Estimate cost & index".
    53694. The chat bubble appears on your site once indexing completes.
    5470
    5571== Frequently Asked Questions ==
     72
     73= Is there a limit on how many articles the free version indexes? =
     74
     75No. The free version indexes your whole archive. Pro adds extra features (reader-questions report, custom fields, answer instructions, styling); it does not unlock more articles.
    5676
    5777= Do my visitors need an account? =
    … …  
    7999
    80100== Changelog ==
     101
     102= 0.7.0 =
     103* New in Pro: custom fields, ACF fields and taxonomies can be added to search, per content type.
     104* New in Pro: answer instructions — set the tone, language and house rules for every answer.
     105* New: a developer filter, `arcai_post_index_text`, to add your own data to a post's searchable text.
     106* New: a one-time, dismissible request for a review after the chat has answered 20 questions.
     107* Readme: clearer description of the free and Pro versions.
    81108
    82109= 0.6.5 =
Note: See TracChangeset for help on using the changeset viewer.