mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix "continue" as a slash command
This commit is contained in:
@ -7139,7 +7139,8 @@ $(document).ready(function () {
|
||||
|
||||
///////////// OPTIMIZED LISTENERS FOR LEFT SIDE OPTIONS POPUP MENU //////////////////////
|
||||
|
||||
$("#options [id]").on("click", function () {
|
||||
$("#options [id]").on("click", function (event, customData) {
|
||||
const fromSlashCommand = customData?.fromSlashCommand || false;
|
||||
var id = $(this).attr("id");
|
||||
|
||||
if (id == "option_select_chat") {
|
||||
@ -7184,7 +7185,7 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
else if (id == 'option_continue') {
|
||||
if (is_send_press == false) {
|
||||
if (is_send_press == false || fromSlashCommand) {
|
||||
is_send_press = true;
|
||||
Generate("continue");
|
||||
}
|
||||
|
@ -117,7 +117,9 @@ const NARRATOR_NAME_DEFAULT = 'System';
|
||||
const COMMENT_NAME_DEFAULT = 'Note';
|
||||
|
||||
function continueChatCallback() {
|
||||
$('#option_continue').trigger('click');
|
||||
// Prevent infinite recursion
|
||||
$('#send_textarea').val('');
|
||||
$('#option_continue').trigger('click', { fromSlashCommand: true });
|
||||
}
|
||||
|
||||
function syncCallback() {
|
||||
|
Reference in New Issue
Block a user