Skip to content

Commit

Permalink
Change suggestions counts var name
Browse files Browse the repository at this point in the history
  • Loading branch information
fallaciousreasoning committed Nov 12, 2024
1 parent 28bd82a commit 365b1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/ai_chat/core/browser/conversation_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ using ai_chat::mojom::ConversationTurn;
using AssociatedContentDelegate =
ConversationHandler::AssociatedContentDelegate;

constexpr size_t kDefaultNonContextualSuggestionsCount = 4;
constexpr size_t kDefaultSuggestionsCount = 4;

} // namespace

Expand Down Expand Up @@ -1061,7 +1061,7 @@ void ConversationHandler::MaybeSeedOrClearSuggestions() {
// We don't have an external list of all the available suggestions, so we
// generate all of them and remove random ones until we have the required
// number and then shuffle the result.
while (suggestions_.size() > kDefaultNonContextualSuggestionsCount) {
while (suggestions_.size() > kDefaultSuggestionsCount) {
auto remove_at = base::RandInt(0, suggestions_.size() - 1);
suggestions_.erase(suggestions_.begin() + remove_at);
}
Expand Down

0 comments on commit 365b1b2

Please sign in to comment.