FIX: A typo in bot filtration in ai-bot-header-icon (#1455)

* FIX: A typo in bot filtration in ai-bot-header-icon

* FIX: Show header icon when there's only one persona with a default LLM set

---------

Co-authored-by: Roman Rizzi <[email protected]>
This commit is contained in:
Jarek Radosz
2025-06-24 10:51:07 -03:00
committed by GitHub
co-authored by Roman Rizzi
parent 757c93e514
commit 5735f063a3
2 changed files with 2 additions and 1 deletions
@@ -20,7 +20,7 @@ export default class AiBotHeaderIcon extends Component {
get bots() {
const availableBots = this.currentUser.ai_enabled_chat_bots
.filter((bot) => !bot.is_persosna)
.filter((bot) => !bot.is_persona || bot.has_default_llm)
.filter(Boolean);
return availableBots ? availableBots.map((bot) => bot.model_name) : [];
+1
View File
@@ -200,6 +200,7 @@ module DiscourseAi
{
"id" => persona_user[:user_id],
"username" => persona_user[:username],
"has_default_llm" => persona_user[:default_llm_id].present?,
"force_default_llm" => persona_user[:force_default_llm],
"is_persona" => true,
}