PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.0.3
MxChat – AI Chatbot & Content Generation for WordPress v3.0.3
3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 2.0.3 2.0.4 2.0.5 2.0.6 All 152 releases
← All changes | includes/admin-settings-page.php +12 -338 3.2.13.0.3 View file →
@@ -63,16 +63,8 @@
63 63 <button class="mxch-mobile-nav-link" data-target="api-keys">
64 64 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21 2-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4"/></svg>
65 65 <span><?php esc_html_e('API Keys', 'mxchat'); ?></span>
66 66 </button>
67 - <button class="mxch-mobile-nav-link" data-target="optimization">
68 - <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
69 - <span><?php esc_html_e('Optimization', 'mxchat'); ?></span>
70 - </button>
71 - <button class="mxch-mobile-nav-link" data-target="testing">
72 - <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 2v6"/><path d="M15 2v6"/><path d="M12 17v5"/><path d="M5 8h14"/><path d="M6 11v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1"/><path d="m9 14 3 3 3-3"/></svg>
73 - <span><?php esc_html_e('Testing', 'mxchat'); ?></span>
74 - </button>
75 67 </div>
76 68 <!-- Integrations Section -->
77 69 <div class="mxch-mobile-nav-section">
78 70 <div class="mxch-mobile-nav-section-title"><?php esc_html_e('Integrations', 'mxchat'); ?></div>
@@ -150,26 +142,8 @@
150 142 </span>
151 143 <span class="mxch-nav-link-text"><?php esc_html_e('API Keys', 'mxchat'); ?></span>
152 144 </button>
153 145 </div>
154 -
155 - <div class="mxch-nav-item" data-section="optimization">
156 - <button class="mxch-nav-link" data-target="optimization">
157 - <span class="mxch-nav-link-icon">
158 - <svg 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"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
159 - </span>
160 - <span class="mxch-nav-link-text"><?php esc_html_e('Optimization', 'mxchat'); ?></span>
161 - </button>
162 - </div>
163 -
164 - <div class="mxch-nav-item" data-section="testing">
165 - <button class="mxch-nav-link" data-target="testing">
166 - <span class="mxch-nav-link-icon">
167 - <svg 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"><path d="M9 2v6"/><path d="M15 2v6"/><path d="M12 17v5"/><path d="M5 8h14"/><path d="M6 11v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1"/><path d="m9 14 3 3 3-3"/></svg>
168 - </span>
169 - <span class="mxch-nav-link-text"><?php esc_html_e('Testing', 'mxchat'); ?></span>
170 - </button>
171 - </div>
172 146 </div>
173 147
174 148 <!-- Integrations Section -->
175 149 <div class="mxch-nav-section">
@@ -205,9 +179,8 @@
205 179 <span class="mxch-nav-link-text"><?php esc_html_e('Tutorials', 'mxchat'); ?></span>
206 180 </button>
207 181 </div>
208 182 </div>
209 -
210 183 </nav>
211 184
212 185 <?php if (!$is_activated): ?>
213 186 <div class="mxch-sidebar-footer">
@@ -224,9 +197,9 @@
224 197 <?php if (!$is_activated): ?>
225 198 <div class="mxch-pro-banner">
226 199 <div class="mxch-pro-banner-content">
227 200 <h3 class="mxch-pro-banner-title"><?php esc_html_e('MxChat Pro — Lifetime Access', 'mxchat'); ?></h3>
228 - <p class="mxch-pro-banner-text"><?php esc_html_e('One-time purchase. Unlock 14+ premium add-ons: Chat with GSC, WooCommerce, Chatbot Themes, Forms Builder, and more.', 'mxchat'); ?></p>
201 + <p class="mxch-pro-banner-text"><?php esc_html_e('One-time purchase. Unlock 10+ premium add-ons: Admin AI Assistant, Forms Builder, Chatbot Themes, and more.', 'mxchat'); ?></p>
229 202 </div>
230 203 <a href="https://mxchat.ai/" target="_blank" class="mxch-pro-banner-btn"><span><?php esc_html_e('Learn More', 'mxchat'); ?></span></a>
231 204 </div>
232 205 <?php endif; ?>
@@ -293,18 +266,8 @@
293 266 mxchat_render_field_wrapper('similarity_threshold', __('Similarity Threshold', 'mxchat'), function() use ($admin_instance) {
294 267 $admin_instance->mxchat_similarity_threshold_callback();
295 268 }, __('Adjust threshold for content matching. Lower values = more matches, higher values = stricter matching.', 'mxchat'));
296 269
297 - // RAG Sources Limit
298 - mxchat_render_field_wrapper('rag_sources_limit', __('RAG Sources Limit', 'mxchat'), function() use ($admin_instance) {
299 - $admin_instance->mxchat_rag_sources_limit_callback();
300 - }, __('Number of knowledge base sources (pages/documents) to include in AI context. Higher values provide more context but use more tokens.', 'mxchat'));
301 -
302 - // RAG Chunks Limit
303 - mxchat_render_field_wrapper('rag_chunks_limit', __('RAG Chunks Limit', 'mxchat'), function() use ($admin_instance) {
304 - $admin_instance->mxchat_rag_chunks_limit_callback();
305 - }, __('Maximum total content chunks sent to the AI across all sources. Higher values provide more context but increase token usage and cost.', 'mxchat'));
306 -
307 270 // Contextual Awareness
308 271 mxchat_render_field_wrapper('contextual_awareness', __('Contextual Awareness', 'mxchat'), function() use ($admin_instance) {
309 272 $admin_instance->mxchat_contextual_awareness_callback();
310 273 }, __('Allow the chatbot to understand and reference the current page content for more relevant responses.', 'mxchat'));
@@ -313,8 +276,12 @@
313 276 mxchat_render_field_wrapper('citation_links', __('Citation Links', 'mxchat'), function() use ($admin_instance) {
314 277 $admin_instance->mxchat_citation_links_toggle_callback();
315 278 }, __('Allow the AI to include citation links from your knowledge database in responses. If disabled, ensure your AI Behavior settings do not mention links or the AI may fabricate URLs.', 'mxchat'));
316 279
280 + // Frontend Debugger
281 + mxchat_render_field_wrapper('frontend_debugger', __('Frontend Debugger', 'mxchat'), function() use ($admin_instance) {
282 + $admin_instance->mxchat_frontend_debugger_callback();
283 + }, __('Show debug panel on frontend for admins. Displays similarity scores and query analysis.', 'mxchat'));
317 284 ?>
318 285 </div>
319 286 </div>
320 287 </div>
@@ -339,9 +306,9 @@
339 306 <?php
340 307 // Auto-Display
341 308 mxchat_render_field_wrapper('auto_display', __('Auto-Display Chatbot', 'mxchat'), function() use ($admin_instance) {
342 309 $admin_instance->mxchat_append_to_body_callback();
343 - }, __('Show chatbot automatically on all pages. Disable to use shortcode [mxchat_chatbot floating="yes"] for floating widget or [mxchat_chatbot floating="no"] for embedded chat.', 'mxchat'));
310 + }, __('Show chatbot automatically on all pages. Disable to use shortcode [mxchat_chatbot] instead.', 'mxchat'));
344 311
345 312 // Open Links in New Tab
346 313 mxchat_render_field_wrapper('link_target', __('Open Links in New Tab', 'mxchat'), function() use ($admin_instance) {
347 314 $admin_instance->mxchat_link_target_toggle_callback();
@@ -552,184 +519,8 @@
552 519 </div>
553 520 </div>
554 521
555 522 <!-- ========================================
556 - OPTIMIZATION
557 - ======================================== -->
558 - <div id="optimization" class="mxch-section">
559 - <div class="mxch-content-header">
560 - <h1 class="mxch-content-title"><?php esc_html_e('Optimization & Diagnostics', 'mxchat'); ?></h1>
561 - <p class="mxch-content-subtitle"><?php esc_html_e('Optimize performance, debug issues, and manage plugin settings.', 'mxchat'); ?></p>
562 - </div>
563 -
564 - <!-- Script Loading Card -->
565 - <div class="mxch-card">
566 - <div class="mxch-card-header">
567 - <h3 class="mxch-card-title">
568 - <svg class="mxch-card-title-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"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
569 - <?php esc_html_e('Script Loading', 'mxchat'); ?>
570 - </h3>
571 - </div>
572 - <div class="mxch-card-body mxchat-autosave-section">
573 - <?php
574 - $script_loading_strategy = isset($options['script_loading_strategy']) ? $options['script_loading_strategy'] : 'default';
575 - ?>
576 - <div class="mxch-field">
577 - <label class="mxch-field-label"><?php esc_html_e('Script Loading Strategy', 'mxchat'); ?></label>
578 - <div class="mxch-field-control">
579 - <select name="mxchat_options[script_loading_strategy]" id="script_loading_strategy" class="mxch-select mxchat-autosave-field">
580 - <option value="default" <?php selected($script_loading_strategy, 'default'); ?>><?php esc_html_e('Default (Immediate)', 'mxchat'); ?></option>
581 - <option value="defer" <?php selected($script_loading_strategy, 'defer'); ?>><?php esc_html_e('Deferred', 'mxchat'); ?></option>
582 - <option value="delay_1s" <?php selected($script_loading_strategy, 'delay_1s'); ?>><?php esc_html_e('Delay 1 Second', 'mxchat'); ?></option>
583 - <option value="delay_3s" <?php selected($script_loading_strategy, 'delay_3s'); ?>><?php esc_html_e('Delay 3 Seconds', 'mxchat'); ?></option>
584 - <option value="delay_5s" <?php selected($script_loading_strategy, 'delay_5s'); ?>><?php esc_html_e('Delay 5 Seconds', 'mxchat'); ?></option>
585 - <option value="on_interaction" <?php selected($script_loading_strategy, 'on_interaction'); ?>><?php esc_html_e('On User Interaction', 'mxchat'); ?></option>
586 - </select>
587 - </div>
588 - <p class="mxch-field-description"><?php esc_html_e('Control when the chatbot script loads to improve page performance.', 'mxchat'); ?></p>
589 - </div>
590 -
591 - <div class="mxch-notice mxch-notice-info" style="margin-top: 16px;">
592 - <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"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
593 - <div>
594 - <strong><?php esc_html_e('Loading Strategies:', 'mxchat'); ?></strong>
595 - <ul style="margin: 8px 0 0 0; padding-left: 20px;">
596 - <li><strong><?php esc_html_e('Default:', 'mxchat'); ?></strong> <?php esc_html_e('Script loads immediately in the footer. Best for sites where chat is critical.', 'mxchat'); ?></li>
597 - <li><strong><?php esc_html_e('Deferred:', 'mxchat'); ?></strong> <?php esc_html_e('Script loads after HTML parsing completes. Good balance of performance and availability.', 'mxchat'); ?></li>
598 - <li><strong><?php esc_html_e('Delay:', 'mxchat'); ?></strong> <?php esc_html_e('Script loads after a set delay. Helps improve LCP scores.', 'mxchat'); ?></li>
599 - <li><strong><?php esc_html_e('On User Interaction:', 'mxchat'); ?></strong> <?php esc_html_e('Script loads when user scrolls, moves mouse, or touches screen. Best for Core Web Vitals but chat appears with slight delay.', 'mxchat'); ?></li>
600 - </ul>
601 - </div>
602 - </div>
603 - </div>
604 - </div>
605 -
606 - <!-- Debug Mode Card -->
607 - <?php
608 - $debug_mode = isset($options['debug_mode']) ? $options['debug_mode'] : 'off';
609 - $debug_active = ($debug_mode === 'on');
610 - ?>
611 - <div class="mxch-card">
612 - <div class="mxch-card-header">
613 - <h3 class="mxch-card-title">
614 - <svg class="mxch-card-title-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"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"/><path d="m9 12 2 2 4-4"/></svg>
615 - <?php esc_html_e('Debug Mode', 'mxchat'); ?>
616 - </h3>
617 - </div>
618 - <div class="mxch-card-body">
619 - <div class="mxch-field">
620 - <label class="mxch-toggle">
621 - <input type="checkbox" class="mxch-toggle-input" id="mxchat_debug_mode" name="mxchat_options[debug_mode]" value="on" <?php checked($debug_active); ?>>
622 - <span class="mxch-toggle-switch"></span>
623 - <span class="mxch-toggle-label"><?php esc_html_e('Enable Debug Logging', 'mxchat'); ?></span>
624 - </label>
625 - <p class="mxch-field-description"><?php esc_html_e('Tracks settings changes, knowledge base errors, API issues, and embedding failures. Enable only when troubleshooting. Max 100 entries stored.', 'mxchat'); ?></p>
626 - </div>
627 - </div>
628 - </div>
629 -
630 - <!-- Debug Log Viewer Card -->
631 - <div class="mxch-card">
632 - <div class="mxch-card-header" style="display: flex; justify-content: space-between; align-items: center;">
633 - <h3 class="mxch-card-title">
634 - <svg class="mxch-card-title-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"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
635 - <?php esc_html_e('Debug Log', 'mxchat'); ?>
636 - </h3>
637 - <div style="display: flex; gap: 8px; align-items: center;">
638 - <span id="mxchat-log-count" class="mxch-badge" style="display: none;"></span>
639 - <button type="button" class="mxch-btn mxch-btn-secondary mxch-btn-sm" id="mxchat-refresh-log">
640 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2"/></svg>
641 - <?php esc_html_e('Refresh', 'mxchat'); ?>
642 - </button>
643 - <button type="button" class="mxch-btn mxch-btn-secondary mxch-btn-sm" id="mxchat-clear-log">
644 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
645 - <?php esc_html_e('Clear', 'mxchat'); ?>
646 - </button>
647 - </div>
648 - </div>
649 - <div class="mxch-card-body">
650 - <div id="mxchat-debug-log" class="mxchat-debug-log-viewer">
651 - <div class="mxchat-debug-log-empty">
652 - <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" style="opacity: 0.3;"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
653 - <p><?php esc_html_e('No log entries yet. Enable debug mode to start logging.', 'mxchat'); ?></p>
654 - </div>
655 - </div>
656 - </div>
657 - </div>
658 -
659 - <!-- Settings Tools Card -->
660 - <div class="mxch-card">
661 - <div class="mxch-card-header">
662 - <h3 class="mxch-card-title">
663 - <svg class="mxch-card-title-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"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>
664 - <?php esc_html_e('Settings Tools', 'mxchat'); ?>
665 - </h3>
666 - </div>
667 - <div class="mxch-card-body">
668 - <div class="mxch-tools-grid">
669 - <!-- Export Settings -->
670 - <div class="mxch-tool-item">
671 - <div class="mxch-tool-icon">
672 - <svg 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"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
673 - </div>
674 - <div class="mxch-tool-content">
675 - <h4><?php esc_html_e('Export Settings', 'mxchat'); ?></h4>
676 - <p><?php esc_html_e('Download a JSON file of your current settings for backup or support. API keys are masked for security.', 'mxchat'); ?></p>
677 - <button type="button" class="mxch-btn mxch-btn-secondary" id="mxchat-export-settings">
678 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
679 - <?php esc_html_e('Export Settings', 'mxchat'); ?>
680 - </button>
681 - </div>
682 - </div>
683 -
684 - <!-- Reset All Settings -->
685 - <div class="mxch-tool-item mxch-tool-item-danger">
686 - <div class="mxch-tool-icon">
687 - <svg 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"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
688 - </div>
689 - <div class="mxch-tool-content">
690 - <h4><?php esc_html_e('Reset All Settings', 'mxchat'); ?></h4>
691 - <p><?php esc_html_e('Reset all MxChat settings to their default values. This action cannot be undone.', 'mxchat'); ?></p>
692 - <button type="button" class="mxch-btn mxch-btn-danger" id="mxchat-reset-settings">
693 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/></svg>
694 - <?php esc_html_e('Reset All Settings', 'mxchat'); ?>
695 - </button>
696 - </div>
697 - </div>
698 - </div>
699 - </div>
700 - </div>
701 -
702 - <!-- Reset Confirmation Modal -->
703 - <div id="mxchat-reset-modal" class="mxch-modal" style="display: none;">
704 - <div class="mxch-modal-backdrop"></div>
705 - <div class="mxch-modal-content">
706 - <div class="mxch-modal-header">
707 - <h3><?php esc_html_e('Reset All Settings', 'mxchat'); ?></h3>
708 - <button type="button" class="mxch-modal-close" id="mxchat-reset-modal-close">&times;</button>
709 - </div>
710 - <div class="mxch-modal-body">
711 - <div class="mxch-notice mxch-notice-warning">
712 - <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"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
713 - <div>
714 - <strong><?php esc_html_e('Warning: This action cannot be undone!', 'mxchat'); ?></strong>
715 - <p><?php esc_html_e('All your MxChat settings including API keys, customizations, and configurations will be permanently deleted.', 'mxchat'); ?></p>
716 - </div>
717 - </div>
718 - <div class="mxch-field" style="margin-top: 20px;">
719 - <label class="mxch-field-label"><?php esc_html_e('Type RESET to confirm:', 'mxchat'); ?></label>
720 - <input type="text" id="mxchat-reset-confirmation" class="mxch-input" placeholder="RESET" autocomplete="off">
721 - </div>
722 - </div>
723 - <div class="mxch-modal-footer">
724 - <button type="button" class="mxch-btn mxch-btn-secondary" id="mxchat-reset-cancel"><?php esc_html_e('Cancel', 'mxchat'); ?></button>
725 - <button type="button" class="mxch-btn mxch-btn-danger" id="mxchat-reset-confirm" disabled><?php esc_html_e('Reset All Settings', 'mxchat'); ?></button>
726 - </div>
727 - </div>
728 - </div>
729 - </div>
730 -
731 - <!-- ========================================
732 523 INTEGRATIONS - TOOLBAR
733 524 ======================================== -->
734 525 <div id="integrations-toolbar" class="mxch-section">
735 526 <div class="mxch-content-header">
@@ -962,23 +753,8 @@
962 753 <div class="mxch-tutorials-grid">
963 754 <?php
964 755 $tutorials = array(
965 756 array(
966 - 'title' => __('Quick Setup with MxChat', 'mxchat'),
967 - 'description' => __('Learn how to quickly setup and understand how your chatbot works.', 'mxchat'),
968 - 'url' => 'https://www.youtube.com/watch?v=3BqoiyWaQiM&t'
969 - ),
970 - array(
971 - 'title' => __('AI Content Generation', 'mxchat'),
972 - 'description' => __('Generate full blog posts and landing pages with AI—from prompt to publish in minutes.', 'mxchat'),
973 - 'url' => 'https://www.youtube.com/watch?v=n8TeEeHpxs4'
974 - ),
975 - array(
976 - 'title' => __('Chat With Your GSC Data', 'mxchat'),
977 - 'description' => __('Find content gaps, quick win keywords, and SEO opportunities by chatting with your Google Search Console data using the Admin Assistant add-on.', 'mxchat'),
978 - 'url' => 'https://www.youtube.com/watch?v=ytgMou_7SZA&t=2s'
979 - ),
980 - array(
981 757 'title' => __('AI Theme Generator', 'mxchat'),
982 758 'description' => __('Learn how to instantly restyle your chatbot using plain English prompts with real-time previews.', 'mxchat'),
983 759 'url' => 'https://www.youtube.com/watch?v=rSQDW2qbtRU&t'
984 760 ),
@@ -992,9 +768,14 @@
992 768 'description' => __('Bring a ChatGPT-like experience directly inside your WordPress dashboard.', 'mxchat'),
993 769 'url' => 'https://youtu.be/AdEA1k-UCFM'
994 770 ),
995 771 array(
996 - 'title' => __('Chat Themes', 'mxchat'),
772 + 'title' => __('Intent Tester Guide', 'mxchat'),
773 + 'description' => __('Fine-tune your chatbot\'s responses and ensure accurate query understanding.', 'mxchat'),
774 + 'url' => 'https://www.youtube.com/watch?v=uTr14tn59Hc'
775 + ),
776 + array(
777 + 'title' => __('Theme Customizer', 'mxchat'),
997 778 'description' => __('Customize appearance with real-time previews to match your brand.', 'mxchat'),
998 779 'url' => 'https://youtu.be/MfbB9mZi6ag'
999 780 ),
1000 781 array(
@@ -1045,115 +826,8 @@
1045 826 </a>
1046 827 </div>
1047 828 </div>
1048 829 <?php endforeach; ?>
1049 - </div>
1050 - </div>
1051 -
1052 - <!-- =====================================================
1053 - TESTING SECTION
1054 - ===================================================== -->
1055 - <div id="testing" class="mxch-section">
1056 - <div class="mxch-content-header">
1057 - <h1 class="mxch-content-title"><?php esc_html_e('Testing', 'mxchat'); ?></h1>
1058 - <p class="mxch-content-subtitle"><?php esc_html_e('Test your chatbot and inspect debug data in real time.', 'mxchat'); ?></p>
1059 - </div>
1060 -
1061 - <div class="mxch-testing-layout">
1062 - <!-- Left Column: Debug Panel -->
1063 - <div class="mxch-testing-debug-panel">
1064 - <!-- Quick Actions -->
1065 - <div class="mxch-card">
1066 - <div class="mxch-card-body">
1067 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Quick Actions', 'mxchat'); ?></h3>
1068 - <div class="mxch-testing-actions-row">
1069 - <button type="button" class="mxch-testing-btn mxch-testing-btn-danger" id="mxch-testing-clear-session">
1070 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/></svg>
1071 - <?php esc_html_e('Clear Chat Session', 'mxchat'); ?>
1072 - </button>
1073 - <button type="button" class="mxch-testing-btn mxch-testing-btn-secondary" id="mxch-testing-clear-debug">
1074 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M2 12h20"/></svg>
1075 - <?php esc_html_e('Clear Debug Log', 'mxchat'); ?>
1076 - </button>
1077 - </div>
1078 - </div>
1079 - </div>
1080 -
1081 - <!-- Last Query Analysis -->
1082 - <div class="mxch-card">
1083 - <div class="mxch-card-body">
1084 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Last Query Analysis', 'mxchat'); ?></h3>
1085 -
1086 - <div class="mxch-testing-field">
1087 - <label><?php esc_html_e('Similarity Threshold', 'mxchat'); ?></label>
1088 - <span id="mxch-testing-threshold"><?php esc_html_e('Loading...', 'mxchat'); ?></span>
1089 - </div>
1090 -
1091 - <div class="mxch-testing-field">
1092 - <label><?php esc_html_e('User Query', 'mxchat'); ?></label>
1093 - <div id="mxch-testing-last-query" class="mxch-testing-query-display"><?php esc_html_e('Waiting for next query...', 'mxchat'); ?></div>
1094 - </div>
1095 -
1096 - <div class="mxch-testing-field">
1097 - <label><?php esc_html_e('Approved URLs for Citations', 'mxchat'); ?></label>
1098 - <div id="mxch-testing-approved-urls" class="mxch-testing-results">
1099 - <div class="mxch-testing-no-data"><?php esc_html_e('No URL data yet', 'mxchat'); ?></div>
1100 - </div>
1101 - </div>
1102 -
1103 - <div class="mxch-testing-field">
1104 - <label><?php esc_html_e('Document Matches', 'mxchat'); ?></label>
1105 - <div id="mxch-testing-similarity-scores" class="mxch-testing-results">
1106 - <div class="mxch-testing-no-data"><?php esc_html_e('No query data yet', 'mxchat'); ?></div>
1107 - </div>
1108 - </div>
1109 -
1110 - <div class="mxch-testing-field">
1111 - <label><?php esc_html_e('Actions Triggered', 'mxchat'); ?></label>
1112 - <div id="mxch-testing-action-scores" class="mxch-testing-results">
1113 - <div class="mxch-testing-no-data"><?php esc_html_e('No action data yet', 'mxchat'); ?></div>
1114 - </div>
1115 - </div>
1116 - </div>
1117 - </div>
1118 -
1119 - <!-- System Information -->
1120 - <div class="mxch-card">
1121 - <div class="mxch-card-body">
1122 - <h3 class="mxch-testing-section-title"><?php esc_html_e('System Information', 'mxchat'); ?></h3>
1123 -
1124 - <div class="mxch-testing-field">
1125 - <label><?php esc_html_e('System Prompt', 'mxchat'); ?></label>
1126 - <div id="mxch-testing-system-prompt" class="mxch-testing-system-prompt"><?php esc_html_e('Loading...', 'mxchat'); ?></div>
1127 - </div>
1128 -
1129 - <div class="mxch-testing-field">
1130 - <label><?php esc_html_e('Knowledge Base', 'mxchat'); ?></label>
1131 - <span id="mxch-testing-kb-status"><?php esc_html_e('Checking...', 'mxchat'); ?></span>
1132 - </div>
1133 - </div>
1134 - </div>
1135 -
1136 - <!-- Debug Log -->
1137 - <div class="mxch-card">
1138 - <div class="mxch-card-body">
1139 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Debug Log', 'mxchat'); ?></h3>
1140 - <div id="mxch-testing-debug-console" class="mxch-testing-debug-console">
1141 - <div class="mxch-testing-debug-entry"><?php esc_html_e('Debug panel ready - send a message to begin...', 'mxchat'); ?></div>
1142 - </div>
1143 - </div>
1144 - </div>
1145 - </div>
1146 -
1147 - <!-- Right Column: Chatbot Replica -->
1148 - <div class="mxch-testing-chatbot-column">
1149 - <div class="mxch-testing-chatbot-scope">
1150 - <?php
1151 - // Render the chatbot inline for testing
1152 - echo do_shortcode('[mxchat_chatbot floating="no" bot_id="testing"]');
1153 - ?>
1154 - </div>
1155 - </div>
1156 830 </div>
1157 831 </div>
1158 832
1159 833 </main>