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:
co-authored by
Roman Rizzi
parent
757c93e514
commit
5735f063a3
@@ -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) : [];
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user