Changeset 3748372
- Timestamp:
- 10/15/2026 11:59:49 AM (39 hours ago)
- Location:
- archivist-ai
- Files:
-
- 22 edited
- 1 copied
-
tags/0.7.0 (copied) (copied from archivist-ai/trunk )
-
tags/0.7.0/admin/class-arcai-admin.php (modified) (8 diffs)
-
tags/0.7.0/archivist-ai.php (modified) (2 diffs)
-
tags/0.7.0/assets/css/admin.css (modified) (1 diff)
-
tags/0.7.0/assets/js/admin.js (modified) (2 diffs)
-
tags/0.7.0/includes/class-arcai-chat-controller.php (modified) (1 diff)
-
tags/0.7.0/includes/class-arcai-chunker.php (modified) (1 diff)
-
tags/0.7.0/includes/class-arcai-frontend.php (modified) (2 diffs)
-
tags/0.7.0/includes/class-arcai-settings.php (modified) (4 diffs)
-
tags/0.7.0/includes/class-arcai-usage.php (modified) (1 diff)
-
tags/0.7.0/languages/archivist-ai.pot (modified) (7 diffs)
-
tags/0.7.0/readme.txt (modified) (4 diffs)
-
trunk/admin/class-arcai-admin.php (modified) (8 diffs)
-
trunk/archivist-ai.php (modified) (2 diffs)
-
trunk/assets/css/admin.css (modified) (1 diff)
-
trunk/assets/js/admin.js (modified) (2 diffs)
-
trunk/includes/class-arcai-chat-controller.php (modified) (1 diff)
-
trunk/includes/class-arcai-chunker.php (modified) (1 diff)
-
trunk/includes/class-arcai-frontend.php (modified) (2 diffs)
-
trunk/includes/class-arcai-settings.php (modified) (4 diffs)
-
trunk/includes/class-arcai-usage.php (modified) (1 diff)
-
trunk/languages/archivist-ai.pot (modified) (7 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
archivist-ai/tags/0.7.0/admin/class-arcai-admin.php
r3748265 r3748372 16 16 add_action( 'admin_init', array( $this, 'register_settings' ) ); 17 17 add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) ); 18 add_action( 'admin_post_arcai_review_prompt', array( $this, 'handle_review_prompt' ) ); 18 19 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); 19 20 add_action( 'wp_ajax_arcai_estimate_index', array( $this, 'ajax_estimate' ) ); … … 191 192 'tone' => $state['indexed_posts'] ? 'ok' : 'off', 192 193 ); 194 195 $show_pro_hints = true; 193 196 ?> 194 197 <div class="wrap arcai-wrap"> … … 197 200 <div class="arcai-columns"> 198 201 <div class="arcai-main"> 202 203 <?php $this->render_review_prompt(); ?> 199 204 200 205 <form method="post" action="options.php" class="arcai-settings"> … … 244 249 </td> 245 250 </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; ?> 246 254 </table> 255 <?php 256 ?> 247 257 </section> 248 258 … … 270 280 </td> 271 281 </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 ?> 304 284 <tr> 305 285 <th scope="row"><label for="arcai-greeting"><?php esc_html_e( 'Greeting message', 'archivist-ai' ); ?></label></th> … … 308 288 <?php 309 289 ?> 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; ?> 310 293 </table> 311 294 <?php $this->render_chat_preview( $settings ); ?> … … 428 411 <p class="description"><?php esc_html_e( 'Computed from OpenAI list prices for the tokens each call used.', 'archivist-ai' ); ?></p> 429 412 </section> 413 414 <?php if ( $show_pro_hints ) : ?> 415 <?php $this->render_pro_card(); ?> 416 <?php endif; ?> 430 417 431 418 </div> … … 474 461 } 475 462 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 476 565 477 566 private function verify_ajax() { -
archivist-ai/tags/0.7.0/archivist-ai.php
r3748265 r3748372 1 1 <?php 2 2 /** 3 * Plugin Name: Archivist AI 3 * Plugin Name: Archivist AI – AI Search & Chatbot for Your Articles 4 4 * Plugin URI: https://archivist-ai.com 5 5 * Description: AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required. 6 * Version: 0. 6.56 * Version: 0.7.0 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 7.4 … … 18 18 } 19 19 20 define( 'ARCAI_VERSION', '0. 6.5' );20 define( 'ARCAI_VERSION', '0.7.0' ); 21 21 define( 'ARCAI_PLUGIN_FILE', __FILE__ ); 22 22 define( 'ARCAI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
archivist-ai/tags/0.7.0/assets/css/admin.css
r3724623 r3748372 399 399 } 400 400 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 401 496 /* --- Buttons --- */ 402 497 .arcai-wrap .button { -
archivist-ai/tags/0.7.0/assets/js/admin.js
r3724623 r3748372 124 124 return; 125 125 } 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'; 128 129 var lightBg = isLight( bg ); 129 130 preview.style.setProperty( '--arcai-accent', accent ); … … 132 133 preview.style.setProperty( '--arcai-text', lightBg ? '#221d14' : '#f6f1e4' ); 133 134 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' ); 135 136 preview.setAttribute( 'data-arcai-corners', $( 'input[name$="[chat_corners]"]:checked' ).val() || 'square' ); 136 137 $( '#arcai-preview-greeting' ).text( $( '#arcai-greeting' ).val() ); -
archivist-ai/tags/0.7.0/includes/class-arcai-chat-controller.php
r3724460 r3748372 251 251 . 'Cite sources inline with their bracket numbers, e.g. [1], [2]. ' 252 252 . '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; 255 257 256 258 $messages = array( array( 'role' => 'system', 'content' => $system ) ); -
archivist-ai/tags/0.7.0/includes/class-arcai-chunker.php
r3724460 r3748372 43 43 public static function plain_text( $post ) { 44 44 $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 45 56 $text = strip_shortcodes( $text ); 46 57 $text = excerpt_remove_blocks( $text ); -
archivist-ai/tags/0.7.0/includes/class-arcai-frontend.php
r3724623 r3748372 29 29 wp_register_script( 'arcai-chat', ARCAI_PLUGIN_URL . 'assets/js/chat.js', array(), ARCAI_VERSION, true ); 30 30 31 $look = Arcai_Settings::appearance(); 31 32 wp_localize_script( 32 33 'arcai-chat', … … 37 38 'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '', 38 39 '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'], 43 44 'maxTurns' => 10, 44 45 'i18n' => array( -
archivist-ai/tags/0.7.0/includes/class-arcai-settings.php
r3724623 r3748372 10 10 public static function defaults() { 11 11 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, 25 27 ); 26 28 } … … 47 49 'rounded' => __( 'Rounded', 'archivist-ai' ), 48 50 ); 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; 49 67 } 50 68 … … 87 105 $clean['bubble_color'] = $defaults['bubble_color']; 88 106 } 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']; 95 112 $clean['greeting'] = isset( $input['greeting'] ) ? sanitize_text_field( $input['greeting'] ) : $defaults['greeting']; 96 113 … … 98 115 $clean['require_login'] = 0; 99 116 117 100 118 return $clean; 101 119 } 120 121 /** 122 * Pro settings: full appearance, custom answer instructions and the custom 123 * field / taxonomy mapping used when indexing. 124 */ 102 125 } -
archivist-ai/tags/0.7.0/includes/class-arcai-usage.php
r3724460 r3748372 50 50 } 51 51 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 52 65 public static function over_daily_cap() { 53 66 $cap = (float) Arcai_Settings::get( 'daily_cap' ); -
archivist-ai/tags/0.7.0/languages/archivist-ai.pot
r3748265 r3748372 3 3 msgid "" 4 4 msgstr "" 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" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/archivist-ai\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 17 17 #. Plugin Name of the plugin 18 18 #: 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" 19 msgid "Archivist AI – AI Search & Chatbot for Your Articles" 24 20 msgstr "" 25 21 … … 39 35 msgstr "" 40 36 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 41 msgid "Archivist AI" 42 msgstr "" 43 44 #: admin/class-arcai-admin.php:56 42 45 msgid "This site uses Archivist AI to answer questions about our published articles in a chat." 43 46 msgstr "" 44 47 45 48 #. translators: %s: link to OpenAI's privacy policy 46 #: admin/class-arcai-admin.php:5 849 #: admin/class-arcai-admin.php:59 47 50 #, php-format 48 51 msgid "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." 49 52 msgstr "" 50 53 51 #: admin/class-arcai-admin.php: 5954 #: admin/class-arcai-admin.php:60 52 55 msgid "OpenAI Privacy Policy" 53 56 msgstr "" 54 57 55 #: admin/class-arcai-admin.php:6 158 #: admin/class-arcai-admin.php:62 56 59 msgid "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." 57 60 msgstr "" 58 61 59 #: admin/class-arcai-admin.php:6 262 #: admin/class-arcai-admin.php:63 60 63 msgid "Please do not enter personal or sensitive information in the chat." 61 64 msgstr "" 62 65 63 66 #. translators: 1: number of posts, 2: token count, 3: estimated cost in USD. 64 #: admin/class-arcai-admin.php:9 567 #: admin/class-arcai-admin.php:96 65 68 #, php-format 66 69 msgid "Indexing %1$s posts will use roughly %2$s tokens. Estimated cost: %3$s. Continue?" 67 70 msgstr "" 68 71 69 #: admin/class-arcai-admin.php:9 672 #: admin/class-arcai-admin.php:97 70 73 msgid "Request failed. Please try again." 71 74 msgstr "" 72 75 73 #: admin/class-arcai-admin.php:11 476 #: admin/class-arcai-admin.php:115 74 77 msgid "AI search for your archive" 75 78 msgstr "" 76 79 77 #: admin/class-arcai-admin.php:15 180 #: admin/class-arcai-admin.php:152 78 81 msgid "Indexing" 79 82 msgstr "" 80 83 81 #: admin/class-arcai-admin.php:15 284 #: admin/class-arcai-admin.php:153 82 85 msgid "Understanding questions" 83 86 msgstr "" 84 87 85 #: admin/class-arcai-admin.php:15 388 #: admin/class-arcai-admin.php:154 86 89 msgid "Searching the archive" 87 90 msgstr "" 88 91 89 #: admin/class-arcai-admin.php:15 492 #: admin/class-arcai-admin.php:155 90 93 msgid "Writing answers" 91 94 msgstr "" 92 95 93 #: admin/class-arcai-admin.php:1 6996 #: admin/class-arcai-admin.php:170 94 97 msgid "Needs an API key" 95 98 msgstr "" 96 99 97 #: admin/class-arcai-admin.php:17 4100 #: admin/class-arcai-admin.php:175 98 101 msgid "Paused — daily cap reached" 99 102 msgstr "" 100 103 101 #: admin/class-arcai-admin.php:1 79104 #: admin/class-arcai-admin.php:180 102 105 msgid "Bubble off" 103 106 msgstr "" 104 107 105 #: admin/class-arcai-admin.php:18 4108 #: admin/class-arcai-admin.php:185 106 109 msgid "Chat live" 107 110 msgstr "" 108 111 109 112 #. translators: %s: number of indexed posts 110 #: admin/class-arcai-admin.php:19 0113 #: admin/class-arcai-admin.php:191 111 114 #, php-format 112 115 msgid "%s post indexed" … … 115 118 msgstr[1] "" 116 119 117 #: admin/class-arcai-admin.php:2 06120 #: admin/class-arcai-admin.php:211 118 121 msgid "Connection" 119 122 msgstr "" 120 123 121 #: admin/class-arcai-admin.php:21 0124 #: admin/class-arcai-admin.php:215 122 125 msgid "OpenAI API key" 123 126 msgstr "" 124 127 125 #: admin/class-arcai-admin.php:21 3128 #: admin/class-arcai-admin.php:218 126 129 msgid "One key covers both indexing (embeddings) and answers. You pay OpenAI directly at list price." 127 130 msgstr "" 128 131 129 #: admin/class-arcai-admin.php:2 17132 #: admin/class-arcai-admin.php:222 130 133 msgid "Answer model" 131 134 msgstr "" 132 135 133 #: admin/class-arcai-admin.php:22 1136 #: admin/class-arcai-admin.php:226 134 137 msgid "Embedding model" 135 138 msgstr "" 136 139 137 #: admin/class-arcai-admin.php:23 0140 #: admin/class-arcai-admin.php:235 138 141 msgid "What to index" 139 142 msgstr "" 140 143 141 #: admin/class-arcai-admin.php:23 4144 #: admin/class-arcai-admin.php:239 142 145 msgid "Post types" 143 146 msgstr "" 144 147 145 #: admin/class-arcai-admin.php:24 3148 #: admin/class-arcai-admin.php:248 146 149 msgid "Only published, public, non-password-protected content is ever indexed." 147 150 msgstr "" 148 151 149 152 #: admin/class-arcai-admin.php:252 153 msgid "Custom fields" 154 msgstr "" 155 156 #: admin/class-arcai-admin.php:252 157 msgid "Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date." 158 msgstr "" 159 160 #: admin/class-arcai-admin.php:262 150 161 msgid "Chat widget" 151 162 msgstr "" 152 163 153 #: admin/class-arcai-admin.php:2 56164 #: admin/class-arcai-admin.php:266 154 165 msgid "Chat bubble" 155 166 msgstr "" 156 167 157 #: admin/class-arcai-admin.php:2 60168 #: admin/class-arcai-admin.php:270 158 169 msgid "Show the floating chat bubble on the site" 159 170 msgstr "" 160 171 161 #: admin/class-arcai-admin.php:2 62172 #: admin/class-arcai-admin.php:272 162 173 msgid "Or place the chat inline with the Archivist AI block or the [archivist_ai] shortcode." 163 174 msgstr "" 164 175 165 #: admin/class-arcai-admin.php:2 66176 #: admin/class-arcai-admin.php:276 166 177 msgid "Accent color" 167 178 msgstr "" 168 179 169 #: admin/class-arcai-admin.php:2 69180 #: admin/class-arcai-admin.php:279 170 181 msgid "Used for the bubble, the send button and citation numbers." 171 182 msgstr "" 172 183 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 185 msgid "Greeting message" 187 186 msgstr "" 188 187 189 188 #: 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 189 msgid "Your style" 190 msgstr "" 191 192 #: admin/class-arcai-admin.php:291 193 msgid "Background color, font and corner style, plus your own answer instructions: tone, language and house rules." 194 msgstr "" 195 196 #: admin/class-arcai-admin.php:300 199 197 msgid "Limits & spending" 200 198 msgstr "" 201 199 200 #: admin/class-arcai-admin.php:304 201 msgid "Daily spending cap" 202 msgstr "" 203 204 #: admin/class-arcai-admin.php:307 205 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap." 206 msgstr "" 207 208 #: admin/class-arcai-admin.php:311 209 msgid "Visitor rate limit" 210 msgstr "" 211 212 #: admin/class-arcai-admin.php:314 213 msgid "chat turns per hour, per visitor IP" 214 msgstr "" 215 202 216 #: admin/class-arcai-admin.php:321 203 msgid "Daily spending cap"204 msgstr ""205 206 #: admin/class-arcai-admin.php:324207 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."208 msgstr ""209 210 #: admin/class-arcai-admin.php:328211 msgid "Visitor rate limit"212 msgstr ""213 214 #: admin/class-arcai-admin.php:331215 msgid "chat turns per hour, per visitor IP"216 msgstr ""217 218 #: admin/class-arcai-admin.php:338219 217 msgid "Changes apply to the chat as soon as you save." 220 218 msgstr "" 221 219 222 #: admin/class-arcai-admin.php:3 39220 #: admin/class-arcai-admin.php:322 223 221 msgid "Save settings" 224 222 msgstr "" 225 223 226 #: admin/class-arcai-admin.php:3 49224 #: admin/class-arcai-admin.php:332 227 225 msgid "Index" 228 226 msgstr "" 229 227 230 #: admin/class-arcai-admin.php:3 50228 #: admin/class-arcai-admin.php:333 231 229 msgid "Your archive" 232 230 msgstr "" 233 231 234 #: admin/class-arcai-admin.php:3 54232 #: admin/class-arcai-admin.php:337 235 233 msgid "posts searchable" 236 234 msgstr "" 237 235 236 #: admin/class-arcai-admin.php:345 237 msgid "Estimate cost & index" 238 msgstr "" 239 240 #: admin/class-arcai-admin.php:348 241 msgid "Cancel" 242 msgstr "" 243 244 #: admin/class-arcai-admin.php:351 245 msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically." 246 msgstr "" 247 248 #: admin/class-arcai-admin.php:356 249 msgid "Usage" 250 msgstr "" 251 252 #: admin/class-arcai-admin.php:357 253 msgid "What it costs you" 254 msgstr "" 255 238 256 #: admin/class-arcai-admin.php:362 239 msgid "Estimate cost & index"240 msgstr ""241 242 #: admin/class-arcai-admin.php:365243 msgid "Cancel"244 msgstr ""245 246 #: admin/class-arcai-admin.php:368247 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:373251 msgid "Usage"252 msgstr ""253 254 #: admin/class-arcai-admin.php:374255 msgid "What it costs you"256 msgstr ""257 258 #: admin/class-arcai-admin.php:379259 257 msgid "Today" 260 258 msgstr "" 261 259 262 #: admin/class-arcai-admin.php:3 83260 #: admin/class-arcai-admin.php:366 263 261 msgid "30 days" 264 262 msgstr "" 265 263 266 #: admin/class-arcai-admin.php:3 87264 #: admin/class-arcai-admin.php:370 267 265 msgid "Answers" 268 266 msgstr "" 269 267 270 268 #. translators: 1: amount spent today, 2: daily cap 271 #: admin/class-arcai-admin.php:3 99269 #: admin/class-arcai-admin.php:382 272 270 #, php-format 273 271 msgid "%1$s of your %2$s daily cap used" 274 272 msgstr "" 275 273 276 #: admin/class-arcai-admin.php: 410274 #: admin/class-arcai-admin.php:393 277 275 msgid "Last 30 days" 278 276 msgstr "" 279 277 278 #: admin/class-arcai-admin.php:394 279 msgid "Calls" 280 msgstr "" 281 282 #: admin/class-arcai-admin.php:395 283 msgid "Cost" 284 msgstr "" 285 286 #: admin/class-arcai-admin.php:399 287 msgid "No usage yet." 288 msgstr "" 289 280 290 #: admin/class-arcai-admin.php:411 281 msgid "Calls"282 msgstr ""283 284 #: admin/class-arcai-admin.php:412285 msgid "Cost"286 msgstr ""287 288 #: admin/class-arcai-admin.php:416289 msgid "No usage yet."290 msgstr ""291 292 #: admin/class-arcai-admin.php:428293 291 msgid "Computed from OpenAI list prices for the tokens each call used." 294 292 msgstr "" 295 293 296 #: admin/class-arcai-admin.php:4 44294 #: admin/class-arcai-admin.php:431 297 295 msgid "Live preview" 298 296 msgstr "" 299 297 300 #: admin/class-arcai-admin.php:4 49301 #: includes/class-arcai-frontend.php:5 0298 #: admin/class-arcai-admin.php:436 299 #: includes/class-arcai-frontend.php:51 302 300 msgid "Archive search" 303 301 msgstr "" 304 302 305 #: admin/class-arcai-admin.php:4 54303 #: admin/class-arcai-admin.php:441 306 304 msgid "What have we written about food retail this year?" 307 305 msgstr "" 308 306 309 #: admin/class-arcai-admin.php:4 56307 #: admin/class-arcai-admin.php:443 310 308 msgid "Two themes stand out: discount chains gaining share" 311 309 msgstr "" 312 310 313 #: admin/class-arcai-admin.php:4 56311 #: admin/class-arcai-admin.php:443 314 312 msgid "and a push into private-label ranges" 315 313 msgstr "" 316 314 317 #: admin/class-arcai-admin.php:458 315 #: admin/class-arcai-admin.php:445 316 #: includes/class-arcai-frontend.php:48 317 msgid "Sources" 318 msgstr "" 319 320 #: admin/class-arcai-admin.php:446 321 msgid "The discount grocers’ quiet takeover" 322 msgstr "" 323 324 #: admin/class-arcai-admin.php:447 325 msgid "Why every chain wants its own brand" 326 msgstr "" 327 328 #: admin/class-arcai-admin.php:452 329 #: includes/class-arcai-frontend.php:46 330 msgid "Ask about our articles…" 331 msgstr "" 332 333 #: admin/class-arcai-admin.php:453 318 334 #: includes/class-arcai-frontend.php:47 319 msgid "Sources"320 msgstr ""321 322 #: admin/class-arcai-admin.php:459323 msgid "The discount grocers’ quiet takeover"324 msgstr ""325 326 #: admin/class-arcai-admin.php:460327 msgid "Why every chain wants its own brand"328 msgstr ""329 330 #: admin/class-arcai-admin.php:465331 #: includes/class-arcai-frontend.php:45332 msgid "Ask about our articles…"333 msgstr ""334 335 #: admin/class-arcai-admin.php:466336 #: includes/class-arcai-frontend.php:46337 335 msgid "Send" 338 336 msgstr "" 339 337 340 #: admin/class-arcai-admin.php:479 338 #: admin/class-arcai-admin.php:473 339 msgid "See Pro" 340 msgstr "" 341 342 #: admin/class-arcai-admin.php:484 343 msgid "Reader questions report: what people ask, and what your archive could not answer" 344 msgstr "" 345 346 #: admin/class-arcai-admin.php:485 347 msgid "Custom fields, ACF fields and taxonomies in search" 348 msgstr "" 349 350 #: admin/class-arcai-admin.php:486 351 msgid "Your own answer instructions: tone, language, house rules" 352 msgstr "" 353 354 #: admin/class-arcai-admin.php:487 355 msgid "Full styling: background, font, corners" 356 msgstr "" 357 358 #: admin/class-arcai-admin.php:488 359 msgid "Answer caching and subscriber-only mode" 360 msgstr "" 361 362 #: admin/class-arcai-admin.php:494 363 msgid "Go further" 364 msgstr "" 365 366 #: admin/class-arcai-admin.php:502 367 msgid "See Pro plans" 368 msgstr "" 369 370 #: admin/class-arcai-admin.php:522 371 msgid "Your archive has answered over 20 questions." 372 msgstr "" 373 374 #: admin/class-arcai-admin.php:523 375 msgid "If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it." 376 msgstr "" 377 378 #: admin/class-arcai-admin.php:526 379 msgid "Leave a review" 380 msgstr "" 381 382 #: admin/class-arcai-admin.php:527 383 msgid "No thanks" 384 msgstr "" 385 386 #: admin/class-arcai-admin.php:538 387 #: admin/class-arcai-admin.php:568 341 388 msgid "Permission denied." 342 389 msgstr "" … … 354 401 msgstr "" 355 402 356 #: includes/class-arcai-chat-controller.php:28 2403 #: includes/class-arcai-chat-controller.php:284 357 404 msgid "I couldn't find any articles matching that. Try rephrasing your question or broadening the time range." 358 405 msgstr "" 359 406 360 #: includes/class-arcai-chat-controller.php: 398407 #: includes/class-arcai-chat-controller.php:400 361 408 msgid "The AI search is temporarily unavailable. Please try again in a moment." 362 409 msgstr "" 363 410 364 #: includes/class-arcai-frontend.php:4 8411 #: includes/class-arcai-frontend.php:49 365 412 msgid "Something went wrong. Please try again." 366 413 msgstr "" 367 414 368 #: includes/class-arcai-frontend.php: 49415 #: includes/class-arcai-frontend.php:50 369 416 msgid "This conversation has reached its limit — refresh to start a new one." 370 417 msgstr "" 371 418 372 #: includes/class-arcai-frontend.php: 79419 #: includes/class-arcai-frontend.php:80 373 420 msgid "Archivist AI: add your API key in the plugin settings to enable the chat." 374 421 msgstr "" 375 422 376 423 #. translators: %s: login URL 377 #: includes/class-arcai-frontend.php:8 5424 #: includes/class-arcai-frontend.php:86 378 425 #, php-format 379 426 msgid "Please <a href=\"%s\">log in</a> to use the archive search." … … 397 444 msgstr "" 398 445 399 #: includes/class-arcai-settings.php:2 3446 #: includes/class-arcai-settings.php:25 400 447 msgid "Hi! Ask me anything about our articles." 401 448 msgstr "" 402 449 403 #: includes/class-arcai-settings.php:3 3450 #: includes/class-arcai-settings.php:35 404 451 msgid "Theme font (matches your site)" 405 452 msgstr "" 406 453 407 #: includes/class-arcai-settings.php:3 4454 #: includes/class-arcai-settings.php:36 408 455 msgid "Serif" 409 456 msgstr "" 410 457 411 #: includes/class-arcai-settings.php:3 5458 #: includes/class-arcai-settings.php:37 412 459 msgid "Sans-serif" 413 460 msgstr "" 414 461 415 #: includes/class-arcai-settings.php:3 6462 #: includes/class-arcai-settings.php:38 416 463 msgid "Monospace" 417 464 msgstr "" 418 465 419 #: includes/class-arcai-settings.php:4 5466 #: includes/class-arcai-settings.php:47 420 467 msgid "Square" 421 468 msgstr "" 422 469 423 #: includes/class-arcai-settings.php:4 6470 #: includes/class-arcai-settings.php:48 424 471 msgid "Soft" 425 472 msgstr "" 426 473 427 #: includes/class-arcai-settings.php:4 7474 #: includes/class-arcai-settings.php:49 428 475 msgid "Rounded" 429 476 msgstr "" -
archivist-ai/tags/0.7.0/readme.txt
r3748265 r3748372 1 === Archivist AI ===1 === Archivist AI – AI Search & Chatbot for Your Articles === 2 2 Contributors: archivistai 3 Tags: ai , search, chat, archive, semanticsearch3 Tags: ai search, chatbot, ai chatbot, semantic search, site search 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 0. 6.57 Stable tag: 0.7.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.11 AI search and chatbot for your articles. Readers ask questions and get answers from your own posts, with sources cited. No login required. 12 12 13 13 == Description == 14 14 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. 15 Archivist 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 17 It'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. 16 18 17 19 **For your readers:** … … 29 31 * You pay OpenAI directly at list price — no markup, no middleman 30 32 * 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 31 37 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** 33 49 34 50 == External services == … … 50 66 1. Upload the plugin and activate it. 51 67 2. 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".68 3. Choose which post types to index and click "Estimate cost & index". 53 69 4. The chat bubble appears on your site once indexing completes. 54 70 55 71 == Frequently Asked Questions == 72 73 = Is there a limit on how many articles the free version indexes? = 74 75 No. 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. 56 76 57 77 = Do my visitors need an account? = … … 79 99 80 100 == 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. 81 108 82 109 = 0.6.5 = -
archivist-ai/trunk/admin/class-arcai-admin.php
r3748265 r3748372 16 16 add_action( 'admin_init', array( $this, 'register_settings' ) ); 17 17 add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) ); 18 add_action( 'admin_post_arcai_review_prompt', array( $this, 'handle_review_prompt' ) ); 18 19 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); 19 20 add_action( 'wp_ajax_arcai_estimate_index', array( $this, 'ajax_estimate' ) ); … … 191 192 'tone' => $state['indexed_posts'] ? 'ok' : 'off', 192 193 ); 194 195 $show_pro_hints = true; 193 196 ?> 194 197 <div class="wrap arcai-wrap"> … … 197 200 <div class="arcai-columns"> 198 201 <div class="arcai-main"> 202 203 <?php $this->render_review_prompt(); ?> 199 204 200 205 <form method="post" action="options.php" class="arcai-settings"> … … 244 249 </td> 245 250 </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; ?> 246 254 </table> 255 <?php 256 ?> 247 257 </section> 248 258 … … 270 280 </td> 271 281 </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 ?> 304 284 <tr> 305 285 <th scope="row"><label for="arcai-greeting"><?php esc_html_e( 'Greeting message', 'archivist-ai' ); ?></label></th> … … 308 288 <?php 309 289 ?> 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; ?> 310 293 </table> 311 294 <?php $this->render_chat_preview( $settings ); ?> … … 428 411 <p class="description"><?php esc_html_e( 'Computed from OpenAI list prices for the tokens each call used.', 'archivist-ai' ); ?></p> 429 412 </section> 413 414 <?php if ( $show_pro_hints ) : ?> 415 <?php $this->render_pro_card(); ?> 416 <?php endif; ?> 430 417 431 418 </div> … … 474 461 } 475 462 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 476 565 477 566 private function verify_ajax() { -
archivist-ai/trunk/archivist-ai.php
r3748265 r3748372 1 1 <?php 2 2 /** 3 * Plugin Name: Archivist AI 3 * Plugin Name: Archivist AI – AI Search & Chatbot for Your Articles 4 4 * Plugin URI: https://archivist-ai.com 5 5 * Description: AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required. 6 * Version: 0. 6.56 * Version: 0.7.0 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 7.4 … … 18 18 } 19 19 20 define( 'ARCAI_VERSION', '0. 6.5' );20 define( 'ARCAI_VERSION', '0.7.0' ); 21 21 define( 'ARCAI_PLUGIN_FILE', __FILE__ ); 22 22 define( 'ARCAI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
archivist-ai/trunk/assets/css/admin.css
r3724623 r3748372 399 399 } 400 400 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 401 496 /* --- Buttons --- */ 402 497 .arcai-wrap .button { -
archivist-ai/trunk/assets/js/admin.js
r3724623 r3748372 124 124 return; 125 125 } 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'; 128 129 var lightBg = isLight( bg ); 129 130 preview.style.setProperty( '--arcai-accent', accent ); … … 132 133 preview.style.setProperty( '--arcai-text', lightBg ? '#221d14' : '#f6f1e4' ); 133 134 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' ); 135 136 preview.setAttribute( 'data-arcai-corners', $( 'input[name$="[chat_corners]"]:checked' ).val() || 'square' ); 136 137 $( '#arcai-preview-greeting' ).text( $( '#arcai-greeting' ).val() ); -
archivist-ai/trunk/includes/class-arcai-chat-controller.php
r3724460 r3748372 251 251 . 'Cite sources inline with their bracket numbers, e.g. [1], [2]. ' 252 252 . '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; 255 257 256 258 $messages = array( array( 'role' => 'system', 'content' => $system ) ); -
archivist-ai/trunk/includes/class-arcai-chunker.php
r3724460 r3748372 43 43 public static function plain_text( $post ) { 44 44 $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 45 56 $text = strip_shortcodes( $text ); 46 57 $text = excerpt_remove_blocks( $text ); -
archivist-ai/trunk/includes/class-arcai-frontend.php
r3724623 r3748372 29 29 wp_register_script( 'arcai-chat', ARCAI_PLUGIN_URL . 'assets/js/chat.js', array(), ARCAI_VERSION, true ); 30 30 31 $look = Arcai_Settings::appearance(); 31 32 wp_localize_script( 32 33 'arcai-chat', … … 37 38 'nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '', 38 39 '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'], 43 44 'maxTurns' => 10, 44 45 'i18n' => array( -
archivist-ai/trunk/includes/class-arcai-settings.php
r3724623 r3748372 10 10 public static function defaults() { 11 11 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, 25 27 ); 26 28 } … … 47 49 'rounded' => __( 'Rounded', 'archivist-ai' ), 48 50 ); 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; 49 67 } 50 68 … … 87 105 $clean['bubble_color'] = $defaults['bubble_color']; 88 106 } 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']; 95 112 $clean['greeting'] = isset( $input['greeting'] ) ? sanitize_text_field( $input['greeting'] ) : $defaults['greeting']; 96 113 … … 98 115 $clean['require_login'] = 0; 99 116 117 100 118 return $clean; 101 119 } 120 121 /** 122 * Pro settings: full appearance, custom answer instructions and the custom 123 * field / taxonomy mapping used when indexing. 124 */ 102 125 } -
archivist-ai/trunk/includes/class-arcai-usage.php
r3724460 r3748372 50 50 } 51 51 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 52 65 public static function over_daily_cap() { 53 66 $cap = (float) Arcai_Settings::get( 'daily_cap' ); -
archivist-ai/trunk/languages/archivist-ai.pot
r3748265 r3748372 3 3 msgid "" 4 4 msgstr "" 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" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/archivist-ai\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 17 17 #. Plugin Name of the plugin 18 18 #: 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" 19 msgid "Archivist AI – AI Search & Chatbot for Your Articles" 24 20 msgstr "" 25 21 … … 39 35 msgstr "" 40 36 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 41 msgid "Archivist AI" 42 msgstr "" 43 44 #: admin/class-arcai-admin.php:56 42 45 msgid "This site uses Archivist AI to answer questions about our published articles in a chat." 43 46 msgstr "" 44 47 45 48 #. translators: %s: link to OpenAI's privacy policy 46 #: admin/class-arcai-admin.php:5 849 #: admin/class-arcai-admin.php:59 47 50 #, php-format 48 51 msgid "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." 49 52 msgstr "" 50 53 51 #: admin/class-arcai-admin.php: 5954 #: admin/class-arcai-admin.php:60 52 55 msgid "OpenAI Privacy Policy" 53 56 msgstr "" 54 57 55 #: admin/class-arcai-admin.php:6 158 #: admin/class-arcai-admin.php:62 56 59 msgid "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." 57 60 msgstr "" 58 61 59 #: admin/class-arcai-admin.php:6 262 #: admin/class-arcai-admin.php:63 60 63 msgid "Please do not enter personal or sensitive information in the chat." 61 64 msgstr "" 62 65 63 66 #. translators: 1: number of posts, 2: token count, 3: estimated cost in USD. 64 #: admin/class-arcai-admin.php:9 567 #: admin/class-arcai-admin.php:96 65 68 #, php-format 66 69 msgid "Indexing %1$s posts will use roughly %2$s tokens. Estimated cost: %3$s. Continue?" 67 70 msgstr "" 68 71 69 #: admin/class-arcai-admin.php:9 672 #: admin/class-arcai-admin.php:97 70 73 msgid "Request failed. Please try again." 71 74 msgstr "" 72 75 73 #: admin/class-arcai-admin.php:11 476 #: admin/class-arcai-admin.php:115 74 77 msgid "AI search for your archive" 75 78 msgstr "" 76 79 77 #: admin/class-arcai-admin.php:15 180 #: admin/class-arcai-admin.php:152 78 81 msgid "Indexing" 79 82 msgstr "" 80 83 81 #: admin/class-arcai-admin.php:15 284 #: admin/class-arcai-admin.php:153 82 85 msgid "Understanding questions" 83 86 msgstr "" 84 87 85 #: admin/class-arcai-admin.php:15 388 #: admin/class-arcai-admin.php:154 86 89 msgid "Searching the archive" 87 90 msgstr "" 88 91 89 #: admin/class-arcai-admin.php:15 492 #: admin/class-arcai-admin.php:155 90 93 msgid "Writing answers" 91 94 msgstr "" 92 95 93 #: admin/class-arcai-admin.php:1 6996 #: admin/class-arcai-admin.php:170 94 97 msgid "Needs an API key" 95 98 msgstr "" 96 99 97 #: admin/class-arcai-admin.php:17 4100 #: admin/class-arcai-admin.php:175 98 101 msgid "Paused — daily cap reached" 99 102 msgstr "" 100 103 101 #: admin/class-arcai-admin.php:1 79104 #: admin/class-arcai-admin.php:180 102 105 msgid "Bubble off" 103 106 msgstr "" 104 107 105 #: admin/class-arcai-admin.php:18 4108 #: admin/class-arcai-admin.php:185 106 109 msgid "Chat live" 107 110 msgstr "" 108 111 109 112 #. translators: %s: number of indexed posts 110 #: admin/class-arcai-admin.php:19 0113 #: admin/class-arcai-admin.php:191 111 114 #, php-format 112 115 msgid "%s post indexed" … … 115 118 msgstr[1] "" 116 119 117 #: admin/class-arcai-admin.php:2 06120 #: admin/class-arcai-admin.php:211 118 121 msgid "Connection" 119 122 msgstr "" 120 123 121 #: admin/class-arcai-admin.php:21 0124 #: admin/class-arcai-admin.php:215 122 125 msgid "OpenAI API key" 123 126 msgstr "" 124 127 125 #: admin/class-arcai-admin.php:21 3128 #: admin/class-arcai-admin.php:218 126 129 msgid "One key covers both indexing (embeddings) and answers. You pay OpenAI directly at list price." 127 130 msgstr "" 128 131 129 #: admin/class-arcai-admin.php:2 17132 #: admin/class-arcai-admin.php:222 130 133 msgid "Answer model" 131 134 msgstr "" 132 135 133 #: admin/class-arcai-admin.php:22 1136 #: admin/class-arcai-admin.php:226 134 137 msgid "Embedding model" 135 138 msgstr "" 136 139 137 #: admin/class-arcai-admin.php:23 0140 #: admin/class-arcai-admin.php:235 138 141 msgid "What to index" 139 142 msgstr "" 140 143 141 #: admin/class-arcai-admin.php:23 4144 #: admin/class-arcai-admin.php:239 142 145 msgid "Post types" 143 146 msgstr "" 144 147 145 #: admin/class-arcai-admin.php:24 3148 #: admin/class-arcai-admin.php:248 146 149 msgid "Only published, public, non-password-protected content is ever indexed." 147 150 msgstr "" 148 151 149 152 #: admin/class-arcai-admin.php:252 153 msgid "Custom fields" 154 msgstr "" 155 156 #: admin/class-arcai-admin.php:252 157 msgid "Make custom fields, ACF fields and taxonomies searchable too, e.g. a product’s price or an event’s venue and date." 158 msgstr "" 159 160 #: admin/class-arcai-admin.php:262 150 161 msgid "Chat widget" 151 162 msgstr "" 152 163 153 #: admin/class-arcai-admin.php:2 56164 #: admin/class-arcai-admin.php:266 154 165 msgid "Chat bubble" 155 166 msgstr "" 156 167 157 #: admin/class-arcai-admin.php:2 60168 #: admin/class-arcai-admin.php:270 158 169 msgid "Show the floating chat bubble on the site" 159 170 msgstr "" 160 171 161 #: admin/class-arcai-admin.php:2 62172 #: admin/class-arcai-admin.php:272 162 173 msgid "Or place the chat inline with the Archivist AI block or the [archivist_ai] shortcode." 163 174 msgstr "" 164 175 165 #: admin/class-arcai-admin.php:2 66176 #: admin/class-arcai-admin.php:276 166 177 msgid "Accent color" 167 178 msgstr "" 168 179 169 #: admin/class-arcai-admin.php:2 69180 #: admin/class-arcai-admin.php:279 170 181 msgid "Used for the bubble, the send button and citation numbers." 171 182 msgstr "" 172 183 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 185 msgid "Greeting message" 187 186 msgstr "" 188 187 189 188 #: 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 189 msgid "Your style" 190 msgstr "" 191 192 #: admin/class-arcai-admin.php:291 193 msgid "Background color, font and corner style, plus your own answer instructions: tone, language and house rules." 194 msgstr "" 195 196 #: admin/class-arcai-admin.php:300 199 197 msgid "Limits & spending" 200 198 msgstr "" 201 199 200 #: admin/class-arcai-admin.php:304 201 msgid "Daily spending cap" 202 msgstr "" 203 204 #: admin/class-arcai-admin.php:307 205 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap." 206 msgstr "" 207 208 #: admin/class-arcai-admin.php:311 209 msgid "Visitor rate limit" 210 msgstr "" 211 212 #: admin/class-arcai-admin.php:314 213 msgid "chat turns per hour, per visitor IP" 214 msgstr "" 215 202 216 #: admin/class-arcai-admin.php:321 203 msgid "Daily spending cap"204 msgstr ""205 206 #: admin/class-arcai-admin.php:324207 msgid "When reached, the AI chat pauses until midnight. 0 disables the cap."208 msgstr ""209 210 #: admin/class-arcai-admin.php:328211 msgid "Visitor rate limit"212 msgstr ""213 214 #: admin/class-arcai-admin.php:331215 msgid "chat turns per hour, per visitor IP"216 msgstr ""217 218 #: admin/class-arcai-admin.php:338219 217 msgid "Changes apply to the chat as soon as you save." 220 218 msgstr "" 221 219 222 #: admin/class-arcai-admin.php:3 39220 #: admin/class-arcai-admin.php:322 223 221 msgid "Save settings" 224 222 msgstr "" 225 223 226 #: admin/class-arcai-admin.php:3 49224 #: admin/class-arcai-admin.php:332 227 225 msgid "Index" 228 226 msgstr "" 229 227 230 #: admin/class-arcai-admin.php:3 50228 #: admin/class-arcai-admin.php:333 231 229 msgid "Your archive" 232 230 msgstr "" 233 231 234 #: admin/class-arcai-admin.php:3 54232 #: admin/class-arcai-admin.php:337 235 233 msgid "posts searchable" 236 234 msgstr "" 237 235 236 #: admin/class-arcai-admin.php:345 237 msgid "Estimate cost & index" 238 msgstr "" 239 240 #: admin/class-arcai-admin.php:348 241 msgid "Cancel" 242 msgstr "" 243 244 #: admin/class-arcai-admin.php:351 245 msgid "You see the estimated cost before anything is sent to OpenAI. New and edited posts are indexed automatically." 246 msgstr "" 247 248 #: admin/class-arcai-admin.php:356 249 msgid "Usage" 250 msgstr "" 251 252 #: admin/class-arcai-admin.php:357 253 msgid "What it costs you" 254 msgstr "" 255 238 256 #: admin/class-arcai-admin.php:362 239 msgid "Estimate cost & index"240 msgstr ""241 242 #: admin/class-arcai-admin.php:365243 msgid "Cancel"244 msgstr ""245 246 #: admin/class-arcai-admin.php:368247 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:373251 msgid "Usage"252 msgstr ""253 254 #: admin/class-arcai-admin.php:374255 msgid "What it costs you"256 msgstr ""257 258 #: admin/class-arcai-admin.php:379259 257 msgid "Today" 260 258 msgstr "" 261 259 262 #: admin/class-arcai-admin.php:3 83260 #: admin/class-arcai-admin.php:366 263 261 msgid "30 days" 264 262 msgstr "" 265 263 266 #: admin/class-arcai-admin.php:3 87264 #: admin/class-arcai-admin.php:370 267 265 msgid "Answers" 268 266 msgstr "" 269 267 270 268 #. translators: 1: amount spent today, 2: daily cap 271 #: admin/class-arcai-admin.php:3 99269 #: admin/class-arcai-admin.php:382 272 270 #, php-format 273 271 msgid "%1$s of your %2$s daily cap used" 274 272 msgstr "" 275 273 276 #: admin/class-arcai-admin.php: 410274 #: admin/class-arcai-admin.php:393 277 275 msgid "Last 30 days" 278 276 msgstr "" 279 277 278 #: admin/class-arcai-admin.php:394 279 msgid "Calls" 280 msgstr "" 281 282 #: admin/class-arcai-admin.php:395 283 msgid "Cost" 284 msgstr "" 285 286 #: admin/class-arcai-admin.php:399 287 msgid "No usage yet." 288 msgstr "" 289 280 290 #: admin/class-arcai-admin.php:411 281 msgid "Calls"282 msgstr ""283 284 #: admin/class-arcai-admin.php:412285 msgid "Cost"286 msgstr ""287 288 #: admin/class-arcai-admin.php:416289 msgid "No usage yet."290 msgstr ""291 292 #: admin/class-arcai-admin.php:428293 291 msgid "Computed from OpenAI list prices for the tokens each call used." 294 292 msgstr "" 295 293 296 #: admin/class-arcai-admin.php:4 44294 #: admin/class-arcai-admin.php:431 297 295 msgid "Live preview" 298 296 msgstr "" 299 297 300 #: admin/class-arcai-admin.php:4 49301 #: includes/class-arcai-frontend.php:5 0298 #: admin/class-arcai-admin.php:436 299 #: includes/class-arcai-frontend.php:51 302 300 msgid "Archive search" 303 301 msgstr "" 304 302 305 #: admin/class-arcai-admin.php:4 54303 #: admin/class-arcai-admin.php:441 306 304 msgid "What have we written about food retail this year?" 307 305 msgstr "" 308 306 309 #: admin/class-arcai-admin.php:4 56307 #: admin/class-arcai-admin.php:443 310 308 msgid "Two themes stand out: discount chains gaining share" 311 309 msgstr "" 312 310 313 #: admin/class-arcai-admin.php:4 56311 #: admin/class-arcai-admin.php:443 314 312 msgid "and a push into private-label ranges" 315 313 msgstr "" 316 314 317 #: admin/class-arcai-admin.php:458 315 #: admin/class-arcai-admin.php:445 316 #: includes/class-arcai-frontend.php:48 317 msgid "Sources" 318 msgstr "" 319 320 #: admin/class-arcai-admin.php:446 321 msgid "The discount grocers’ quiet takeover" 322 msgstr "" 323 324 #: admin/class-arcai-admin.php:447 325 msgid "Why every chain wants its own brand" 326 msgstr "" 327 328 #: admin/class-arcai-admin.php:452 329 #: includes/class-arcai-frontend.php:46 330 msgid "Ask about our articles…" 331 msgstr "" 332 333 #: admin/class-arcai-admin.php:453 318 334 #: includes/class-arcai-frontend.php:47 319 msgid "Sources"320 msgstr ""321 322 #: admin/class-arcai-admin.php:459323 msgid "The discount grocers’ quiet takeover"324 msgstr ""325 326 #: admin/class-arcai-admin.php:460327 msgid "Why every chain wants its own brand"328 msgstr ""329 330 #: admin/class-arcai-admin.php:465331 #: includes/class-arcai-frontend.php:45332 msgid "Ask about our articles…"333 msgstr ""334 335 #: admin/class-arcai-admin.php:466336 #: includes/class-arcai-frontend.php:46337 335 msgid "Send" 338 336 msgstr "" 339 337 340 #: admin/class-arcai-admin.php:479 338 #: admin/class-arcai-admin.php:473 339 msgid "See Pro" 340 msgstr "" 341 342 #: admin/class-arcai-admin.php:484 343 msgid "Reader questions report: what people ask, and what your archive could not answer" 344 msgstr "" 345 346 #: admin/class-arcai-admin.php:485 347 msgid "Custom fields, ACF fields and taxonomies in search" 348 msgstr "" 349 350 #: admin/class-arcai-admin.php:486 351 msgid "Your own answer instructions: tone, language, house rules" 352 msgstr "" 353 354 #: admin/class-arcai-admin.php:487 355 msgid "Full styling: background, font, corners" 356 msgstr "" 357 358 #: admin/class-arcai-admin.php:488 359 msgid "Answer caching and subscriber-only mode" 360 msgstr "" 361 362 #: admin/class-arcai-admin.php:494 363 msgid "Go further" 364 msgstr "" 365 366 #: admin/class-arcai-admin.php:502 367 msgid "See Pro plans" 368 msgstr "" 369 370 #: admin/class-arcai-admin.php:522 371 msgid "Your archive has answered over 20 questions." 372 msgstr "" 373 374 #: admin/class-arcai-admin.php:523 375 msgid "If Archivist AI is useful to you, a short review on WordPress.org helps other publishers find it." 376 msgstr "" 377 378 #: admin/class-arcai-admin.php:526 379 msgid "Leave a review" 380 msgstr "" 381 382 #: admin/class-arcai-admin.php:527 383 msgid "No thanks" 384 msgstr "" 385 386 #: admin/class-arcai-admin.php:538 387 #: admin/class-arcai-admin.php:568 341 388 msgid "Permission denied." 342 389 msgstr "" … … 354 401 msgstr "" 355 402 356 #: includes/class-arcai-chat-controller.php:28 2403 #: includes/class-arcai-chat-controller.php:284 357 404 msgid "I couldn't find any articles matching that. Try rephrasing your question or broadening the time range." 358 405 msgstr "" 359 406 360 #: includes/class-arcai-chat-controller.php: 398407 #: includes/class-arcai-chat-controller.php:400 361 408 msgid "The AI search is temporarily unavailable. Please try again in a moment." 362 409 msgstr "" 363 410 364 #: includes/class-arcai-frontend.php:4 8411 #: includes/class-arcai-frontend.php:49 365 412 msgid "Something went wrong. Please try again." 366 413 msgstr "" 367 414 368 #: includes/class-arcai-frontend.php: 49415 #: includes/class-arcai-frontend.php:50 369 416 msgid "This conversation has reached its limit — refresh to start a new one." 370 417 msgstr "" 371 418 372 #: includes/class-arcai-frontend.php: 79419 #: includes/class-arcai-frontend.php:80 373 420 msgid "Archivist AI: add your API key in the plugin settings to enable the chat." 374 421 msgstr "" 375 422 376 423 #. translators: %s: login URL 377 #: includes/class-arcai-frontend.php:8 5424 #: includes/class-arcai-frontend.php:86 378 425 #, php-format 379 426 msgid "Please <a href=\"%s\">log in</a> to use the archive search." … … 397 444 msgstr "" 398 445 399 #: includes/class-arcai-settings.php:2 3446 #: includes/class-arcai-settings.php:25 400 447 msgid "Hi! Ask me anything about our articles." 401 448 msgstr "" 402 449 403 #: includes/class-arcai-settings.php:3 3450 #: includes/class-arcai-settings.php:35 404 451 msgid "Theme font (matches your site)" 405 452 msgstr "" 406 453 407 #: includes/class-arcai-settings.php:3 4454 #: includes/class-arcai-settings.php:36 408 455 msgid "Serif" 409 456 msgstr "" 410 457 411 #: includes/class-arcai-settings.php:3 5458 #: includes/class-arcai-settings.php:37 412 459 msgid "Sans-serif" 413 460 msgstr "" 414 461 415 #: includes/class-arcai-settings.php:3 6462 #: includes/class-arcai-settings.php:38 416 463 msgid "Monospace" 417 464 msgstr "" 418 465 419 #: includes/class-arcai-settings.php:4 5466 #: includes/class-arcai-settings.php:47 420 467 msgid "Square" 421 468 msgstr "" 422 469 423 #: includes/class-arcai-settings.php:4 6470 #: includes/class-arcai-settings.php:48 424 471 msgid "Soft" 425 472 msgstr "" 426 473 427 #: includes/class-arcai-settings.php:4 7474 #: includes/class-arcai-settings.php:49 428 475 msgid "Rounded" 429 476 msgstr "" -
archivist-ai/trunk/readme.txt
r3748265 r3748372 1 === Archivist AI ===1 === Archivist AI – AI Search & Chatbot for Your Articles === 2 2 Contributors: archivistai 3 Tags: ai , search, chat, archive, semanticsearch3 Tags: ai search, chatbot, ai chatbot, semantic search, site search 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 0. 6.57 Stable tag: 0.7.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 AI chat search for your article archive. Visitors ask questions, get source-backed answers — no login required.11 AI search and chatbot for your articles. Readers ask questions and get answers from your own posts, with sources cited. No login required. 12 12 13 13 == Description == 14 14 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. 15 Archivist 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 17 It'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. 16 18 17 19 **For your readers:** … … 29 31 * You pay OpenAI directly at list price — no markup, no middleman 30 32 * 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 31 37 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** 33 49 34 50 == External services == … … 50 66 1. Upload the plugin and activate it. 51 67 2. 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".68 3. Choose which post types to index and click "Estimate cost & index". 53 69 4. The chat bubble appears on your site once indexing completes. 54 70 55 71 == Frequently Asked Questions == 72 73 = Is there a limit on how many articles the free version indexes? = 74 75 No. 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. 56 76 57 77 = Do my visitors need an account? = … … 79 99 80 100 == 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. 81 108 82 109 = 0.6.5 =
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)