Skip to content

Commit c4d9fab

Browse files
authored
FIX: typo when excluding personas from enabled bot list (#671)
1 parent 0d6d9a6 commit c4d9fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assets/javascripts/discourse/connectors/composer-fields/persona-llm-selector.gjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function isBotMessage(composer, currentUser) {
1414
) {
1515
const reciepients = composer.targetRecipients.split(",");
1616

17-
return currentUser.ai_enabled_chat_bots.any((bot) =>
18-
reciepients.any((username) => username === bot.username)
19-
);
17+
return currentUser.ai_enabled_chat_bots
18+
.filter((bot) => !bot.is_persona)
19+
.any((bot) => reciepients.any((username) => username === bot.username));
2020
}
2121
return false;
2222
}
@@ -110,7 +110,7 @@ export default class BotSelector extends Component {
110110

111111
get llmOptions() {
112112
const availableBots = this.currentUser.ai_enabled_chat_bots
113-
.filter((bot) => !bot.is_persosna)
113+
.filter((bot) => !bot.is_persona)
114114
.filter(Boolean);
115115

116116
return availableBots.map((bot) => {

0 commit comments

Comments
 (0)