Fix execute on new chat not saving

cc2e82ce8f24a97a48c46acd0d1dc361debd62f3

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +5 -0Showing whitespace changes
public/scripts/extensions/quick-reply/src/QuickReply.js+1 -0
@@ -1904,6 +1904,7 @@ export class QuickReply {
1904 executeOnAi: this.executeOnAi,1904 executeOnAi: this.executeOnAi,
1905 executeOnChatChange: this.executeOnChatChange,1905 executeOnChatChange: this.executeOnChatChange,
1906 executeOnGroupMemberDraft: this.executeOnGroupMemberDraft,1906 executeOnGroupMemberDraft: this.executeOnGroupMemberDraft,
1907 executeOnNewChat: this.executeOnNewChat,
1907 automationId: this.automationId,1908 automationId: this.automationId,
1908 };1909 };
1909 }1910 }
public/scripts/extensions/quick-reply/src/SlashCommandHandler.js+4 -0
@@ -35,6 +35,7 @@ export class SlashCommandHandler {
35 if (qr.executeOnUser) icons += enumIcons.user;35 if (qr.executeOnUser) icons += enumIcons.user;
36 if (qr.executeOnAi) icons += enumIcons.assistant;36 if (qr.executeOnAi) icons += enumIcons.assistant;
37 if (qr.executeOnChatChange) icons += '💬';37 if (qr.executeOnChatChange) icons += '💬';
38 if (qr.executeOnNewChat) icons += '🆕';
38 if (qr.executeOnGroupMemberDraft) icons += enumIcons.group;39 if (qr.executeOnGroupMemberDraft) icons += enumIcons.group;
39 return icons;40 return icons;
40 }41 }
@@ -265,6 +266,7 @@ export class SlashCommandHandler {
265 new SlashCommandNamedArgument('user', 'auto execute on user message, e.g., user=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),266 new SlashCommandNamedArgument('user', 'auto execute on user message, e.g., user=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
266 new SlashCommandNamedArgument('bot', 'auto execute on AI message, e.g., bot=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),267 new SlashCommandNamedArgument('bot', 'auto execute on AI message, e.g., bot=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
267 new SlashCommandNamedArgument('load', 'auto execute on chat load, e.g., load=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),268 new SlashCommandNamedArgument('load', 'auto execute on chat load, e.g., load=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
269 new SlashCommandNamedArgument('new', 'auto execute on new chat, e.g., new=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
268 new SlashCommandNamedArgument('group', 'auto execute on group member selection, e.g., group=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),270 new SlashCommandNamedArgument('group', 'auto execute on group member selection, e.g., group=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
269 new SlashCommandNamedArgument('title', 'title / tooltip to be shown on button, e.g., title="My Fancy Button"', [ARGUMENT_TYPE.STRING], false),271 new SlashCommandNamedArgument('title', 'title / tooltip to be shown on button, e.g., title="My Fancy Button"', [ARGUMENT_TYPE.STRING], false),
270 ];272 ];
@@ -857,6 +859,7 @@ export class SlashCommandHandler {
857 executeOnUser: isTrueBoolean(args.user),859 executeOnUser: isTrueBoolean(args.user),
858 executeOnAi: isTrueBoolean(args.bot),860 executeOnAi: isTrueBoolean(args.bot),
859 executeOnChatChange: isTrueBoolean(args.load),861 executeOnChatChange: isTrueBoolean(args.load),
862 executeOnNewChat: isTrueBoolean(args.new),
860 executeOnGroupMemberDraft: isTrueBoolean(args.group),863 executeOnGroupMemberDraft: isTrueBoolean(args.group),
861 automationId: args.automationId ?? '',864 automationId: args.automationId ?? '',
862 },865 },
@@ -889,6 +892,7 @@ export class SlashCommandHandler {
889 executeOnAi: args.bot === undefined ? undefined : isTrueBoolean(args.bot),892 executeOnAi: args.bot === undefined ? undefined : isTrueBoolean(args.bot),
890 executeOnChatChange: args.load === undefined ? undefined : isTrueBoolean(args.load),893 executeOnChatChange: args.load === undefined ? undefined : isTrueBoolean(args.load),
891 executeOnGroupMemberDraft: args.group === undefined ? undefined : isTrueBoolean(args.group),894 executeOnGroupMemberDraft: args.group === undefined ? undefined : isTrueBoolean(args.group),
895 executeOnNewChat: args.new === undefined ? undefined : isTrueBoolean(args.new),
892 automationId: args.automationId ?? '',896 automationId: args.automationId ?? '',
893 },897 },
894 );898 );