1
0
mirror of synced 2026-08-05 15:26:55 +00:00

FIX: stream messages when directly PMing a persona (#500)

previous to this fix we did not consider personas a bot in the
front end
This commit is contained in:
Sam
2024-03-01 07:53:42 +11:00
committed by GitHub
parent 9fb1430e40
commit 59bab2bba3
3 changed files with 32 additions and 1 deletions
@@ -10,8 +10,9 @@ import copyConversation from "../discourse/lib/copy-conversation";
const AUTO_COPY_THRESHOLD = 4;
let enabledChatBotIds = [];
function isGPTBot(user) {
return user && [-110, -111, -112, -113, -114, -115, -116].includes(user.id);
return user && enabledChatBotIds.includes(user.id);
}
function attachHeaderIcon(api) {
@@ -197,6 +198,7 @@ export default {
const user = container.lookup("service:current-user");
if (user?.ai_enabled_chat_bots) {
enabledChatBotIds = user.ai_enabled_chat_bots.map((bot) => bot.id);
if (settings.ai_bot_add_to_header) {
withPluginApi("1.6.0", attachHeaderIcon);
}