mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Quick Replies: Add auto-execute on new chat
This commit is contained in:
@ -44,6 +44,7 @@ export class QuickReply {
|
||||
/**@type {boolean}*/ executeOnAi = false;
|
||||
/**@type {boolean}*/ executeOnChatChange = false;
|
||||
/**@type {boolean}*/ executeOnGroupMemberDraft = false;
|
||||
/**@type {boolean}*/ executeOnNewChat = false;
|
||||
/**@type {string}*/ automationId = '';
|
||||
|
||||
/**@type {function}*/ onExecute;
|
||||
@ -1061,6 +1062,13 @@ export class QuickReply {
|
||||
this.updateContext();
|
||||
});
|
||||
/**@type {HTMLInputElement}*/
|
||||
const executeOnNewChat = dom.querySelector('#qr--executeOnNewChat');
|
||||
executeOnNewChat.checked = this.executeOnNewChat;
|
||||
executeOnNewChat.addEventListener('click', ()=>{
|
||||
this.executeOnNewChat = executeOnNewChat.checked;
|
||||
this.updateContext();
|
||||
});
|
||||
/**@type {HTMLInputElement}*/
|
||||
const automationId = dom.querySelector('#qr--automationId');
|
||||
automationId.value = this.automationId;
|
||||
automationId.addEventListener('input', () => {
|
||||
|
Reference in New Issue
Block a user