mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-24 06:53:41 +00:00
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 <rizziromanalejandro@gmail.com>
This commit is contained in:
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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user