PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.1.2
MxChat – AI Chatbot & Content Generation for WordPress v3.1.2
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 | js/knowledge-processing.js +22 -26 3.2.33.1.2 View file →
@@ -495,18 +495,20 @@
495 495 if (status.failed > 0 && status.failed_items && status.failed_items.length > 0) {
496 496 detailsHtml += '<div class="mxchat-error-summary" style="background: #fff3cd; border-left: 4px solid #ffc107; padding: 15px; margin-top: 15px;">';
497 497 detailsHtml += '<h4 style="margin: 0 0 10px 0; color: #856404;">⚠️ Failed Pages</h4>';
498 498
499 + detailsHtml += '<details style="cursor: pointer;">';
500 + detailsHtml += '<summary style="font-weight: bold; color: #856404; padding: 5px 0;">Click to view ' + status.failed_items.length + ' failed pages</summary>';
501 +
499 502 detailsHtml += '<div style="margin-top: 10px; max-height: 400px; overflow-y: auto;">';
500 503 detailsHtml += '<table style="width: 100%; border-collapse: collapse;">';
501 504 detailsHtml += '<thead><tr style="background: #f5f5f5;"><th style="padding: 8px; text-align: left;">Page</th><th style="padding: 8px; text-align: left;">Error</th><th style="padding: 8px; text-align: left;">Attempts</th></tr></thead>';
502 505 detailsHtml += '<tbody>';
503 -
506 +
504 507 status.failed_items.forEach(function(item) {
505 - let data;
506 - try { data = JSON.parse(item.item_data); } catch(e) { data = {}; }
508 + const data = JSON.parse(item.item_data);
507 509 const pageNum = data.page_number || 'Unknown';
508 -
510 +
509 511 detailsHtml += '<tr style="border-bottom: 1px solid #ddd;">';
510 512 detailsHtml += '<td style="padding: 8px;">Page ' + pageNum + '</td>';
511 513 detailsHtml += '<td style="padding: 8px; word-break: break-word;">' + (item.error_message || 'Unknown error') + '</td>';
512 514 detailsHtml += '<td style="padding: 8px;">' + item.attempts + '</td>';
@@ -511,12 +513,13 @@
511 513 detailsHtml += '<td style="padding: 8px; word-break: break-word;">' + (item.error_message || 'Unknown error') + '</td>';
512 514 detailsHtml += '<td style="padding: 8px;">' + item.attempts + '</td>';
513 515 detailsHtml += '</tr>';
514 516 });
515 -
517 +
516 518 detailsHtml += '</tbody></table>';
517 519 detailsHtml += '</div>';
518 -
520 + detailsHtml += '</details>';
521 +
519 522 detailsHtml += '</div>';
520 523 }
521 524
522 525 $card.find('.mxchat-status-details').html(detailsHtml);
@@ -571,20 +574,21 @@
571 574 if (status.failed > 0 && status.failed_items && status.failed_items.length > 0) {
572 575 detailsHtml += '<div class="mxchat-error-summary" style="background: #fff3cd; border-left: 4px solid #ffc107; padding: 15px; margin-top: 15px;">';
573 576 detailsHtml += '<h4 style="margin: 0 0 10px 0; color: #856404;">⚠️ Failed URLs</h4>';
574 577
578 + detailsHtml += '<details style="cursor: pointer;">';
579 + detailsHtml += '<summary style="font-weight: bold; color: #856404; padding: 5px 0;">Click to view ' + status.failed_items.length + ' failed URLs</summary>';
580 +
575 581 detailsHtml += '<div style="margin-top: 10px; max-height: 400px; overflow-y: auto;">';
576 582 detailsHtml += '<table style="width: 100%; border-collapse: collapse;">';
577 583 detailsHtml += '<thead><tr style="background: #f5f5f5;"><th style="padding: 8px; text-align: left;">URL</th><th style="padding: 8px; text-align: left;">Error</th><th style="padding: 8px; text-align: left;">Attempts</th></tr></thead>';
578 584 detailsHtml += '<tbody>';
579 -
585 +
580 586 status.failed_items.forEach(function(item) {
581 - let data;
582 - try { data = JSON.parse(item.item_data); } catch(e) { data = {}; }
583 - const url = data.url || data.pdf_url || 'Unknown URL';
584 - const pageInfo = data.page_number ? ' (page ' + data.page_number + ')' : '';
585 - const displayUrl = (url.length > 60 ? url.substring(0, 57) + '...' : url) + pageInfo;
586 -
587 + const data = JSON.parse(item.item_data);
588 + const url = data.url || 'Unknown URL';
589 + const displayUrl = url.length > 60 ? url.substring(0, 57) + '...' : url;
590 +
587 591 detailsHtml += '<tr style="border-bottom: 1px solid #ddd;">';
588 592 detailsHtml += '<td style="padding: 8px;"><a href="' + url + '" target="_blank" style="color: #0073aa; text-decoration: none;">' + displayUrl + '</a></td>';
589 593 detailsHtml += '<td style="padding: 8px; word-break: break-word;">' + (item.error_message || 'Unknown error') + '</td>';
590 594 detailsHtml += '<td style="padding: 8px;">' + item.attempts + '</td>';
@@ -589,15 +593,16 @@
589 593 detailsHtml += '<td style="padding: 8px; word-break: break-word;">' + (item.error_message || 'Unknown error') + '</td>';
590 594 detailsHtml += '<td style="padding: 8px;">' + item.attempts + '</td>';
591 595 detailsHtml += '</tr>';
592 596 });
593 -
597 +
594 598 detailsHtml += '</tbody></table>';
595 599 detailsHtml += '</div>';
596 -
600 + detailsHtml += '</details>';
601 +
597 602 detailsHtml += '</div>';
598 603 }
599 -
604 +
600 605 $card.find('.mxchat-status-details').html(detailsHtml);
601 606 }
602 607
603 608 /**
@@ -1955,18 +1960,9 @@
1955 1960 const $row = $('<tr id="prompt-' + entry.id + '" data-entry-id="' + entry.id + '" data-source="wordpress" style="border-bottom: 1px solid var(--mxch-card-border); display: none;">' +
1956 1961 '<td style="padding: 12px 16px; font-size: 13px;">' + entry.id + '</td>' +
1957 1962 '<td class="mxchat-content-cell" style="padding: 12px 16px; font-size: 13px;">' + contentHtml + '</td>' +
1958 1963 '<td class="mxchat-url-cell" style="padding: 12px 16px; font-size: 13px;">' + sourceHtml + '</td>' +
1959 - '<td style="padding: 12px 16px; white-space: nowrap;">' +
1960 - '<button type="button" class="mxch-btn mxch-btn-ghost mxch-btn-sm mxchat-edit-entry-btn"' +
1961 - ' data-source-url="' + (entry.source_url || '') + '"' +
1962 - ' data-entry-id="' + entry.id + '"' +
1963 - ' data-data-source="wordpress"' +
1964 - ' data-bot-id="' + (entry.bot_id || 'default') + '"' +
1965 - ' data-nonce="' + (entry.edit_nonce || '') + '"' +
1966 - ' title="Edit content">' +
1967 - '<span class="dashicons dashicons-edit" style="font-size: 14px;"></span>' +
1968 - '</button>' +
1964 + '<td style="padding: 12px 16px;">' +
1969 1965 '<a href="' + deleteUrl + '" class="mxch-btn mxch-btn-ghost mxch-btn-sm" style="color: var(--mxch-error);" onclick="return confirm(\'Delete this entry?\');">' +
1970 1966 '<span class="dashicons dashicons-trash" style="font-size: 14px;"></span>' +
1971 1967 '</a>' +
1972 1968 '</td>' +