Changeset 3448781
- Timestamp:
- 01/28/2026 02:26:23 PM (3 weeks ago)
- Location:
- mxchat-basic
- Files:
-
- 127 added
- 8 edited
-
tags/3.0.5 (added)
-
tags/3.0.5/admin (added)
-
tags/3.0.5/admin/class-ajax-handler.php (added)
-
tags/3.0.5/admin/class-knowledge-manager.php (added)
-
tags/3.0.5/admin/class-pinecone-manager.php (added)
-
tags/3.0.5/css (added)
-
tags/3.0.5/css/actions.css (added)
-
tags/3.0.5/css/admin-add-ons.css (added)
-
tags/3.0.5/css/admin-pro.css (added)
-
tags/3.0.5/css/admin-sidebar.css (added)
-
tags/3.0.5/css/admin-style.css (added)
-
tags/3.0.5/css/chat-style.css (added)
-
tags/3.0.5/css/chat-transcripts.css (added)
-
tags/3.0.5/css/content-selector.css (added)
-
tags/3.0.5/css/intent-style.css (added)
-
tags/3.0.5/css/knowledge-style.css (added)
-
tags/3.0.5/css/test-panel.css (added)
-
tags/3.0.5/images (added)
-
tags/3.0.5/images/Icon-01.svg (added)
-
tags/3.0.5/images/Icon-02.svg (added)
-
tags/3.0.5/images/Icon-03.svg (added)
-
tags/3.0.5/images/Icon-04.svg (added)
-
tags/3.0.5/images/addons (added)
-
tags/3.0.5/images/addons/mxchat-admin-assistant.png (added)
-
tags/3.0.5/images/addons/mxchat-assistant-api.png (added)
-
tags/3.0.5/images/addons/mxchat-forms.png (added)
-
tags/3.0.5/images/addons/mxchat-image-analysis.png (added)
-
tags/3.0.5/images/addons/mxchat-moderation.png (added)
-
tags/3.0.5/images/addons/mxchat-multi-bot.png (added)
-
tags/3.0.5/images/addons/mxchat-perplexity.png (added)
-
tags/3.0.5/images/addons/mxchat-theme.png (added)
-
tags/3.0.5/images/addons/mxchat-trigger.png (added)
-
tags/3.0.5/images/addons/mxchat-veo.png (added)
-
tags/3.0.5/images/addons/mxchat-woo.png (added)
-
tags/3.0.5/images/icon-128x128.png (added)
-
tags/3.0.5/images/pro-only-dark.png (added)
-
tags/3.0.5/includes (added)
-
tags/3.0.5/includes/admin-actions-page.php (added)
-
tags/3.0.5/includes/admin-knowledge-page.php (added)
-
tags/3.0.5/includes/admin-pro-page.php (added)
-
tags/3.0.5/includes/admin-settings-page.php (added)
-
tags/3.0.5/includes/admin-transcripts-page.php (added)
-
tags/3.0.5/includes/class-mxchat-addons.php (added)
-
tags/3.0.5/includes/class-mxchat-admin.php (added)
-
tags/3.0.5/includes/class-mxchat-chunker.php (added)
-
tags/3.0.5/includes/class-mxchat-integrator.php (added)
-
tags/3.0.5/includes/class-mxchat-meta-box.php (added)
-
tags/3.0.5/includes/class-mxchat-public.php (added)
-
tags/3.0.5/includes/class-mxchat-user.php (added)
-
tags/3.0.5/includes/class-mxchat-utils.php (added)
-
tags/3.0.5/includes/class-mxchat-woocommerce.php (added)
-
tags/3.0.5/includes/class-mxchat-word-handler.php (added)
-
tags/3.0.5/includes/pdf-parser (added)
-
tags/3.0.5/includes/pdf-parser/alt_autoload.php (added)
-
tags/3.0.5/includes/pdf-parser/src (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Config.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Document.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementArray.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementBoolean.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementDate.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementHexa.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementMissing.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementName.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementNull.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementNumeric.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementString.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementStruct.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementXRef.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/AbstractEncoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/EncodingLocator.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/ISOLatin1Encoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/ISOLatin9Encoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/MacRomanEncoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/PDFDocEncoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/StandardEncoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Encoding/WinAnsiEncoding.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Exception (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Exception/EmptyPdfException.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Exception/EncodingNotFoundException.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Exception/MissingPdfHeaderException.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Exception/NotImplementedException.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontCIDFontType0.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontCIDFontType2.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontTrueType.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType0.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType1.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType3.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Header.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/PDFObject.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Page.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Pages.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/Parser.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/RawData (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/RawData/FilterHelper.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/RawData/RawDataParser.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/XObject (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/XObject/Form.php (added)
-
tags/3.0.5/includes/pdf-parser/src/Smalot/PdfParser/XObject/Image.php (added)
-
tags/3.0.5/js (added)
-
tags/3.0.5/js/activation-script.js (added)
-
tags/3.0.5/js/admin-status.js (added)
-
tags/3.0.5/js/chat-script.js (added)
-
tags/3.0.5/js/content-selector.js (added)
-
tags/3.0.5/js/embedding-check.js (added)
-
tags/3.0.5/js/floating-script.js (added)
-
tags/3.0.5/js/knowledge-processing.js (added)
-
tags/3.0.5/js/meta-box.js (added)
-
tags/3.0.5/js/mxchat-admin.js (added)
-
tags/3.0.5/js/mxchat-test-streaming.js (added)
-
tags/3.0.5/js/mxchat_actions.js (added)
-
tags/3.0.5/js/mxchat_pro.js (added)
-
tags/3.0.5/js/mxchat_transcripts.js (added)
-
tags/3.0.5/js/my-color-picker.js (added)
-
tags/3.0.5/js/test-panel.js (added)
-
tags/3.0.5/languages (added)
-
tags/3.0.5/languages/mxchat.pot (added)
-
tags/3.0.5/mxchat-basic.php (added)
-
tags/3.0.5/readme.txt (added)
-
trunk/admin/class-ajax-handler.php (modified) (2 diffs)
-
trunk/css/admin-sidebar.css (modified) (1 diff)
-
trunk/css/admin-style.css (modified) (1 diff)
-
trunk/includes/admin-knowledge-page.php (modified) (2 diffs)
-
trunk/includes/class-mxchat-admin.php (modified) (23 diffs)
-
trunk/js/mxchat-admin.js (modified) (1 diff)
-
trunk/mxchat-basic.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mxchat-basic/trunk/admin/class-ajax-handler.php
r3446370 r3448781 251 251 $serialized = maybe_serialize($transcripts_options); 252 252 253 // Direct database update 254 $result = $wpdb->update( 255 $wpdb->options, 256 array('option_value' => $serialized), 257 array('option_name' => 'mxchat_transcripts_options'), 258 array('%s'), 259 array('%s') 260 ); 253 // Check if the option already exists in the database 254 $existing = $wpdb->get_var("SELECT option_id FROM {$wpdb->options} WHERE option_name = 'mxchat_transcripts_options'"); 255 256 if ($existing) { 257 // Option exists, do an update 258 $result = $wpdb->update( 259 $wpdb->options, 260 array('option_value' => $serialized), 261 array('option_name' => 'mxchat_transcripts_options'), 262 array('%s'), 263 array('%s') 264 ); 265 } else { 266 // Option doesn't exist (new install), do an insert 267 $result = $wpdb->insert( 268 $wpdb->options, 269 array( 270 'option_name' => 'mxchat_transcripts_options', 271 'option_value' => $serialized, 272 'autoload' => 'yes' 273 ), 274 array('%s', '%s', '%s') 275 ); 276 } 261 277 262 278 // Clear all caches after direct DB update … … 264 280 wp_cache_delete('alloptions', 'options'); 265 281 wp_cache_flush(); 266 267 // Verify the save worked by reading directly from database268 $db_value = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name = 'mxchat_transcripts_options'");269 270 // Log for debugging271 error_log('MXChat Transcripts Save: field=' . $field_name . ', value=' . $value . ', db_result=' . var_export($result, true));272 error_log('MXChat Transcripts Save: saved options=' . print_r($transcripts_options, true));273 error_log('MXChat Transcripts Verify: DB direct after save=' . $db_value);274 282 275 283 wp_send_json_success(['message' => esc_html__('Setting saved', 'mxchat')]); -
mxchat-basic/trunk/css/admin-sidebar.css
r3442157 r3448781 1950 1950 } 1951 1951 1952 /* Position feedback near inputs */ 1953 .mxch-admin-wrapper input + .feedback-container, 1954 .mxch-admin-wrapper select + .feedback-container, 1955 .mxch-admin-wrapper textarea + .feedback-container { 1952 /* Position feedback near inputs - use inline for form-table context */ 1953 .mxch-admin-wrapper .form-table input + .feedback-container, 1954 .mxch-admin-wrapper .form-table select + .feedback-container, 1955 .mxch-admin-wrapper .form-table textarea + .feedback-container { 1956 position: relative; 1957 display: inline-flex; 1958 vertical-align: middle; 1959 margin-left: 10px; 1960 right: auto; 1961 top: auto; 1962 transform: none; 1963 } 1964 1965 /* Position feedback near inputs - absolute for card layouts with field-control */ 1966 .mxch-admin-wrapper .mxch-field-control input + .feedback-container, 1967 .mxch-admin-wrapper .mxch-field-control select + .feedback-container, 1968 .mxch-admin-wrapper .mxch-field-control textarea + .feedback-container { 1956 1969 position: absolute; 1957 1970 right: -30px; -
mxchat-basic/trunk/css/admin-style.css
r3442157 r3448781 3229 3229 background-color: #f0f6fc; 3230 3230 transition: all 0.3s ease; 3231 position: relative; 3232 } 3233 3234 /* API Key save indicator positioning */ 3235 .api-key-wrapper .feedback-container { 3236 position: relative; 3237 display: inline-flex; 3238 vertical-align: middle; 3239 margin-left: 10px; 3240 right: auto; 3241 top: auto; 3242 transform: none; 3243 } 3244 3245 /* Generic field wrapper for save indicator positioning */ 3246 .mxchat-field-wrapper { 3247 position: relative; 3248 display: inline-block; 3249 } 3250 3251 .mxchat-field-wrapper .feedback-container { 3252 position: relative; 3253 display: inline-flex; 3254 vertical-align: middle; 3255 margin-left: 10px; 3256 right: auto; 3257 top: auto; 3258 transform: none; 3231 3259 } 3232 3260 -
mxchat-basic/trunk/includes/admin-knowledge-page.php
r3442157 r3448781 403 403 $options = $admin_instance->options ?? get_option('mxchat_options', array()); 404 404 405 // Check if user is using WordPress database (not Pinecone or OpenAI Vector Store) 406 $pinecone_options = get_option('mxchat_pinecone_addon_options', array()); 407 $is_pinecone_active = ($pinecone_options['mxchat_use_pinecone'] ?? '0') === '1'; 408 $vectorstore_options = get_option('mxchat_openai_vectorstore_options', array()); 409 $is_vectorstore_active = ($vectorstore_options['mxchat_use_openai_vectorstore'] ?? '0') === '1'; 410 $is_using_wordpress_db = !$is_pinecone_active && !$is_vectorstore_active; 411 405 412 // Check embedding API key 406 413 $embedding_model = isset($options['embedding_model']) ? esc_attr($options['embedding_model']) : 'text-embedding-ada-002'; … … 454 461 </div> 455 462 </div> 463 464 <?php if ($is_using_wordpress_db): ?> 465 <!-- WordPress Database Caution Notice --> 466 <div class="mxch-notice mxch-notice-warning" style="margin-bottom: 24px;"> 467 <svg class="mxch-notice-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 468 <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/> 469 </svg> 470 <div> 471 <strong><?php esc_html_e('Using WordPress Database:', 'mxchat'); ?></strong> 472 <?php esc_html_e('The WordPress database is not optimized for vector search with large datasets. If you plan to have more than 500 knowledge entries, we highly recommend using Pinecone for better performance and scalability.', 'mxchat'); ?> 473 </div> 474 </div> 475 <?php endif; ?> 456 476 457 477 <div class="mxch-card"> -
mxchat-basic/trunk/includes/class-mxchat-admin.php
r3446370 r3448781 5373 5373 public function api_key_callback() { 5374 5374 $apiKey = isset($this->options['api_key']) ? esc_attr($this->options['api_key']) : ''; 5375 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5375 5376 5376 5377 echo '<div class="api-key-wrapper">'; 5377 echo '<input type="password" id="api_key" name="api_key" value="' . $apiKey . '" class="regular-text " autocomplete="off" />';5378 echo '<input type="password" id="api_key" name="api_key" value="' . $apiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5378 5379 echo '<button type="button" id="toggleApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5379 5380 echo '<p class="description">' . esc_html__('Required for OpenAI GPT models and OpenAI embeddings. Get your API key from OpenAI Platform.', 'mxchat') . '</p>'; … … 5384 5385 public function xai_api_key_callback() { 5385 5386 $xaiApiKey = isset($this->options['xai_api_key']) ? esc_attr($this->options['xai_api_key']) : ''; 5387 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5386 5388 5387 5389 echo '<div class="api-key-wrapper">'; 5388 echo '<input type="password" id="xai_api_key" name="xai_api_key" value="' . $xaiApiKey . '" class="regular-text " autocomplete="off" />';5390 echo '<input type="password" id="xai_api_key" name="xai_api_key" value="' . $xaiApiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5389 5391 echo '<button type="button" id="toggleXaiApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5390 5392 echo '<p class="description">' . esc_html__('Required for X.AI Grok models. Get your API key from X.AI Console.', 'mxchat') . '</p>'; … … 5394 5396 public function claude_api_key_callback() { 5395 5397 $claudeApiKey = isset($this->options['claude_api_key']) ? esc_attr($this->options['claude_api_key']) : ''; 5398 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5396 5399 5397 5400 echo '<div class="api-key-wrapper">'; 5398 echo '<input type="password" id="claude_api_key" name="claude_api_key" value="' . $claudeApiKey . '" class="regular-text " autocomplete="off" />';5401 echo '<input type="password" id="claude_api_key" name="claude_api_key" value="' . $claudeApiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5399 5402 echo '<button type="button" id="toggleClaudeApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5400 5403 echo '<p class="description">' . esc_html__('Required for Anthropic Claude models. Get your API key from Anthropic Console.', 'mxchat') . '</p>'; … … 5405 5408 public function deepseek_api_key_callback() { 5406 5409 $apiKey = isset($this->options['deepseek_api_key']) ? esc_attr($this->options['deepseek_api_key']) : ''; 5410 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5407 5411 5408 5412 echo '<div class="api-key-wrapper">'; 5409 echo '<input type="password" id="deepseek_api_key" name="deepseek_api_key" value="' . $apiKey . '" class="regular-text " autocomplete="off" />';5413 echo '<input type="password" id="deepseek_api_key" name="deepseek_api_key" value="' . $apiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5410 5414 echo '<button type="button" id="toggleDeepSeekApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5411 5415 echo '<p class="description">' . esc_html__('Required for DeepSeek models. Get your API key from DeepSeek Platform.', 'mxchat') . '</p>'; … … 5416 5420 public function gemini_api_key_callback() { 5417 5421 $geminiApiKey = isset($this->options['gemini_api_key']) ? esc_attr($this->options['gemini_api_key']) : ''; 5422 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5418 5423 5419 5424 echo '<div class="api-key-wrapper">'; 5420 echo '<input type="password" id="gemini_api_key" name="gemini_api_key" value="' . $geminiApiKey . '" class="regular-text " autocomplete="off" />';5425 echo '<input type="password" id="gemini_api_key" name="gemini_api_key" value="' . $geminiApiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5421 5426 echo '<button type="button" id="toggleGeminiApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5422 5427 echo '<p class="description">' . esc_html__('Required for Google Gemini models and embeddings. Get your API key from Google AI Studio.', 'mxchat') . '</p>'; … … 5428 5433 public function openrouter_api_key_callback() { 5429 5434 $openrouterApiKey = isset($this->options['openrouter_api_key']) ? esc_attr($this->options['openrouter_api_key']) : ''; 5435 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5436 5430 5437 echo '<div class="api-key-wrapper">'; 5431 echo '<input type="password" id="openrouter_api_key" name="openrouter_api_key" value="' . $openrouterApiKey . '" class="regular-text " autocomplete="off" />';5438 echo '<input type="password" id="openrouter_api_key" name="openrouter_api_key" value="' . $openrouterApiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5432 5439 echo '<button type="button" id="toggleOpenRouterApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5433 5440 echo '<p class="description">' . esc_html__('Required for OpenRouter models. Get your API key from OpenRouter.ai', 'mxchat') . '</p>'; … … 5438 5445 public function voyage_api_key_callback() { 5439 5446 $apiKey = isset($this->options['voyage_api_key']) ? esc_attr($this->options['voyage_api_key']) : ''; 5447 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5440 5448 5441 5449 echo '<div class="api-key-wrapper">'; 5442 echo '<input type="password" id="voyage_api_key" name="voyage_api_key" value="' . $apiKey . '" class="regular-text " autocomplete="off" />';5450 echo '<input type="password" id="voyage_api_key" name="voyage_api_key" value="' . $apiKey . '" class="regular-text mxchat-autosave-field" autocomplete="off" data-nonce="' . $nonce . '" />'; 5443 5451 echo '<button type="button" id="toggleVoyageAPIKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; 5444 5452 echo '<p class="description">' . esc_html__('Required for Voyage AI embedding models. Get your API key from Voyage AI.', 'mxchat') . '</p>'; … … 5448 5456 public function mxchat_loops_api_key_callback() { 5449 5457 $loops_api_key = isset($this->options['loops_api_key']) ? esc_attr($this->options['loops_api_key']) : ''; 5458 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5450 5459 5451 5460 // Hidden fields to "trap" autofill … … 5455 5464 echo '<div class="api-key-wrapper">'; 5456 5465 echo sprintf( 5457 '<input type="password" id="loops_api_key" name="loops_api_key" value="%s" class="regular-text" autocomplete="new-password" />', 5458 $loops_api_key 5466 '<input type="password" id="loops_api_key" name="loops_api_key" value="%s" class="regular-text mxchat-autosave-field" autocomplete="new-password" data-nonce="%s" />', 5467 $loops_api_key, 5468 $nonce 5459 5469 ); 5460 5470 echo '<button type="button" id="toggleLoopsApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; … … 5466 5476 $loops_api_key = ''; 5467 5477 $selected_list = ''; 5478 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5468 5479 5469 5480 // Safely get the API key … … 5480 5491 $lists = $this->mxchat_fetch_loops_mailing_lists($loops_api_key); 5481 5492 if (is_array($lists) && !empty($lists)) { 5482 echo '<select id="loops_mailing_list" name="loops_mailing_list">'; 5493 echo '<div class="mxchat-field-wrapper">'; 5494 echo '<select id="loops_mailing_list" name="loops_mailing_list" class="mxchat-autosave-field" data-nonce="' . $nonce . '">'; 5483 5495 5484 5496 // Add a default "Select a list" option … … 5496 5508 } 5497 5509 echo '</select>'; 5510 echo '</div>'; 5498 5511 echo '<p class="description">' . esc_html__('Please select a mailing list to use with Loops.', 'mxchat') . '</p>'; 5499 5512 } else { … … 5509 5522 ? $this->options['triggered_phrase_response'] 5510 5523 : $default_response; 5524 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5525 5526 echo '<div class="mxchat-field-wrapper">'; 5511 5527 echo sprintf( 5512 '<textarea id="triggered_phrase_response" name="triggered_phrase_response" rows="3" cols="50">%s</textarea>', 5528 '<textarea id="triggered_phrase_response" name="triggered_phrase_response" rows="3" cols="50" class="mxchat-autosave-field" data-nonce="%s">%s</textarea>', 5529 $nonce, 5513 5530 esc_textarea($triggered_response) 5514 5531 ); 5532 echo '</div>'; 5515 5533 echo '<p class="description">' . esc_html__('Enter the instruction for the AI when a trigger keyword is detected. The AI will use this as guidance to naturally ask for the user\'s email in a conversational way.', 'mxchat') . '</p>'; 5516 5534 } … … 5521 5539 ? $this->options['email_capture_response'] 5522 5540 : $default_response; 5541 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 5542 5543 echo '<div class="mxchat-field-wrapper">'; 5523 5544 echo sprintf( 5524 '<textarea id="email_capture_response" name="email_capture_response" rows="3" cols="50">%s</textarea>', 5545 '<textarea id="email_capture_response" name="email_capture_response" rows="3" cols="50" class="mxchat-autosave-field" data-nonce="%s">%s</textarea>', 5546 $nonce, 5525 5547 esc_textarea($email_capture_response) 5526 5548 ); 5549 echo '</div>'; 5527 5550 echo '<p class="description">' . esc_html__('Enter the instruction for the AI when a user provides their email. The AI will use this as guidance to naturally confirm the email capture in a conversational way.', 'mxchat') . '</p>'; 5528 5551 } … … 5905 5928 ), 5906 5929 esc_html__('Google Gemini Embeddings', 'mxchat') => array( 5907 'gemini-embedding- exp-03-07' => esc_html__('Gemini Embedding (1536, Experimental)', 'mxchat'),5930 'gemini-embedding-001' => esc_html__('Gemini Embedding (1536, Stable)', 'mxchat'), 5908 5931 ) 5909 5932 ); … … 6806 6829 public function mxchat_brave_api_key_callback() { 6807 6830 $brave_api_key = isset($this->options['brave_api_key']) ? esc_attr($this->options['brave_api_key']) : ''; 6831 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6808 6832 6809 6833 echo '<div class="api-key-wrapper">'; 6810 6834 echo sprintf( 6811 '<input type="password" id="brave_api_key" name="brave_api_key" value="%s" class="regular-text" />', 6812 $brave_api_key 6835 '<input type="password" id="brave_api_key" name="brave_api_key" value="%s" class="regular-text mxchat-autosave-field" data-nonce="%s" />', 6836 $brave_api_key, 6837 $nonce 6813 6838 ); 6814 6839 echo '<button type="button" id="toggleBraveApiKeyVisibility">' . esc_html__('Show', 'mxchat') . '</button>'; … … 6821 6846 ? intval($this->options['brave_image_count']) 6822 6847 : 4; 6823 6848 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6849 6850 echo '<div class="mxchat-field-wrapper">'; 6824 6851 echo sprintf( 6825 6852 '<input type="number" id="brave_image_count" name="brave_image_count" 6826 value="%d" min="1" max="6" class="small-text" />', 6827 $brave_image_count 6828 ); 6853 value="%d" min="1" max="6" class="small-text mxchat-autosave-field" data-nonce="%s" />', 6854 $brave_image_count, 6855 $nonce 6856 ); 6857 echo '</div>'; 6829 6858 echo '<p class="description">' . __('Select the number of images to return (1-6).', 'mxchat') . '</p>'; 6830 6859 } … … 6834 6863 ? esc_attr($this->options['brave_safe_search']) 6835 6864 : 'strict'; 6836 6837 echo '<select id="brave_safe_search" name="brave_safe_search">'; 6865 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6866 6867 echo '<div class="mxchat-field-wrapper">'; 6868 echo '<select id="brave_safe_search" name="brave_safe_search" class="mxchat-autosave-field" data-nonce="' . $nonce . '">'; 6838 6869 echo sprintf( 6839 6870 '<option value="strict" %s>%s</option>', … … 6847 6878 ); 6848 6879 echo '</select>'; 6880 echo '</div>'; 6849 6881 echo '<p class="description">' . 6850 6882 esc_html__('Set the Safe Search level for image searches. Brave Search only supports "Strict" and "Off" options.', 'mxchat') . … … 6856 6888 ? intval($this->options['brave_news_count']) 6857 6889 : 3; 6858 6890 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6891 6892 echo '<div class="mxchat-field-wrapper">'; 6859 6893 echo sprintf( 6860 6894 '<input type="number" id="brave_news_count" name="brave_news_count" 6861 value="%d" min="1" max="10" class="small-text" />', 6862 $brave_news_count 6863 ); 6895 value="%d" min="1" max="10" class="small-text mxchat-autosave-field" data-nonce="%s" />', 6896 $brave_news_count, 6897 $nonce 6898 ); 6899 echo '</div>'; 6864 6900 echo '<p class="description">' . esc_html__('Select the number of news articles to retrieve (1-10).', 'mxchat') . '</p>'; 6865 6901 } … … 6869 6905 ? esc_attr($this->options['brave_country']) 6870 6906 : 'us'; 6871 6907 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6908 6909 echo '<div class="mxchat-field-wrapper">'; 6872 6910 echo sprintf( 6873 6911 '<input type="text" id="brave_country" name="brave_country" 6874 value="%s" maxlength="2" class="small-text" />', 6875 $brave_country 6876 ); 6912 value="%s" maxlength="2" class="small-text mxchat-autosave-field" data-nonce="%s" />', 6913 $brave_country, 6914 $nonce 6915 ); 6916 echo '</div>'; 6877 6917 echo '<p class="description">' . esc_html__('Enter the country code (e.g., "us" for United States).', 'mxchat') . '</p>'; 6878 6918 } … … 6882 6922 ? esc_attr($this->options['brave_language']) 6883 6923 : 'en'; 6884 6924 $nonce = wp_create_nonce('mxchat_autosave_nonce'); 6925 6926 echo '<div class="mxchat-field-wrapper">'; 6885 6927 echo sprintf( 6886 6928 '<input type="text" id="brave_language" name="brave_language" 6887 value="%s" maxlength="2" class="small-text" />', 6888 $brave_language 6889 ); 6929 value="%s" maxlength="2" class="small-text mxchat-autosave-field" data-nonce="%s" />', 6930 $brave_language, 6931 $nonce 6932 ); 6933 echo '</div>'; 6890 6934 echo '<p class="description">' . esc_html__('Enter the language code (e.g., "en" for English).', 'mxchat') . '</p>'; 6891 6935 } … … 7664 7708 'text-embedding-3-large', 7665 7709 'voyage-3-large', 7666 'gemini-embedding- exp-03-07'7710 'gemini-embedding-001' 7667 7711 ); 7668 7712 if (in_array($input['embedding_model'], $allowed_models)) { -
mxchat-basic/trunk/js/mxchat-admin.js
r3446370 r3448781 1694 1694 gemini: [ 1695 1695 { 1696 value: 'gemini-embedding- exp-03-07',1697 label: 'Gemini Embedding', 1698 description: ' ExperimentalSOTA embeddings (1536 dimensions, 8K context)'1696 value: 'gemini-embedding-001', 1697 label: 'Gemini Embedding', 1698 description: 'Stable SOTA embeddings (1536 dimensions, 8K context)' 1699 1699 } 1700 1700 ] -
mxchat-basic/trunk/mxchat-basic.php
r3446370 r3448781 4 4 * Plugin URI: https://mxchat.ai/ 5 5 * Description: AI chatbot for WordPress with OpenAI, Claude, xAI, DeepSeek, live agent, PDF uploads, WooCommerce, and training on website data. 6 * Version: 3.0. 46 * Version: 3.0.5 7 7 * Author: MxChat 8 8 * Author URI: https://mxchat.ai … … 768 768 } 769 769 770 // 3.0.5: Migrate deprecated Gemini embedding model 771 if (version_compare($current_version, '3.0.5', '<')) { 772 mxchat_migrate_gemini_embedding_model(); 773 } 774 770 775 // Run full activation to ensure everything is up to date 771 776 mxchat_activate(); … … 1054 1059 } 1055 1060 1061 /** 1062 * Migration: Update deprecated Gemini embedding model (v3.0.5) 1063 * Updates gemini-embedding-exp-03-07 to gemini-embedding-001 for users who had it selected 1064 */ 1065 function mxchat_migrate_gemini_embedding_model() { 1066 $options = get_option('mxchat_options', array()); 1067 1068 if (isset($options['embedding_model']) && $options['embedding_model'] === 'gemini-embedding-exp-03-07') { 1069 $options['embedding_model'] = 'gemini-embedding-001'; 1070 update_option('mxchat_options', $options); 1071 } 1072 } 1073 1056 1074 // Register activation hook 1057 1075 register_activation_hook(__FILE__, 'mxchat_activate'); -
mxchat-basic/trunk/readme.txt
r3446370 r3448781 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.2 8 Stable tag: 3.0. 48 Stable tag: 3.0.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 38 38 👉 [Visit our website to view all add-ons](https://mxchat.ai) 39 39 40 ## 🔥 What's New in Version 3.0.4 41 42 🤖 **New Google Gemini Models** 43 - New: Added latest Google Gemini models (3 Pro Preview, 3 Flash Preview, 2.5 Pro, 2.5 Flash, 2.5 Flash-Lite) 44 45 🌍 **Transcript Translation** 46 - New: Auto-translate chat transcripts to any language 47 48 📊 **Action Scores in Transcripts** 49 - New: View action similarity scores in the chat transcripts sources modal 50 - See which documents ranked highest for each response 51 - Track which actions triggered or almost triggered during conversations 40 ## 🔥 What's New in Version 3.0.5 41 42 🔧 **Gemini Embedding Model Update** 43 - Fixed: Updated Gemini embedding model from deprecated `gemini-embedding-exp-03-07` to stable `gemini-embedding-001` 52 44 53 45 🐛 **Bug Fixes** 54 - Fixed: Lead capture forms not working with multi-bot class IDs 46 - Fixed: Notification settings not saving on new installations 47 - Fixed: Save indicators not visible on settings fields (API keys, Slack, Telegram, Loops, Brave Search) 48 49 ✨ **Improvements** 50 - Added: Warning notice for WordPress database users recommending Pinecone for large knowledge bases (500+ entries) 51 - Improved: Minor admin UI updates for better user experience 55 52 56 53 ## Core Features That Set MxChat Apart … … 270 267 == Changelog == 271 268 269 = 3.0.5 - January 28, 2026 = 270 - Fixed: Updated Gemini embedding model from deprecated `gemini-embedding-exp-03-07` to stable `gemini-embedding-001` 271 - Fixed: Notification settings not saving on new installations 272 - Fixed: Save indicators not visible on settings fields (API keys, Slack, Telegram, Loops, Brave Search) 273 - Added: Warning notice for WordPress database users recommending Pinecone for large knowledge bases 274 - Improved: Minor admin UI updates for better user experience 275 272 276 = 3.0.4 - January 24, 2026 = 273 277 - New: Added latest Google Gemini models (3 Pro Preview, 3 Flash Preview, 2.5 Pro, 2.5 Flash, 2.5 Flash-Lite) … … 532 536 = 2.2.1 = 533 537 - Added Claude Sonnet 4 and Claude Opus 4 chat models. 534 - Integrated Google Gemini embedding model (gemini-embedding- exp-03-07).538 - Integrated Google Gemini embedding model (gemini-embedding-001). 535 539 - Built Pinecone vector database support directly into core plugin. 536 540 - Removed dependency on separate Pinecone add-on. … … 786 790 == Upgrade Notice == 787 791 788 = 3.0. 4 - January 23, 2026 =789 New Gemini models (3 Pro, 3 Flash, 2.5 Pro, 2.5 Flash, 2.5 Flash-Lite), transcript translation, action scores in transcript sources modal, and lead capture fix for multi-bot setups.792 = 3.0.5 - January 28, 2026 = 793 Minor update: Updated Gemini embedding model to stable version, fixed notification settings on new installs, improved save indicators visibility, and added WordPress database warning for large knowledge bases. 790 794 791 795 == License & Warranty ==
Note: See TracChangeset
for help on using the changeset viewer.