Fix execute on new chat not saving

cc2e82ce8f24a97a48c46acd0d1dc361debd62f3

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

2 files changed, +5 -0Ignore whitespace
public/scripts/extensions/quick-reply/src/QuickReply.js+1 -0
@@ -1904,6 +1904,7 @@ export class QuickReply {
19041904 executeOnAi: this.executeOnAi,
19051905 executeOnChatChange: this.executeOnChatChange,
19061906 executeOnGroupMemberDraft: this.executeOnGroupMemberDraft,
1907+ executeOnNewChat: this.executeOnNewChat,
19071908 automationId: this.automationId,
19081909 };
19091910 }
public/scripts/extensions/quick-reply/src/SlashCommandHandler.js+4 -0
@@ -35,6 +35,7 @@ export class SlashCommandHandler {
3535 if (qr.executeOnUser) icons += enumIcons.user;
3636 if (qr.executeOnAi) icons += enumIcons.assistant;
3737 if (qr.executeOnChatChange) icons += '💬';
38+ if (qr.executeOnNewChat) icons += '🆕';
3839 if (qr.executeOnGroupMemberDraft) icons += enumIcons.group;
3940 return icons;
4041 }
@@ -265,6 +266,7 @@ export class SlashCommandHandler {
265266 new SlashCommandNamedArgument('user', 'auto execute on user message, e.g., user=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
266267 new SlashCommandNamedArgument('bot', 'auto execute on AI message, e.g., bot=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
267268 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'),
268270 new SlashCommandNamedArgument('group', 'auto execute on group member selection, e.g., group=true', [ARGUMENT_TYPE.BOOLEAN], false, false, 'false'),
269271 new SlashCommandNamedArgument('title', 'title / tooltip to be shown on button, e.g., title="My Fancy Button"', [ARGUMENT_TYPE.STRING], false),
270272 ];
@@ -857,6 +859,7 @@ export class SlashCommandHandler {
857859 executeOnUser: isTrueBoolean(args.user),
858860 executeOnAi: isTrueBoolean(args.bot),
859861 executeOnChatChange: isTrueBoolean(args.load),
862+ executeOnNewChat: isTrueBoolean(args.new),
860863 executeOnGroupMemberDraft: isTrueBoolean(args.group),
861864 automationId: args.automationId ?? '',
862865 },
@@ -889,6 +892,7 @@ export class SlashCommandHandler {
889892 executeOnAi: args.bot === undefined ? undefined : isTrueBoolean(args.bot),
890893 executeOnChatChange: args.load === undefined ? undefined : isTrueBoolean(args.load),
891894 executeOnGroupMemberDraft: args.group === undefined ? undefined : isTrueBoolean(args.group),
895+ executeOnNewChat: args.new === undefined ? undefined : isTrueBoolean(args.new),
892896 automationId: args.automationId ?? '',
893897 },
894898 );