From 105a790c22044162897612556c56f7ed777c1201 Mon Sep 17 00:00:00 2001 From: Jay Harris Date: Thu, 21 Nov 2024 14:32:00 +1300 Subject: [PATCH] [AI Chat]: Don't show starter suggestions on non-empty chats --- components/ai_chat/core/browser/conversation_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ai_chat/core/browser/conversation_handler.cc b/components/ai_chat/core/browser/conversation_handler.cc index 0b73ca535917..10f3ea34d583 100644 --- a/components/ai_chat/core/browser/conversation_handler.cc +++ b/components/ai_chat/core/browser/conversation_handler.cc @@ -1177,6 +1177,10 @@ void ConversationHandler::MaybeSeedOrClearSuggestions() { if (!is_page_associated) { suggestions_.clear(); suggestion_generation_status_ = mojom::SuggestionGenerationStatus::None; + if (!chat_history_.empty()) { + return; + } + suggestions_.emplace_back(STARTER_PROMPT(MEMO)); suggestions_.emplace_back(STARTER_PROMPT(INTERVIEW)); suggestions_.emplace_back(STARTER_PROMPT(STUDY_PLAN));