Changeset 3822100
- Timestamp:
- 11/25/2026 06:14:03 AM (less than one hour ago)
- Location:
- cheshire-cat-chatbot/trunk
- Files:
-
- 2 deleted
- 6 edited
-
README.txt (modified) (2 diffs)
-
assets/css/chat.css (modified) (1 diff)
-
assets/css/font-awesome (deleted)
-
assets/css/webfonts (deleted)
-
assets/js/chat.js (modified) (7 diffs)
-
cheshire-cat-chatbot.php (modified) (5 diffs)
-
inc/admin/style.php (modified) (2 diffs)
-
inc/shortcodes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cheshire-cat-chatbot/trunk/README.txt
r3686652 r3822100 5 5 Requires PHP: 7.4 6 6 Tested up to: 7.1 7 Stable tag: 2.0. 27 Stable tag: 2.0.3 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 70 70 == Changelog == 71 71 72 = 2.0.3 = 73 * Optimization: Removed Font Awesome CSS (~100KB) and webfonts in favor of lightweight inline SVG icons for significantly faster page loads. 74 72 75 = 2.0.2 = 73 76 * Fix: WooCommerce single product pages now prioritize the deepest/most specific product category when inheriting predefined questions. -
cheshire-cat-chatbot/trunk/assets/css/chat.css
r3418551 r3822100 256 256 } 257 257 258 #cheshire-chat-send i { 258 #cheshire-chat-send i, 259 #cheshire-chat-send svg { 259 260 pointer-events: none; 261 } 262 263 .cheshire-icon { 264 display: inline-block; 265 vertical-align: middle; 266 flex-shrink: 0; 267 } 268 269 .cheshire-icon-spinner { 270 animation: cheshire-spin 1s linear infinite; 271 } 272 273 @keyframes cheshire-spin { 274 from { 275 transform: rotate(0deg); 276 } 277 to { 278 transform: rotate(360deg); 279 } 260 280 } 261 281 -
cheshire-cat-chatbot/trunk/assets/js/chat.js
r3686497 r3822100 7 7 jQuery(document).ready(function ($) { 8 8 'use strict'; 9 10 var SEND_ICON_SVG = '<svg class="cheshire-icon cheshire-icon-send" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>'; 11 var SPINNER_ICON_SVG = '<svg class="cheshire-icon cheshire-icon-spinner" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg>'; 9 12 10 13 /** … … 365 368 366 369 // Re-enable the send button and restore the original icon 367 $('#cheshire-chat-send').prop('disabled', false).html( '<i class="far fa-arrow-alt-circle-right"></i>');370 $('#cheshire-chat-send').prop('disabled', false).html(SEND_ICON_SVG); 368 371 } 369 372 … … 506 509 507 510 // Re-enable the send button and restore the original icon 508 $('#cheshire-chat-send').prop('disabled', false).html( '<i class="far fa-arrow-alt-circle-right"></i>');511 $('#cheshire-chat-send').prop('disabled', false).html(SEND_ICON_SVG); 509 512 510 513 // Only display the complete message if we haven't just finished streaming … … 574 577 // Disable the send button and change the icon to spinning 575 578 sendButton.prop('disabled', true); 576 sendButton.html( '<i class="fas fa-spinner fa-spin"></i>');579 sendButton.html(SPINNER_ICON_SVG); 577 580 578 581 // Clear the input field … … 659 662 // Re-enable the send button and restore the original icon 660 663 sendButton.prop('disabled', false); 661 sendButton.html( '<i class="far fa-arrow-alt-circle-right"></i>');664 sendButton.html(SEND_ICON_SVG); 662 665 663 666 if (response.success) { … … 676 679 // Re-enable the send button and restore the original icon 677 680 sendButton.prop('disabled', false); 678 sendButton.html( '<i class="far fa-arrow-alt-circle-right"></i>');681 sendButton.html(SEND_ICON_SVG); 679 682 680 683 // Handle AJAX error … … 802 805 803 806 // Add icon to the send button 804 $('#cheshire-chat-send').html( '<i class="far fa-arrow-alt-circle-right"></i>');807 $('#cheshire-chat-send').html(SEND_ICON_SVG); 805 808 806 809 // Display predefined responses -
cheshire-cat-chatbot/trunk/cheshire-cat-chatbot.php
r3686652 r3822100 12 12 * Plugin URI: https://cheshirecat.ai/ 13 13 * Description: A WordPress plugin to integrate the Cheshire Cat AI chatbot, offering seamless conversational AI for your site. 14 * Version: 2.0. 214 * Version: 2.0.3 15 15 * Author: Marco Buttarini 16 16 * Author URI: https://bititup.it/ … … 32 32 33 33 // Define plugin constants. 34 define( 'CHESHIRE_CAT_VERSION', '2.0. 2' );34 define( 'CHESHIRE_CAT_VERSION', '2.0.3' ); 35 35 define( 'CHESHIRE_CAT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 36 36 define( 'CHESHIRE_CAT_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); … … 406 406 } 407 407 408 // Enqueue Font Awesome for icons.409 wp_enqueue_style(410 'font-awesome-css',411 CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',412 array(),413 $version414 );415 416 408 // Add dynamic CSS based on user settings. 417 409 wp_add_inline_style( 'cheshire-chat-css', cheshirecat_generate_dynamic_css() ); … … 478 470 'cheshire-chat-css', 479 471 CHESHIRE_CAT_PLUGIN_URL . 'assets/css/chat.css', 480 array(),481 $version482 );483 484 // Font Awesome is used by icons in the preview/chat UI485 wp_enqueue_style(486 'font-awesome-css',487 CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',488 472 array(), 489 473 $version … … 564 548 // Also set the page ID as a global JavaScript variable for backward compatibility 565 549 wp_add_inline_script('cheshire-chat-js', 'window.cheshire_page_id = ' . $current_page_id . ';', 'before'); 566 567 // Enqueue Font Awesome for icons.568 wp_enqueue_style(569 'font-awesome-css',570 CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',571 array(),572 $version573 );574 550 575 551 // Add custom CSS for the playground -
cheshire-cat-chatbot/trunk/inc/admin/style.php
r3418553 r3822100 675 675 <div id="cheshire-chat-header"> 676 676 <button id="cheshire-chat-new" aria-label="New conversation" title="Start a new conversation" onclick="return false;"> 677 < i class="fas fa-plus"></i>677 <svg class="cheshire-icon cheshire-icon-plus" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> 678 678 </button> 679 679 <button id="cheshire-chat-close" aria-label="Close chat" onclick="return false;"> 680 < i class="fas fa-times"></i>680 <svg class="cheshire-icon cheshire-icon-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> 681 681 </button> 682 682 </div> … … 695 695 <div id="cheshire-chat-input-container"> 696 696 <input type="text" id="cheshire-chat-input" placeholder="<?php echo esc_attr(get_option('cheshire_plugin_input_placeholder')); ?>"> 697 <button id="cheshire-chat-send" onclick="return false;">< i class="far fa-arrow-alt-circle-right"></i></button>697 <button id="cheshire-chat-send" onclick="return false;"><svg class="cheshire-icon cheshire-icon-send" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg></button> 698 698 </div> 699 699 </div> -
cheshire-cat-chatbot/trunk/inc/shortcodes.php
r3617470 r3822100 52 52 <div id="cheshire-chat-header"> 53 53 <button id="cheshire-chat-new" aria-label="<?php esc_attr_e('New conversation', 'cheshire-cat-chatbot'); ?>" title="<?php esc_attr_e('Start a new conversation', 'cheshire-cat-chatbot'); ?>"> 54 < i class="fas fa-plus"></i>54 <svg class="cheshire-icon cheshire-icon-plus" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> 55 55 </button> 56 56 <button id="cheshire-chat-close" aria-label="<?php esc_attr_e('Close chat', 'cheshire-cat-chatbot'); ?>"> 57 < i class="fas fa-times"></i>57 <svg class="cheshire-icon cheshire-icon-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> 58 58 </button> 59 59 </div>
Note:
See TracChangeset
for help on using the changeset viewer.