Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 5735f06

Browse files
CvXromanrizzi
andauthored
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]>
1 parent 757c93e commit 5735f06

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

assets/javascripts/discourse/components/ai-bot-header-icon.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class AiBotHeaderIcon extends Component {
2020

2121
get bots() {
2222
const availableBots = this.currentUser.ai_enabled_chat_bots
23-
.filter((bot) => !bot.is_persosna)
23+
.filter((bot) => !bot.is_persona || bot.has_default_llm)
2424
.filter(Boolean);
2525

2626
return availableBots ? availableBots.map((bot) => bot.model_name) : [];

lib/ai_bot/entry_point.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def inject_into(plugin)
200200
{
201201
"id" => persona_user[:user_id],
202202
"username" => persona_user[:username],
203+
"has_default_llm" => persona_user[:default_llm_id].present?,
203204
"force_default_llm" => persona_user[:force_default_llm],
204205
"is_persona" => true,
205206
}

0 commit comments

Comments
 (0)