Fix missing `reply` field in ON_DEMAND code context

Fixed issue where ChatGPT occasionally sends response records without a
`reply` field in ON_DEMAND code context, ensuring proper handling in
line with the plugin’s expected behavior rather than causing an
exception.

Change-Id: I277cdb3f7de93309424bea02e176053714234e4f
Signed-off-by: Patrizio <patrizio.gelosi@amarulasolutions.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
index f4e1d8c..dda6edb 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chatgpt/PatchSetReviewer.java
@@ -138,7 +138,7 @@
                 log.debug("Score added: {}", score);
                 reviewScores.add(score);
             }
-            if (!change.getIsCommentEvent() && changeSetData.getReplyFilterEnabled() && isHidden) {
+            if (reply == null || !change.getIsCommentEvent() && changeSetData.getReplyFilterEnabled() && isHidden) {
                 continue;
             }
             if (changeSetData.getDebugReviewMode()) {