Track generated suggestion edits only when suggestions remain

Change 417417 introduced tracking for generated suggestion edits, but it also reported when suggestions were removed. We are only interested in tracking edits when suggestions are still present in the message text.

Release-Notes: skip
Google-Bug-Id: b/303611208
Change-Id: I314fa86cc4c6a442c7f2226c6ffae52ebc31ecfe
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
index 48d7b1b..e9629b4 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -1753,8 +1753,12 @@
   }
 
   private trackGeneratedSuggestionEdit() {
+    const hasUserSuggestion = this.messageText.includes(
+      USER_SUGGESTION_START_PATTERN
+    );
     const wasGeneratedSuggestionEdited =
       this.addedGeneratedSuggestion &&
+      hasUserSuggestion &&
       !this.messageText.includes(this.addedGeneratedSuggestion);
     if (wasGeneratedSuggestionEdited) {
       this.reporting.reportInteraction(Interaction.GENERATE_SUGGESTION_EDITED, {