diff --git a/ai-summary-query.php b/ai-summary-query.php index 1a1aefc..534570e 100644 --- a/ai-summary-query.php +++ b/ai-summary-query.php @@ -226,6 +226,10 @@ if (!empty($query_code)) { 'comment_url' => get_comment_link($comment), 'is_spam' => isset($detection_result['is_spam']) ? $detection_result['is_spam'] : false, 'reason' => isset($detection_result['reason']) ? $detection_result['reason'] : '', + 'username_invalid' => isset($detection_result['username_invalid']) ? $detection_result['username_invalid'] : false, + 'confidence' => isset($detection_result['confidence']) ? $detection_result['confidence'] : null, + 'suggestion' => isset($detection_result['suggestion']) ? $detection_result['suggestion'] : '', + 'analysis' => isset($detection_result['analysis']) ? $detection_result['analysis'] : '', 'action' => isset($detection_result['action']) ? $detection_result['action'] : '', 'detection_time' => $detection_time, 'code' => $query_code @@ -554,10 +558,41 @@ html.darkmode .ai-verify-subtitle { color: #aaa; } + +
+ + + + + + +
+
+ +
+ + % +
+ + +
+ + + __('自动处理', 'argon'), + 'review' => __('人工审核', 'argon'), + 'approve' => __('直接通过', 'argon') + ]; + echo isset($suggestion_labels[$result['suggestion']]) ? esc_html($suggestion_labels[$result['suggestion']]) : esc_html($result['suggestion']); + ?> + +
+
@@ -587,6 +622,13 @@ html.darkmode .ai-verify-subtitle { color: #aaa; }
+ +

+
+ +
+ +
@@ -690,6 +732,10 @@ if (current_user_can('manage_options')): 'post_url' => get_permalink($comment->comment_post_ID), 'is_spam' => isset($detection_result['is_spam']) ? $detection_result['is_spam'] : false, 'reason' => isset($detection_result['reason']) ? $detection_result['reason'] : '', + 'username_invalid' => isset($detection_result['username_invalid']) ? $detection_result['username_invalid'] : false, + 'confidence' => isset($detection_result['confidence']) ? $detection_result['confidence'] : null, + 'suggestion' => isset($detection_result['suggestion']) ? $detection_result['suggestion'] : '', + 'analysis' => isset($detection_result['analysis']) ? $detection_result['analysis'] : '', 'action' => isset($detection_result['action']) ? $detection_result['action'] : '', 'detection_time' => $detection->time ] @@ -926,10 +972,32 @@ if (current_user_can('manage_options')):
+ ${record.data.username_invalid ? ` +
+ + + + + + +
+ ` : ''}
${escapeHtml(record.data.reason)}
+ ${record.data.confidence ? ` +
+ + ${Math.round(record.data.confidence * 100)}% +
+ ` : ''} + ${record.data.suggestion ? ` +
+ + ${escapeHtml(record.data.suggestion)} +
+ ` : ''} ${record.data.action ? `
@@ -942,6 +1010,13 @@ if (current_user_can('manage_options')):
+ ${record.data.analysis ? ` +

+
+ ${escapeHtml(record.data.analysis)} +
+ ` : ''} +