Changeset 3319002
- Timestamp:
- 06/28/2025 01:37:03 AM (8 months ago)
- Location:
- mxchat-basic
- Files:
-
- 95 added
- 9 edited
-
tags/2.2.8 (added)
-
tags/2.2.8/admin (added)
-
tags/2.2.8/admin/class-ajax-handler.php (added)
-
tags/2.2.8/admin/class-knowledge-manager.php (added)
-
tags/2.2.8/admin/class-pinecone-manager.php (added)
-
tags/2.2.8/css (added)
-
tags/2.2.8/css/admin-add-ons.css (added)
-
tags/2.2.8/css/admin-style.css (added)
-
tags/2.2.8/css/chat-style.css (added)
-
tags/2.2.8/css/chat-transcripts.css (added)
-
tags/2.2.8/css/content-selector.css (added)
-
tags/2.2.8/css/intent-style.css (added)
-
tags/2.2.8/css/knowledge-style.css (added)
-
tags/2.2.8/css/test-panel.css (added)
-
tags/2.2.8/images (added)
-
tags/2.2.8/images/Icon-01.svg (added)
-
tags/2.2.8/images/Icon-02.svg (added)
-
tags/2.2.8/images/Icon-03.svg (added)
-
tags/2.2.8/images/Icon-04.svg (added)
-
tags/2.2.8/images/pro-only-dark.png (added)
-
tags/2.2.8/includes (added)
-
tags/2.2.8/includes/class-mxchat-addons.php (added)
-
tags/2.2.8/includes/class-mxchat-admin.php (added)
-
tags/2.2.8/includes/class-mxchat-integrator.php (added)
-
tags/2.2.8/includes/class-mxchat-public.php (added)
-
tags/2.2.8/includes/class-mxchat-user.php (added)
-
tags/2.2.8/includes/class-mxchat-utils.php (added)
-
tags/2.2.8/includes/class-mxchat-word-handler.php (added)
-
tags/2.2.8/includes/pdf-parser (added)
-
tags/2.2.8/includes/pdf-parser/alt_autoload.php (added)
-
tags/2.2.8/includes/pdf-parser/src (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Config.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Document.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementArray.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementBoolean.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementDate.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementHexa.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementMissing.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementName.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementNull.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementNumeric.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementString.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementStruct.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Element/ElementXRef.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/AbstractEncoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/EncodingLocator.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/ISOLatin1Encoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/ISOLatin9Encoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/MacRomanEncoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/PDFDocEncoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/StandardEncoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Encoding/WinAnsiEncoding.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Exception (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Exception/EmptyPdfException.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Exception/EncodingNotFoundException.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Exception/MissingPdfHeaderException.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Exception/NotImplementedException.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontCIDFontType0.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontCIDFontType2.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontTrueType.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType0.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType1.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Font/FontType3.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Header.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/PDFObject.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Page.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Pages.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/Parser.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/RawData (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/RawData/FilterHelper.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/RawData/RawDataParser.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/XObject (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/XObject/Form.php (added)
-
tags/2.2.8/includes/pdf-parser/src/Smalot/PdfParser/XObject/Image.php (added)
-
tags/2.2.8/js (added)
-
tags/2.2.8/js/activation-script.js (added)
-
tags/2.2.8/js/chat-script.js (added)
-
tags/2.2.8/js/content-selector.js (added)
-
tags/2.2.8/js/knowledge-processing.js (added)
-
tags/2.2.8/js/mxchat-admin.js (added)
-
tags/2.2.8/js/mxchat_transcripts.js (added)
-
tags/2.2.8/js/test-panel.js (added)
-
tags/2.2.8/languages (added)
-
tags/2.2.8/languages/mxchat.pot (added)
-
tags/2.2.8/mxchat-basic.php (added)
-
tags/2.2.8/readme.txt (added)
-
trunk/admin/class-ajax-handler.php (modified) (1 diff)
-
trunk/admin/class-knowledge-manager.php (modified) (7 diffs)
-
trunk/includes/class-mxchat-addons.php (modified) (5 diffs)
-
trunk/includes/class-mxchat-admin.php (modified) (6 diffs)
-
trunk/includes/class-mxchat-integrator.php (modified) (8 diffs)
-
trunk/js/chat-script.js (modified) (6 diffs)
-
trunk/js/content-selector.js (modified) (2 diffs)
-
trunk/mxchat-basic.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mxchat-basic/trunk/admin/class-ajax-handler.php
r3311750 r3319002 189 189 'show_pdf_upload_button', 190 190 'show_word_upload_button', 191 'enable_streaming_toggle' // Add this line 191 'enable_streaming_toggle', 192 'contextual_awareness_toggle' // Add this line 192 193 ])) { 193 194 //error_log('MXChat Save: Processing toggle: ' . $name); -
mxchat-basic/trunk/admin/class-knowledge-manager.php
r3315188 r3319002 1821 1821 1822 1822 $page = isset($_GET['page']) ? absint($_GET['page']) : 1; 1823 $per_page = isset($_GET['per_page']) ? absint($_GET['per_page']) : 20;1823 $per_page = isset($_GET['per_page']) ? absint($_GET['per_page']) : 50; 1824 1824 $search = isset($_GET['search']) ? sanitize_text_field($_GET['search']) : ''; 1825 1825 $post_type = isset($_GET['post_type']) ? sanitize_text_field($_GET['post_type']) : 'all'; … … 1998 1998 } 1999 1999 2000 // Get minimal content2000 // Get content including ACF fields 2001 2001 $content = $post->post_title . "\n\n" . wp_strip_all_tags($post->post_content); 2002 2003 // ADD ACF FIELDS SUPPORT 2004 $acf_fields = $this->mxchat_get_acf_fields_for_post($post_id); 2005 if (!empty($acf_fields)) { 2006 $acf_content_parts = array(); 2007 2008 foreach ($acf_fields as $field_name => $field_value) { 2009 $formatted_value = $this->mxchat_format_acf_field_value($field_value, $field_name, $post_id); 2010 2011 if (!empty($formatted_value)) { 2012 // Convert field name to readable label 2013 $field_label = ucwords(str_replace('_', ' ', $field_name)); 2014 $acf_content_parts[] = $field_label . ": " . $formatted_value; 2015 } 2016 } 2017 2018 if (!empty($acf_content_parts)) { 2019 $content .= "\n\n" . implode("\n", $acf_content_parts); 2020 } 2021 } 2022 2002 2023 $content = substr($content, 0, 10000); // Limit content size 2003 2024 … … 2025 2046 $vector_id = md5($source_url); // Vector ID for Pinecone 2026 2047 2027 // ================================ 2028 // FIXED: Check for existing content in ONLY the active storage method 2029 // ================================ 2030 2048 // Check for existing content in ONLY the active storage method 2031 2049 $is_update = false; 2032 2050 … … 2068 2086 } 2069 2087 2070 // ================================ 2071 // UPDATE: Only update caches if Pinecone is enabled 2072 // ================================ 2073 2088 // Update caches if Pinecone is enabled 2074 2089 if ($use_pinecone && !empty($pinecone_options['mxchat_pinecone_api_key'])) { 2075 2090 // Update vector ID cache for improved fetching … … 2100 2115 $operation_type = $is_update ? 'update' : 'new'; 2101 2116 2117 // Count ACF fields for debugging 2118 $acf_field_count = count($acf_fields); 2119 2102 2120 // Success response with minimal data 2103 2121 wp_send_json_success(array( … … 2106 2124 'title' => $post->post_title, 2107 2125 'operation_type' => $operation_type, 2108 'vector_id' => $vector_id, // Include vector ID for debugging 2109 'cache_updated' => $use_pinecone // Indicate if cache was updated 2126 'vector_id' => $vector_id, 2127 'cache_updated' => $use_pinecone, 2128 'acf_fields_found' => $acf_field_count, 2129 'content_preview' => substr($content, 0, 100) . '...' 2110 2130 )); 2111 2131 exit; … … 3022 3042 } 3023 3043 3044 /** 3045 * Get all ACF fields for a specific post 3046 */ 3047 public function mxchat_get_acf_fields_for_post($post_id) { 3048 if (!function_exists('get_fields')) { 3049 return array(); 3050 } 3051 3052 $fields = get_fields($post_id); 3053 if (!$fields || !is_array($fields)) { 3054 return array(); 3055 } 3056 3057 return $fields; 3058 } 3059 3060 /** 3061 * Format ACF field values for content extraction 3062 */ 3063 public function mxchat_format_acf_field_value($value, $field_name = '', $post_id = 0) { 3064 if (empty($value)) { 3065 return ''; 3066 } 3067 3068 // Handle different ACF field types 3069 if (is_array($value)) { 3070 // Check if it's an image/file field 3071 if (isset($value['url'])) { 3072 // Image field - return alt text, title, or caption 3073 if (!empty($value['alt'])) { 3074 return $value['alt']; 3075 } elseif (!empty($value['title'])) { 3076 return $value['title']; 3077 } elseif (!empty($value['caption'])) { 3078 return $value['caption']; 3079 } else { 3080 return ''; // Don't include just the URL 3081 } 3082 } 3083 3084 // Check if it's a post object or relationship field 3085 if (isset($value['post_title'])) { 3086 return $value['post_title']; 3087 } 3088 3089 // Check if it's a user field 3090 if (isset($value['display_name'])) { 3091 return $value['display_name']; 3092 } 3093 3094 // Check if it's a taxonomy term 3095 if (isset($value['name']) && isset($value['taxonomy'])) { 3096 return $value['name']; 3097 } 3098 3099 // Check if it's a select field with label 3100 if (isset($value['label'])) { 3101 return $value['label']; 3102 } 3103 3104 // Check for repeater field or flexible content 3105 if (is_numeric(key($value))) { 3106 $sub_values = array(); 3107 foreach ($value as $sub_item) { 3108 if (is_array($sub_item)) { 3109 // For repeater/flexible content, extract text values 3110 $sub_text = $this->mxchat_extract_text_from_acf_array($sub_item); 3111 if (!empty($sub_text)) { 3112 $sub_values[] = $sub_text; 3113 } 3114 } else { 3115 $sub_values[] = (string) $sub_item; 3116 } 3117 } 3118 return implode(', ', array_filter($sub_values)); 3119 } 3120 3121 // For other arrays, try to extract meaningful text 3122 $text_values = array(); 3123 foreach ($value as $key => $val) { 3124 if (is_string($val) && !empty(trim($val))) { 3125 $text_values[] = trim($val); 3126 } elseif (is_array($val) && isset($val['post_title'])) { 3127 $text_values[] = $val['post_title']; 3128 } elseif (is_array($val) && isset($val['name'])) { 3129 $text_values[] = $val['name']; 3130 } 3131 } 3132 3133 return implode(', ', array_filter($text_values)); 3134 } 3135 3136 // Handle object values 3137 if (is_object($value)) { 3138 if (isset($value->post_title)) { 3139 return $value->post_title; 3140 } elseif (isset($value->display_name)) { 3141 return $value->display_name; 3142 } elseif (isset($value->name)) { 3143 return $value->name; 3144 } elseif (method_exists($value, '__toString')) { 3145 return (string) $value; 3146 } 3147 return ''; 3148 } 3149 3150 // Handle boolean values 3151 if (is_bool($value)) { 3152 return $value ? 'Yes' : 'No'; 3153 } 3154 3155 // For everything else, convert to string 3156 return (string) $value; 3157 } 3158 3159 /** 3160 * Extract text from complex ACF array structures 3161 */ 3162 private function mxchat_extract_text_from_acf_array($array) { 3163 if (!is_array($array)) { 3164 return ''; 3165 } 3166 3167 $text_parts = array(); 3168 3169 foreach ($array as $key => $value) { 3170 if (is_string($value) && !empty(trim($value))) { 3171 // Skip keys that are likely to be IDs or technical values 3172 if (!is_numeric($value) || strlen($value) > 10) { 3173 $text_parts[] = trim($value); 3174 } 3175 } elseif (is_array($value)) { 3176 if (isset($value['post_title'])) { 3177 $text_parts[] = $value['post_title']; 3178 } elseif (isset($value['name'])) { 3179 $text_parts[] = $value['name']; 3180 } elseif (isset($value['label'])) { 3181 $text_parts[] = $value['label']; 3182 } 3183 } 3184 } 3185 3186 return implode(', ', array_filter($text_parts)); 3187 } 3188 3189 3190 3024 3191 public function mxchat_handle_post_update($post_id, $post, $update) { 3025 3192 // Basic validation checks -
mxchat-basic/trunk/includes/class-mxchat-addons.php
r3317645 r3319002 19 19 public function __construct() { 20 20 $this->addons_config = array( 21 'mxchat-intent-tester' => array( 21 22 'mxchat-theme' => array( 23 'title' => __('MxChat Theme Customizer', 'mxchat'), 24 'description' => __('Make your chatbot uniquely yours. Customize colors, styles, and appearance with live previews—zero coding required. Perfect for matching your brand identity.', 'mxchat'), 25 'key_benefits' => array( 26 __('Live preview customizer', 'mxchat'), 27 __('Point-and-click simplicity', 'mxchat'), 28 __('Brand-perfect styling', 'mxchat') 29 ), 30 'license' => 'MxChat PRO', 31 'accent' => '#fa73e6', 32 'url' => 'https://quickdeploywp.com/plugin/mxchat-theme/', 33 'plugin_file' => 'mxchat-theme/mxchat-theme.php', 34 'config_page' => 'mxchat-theme-settings' 35 ), 36 37 'mxchat-admin-assistant' => array( 38 'title' => __('MxChat Admin Assistant', 'mxchat'), 39 'description' => __('Your AI powerhouse inside WordPress. Chat with multiple AI models, generate images, research the web, and boost productivity—all without leaving your dashboard.', 'mxchat'), 40 'key_benefits' => array( 41 __('ChatGPT-like admin interface', 'mxchat'), 42 __('Generate images & research web', 'mxchat'), 43 __('Searchable chat history', 'mxchat') 44 ), 45 'license' => 'MxChat PRO', 46 'accent' => '#fa73e6', 47 'url' => 'https://quickdeploywp.com/plugin/mxchat-admin-assistant/', 48 'plugin_file' => 'mxchat-admin-chat/mxchat-admin-chat.php', 49 'config_page' => 'mxchat-admin-chat' 50 ), 51 'mxchat-forms' => array( 52 'title' => __('MxChat Forms', 'mxchat'), 53 'description' => __('Convert conversations into data collection. Create smart forms that trigger during chats, collect user information, and turn casual visitors into qualified leads.', 'mxchat'), 54 'key_benefits' => array( 55 __('No-code form builder', 'mxchat'), 56 __('Intent-triggered activation', 'mxchat'), 57 __('Export lead data easily', 'mxchat') 58 ), 59 'license' => 'MxChat PRO', 60 'accent' => '#fa73e6', 61 'url' => 'https://quickdeploywp.com/plugin/mxchat-forms/', 62 'plugin_file' => 'mxchat-forms/mxchat-forms.php', 63 'config_page' => 'mxchat-forms' 64 ), 65 'mxchat-smart-recommender' => array( 66 'title' => __('MxChat Smart Recommender', 'mxchat'), 67 'description' => __('Turn your chatbot into a sales machine. Build personalized recommendation flows that understand user preferences and suggest perfect products or services.', 'mxchat'), 68 'key_benefits' => array( 69 __('Increase conversion rates', 'mxchat'), 70 __('Custom recommendation flows', 'mxchat'), 71 __('No coding required', 'mxchat') 72 ), 73 'license' => 'MxChat PRO', 74 'accent' => '#fa73e6', 75 'url' => 'https://quickdeploywp.com/plugin/mxchat-smart-recommender/', 76 'plugin_file' => 'mxchat-smart-recommender/mxchat-smart-recommender.php', 77 'config_page' => 'mxchat-smart-recommender' 78 ), 79 'mxchat-woo' => array( 80 'title' => __('MxChat WooCommerce', 'mxchat'), 81 'description' => __('Boost sales with AI-powered shopping assistance. Help customers find products, manage carts, and complete purchases—all through natural conversation.', 'mxchat'), 82 'key_benefits' => array( 83 __('Smart product recommendations', 'mxchat'), 84 __('Cart & checkout assistance', 'mxchat'), 85 __('Order history access', 'mxchat') 86 ), 87 'license' => 'MxChat PRO', 88 'accent' => '#fa73e6', 89 'url' => 'https://quickdeploywp.com/plugin/mxchat-woo/', 90 'plugin_file' => 'mxchat-woo/mxchat-woo.php', 91 'config_page' => 'mxchat-woo' 92 ), 93 'mxchat-perplexity' => array( 94 'title' => __('MxChat Perplexity', 'mxchat'), 95 'description' => __('Give your chatbot real-time knowledge. Add powerful web search capabilities so your bot can answer questions about current events and time-sensitive information.', 'mxchat'), 96 'key_benefits' => array( 97 __('Real-time web search', 'mxchat'), 98 __('Intent-triggered research', 'mxchat'), 99 __('Up-to-date information', 'mxchat') 100 ), 101 'license' => 'MxChat PRO', 102 'accent' => '#fa73e6', 103 'url' => 'https://quickdeploywp.com/plugin/mxchat-perplexity/', 104 'plugin_file' => 'mxchat-perplexity/mxchat-perplexity.php', 105 'config_page' => 'mxchat-perplexity' 106 ), 107 'mxchat-moderation' => array( 108 'title' => __('MxChat Moderation', 'mxchat'), 109 'description' => __('Keep your chat clean and professional. Block unwanted users, filter inappropriate content, and ensure your chatbot represents your brand properly.', 'mxchat'), 110 'key_benefits' => array( 111 __('IP & email-based blocking', 'mxchat'), 112 __('Content filtering', 'mxchat'), 113 __('Spam protection', 'mxchat') 114 ), 115 'license' => 'MxChat PRO', 116 'accent' => '#fa73e6', 117 'url' => 'https://quickdeploywp.com/plugin/mxchat-moderation/', 118 'plugin_file' => 'mxchat-moderation/mx-chat-moderation.php', 119 'config_page' => 'mx-chat-moderation' 120 ), 121 122 'mxchat-intent-tester' => array( 22 123 'title' => __('MxChat Similarity Tester', 'mxchat'), 23 124 'description' => __('See exactly how your chatbot thinks. Visualize intent matches and similarity scores to optimize accuracy and understand AI decision-making. Essential for fine-tuning your responses.', 'mxchat'), … … 33 134 'config_page' => 'mxchat-intent-tester' 34 135 ), 35 'mxchat-pinecone' => array( 136 137 'mxchat-pinecone' => array( 36 138 'title' => __('Pinecone DB Manager (Deprecated)', 'mxchat'), 37 139 'description' => __('This add-on has been sunsetted and is now included directly in the core MxChat plugin. Find Pinecone settings under the Knowledge tab in Pinecone Settings.', 'mxchat'), … … 48 150 'status' => 'deprecated' 49 151 ), 50 'mxchat-admin-assistant' => array(51 'title' => __('MxChat Admin Assistant', 'mxchat'),52 'description' => __('Your AI powerhouse inside WordPress. Chat with multiple AI models, generate images, research the web, and boost productivity—all without leaving your dashboard.', 'mxchat'),53 'key_benefits' => array(54 __('ChatGPT-like admin interface', 'mxchat'),55 __('Generate images & research web', 'mxchat'),56 __('Searchable chat history', 'mxchat')57 ),58 'license' => 'MxChat PRO',59 'accent' => '#fa73e6',60 'url' => 'https://quickdeploywp.com/plugin/mxchat-admin-assistant/',61 'plugin_file' => 'mxchat-admin-chat/mxchat-admin-chat.php',62 'config_page' => 'mxchat-admin-chat'63 ),64 'mxchat-forms' => array(65 'title' => __('MxChat Forms', 'mxchat'),66 'description' => __('Convert conversations into data collection. Create smart forms that trigger during chats, collect user information, and turn casual visitors into qualified leads.', 'mxchat'),67 'key_benefits' => array(68 __('No-code form builder', 'mxchat'),69 __('Intent-triggered activation', 'mxchat'),70 __('Export lead data easily', 'mxchat')71 ),72 'license' => 'MxChat PRO',73 'accent' => '#fa73e6',74 'url' => 'https://quickdeploywp.com/plugin/mxchat-forms/',75 'plugin_file' => 'mxchat-forms/mxchat-forms.php',76 'config_page' => 'mxchat-forms'77 ),78 'mxchat-smart-recommender' => array(79 'title' => __('MxChat Smart Recommender', 'mxchat'),80 'description' => __('Turn your chatbot into a sales machine. Build personalized recommendation flows that understand user preferences and suggest perfect products or services.', 'mxchat'),81 'key_benefits' => array(82 __('Increase conversion rates', 'mxchat'),83 __('Custom recommendation flows', 'mxchat'),84 __('No coding required', 'mxchat')85 ),86 'license' => 'MxChat PRO',87 'accent' => '#fa73e6',88 'url' => 'https://quickdeploywp.com/plugin/mxchat-smart-recommender/',89 'plugin_file' => 'mxchat-smart-recommender/mxchat-smart-recommender.php',90 'config_page' => 'mxchat-smart-recommender'91 ),92 'mxchat-woo' => array(93 'title' => __('MxChat WooCommerce', 'mxchat'),94 'description' => __('Boost sales with AI-powered shopping assistance. Help customers find products, manage carts, and complete purchases—all through natural conversation.', 'mxchat'),95 'key_benefits' => array(96 __('Smart product recommendations', 'mxchat'),97 __('Cart & checkout assistance', 'mxchat'),98 __('Order history access', 'mxchat')99 ),100 'license' => 'MxChat PRO',101 'accent' => '#fa73e6',102 'url' => 'https://quickdeploywp.com/plugin/mxchat-woo/',103 'plugin_file' => 'mxchat-woo/mxchat-woo.php',104 'config_page' => 'mxchat-woo'105 ),106 'mxchat-theme' => array(107 'title' => __('MxChat Theme Customizer', 'mxchat'),108 'description' => __('Make your chatbot uniquely yours. Customize colors, styles, and appearance with live previews—zero coding required. Perfect for matching your brand identity.', 'mxchat'),109 'key_benefits' => array(110 __('Live preview customizer', 'mxchat'),111 __('Point-and-click simplicity', 'mxchat'),112 __('Brand-perfect styling', 'mxchat')113 ),114 'license' => 'MxChat PRO',115 'accent' => '#fa73e6',116 'url' => 'https://quickdeploywp.com/plugin/mxchat-theme/',117 'plugin_file' => 'mxchat-theme/mxchat-theme.php',118 'config_page' => 'mxchat-theme-settings'119 ),120 'mxchat-perplexity' => array(121 'title' => __('MxChat Perplexity', 'mxchat'),122 'description' => __('Give your chatbot real-time knowledge. Add powerful web search capabilities so your bot can answer questions about current events and time-sensitive information.', 'mxchat'),123 'key_benefits' => array(124 __('Real-time web search', 'mxchat'),125 __('Intent-triggered research', 'mxchat'),126 __('Up-to-date information', 'mxchat')127 ),128 'license' => 'MxChat PRO',129 'accent' => '#fa73e6',130 'url' => 'https://quickdeploywp.com/plugin/mxchat-perplexity/',131 'plugin_file' => 'mxchat-perplexity/mxchat-perplexity.php',132 'config_page' => 'mxchat-perplexity'133 ),134 'mxchat-moderation' => array(135 'title' => __('MxChat Moderation', 'mxchat'),136 'description' => __('Keep your chat clean and professional. Block unwanted users, filter inappropriate content, and ensure your chatbot represents your brand properly.', 'mxchat'),137 'key_benefits' => array(138 __('IP & email-based blocking', 'mxchat'),139 __('Content filtering', 'mxchat'),140 __('Spam protection', 'mxchat')141 ),142 'license' => 'MxChat PRO',143 'accent' => '#fa73e6',144 'url' => 'https://quickdeploywp.com/plugin/mxchat-moderation/',145 'plugin_file' => 'mxchat-moderation/mx-chat-moderation.php',146 'config_page' => 'mx-chat-moderation'147 ),148 152 ); 149 153 } … … 153 157 */ 154 158 public function enqueue_styles() { 155 $plugin_version = '2.2. 7';159 $plugin_version = '2.2.8'; 156 160 157 161 wp_enqueue_style( … … 216 220 * Render the Add Ons page content. 217 221 */ 218 public function render_page() { 219 $this->enqueue_styles(); 220 $sorted_addons = array(); 221 222 // Put free add-ons first, then pro add-ons 223 foreach ($this->addons_config as $slug => $addon) { 224 if ($addon['license'] === 'free') { 225 $sorted_addons[$slug] = $addon; 226 } 227 } 228 229 foreach ($this->addons_config as $slug => $addon) { 230 if ($addon['license'] !== 'free') { 231 $sorted_addons[$slug] = $addon; 232 } 233 } 234 235 ?> 236 <div class="wrap mxchat-addons-wrapper"> 222 public function render_page() { 223 $this->enqueue_styles(); 224 // Remove the sorting logic and just use the original order 225 $sorted_addons = $this->addons_config; 226 227 ?> 228 <div class="wrap mxchat-addons-wrapper"> 237 229 <div class="mxchat-addons-hero"> 238 230 <h1 class="mxchat-main-title"> -
mxchat-basic/trunk/includes/class-mxchat-admin.php
r3317645 r3319002 97 97 'input_copy' => esc_html__('How can I assist?', 'mxchat'), 98 98 'append_to_body' => esc_html__('off', 'mxchat'), 99 'contextual_awareness_toggle' => 'off', 99 100 'close_button_color' => esc_html__('#fff', 'mxchat'), 100 101 'chatbot_bg_color' => esc_html__('#fff', 'mxchat'), … … 327 328 <div class="mxchat-pro-content"> 328 329 <h3>🚀 Limited Lifetime Offer: Save 30% on MxChat Pro, Agency, or Agency Plus!</h3> 329 <p>Unlock <strong>unlimited access</strong> to our growing collection of powerful add-ons including Admin AI Assistant (ChatGPT-like experience in your admin panel), Forms Builder, AI Theme Generator, WooCommerce, Perplexity, and more – all included with your <strong>lifetime license!</strong></p> </div>330 <p>Unlock <strong>unlimited access</strong> to our growing collection of powerful add-ons including Admin AI Assistant (ChatGPT-like experience), Forms Builder, AI Theme Generator, WooCommerce, Perplexity, and more – all included with your <strong>lifetime license!</strong></p> </div> 330 331 <div class="mxchat-pro-cta"> 331 332 <a href="https://mxchat.ai/" target="_blank" class="mxchat-button"><?php echo esc_html__('Upgrade Today', 'mxchat'); ?></a> … … 3282 3283 'mxchat_chatbot_section' 3283 3284 ); 3285 3286 add_settings_field( 3287 'contextual_awareness_toggle', 3288 esc_html__('Contextual Awareness', 'mxchat'), 3289 array($this, 'mxchat_contextual_awareness_callback'), 3290 'mxchat-chatbot', 3291 'mxchat_chatbot_section' 3292 ); 3284 3293 3285 3294 add_settings_field( … … 4973 4982 } 4974 4983 4984 public function mxchat_contextual_awareness_callback() { 4985 // Get value from options array, default to 'off' 4986 $contextual_awareness = isset($this->options['contextual_awareness_toggle']) ? $this->options['contextual_awareness_toggle'] : 'off'; 4987 $checked = ($contextual_awareness === 'on') ? 'checked' : ''; 4988 echo '<label class="toggle-switch">'; 4989 echo sprintf( 4990 '<input type="checkbox" id="contextual_awareness_toggle" name="contextual_awareness_toggle" value="on" %s />', 4991 esc_attr($checked) 4992 ); 4993 echo '<span class="slider"></span>'; 4994 echo '</label>'; 4995 echo '<p class="description">' . 4996 esc_html__('Enable contextual awareness to allow the chatbot to understand and reference the current page content. When enabled, the chatbot will have access to the page title, content, and URL for more relevant responses.', 'mxchat') . 4997 '</p>'; 4998 } 4975 4999 4976 5000 … … 5512 5536 public function mxchat_enqueue_admin_assets() { 5513 5537 // Get plugin version (define this in your main plugin file) 5514 $version = defined('MXCHAT_VERSION') ? MXCHAT_VERSION : '2.2. 7';5538 $version = defined('MXCHAT_VERSION') ? MXCHAT_VERSION : '2.2.8'; 5515 5539 5516 5540 // Use file modification time for development (remove in production) … … 5748 5772 $new_input['append_to_body'] = $input['append_to_body'] === 'on' ? 'on' : 'off'; 5749 5773 } 5774 5775 if (isset($input['contextual_awareness_toggle'])) { 5776 $new_input['contextual_awareness_toggle'] = $input['contextual_awareness_toggle'] === 'on' ? 'on' : 'off'; 5777 } 5750 5778 5751 5779 if (isset($input['top_bar_title'])) { -
mxchat-basic/trunk/includes/class-mxchat-integrator.php
r3317645 r3319002 647 647 } 648 648 649 // NEW: Get page context if provided 650 $page_context = null; 651 if (isset($_POST['page_context']) && !empty($_POST['page_context'])) { 652 $page_context_raw = stripslashes($_POST['page_context']); 653 $page_context = json_decode($page_context_raw, true); 654 655 // Validate page context structure 656 if (is_array($page_context) && 657 isset($page_context['url']) && 658 isset($page_context['title']) && 659 isset($page_context['content'])) { 660 661 // Sanitize page context 662 $page_context['url'] = esc_url_raw($page_context['url']); 663 $page_context['title'] = sanitize_text_field($page_context['title']); 664 $page_context['content'] = wp_kses_post($page_context['content']); 665 } else { 666 $page_context = null; 667 } 668 } 669 649 670 // Modify the message sanitization to preserve PHP tags in code blocks 650 671 $allowed_tags = [ … … 674 695 'timestamp' => time(), 675 696 'top_matches' => [], 676 'action_matches' => [] // NEW: Initialize action matches array 697 'action_matches' => [], // NEW: Initialize action matches array 698 'page_context' => $page_context // NEW: Include page context in testing data 677 699 ]; 678 700 … … 760 782 761 783 // Handle agent mode 784 // Handle agent mode 762 785 if ($chat_mode === 'agent') { 763 786 // First, check for switch intent before doing anything else … … 1032 1055 // Build context with both knowledge base and PDF content if available 1033 1056 $context_content = "User asked: '{$message}'\n\n"; 1057 1058 // NEW: Add page context if available and contextual awareness is enabled 1059 if ($page_context && isset($this->options['contextual_awareness_toggle']) && $this->options['contextual_awareness_toggle'] === 'on') { 1060 $context_content .= "===== CURRENT PAGE CONTEXT =====\n"; 1061 $context_content .= "Page URL: " . $page_context['url'] . "\n"; 1062 $context_content .= "Page Title: " . $page_context['title'] . "\n"; 1063 $context_content .= "Page Content: " . $page_context['content'] . "\n"; 1064 $context_content .= "===== END CURRENT PAGE CONTEXT =====\n\n"; 1065 } 1034 1066 1035 1067 // Get relevant content from knowledge base - THIS IS WHERE THE SIMILARITY ANALYSIS HAPPENS … … 1142 1174 wp_die(); 1143 1175 } 1176 1144 1177 1145 1178 // Updated function to check intents and invoke the callback function … … 4927 4960 public function mxchat_enqueue_scripts_styles() { 4928 4961 // Define version numbers for the styles and scripts 4929 $chat_style_version = '2.2. 7';4930 $chat_script_version = '2.2. 7';4962 $chat_style_version = '2.2.8'; 4963 $chat_script_version = '2.2.8'; 4931 4964 // Enqueue the script 4932 4965 wp_enqueue_script( … … 4953 4986 'nonce' => wp_create_nonce('mxchat_chat_nonce'), 4954 4987 'model' => isset($this->options['model']) ? $this->options['model'] : 'gpt-4o', 4955 'enable_streaming_toggle' => isset($this->options['enable_streaming_toggle']) ? $this->options['enable_streaming_toggle'] : 'on', // ADD THIS LINE 4988 'enable_streaming_toggle' => isset($this->options['enable_streaming_toggle']) ? $this->options['enable_streaming_toggle'] : 'on', 4989 'contextual_awareness_toggle' => isset($this->options['contextual_awareness_toggle']) ? $this->options['contextual_awareness_toggle'] : 'off', // ADD THIS LINE 4956 4990 'link_target_toggle' => $this->options['link_target_toggle'] ?? 'off', 4957 4991 'rate_limit_message' => $this->options['rate_limit_message'] ?? 'Rate limit exceeded. Please try again later.', … … 4983 5017 } 4984 5018 5019 4985 5020 // Modify the mxchat_reset_rate_limits function to handle different timeframes 4986 5021 public function mxchat_reset_rate_limits() { -
mxchat-basic/trunk/js/chat-script.js
r3315188 r3319002 58 58 } 59 59 60 // ==================================== 61 // CONTEXTUAL AWARENESS FUNCTIONALITY 62 // ==================================== 63 64 function getPageContext() { 65 // Check if contextual awareness is enabled 66 if (mxchatChat.contextual_awareness_toggle !== 'on') { 67 return null; 68 } 69 70 // Get page URL 71 const pageUrl = window.location.href; 72 73 // Get page title 74 const pageTitle = document.title || ''; 75 76 // Get main content from the page 77 let pageContent = ''; 78 79 // Try to get content from common content areas 80 const contentSelectors = [ 81 'main', 82 '[role="main"]', 83 '.content', 84 '.main-content', 85 '.post-content', 86 '.entry-content', 87 '.page-content', 88 'article', 89 '#content', 90 '#main' 91 ]; 92 93 let contentElement = null; 94 for (const selector of contentSelectors) { 95 contentElement = document.querySelector(selector); 96 if (contentElement) { 97 break; 98 } 99 } 100 101 // If no specific content area found, use body but exclude header, footer, nav, sidebar 102 if (!contentElement) { 103 contentElement = document.body; 104 } 105 106 if (contentElement) { 107 // Clone the element to avoid modifying the original 108 const clone = contentElement.cloneNode(true); 109 110 // Remove unwanted elements 111 const unwantedSelectors = [ 112 'header', 113 'footer', 114 'nav', 115 '.navigation', 116 '.sidebar', 117 '.widget', 118 '.menu', 119 'script', 120 'style', 121 '.comments', 122 '#comments', 123 '.breadcrumb', 124 '.breadcrumbs', 125 '#floating-chatbot', 126 '#floating-chatbot-button', 127 '.mxchat', 128 '[class*="chat"]', 129 '[id*="chat"]' 130 ]; 131 132 unwantedSelectors.forEach(selector => { 133 const elements = clone.querySelectorAll(selector); 134 elements.forEach(el => el.remove()); 135 }); 136 137 // Get text content and clean it up 138 pageContent = clone.textContent || clone.innerText || ''; 139 140 // Clean up whitespace and limit length 141 pageContent = pageContent 142 .replace(/\s+/g, ' ') 143 .trim() 144 .substring(0, 3000); // Limit to 3000 characters to avoid token limits 145 } 146 147 // Only return context if we have meaningful content 148 if (!pageContent || pageContent.length < 50) { 149 return null; 150 } 151 152 return { 153 url: pageUrl, 154 title: pageTitle, 155 content: pageContent 156 }; 157 } 60 158 61 159 // ==================================== 62 160 // CORE CHAT FUNCTIONALITY 63 161 // ==================================== 64 65 162 // Update your existing sendMessage function 66 163 function sendMessage() { … … 128 225 129 226 function callMxChat(message, callback) { 227 // Get page context if contextual awareness is enabled 228 const pageContext = getPageContext(); 229 230 // Prepare AJAX data 231 const ajaxData = { 232 action: 'mxchat_handle_chat_request', 233 message: message, 234 session_id: getChatSession(), 235 nonce: mxchatChat.nonce 236 }; 237 238 // Add page context if available 239 if (pageContext) { 240 ajaxData.page_context = JSON.stringify(pageContext); 241 } 242 130 243 $.ajax({ 131 244 url: mxchatChat.ajax_url, 132 245 type: 'POST', 133 246 dataType: 'json', 134 data: { 135 action: 'mxchat_handle_chat_request', 136 message: message, 137 session_id: getChatSession(), 138 nonce: mxchatChat.nonce 139 }, 247 data: ajaxData, 140 248 success: function(response) { 141 249 // Log the full response for debugging … … 308 416 } 309 417 418 // Get page context if contextual awareness is enabled 419 const pageContext = getPageContext(); 420 310 421 const formData = new FormData(); 311 422 formData.append('action', 'mxchat_stream_chat'); … … 313 424 formData.append('session_id', getChatSession()); 314 425 formData.append('nonce', mxchatChat.nonce); 426 427 // Add page context if available 428 if (pageContext) { 429 formData.append('page_context', JSON.stringify(pageContext)); 430 } 315 431 316 432 let accumulatedContent = ''; … … 443 559 }); 444 560 } 561 445 562 446 563 // Function to update message during streaming … … 1831 1948 } 1832 1949 }); 1950 1951 1952 1953 1954 1955 -
mxchat-basic/trunk/js/content-selector.js
r3307763 r3319002 12 12 13 13 // Filter elements 14 const $searchInput = $('#mxchat-kb-content-search'); 14 const $searchInput = $('#mxchat-kb-content-search');1 15 15 const $typeFilter = $('#mxchat-kb-content-type-filter'); 16 16 const $statusFilter = $('#mxchat-kb-content-status-filter'); … … 91 91 nonce: mxchatSelector.nonce, 92 92 page: currentPage, 93 per_page: 20,93 per_page: 50, 94 94 search: $searchInput.val(), 95 95 post_type: $typeFilter.val(), 96 96 post_status: $statusFilter.val(), 97 processed_filter: $processedFilter.val() // This needs to match the parameter name in PHP97 processed_filter: $processedFilter.val() 98 98 }; 99 99 -
mxchat-basic/trunk/mxchat-basic.php
r3317645 r3319002 3 3 * Plugin Name: MxChat 4 4 * Description: AI chatbot for WordPress with OpenAI, Claude, xAI, DeepSeek, live agent, PDF uploads, WooCommerce, and training on website data. 5 * Version: 2.2. 75 * Version: 2.2.8 6 6 * Author: MxChat 7 7 * Author URI: https://mxchat.ai … … 17 17 18 18 // Define plugin version constant for asset versioning 19 define('MXCHAT_VERSION', '2.2. 7');19 define('MXCHAT_VERSION', '2.2.8'); 20 20 21 21 function mxchat_load_textdomain() { -
mxchat-basic/trunk/readme.txt
r3317645 r3319002 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.2 8 Stable tag: 2.2. 78 Stable tag: 2.2.8 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 16 16 [Documentation](https://mxchat.ai/documentation/) | [MxChat Pro](https://mxchat.ai/) 17 17 18 ### Product Demo Videos: 19 - [Admin Assistant Add-On](https://www.youtube.com/watch?v=AdEA1k-UCFM) - Discover how to use the MxChat Admin Assistant to bring a ChatGPT-like experience directly inside your WordPress dashboard. Learn to access multiple AI models, save conversations, generate images, and use web search - all without leaving your admin panel. 20 - [AI Theme Generator (Part of Theme Customizer Add-On)](https://www.youtube.com/watch?v=rSQDW2qbtRU&t) - Transform your chatbot's appearance in seconds with our revolutionary AI-powered theme generator! Just describe your ideal design and watch as AI creates and applies custom CSS styling in real-time. No coding required. Supports GPT-4, Claude, Gemini, and more. 21 - [Theme Customizer Add-On](https://www.youtube.com/watch?v=MfbB9mZi6ag) - Learn how to customize your chatbot appearance with the Theme Customizer add-on. Easily modify colors, fonts, and styles with real-time previews to match your brand perfectly. 22 - [MxChat Forms Add-On](https://www.youtube.com/watch?v=3MrWy5dRalA) - Effortlessly create forms to capture leads, support tickets, and more with MxChat Forms! 23 - [MxChat Similarity Tester Add-On](https://www.youtube.com/watch?v=uTr14tn59Hc) - Visualize how your chatbot’s actions perform and which data would be pulled from the database for improved accuracy. 24 - [WooCommerce Add-On](https://www.youtube.com/watch?v=WsqAppHRGdA) - Display product cards, recommend items, guide users to checkout, and supercharge your store. 25 - [Chat with PDF & Word](https://www.youtube.com/watch?v=j_c45WWCTG0) - Let users upload and interact with PDFs and Word docs right from your website’s frontend. 26 - [MxChat Smart Recommender Add-On](https://www.youtube.com/watch?v=8te1KPa238g&t=2s) - Learn how to create intelligent recommendation flows that guide users to perfect matches based on their preferences. 27 - [Optimize with MxChat Agents](https://www.youtube.com/watch?v=A0jowbpyX54) 18 ### 🎥 Product Demo Videos: 19 - [AI Theme Generator Add-On](https://www.youtube.com/watch?v=rSQDW2qbtRU&t) - Transform your chatbot's appearance in seconds with AI-powered design 20 - [Admin Assistant Add-On](https://www.youtube.com/watch?v=AdEA1k-UCFM) - ChatGPT-like experience directly inside your WordPress dashboard 21 - [WooCommerce Add-On](https://www.youtube.com/watch?v=WsqAppHRGdA) - Display product cards, recommendations, and supercharge your store 22 - [Chat with PDF & Word](https://www.youtube.com/watch?v=j_c45WWCTG0) - Let users upload and interact with documents 28 23 29 24 [Explore all product videos on YouTube](https://www.youtube.com/@MxChat/videos) 30 25 31 A powerful, customizable **AI chatbot plugin** for **WordPress**, **MxChat** seamlessly integrates **OpenAI's GPT**, **Anthropic's Claude**, **DeepSeek**, **xAI's Grok**, and **Google's Gemini** models. This versatile solution enables intelligent, real-time interactions to boost engagement and support. The system supports **custom knowledge integration** via **RAG (Retrieval-Augmented Generation)** using either the **native WordPress database** or **Pinecone vector storage**, with content sourced through **manual input**, **URLs**, **PDF uploads**, or **sitemaps**, ensuring highly relevant, context-aware responses. 32 33 **MxChat** features a comprehensive **admin testing panel** that allows you to easily debug and align your chatbot. The testing panel displays retrieved documents and triggered actions in a convenient slide-out panel on the frontend for administrators, along with other powerful debug features for fine-tuning your bot's performance. 34 35 Additionally, **MxChat** includes **live agent handoff via Slack integration**, enabling seamless escalation from AI to human support when needed, ensuring your customers always receive the help they require. 36 37 ### Additional Features: 38 Additional features enhance MxChat’s capabilities, ensuring dynamic and engaging user interactions. The following are included for free: 39 40 - **Free Features:** 41 - Loops Action for lead capture 42 - Brave web search 43 - Brave image search 44 - Image generation via DALL-E 45 - Access to all AI models 46 - Train on website data with various methods (sitemap, URL, PDF, or manual) 47 - Chat transcript review and export 48 - Pinecone Integration for large datasets and faster information retrieval. 49 50 - **Pro Features:** 51 Upgrade to the Pro tier to unlock advanced tools and functionality built directly into MxChat, plus access to all available add-ons: 52 - **Full Access to the MxChat Add-on Ecosystem**: Unlock our complete library of specialized extensions to create a truly customized chatbot experience tailored to your business needs—with new integrations added regularly. 53 - **PDF Content Processing**: Enable in-chat processing of PDF content for richer interactions. 54 - **Robust Action Recognition System**: Power precise and context-aware chatbot responses. 55 - **AI Theme Generator**: Instantly transform your chatbot’s design using natural language. Describe your ideal look—like “modern dark theme with gold accents”—and AI will generate custom CSS with real-time preview and one-click apply. No coding needed. 56 - **Exclusive Access to MxChat AI Agents**: Test and deploy your chatbot with [MxChat AI Agents](https://mxchat.ai/agents/), a revolutionary tool to simulate real-world scenarios and refine performance. 57 58 ### MxChat Add-On Ecosystem 59 **Introducing the MxChat Add-Ons Platform**: Extend your chatbot's capabilities with optional add-ons, designed to provide specialized features tailored to your needs. 60 61 - **MxChat Similarity Tester (Free for All Users)** – Optimize action recognition with query testing, similarity scores, and database insights—perfect for admins enhancing chatbot precision. 62 - **MxChat Admin Assistant (Pro Only)** - Experience a ChatGPT-like interface directly in your WordPress admin panel, with chat thread management, image generation capabilities, and Perplexity search integration—all using your existing MxChat API keys. 63 - **MxChat Forms (Pro Only)** – Enable chatbot-triggered form collection with seamless creation, management, and real-time display in chat—exclusive to Pro users. 64 - **Theme Customizer with AI Generator & Live Preview (Pro Only)** – Instantly redesign your chatbot using natural language prompts like "dark mode with gold accents." The AI generates and applies CSS themes with real-time preview, supporting GPT-4, Claude, Gemini, and more. Easily fine-tune styles like color, layout, and font—no coding needed. 65 - **Chat Moderation (Pro Only)** – Maintain a secure chat environment with advanced moderation tools, including email and IP banning—available only for Pro users. 66 - **MxChat WooCommerce (Pro Only)** – Supercharge your WooCommerce store with AI-powered chat interactions, including product recommendations, order history, cart management, and checkout assistance. 67 - **MxChat Perplexity Integration (Pro Only)** – Add real-time web search capabilities powered by Perplexity AI, delivering up-to-date, well-sourced responses—exclusive to Pro users. 68 - **MxChat Smart Recommender (Pro Only)** – Create intelligent recommendation flows that collect user preferences and provide personalized product or service recommendations from your custom collections. Features customizable similarity thresholds, trigger phrases, and AI prompt templates for tailored recommendation experiences with no coding required. 69 70 The MxChat Add-On Ecosystem offers flexibility to customize and scale your chatbot experience. Stay tuned for more add-ons coming soon! 71 72 ## New in 2.2.6 73 - **Brand New Admin Debug Panel** – Added a comprehensive frontend debug panel for administrators! You can now see retrieved documents, triggered actions, and other debug and setting information in real-time while testing your chatbot, making it easier than ever to fine-tune your bot's performance. 74 - **Fixed Pinecone Single Entry Deletion** – Resolved a bug that prevented individual entries from being properly deleted from Pinecone vector storage. 75 - **Improved Pinecone UI Records Retrieval** – Enhanced the Pinecone database panel with better record loading and display functionality for smoother management of your vector database. 76 - **Fixed WordPress KB Entry Editing** – Resolved an issue where editing knowledge base entries in the WordPress database wasn't working properly, ensuring seamless content management. 77 78 ### Advanced Action Recognition 79 80 MxChat powers its conversations with a smart and robust action recognition system that feels almost magical. By using something called vector embedding—a fancy way of understanding the meaning behind words—it listens to what users say and figures out exactly what they need, even if they phrase it in their own unique way. Imagine it like a super-intuitive friend who knows what you mean without you having to spell it out! This clever system matches user questions or requests to specific actions, making the chatbot feel lively and helpful. For example, it can instantly capture email addresses for your mailing list with the Loops Email Capture feature, or pull up real-time answers from the web using Brave Web Search. For those with the Pro version, it can even dig into PDF documents to answer questions or show off WooCommerce product cards with an easy add-to-cart option—turning casual chats into smooth, action-packed experiences that anyone can enjoy. 81 82 ### Available AI Models: 83 MxChat offers a variety of powerful AI models from **OpenAI**, **X.AI**, **Claude (Anthropic)**, **Google Gemini**, and **DeepSeek**. Each model is designed for specific use cases, allowing you to tailor your chatbot's performance to your needs. 84 85 - **OpenAI Models:** 86 - GPT-4.1 87 - GPT-4o 88 - GPT-4o-mini 89 - GPT-4-turbo 90 - GPT-4 91 - GPT-3.5-turbo 92 93 - **X.AI Models**: 94 - Grok-3 95 - Grok-3 Fast 96 - Grok-3 Mini 97 - Grok-3 Mini Fast 98 - Grok-2 99 100 - **Claude (Anthropic) Models**: 101 - Claude 4 Sonnet 102 - Claude 4 Opus 103 - Claude 3.7 Sonnet 104 - Claude 3.5 Sonnet 105 - Claude 3 Opus 106 - Claude 3 Sonnet 107 - Claude 3 Haiku 108 109 - **DeepSeek Models**: 110 - DeepSeek V3 111 112 - **Google Gemini Models**: 113 - Gemini 2.0 Flash 114 - Gemini 2.0 Flash-Lite 115 - Gemini 1.5 Pro 116 - Gemini 1.5 Flash 117 118 These models offer flexibility and performance for a wide range of applications, ensuring that MxChat can handle everything from simple customer support queries to advanced, real-time interactions. 119 120 For more demos and tutorials, visit the [MxChat YouTube channel](https://www.youtube.com/@MxChat/videos). 121 122 ### Use of Third-Party Services: 123 124 This plugin requires an active connection to the **OpenAI API** or **X.AI API** to generate AI-driven responses. By using this plugin, you consent to sending data to OpenAI's and/or X.AI's servers, which may include user queries and other relevant information. 125 126 - **Service Providers**: 127 - [OpenAI](https://openai.com/) 128 - [X.AI](https://x.ai/) 129 - **Terms of Use**: 130 - [OpenAI API Terms](https://openai.com/policies/terms-of-use/) 131 - [X.AI API Terms](https://x.ai/terms-of-service) 132 - **Privacy Policies**: 133 - [OpenAI Privacy Policy](https://openai.com/policies/privacy-policy/) 134 - [X.AI Privacy Policy](https://x.ai/privacy-policy) 135 136 Please ensure compliance with OpenAI’s & X.AI terms and any applicable data privacy laws. 26 ## 💬 Why Choose MxChat AI Chatbot for Your WordPress Website? 27 28 ✅ **5 Major AI Providers in One Plugin**: OpenAI GPT, Claude, Gemini, xAI Grok, and DeepSeek - switch between 25+ models instantly 29 30 ✅ **Train on Your Website Data**: Advanced RAG technology learns from sitemaps, PDFs, URLs, or manual input for ultra-relevant responses 31 32 ✅ **Live Agent Handoff via Slack**: Seamlessly escalate from AI to human support when customers need personal assistance 33 34 ✅ **Real-Time Debug Panel**: See exactly what your chatbot retrieves and triggers with our admin testing interface 35 36 ✅ **Boost Sales with WooCommerce**: Product cards, cart management, and AI-powered shopping assistance 37 38 ✅ **Extensive Add-On Ecosystem**: Forms, moderation, recommendations, theme customization, and more 39 40 ## 🔥 What's New in Version 2.2.8 41 42 ✨ **Brand New Contextual Awareness Option** – When enabled, the chatbot automatically accesses current page content and URL to provide contextually relevant responses based on what users are viewing 43 44 ✨ **Enhanced WordPress Import with ACF Support** – WordPress knowledge base import now includes Advanced Custom Fields (ACF) data for more comprehensive content training 45 46 ✨ **Major README Structure Update** – Complete formatting overhaul with improved organization and visual presentation for better readability 47 48 ## 🚀 Core Features That Set MxChat Apart 49 50 🟢 **Advanced Action Recognition** – Smart vector embedding system understands user intent and triggers precise actions automatically 51 52 🟢 **AI Theme Generator** – Describe your ideal design in plain English and watch AI create custom CSS styling in real-time 53 54 🟢 **Pinecone Vector Storage** – Lightning-fast knowledge retrieval for large datasets and enterprise-scale deployments 55 56 🟢 **Document Processing** – Users can upload and chat with PDFs and Word documents directly on your frontend 57 58 🟢 **Web Search Integration** – Brave search provides real-time information beyond your knowledge base 59 60 🟢 **Image Generation** – DALL-E integration for visual content creation within chat conversations 61 62 ## 🤖 Choose from 25+ Premium AI Models 63 64 Access the world's most advanced AI models based on your specific needs: 65 66 **OpenAI**: GPT-4.1, GPT-4o, GPT-4o-mini, GPT-4-turbo, GPT-4, GPT-3.5-turbo 67 **X.AI**: Grok-3, Grok-3 Fast, Grok-3 Mini, Grok-3 Mini Fast, Grok-2 68 **Claude**: Claude 4 Sonnet, Claude 4 Opus, Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3 Opus 69 **DeepSeek**: DeepSeek V3 70 **Google Gemini**: Gemini 2.0 Flash, Gemini 2.0 Flash-Lite, Gemini 1.5 Pro, Gemini 1.5 Flash 71 72 ## 🛒 Supercharge Your eCommerce with AI 73 74 Transform online shopping with intelligent assistance: 75 76 - Engage visitors in real time 77 - Recommend products and upsell with product cards 78 - Recover abandoned carts through chatbot campaigns 79 - Convert passive users into paying customers with live support 80 81 ## 🔧 Powerful Add-On Ecosystem 82 83 **Free for All Users:** 84 🟢 **Similarity Tester** – Optimize action recognition with detailed query testing and similarity scores 85 86 **Pro Add-Ons:** 87 🟢 **Admin Assistant** – ChatGPT-like interface in WordPress admin with thread management and image generation 88 🟢 **Theme Customizer** – Visual design editor with AI-powered chatbot theme generation from natural language 89 🟢 **MxChat Forms** – Create chatbot-triggered forms for lead capture and support tickets 90 🟢 **Chat Moderation** – Advanced security with email/IP banning and content filtering 91 🟢 **Smart Recommender** – Intelligent recommendation flows with customizable matching algorithms 92 🟢 **Perplexity Integration** – Real-time web search with authoritative, well-sourced responses 93 94 ## 📱 Mobile-Friendly & Fully Customizable 95 96 MxChat's chatbot widget adapts seamlessly to all devices — desktop, tablet, or mobile. Customize colors, greetings, and placement to match your brand and provide a smooth experience across your entire website. 97 98 ## 🔐 Reliable, Fast, Secure 99 100 MxChat is optimized for performance and security. Your AI chatbot runs smoothly, loads fast, and protects your customer data with enterprise-grade security measures. 101 102 ## 🌟 What Makes MxChat the Best AI Chatbot for WordPress? 103 104 - Used by hundreds of WordPress websites worldwide 105 - 5-star average rating from satisfied customers 106 - Native WordPress integration - no external dependencies 107 - Setup in under 2 minutes with simple API key configuration 108 109 ## 🆓 Start with MxChat's Powerful Free Plan 110 111 MxChat offers a fully functional free plan that includes everything you need to get started with AI chatbot and customer support. With no credit card required, you can: 112 113 - Access all AI models from 5 major providers 114 - Train chatbot on unlimited website content 115 - Loops email capture for lead generation 116 - Web search and image generation capabilities 117 - Real-time admin debug panel 118 - Chat transcript review and export 119 - RAG support & contextual awareness 120 121 Whether you're running a small business or launching a new online store, MxChat's free plan gives you the tools to offer intelligent customer support and grow your business — without paying a cent. 122 123 ## ✅ Get Started with MxChat AI Chatbot Today 124 125 Installing MxChat for WordPress takes just a few clicks. Get started with our free plan and upgrade anytime to access our complete add-on ecosystem and premium features. 126 127 ## 💰 Pricing 128 129 Most powerful features are included in the free plan. Upgrade to Pro for the complete add-on ecosystem and advanced capabilities. 130 131 [View all pricing options](https://mxchat.ai/) 132 133 == Use of Third-Party Services == 134 135 This plugin connects to AI service providers to generate responses: 136 137 **Service Providers:** 138 - [OpenAI](https://openai.com/) - [Terms](https://openai.com/policies/terms-of-use/) | [Privacy](https://openai.com/policies/privacy-policy/) 139 - [Anthropic](https://anthropic.com/) - [Terms](https://www.anthropic.com/terms) | [Privacy](https://www.anthropic.com/privacy) 140 - [Google](https://ai.google.dev/) - [Terms](https://ai.google.dev/terms) | [Privacy](https://policies.google.com/privacy) 141 - [X.AI](https://x.ai/) - [Terms](https://x.ai/terms-of-service) | [Privacy](https://x.ai/privacy-policy) 142 - [DeepSeek](https://deepseek.com/) - [Terms](https://deepseek.com/terms) | [Privacy](https://deepseek.com/privacy) 143 144 Please ensure compliance with applicable terms and data privacy laws. 137 145 138 146 == Installation == … … 150 158 ### Can I customize the chatbot's appearance? 151 159 152 Yes, the **Pro version** offers extensive **theme customization options**, including the ability to change the chatbot's colors, fonts, and background to match your website ’s design.160 Yes, the **Pro version** offers extensive **theme customization options**, including the ability to change the chatbot's colors, fonts, and background to match your website’s design. 153 161 154 162 ### How do I add the chatbot to my site? 155 163 156 You can add the chatbot to your site using the `[mxchat_chatbot floating="yes"]` or `[mxchat_chatbot floating="no"]` shortcode. Additionally, you can automatically append the chatbot to your site ’s body element from the settings page.164 You can add the chatbot to your site using the `[mxchat_chatbot floating="yes"]` or `[mxchat_chatbot floating="no"]` shortcode. Additionally, you can automatically append the chatbot to your site’s body element from the settings page. 157 165 158 166 ### How does the knowledge submission feature work? … … 162 170 ### What is the sitemap submission feature? 163 171 164 The sitemap submission feature allows you to submit a sitemap URL. The plugin will fetch, extract, and add content from the URLs listed in the sitemap to the chatbot ’s knowledge base, enhancing the AI's ability to provide precise and contextually relevant answers.172 The sitemap submission feature allows you to submit a sitemap URL. The plugin will fetch, extract, and add content from the URLs listed in the sitemap to the chatbot’s knowledge base, enhancing the AI's ability to provide precise and contextually relevant answers. 165 173 166 174 … … 170 178 2. **Action Page** - Set custom action triggers to complete specific actions. 171 179 3. **Plugin Settings Page** - Configure your API key and other settings. 172 4. **Add-ons Page** - Extend MxChat ’s functionality with add-ons to customize your needs.180 4. **Add-ons Page** - Extend MxChat’s functionality with add-ons to customize your needs. 173 181 5. **Activation Page** - Easily upgrade to MxChat Pro by entering your activation key. Unlock advanced features like theme customization directly from the MxChat settings page. 174 182 6. **Chat Transcripts** - Review and analyze conversations to refine your AI chatbot. … … 178 186 == Changelog == 179 187 188 = 2.2.8 - June 27, 2025 = 189 - Added brand new contextual awareness option that automatically provides chatbot access to current page content and URL for contextually relevant responses 190 - Enhanced WordPress knowledge base import to include Advanced Custom Fields (ACF) data for more comprehensive content training 191 - Major README structure update with improved formatting and visual presentation 192 180 193 = 2.2.7 = 181 194 - Fixed a bug that occured when deleting all pinecone records & added support for markdown hyperlinking in rate limit messages. 182 195 183 196 = 2.2.6 = 184 - Brand New Admin Debug Panel –Added a comprehensive frontend debug panel for administrators! You can now see retrieved documents, triggered actions, and other debug and setting information in real-time while testing your chatbot, making it easier than ever to fine-tune your bot's performance.185 - Fixed Pinecone Single Entry Deletion –Resolved a bug that prevented individual entries from being properly deleted from Pinecone vector storage.186 - Improved Pinecone UI Records Retrieval –Enhanced the Pinecone database panel with better record loading and display functionality for smoother management of your vector database.187 - Fixed WordPress KB Entry Editing –Resolved an issue where editing knowledge base entries in the WordPress database wasn't working properly, ensuring seamless content management.197 - Brand New Admin Debug Panel – Added a comprehensive frontend debug panel for administrators! You can now see retrieved documents, triggered actions, and other debug and setting information in real-time while testing your chatbot, making it easier than ever to fine-tune your bot's performance. 198 - Fixed Pinecone Single Entry Deletion – Resolved a bug that prevented individual entries from being properly deleted from Pinecone vector storage. 199 - Improved Pinecone UI Records Retrieval – Enhanced the Pinecone database panel with better record loading and display functionality for smoother management of your vector database. 200 - Fixed WordPress KB Entry Editing – Resolved an issue where editing knowledge base entries in the WordPress database wasn't working properly, ensuring seamless content management. 188 201 189 202 = 2.2.5 = 190 - Streaming Response Support – You can now enable streaming responses for OpenAI and Claude models. This delivers a faster, smoother chat experience for users by displaying replies in real-time as they’re generated.191 - Slack Live Agent Fix –Resolved a minor bug that occasionally caused duplicate messages in Slack during live agent conversations.192 - Pinecone UI Update –Fixed a UI display issue in the Pinecone database panel when using the TE3 model.203 - Streaming Response Support – You can now enable streaming responses for OpenAI and Claude models. This delivers a faster, smoother chat experience for users by displaying replies in real-time as they’re generated. 204 - Slack Live Agent Fix – Resolved a minor bug that occasionally caused duplicate messages in Slack during live agent conversations. 205 - Pinecone UI Update – Fixed a UI display issue in the Pinecone database panel when using the TE3 model. 193 206 194 207 = 2.2.4 = … … 280 293 281 294 = 2.0.7 = 282 - **Perplexity Integration Add-On** –Added Perplexity web search, integrated into intent management with a toolbar toggle.283 - **Sonnet 3.7 Support** – Introduced Anthropic’s Claude Sonnet 3.7, the latest high-intelligence model.284 - **Bug Fixes & Improvements** –Fixed title tag formatting in responses and tightened knowledge database similarity range to 20.295 - **Perplexity Integration Add-On** – Added Perplexity web search, integrated into intent management with a toolbar toggle. 296 - **Sonnet 3.7 Support** – Introduced Anthropic’s Claude Sonnet 3.7, the latest high-intelligence model. 297 - **Bug Fixes & Improvements** – Fixed title tag formatting in responses and tightened knowledge database similarity range to 20. 285 298 286 299 = 2.0.5 = 287 - **Auto-Expanding AI Instructions** –AI instructions text field now auto-expands to fit content.288 - **Chat Transcripts UI & Export** –Redesigned chat transcripts UI and added Excel export feature.289 - **Quick Questions Rebrand** –Renamed "Popular Questions" to "Quick Questions" with updated copy.290 - **Security Enhancement** –Improved security to better prevent XSS attacks.291 - **Intent Testing Add-On** –Integrated new Intent Tester add-on for enhanced chatbot performance.300 - **Auto-Expanding AI Instructions** – AI instructions text field now auto-expands to fit content. 301 - **Chat Transcripts UI & Export** – Redesigned chat transcripts UI and added Excel export feature. 302 - **Quick Questions Rebrand** – Renamed "Popular Questions" to "Quick Questions" with updated copy. 303 - **Security Enhancement** – Improved security to better prevent XSS attacks. 304 - **Intent Testing Add-On** – Integrated new Intent Tester add-on for enhanced chatbot performance. 292 305 293 306 = 2.0.4 = 294 - **Markdown Response Fix** –Resolved markdown formatting issues in the chatbot UI.295 - **Agent Mode Customization** –Improved indicator text theme and background styling.296 - **WooCommerce Core Extraction** –Moved WooCommerce features to the dedicated MxChat WooCommerce add-on.307 - **Markdown Response Fix** – Resolved markdown formatting issues in the chatbot UI. 308 - **Agent Mode Customization** – Improved indicator text theme and background styling. 309 - **WooCommerce Core Extraction** – Moved WooCommerce features to the dedicated MxChat WooCommerce add-on. 297 310 298 311 = 2.0.3 = … … 315 328 - **New UI & Branding:** Redesigned the entire plugin interface to align with the new MXChat brand for a modern and seamless experience. 316 329 - **Add-Ons System Introduced:** Added a dedicated Add-Ons page, allowing users to extend the plugin with optional features. Add-ons are completely optional and do not impact core functionality. 317 - **First Add-On Released –Pinecone DB Manager:** Now available for free! This add-on provides an intuitive interface for managing your Pinecone vector database directly within MXChat.330 - **First Add-On Released – Pinecone DB Manager:** Now available for free! This add-on provides an intuitive interface for managing your Pinecone vector database directly within MXChat. 318 331 319 332 = 1.6.5 = … … 527 540 == Upgrade Notice == 528 541 529 = 2.2.7 = 530 - Fixed a bug that occured when deleting all pinecone records & added support for markdown hyperlinking in rate limit messages. 542 = 2.2.8 = 543 - Added brand new contextual awareness option that automatically provides chatbot access to current page content and URL for contextually relevant responses 544 - Enhanced WordPress knowledge base import to include Advanced Custom Fields (ACF) data for more comprehensive content training 545 - Major README structure update with improved formatting and visual presentation 531 546 532 547 == License & Warranty ==
Note: See TracChangeset
for help on using the changeset viewer.