Plugin Directory

Changeset 3406312


Ignore:
Timestamp:
11/30/2025 08:57:08 PM (4 months ago)
Author:
talkgenai
Message:

Initial release v2.3.1

Location:
talkgenai/trunk
Files:
9 added
5 edited

Legend:

Unmodified
Added
Removed
  • talkgenai/trunk/admin/js/admin.js

    r3401250 r3406312  
    29642964            success: function(response) {
    29652965                if (response.success) {
     2966                    // Check if user just depleted their bonus credits
     2967                    if (response.data && response.data.warning === 'bonus_depleted') {
     2968                        showNotification('🎁 Bonus credits ended! You\'re now using standard features. Upgrade to Starter plan for Premium AI models.', 'warning');
     2969                    }
    29662970                    showAppIdeasResult(response.data);
    29672971                } else {
  • talkgenai/trunk/admin/js/article-job-integration.js

    r3401250 r3406312  
    255255                        TalkGenAI_JobManager.hideProgress();
    256256                       
     257                        // Check if this is an AI provider error (overloaded, rate limit, etc.)
     258                        if (errorData && errorData.error === 'ai_provider_error' && errorData.ai_message) {
     259                            // Show short, clear error message (text only, no HTML)
     260                            // Use text() instead of html() to prevent XSS
     261                            const safeMessage = String(errorData.ai_message || 'AI provider error. Please try again.');
     262                            this.showNotification(safeMessage, 'error');
     263                        }
    257264                        // Check if this is a structured error with HTML message (e.g., insufficient credits)
    258                         if (errorData && errorData.ai_message) {
     265                        else if (errorData && errorData.ai_message) {
    259266                            // Show error notification
    260267                            this.showNotification('Error: ' + error, 'error');
     
    587594         */
    588595        showNotification: function(message, type = 'info') {
    589             // WordPress-style admin notice
    590             const $notice = $(`
    591                 <div class="notice notice-${type} is-dismissible">
    592                     <p>${message}</p>
    593                 </div>
    594             `);
     596            // WordPress-style admin notice with proper escaping
     597            const $notice = $('<div class="notice is-dismissible"></div>')
     598                .addClass('notice-' + type);
     599            const $p = $('<p></p>').text(message);  // Use .text() for safe escaping
     600            $notice.append($p);
    595601           
    596602            $('.wrap h1').after($notice);
  • talkgenai/trunk/includes/class-talkgenai-admin.php

    r3401250 r3406312  
    509509    private function render_generate_app_page() {
    510510        $server_status = $this->api->get_server_status();
     511        $user_stats = $this->api->get_user_stats();
     512        $bonus_credits = 0;
     513        if (isset($user_stats['success']) && $user_stats['success'] && isset($user_stats['data']['bonus_credits'])) {
     514            $bonus_credits = intval($user_stats['data']['bonus_credits']);
     515        }
    511516        ?>
    512517        <div class="wrap">
     
    526531                    </div>
    527532                    <div class="talkgenai-server-status-compact">
     533                        <?php if ($bonus_credits > 0): ?>
     534                            <span class="talkgenai-bonus-credits" style="margin-right: 10px; padding: 4px 8px; background: #f0f6fc; border-radius: 4px; font-size: 12px;">
     535                                🎁 <strong><?php echo esc_html__('Bonus:', 'talkgenai'); ?></strong> <?php echo esc_html($bonus_credits); ?> <?php echo esc_html__('credits', 'talkgenai'); ?>
     536                            </span>
     537                        <?php endif; ?>
    528538                        <?php echo wp_kses_post(talkgenai_get_server_status_indicator($server_status)); ?>
    529539                        <span class="talkgenai-server-mode">
  • talkgenai/trunk/readme.txt

    r3401250 r3406312  
    33Tags: ai, app-generator, calculator, tools, productivity
    44Requires at least: 5.0
    5 Tested up to: 6.8
     5Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.1.0
     7Stable tag: 2.3.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313== Description ==
     14
     15https://youtu.be/dg2vaooXrFs
    1416
    1517**Note:** The GPL license applies to the WordPress plugin code only. The backend API service (app.talkgen.ai) is proprietary software owned by TalkGenAI and is not covered by GPL.
     
    4534553. Live preview window - See your generated app before embedding it
    4544564. My Apps dashboard - Manage all your generated applications in one place
    455 5. Frontend display - Generated apps work seamlessly on your WordPress site
    456457
    457458== Changelog ==
     459
     460= 2.3.1 - 2025-11-30 =
     461* 🛡️ **Improved Error Handling**: Clear, short messages when AI provider is temporarily unavailable
     462* ⚠️ Users now see specific messages for Anthropic or OpenAI overload/rate limit errors
     463* 📢 Error messages indicate which provider (Anthropic/OpenAI) had the issue
     464* 🕒 Users are informed to try again in a few minutes when provider is overloaded
     465
     466= 2.2.0 - 2025-11-30 =
     467* ✨ **New Feature**: Bonus Credits System
     468* 🎁 Added support for bonus credits that give users access to Premium AI features
     469* 🎁 Free users with bonus credits can now access Advanced AI modules (GPT-4, Claude Sonnet 4.5)
     470* 🎁 Bonus credits are prioritized over plan credits for optimal user experience
     471* 🎁 Visual display of bonus credits in WordPress admin dashboard
     472* ⚠️ Added upgrade notification when bonus credits are depleted
     473* 📊 Bonus credits default to 0 and can be awarded for referrals, promotions, or special events
    458474
    459475= 1.0.0 - 2025-10-19 =
  • talkgenai/trunk/talkgenai.php

    r3401250 r3406312  
    44 * Plugin URI: https://app.talkgen.ai
    55 * Description: Generate complete web applications using AI. Connect to TalkGenAI server for intelligent app generation with WordPress integration.
    6  * Version: 2.1.0
     6 * Version: 2.3.1
    77 * Author: TalkGenAI Team
    88 * License: GPLv2 or later
    99 * Text Domain: talkgenai
    1010 * Requires at least: 5.0
    11  * Tested up to: 6.8
     11 * Tested up to: 6.9
    1212 * Requires PHP: 7.4
    1313 *
Note: See TracChangeset for help on using the changeset viewer.