Extend impersonate/continue/regenerate with possible custom prompts

- Use custom prompt provided via slash command arguments (similar to /sysgen and others)
- Use written text from textbox, if the popout menu actions are clicked
This commit is contained in:
Wolfsblvt
2024-02-19 01:17:04 +01:00
parent 2e00a1baaf
commit 550d8483cc
2 changed files with 14 additions and 7 deletions

View File

@ -1168,7 +1168,7 @@ async function openChat(id) {
await reloadCurrentChat();
}
function continueChatCallback() {
function continueChatCallback(_, prompt) {
setTimeout(async () => {
try {
await waitUntilCondition(() => !is_send_press && !is_group_generating, 10000, 100);
@ -1179,7 +1179,7 @@ function continueChatCallback() {
// Prevent infinite recursion
$('#send_textarea').val('').trigger('input');
$('#option_continue').trigger('click', { fromSlashCommand: true });
$('#option_continue').trigger('click', { fromSlashCommand: true, additionalPrompt: prompt });
}, 1);
return '';