mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-30 09:53:27 +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() {
|
get bots() {
|
||||||
const availableBots = this.currentUser.ai_enabled_chat_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);
|
.filter(Boolean);
|
||||||
|
|
||||||
return availableBots ? availableBots.map((bot) => bot.model_name) : [];
|
return availableBots ? availableBots.map((bot) => bot.model_name) : [];
|
||||||
|
@ -200,6 +200,7 @@ module DiscourseAi
|
|||||||
{
|
{
|
||||||
"id" => persona_user[:user_id],
|
"id" => persona_user[:user_id],
|
||||||
"username" => persona_user[:username],
|
"username" => persona_user[:username],
|
||||||
|
"has_default_llm" => persona_user[:default_llm_id].present?,
|
||||||
"force_default_llm" => persona_user[:force_default_llm],
|
"force_default_llm" => persona_user[:force_default_llm],
|
||||||
"is_persona" => true,
|
"is_persona" => true,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user