Add Log Probability to FixSuggestionInfo
Log the log_probability of the suggestion. Used to set per-language
thresholds by bucketizing accept/reject rates.
Google-Bug-Id: b/344599612
Release-Notes: skip
Change-Id: Iad281ca1ae924ae2c3e73ce527305206106bdc68
diff --git a/polygerrit-ui/app/api/rest-api.ts b/polygerrit-ui/app/api/rest-api.ts
index b683694..134cdd3 100644
--- a/polygerrit-ui/app/api/rest-api.ts
+++ b/polygerrit-ui/app/api/rest-api.ts
@@ -1320,4 +1320,5 @@
fix_id: FixId;
description: string;
replacements: FixReplacementInfo[];
+ log_probability?: number;
}
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 e73aad2..c20994c 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -1394,6 +1394,7 @@
commentId: this.comment.id,
response: suggestionResponse.responseCode,
numSuggestions: suggestionResponse.fix_suggestions.length,
+ logProbability: suggestionResponse.fix_suggestions?.[0].log_probability,
});
const suggestion = suggestionResponse.fix_suggestions?.[0];
if (!suggestion?.replacements || suggestion.replacements.length === 0) {