mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Update index.js
This commit is contained in:
@ -120,7 +120,7 @@ async function sendQuickReply(index) {
|
|||||||
// If existing text, add space after prompt
|
// If existing text, add space after prompt
|
||||||
newText = existingText + ' ' + prompt + ' ';
|
newText = existingText + ' ' + prompt + ' ';
|
||||||
} else {
|
} else {
|
||||||
// If no existing text, add prompt only
|
// If no existing text, add prompt only (with a trailing space)
|
||||||
newText = prompt + ' ';
|
newText = prompt + ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,12 +129,14 @@ async function sendQuickReply(index) {
|
|||||||
// Set the focus back to the textarea
|
// Set the focus back to the textarea
|
||||||
$("#send_textarea").focus();
|
$("#send_textarea").focus();
|
||||||
|
|
||||||
// Only trigger send button if quickActionEnabled is not checked
|
// Only trigger send button if quickActionEnabled is not checked or
|
||||||
if (!$("#quickActionEnabled").prop('checked')) {
|
// the prompt starts with '/'
|
||||||
|
if (!$("#quickActionEnabled").prop('checked') || prompt.startsWith('/')) {
|
||||||
$("#send_but").trigger('click');
|
$("#send_but").trigger('click');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function addQuickReplyBar() {
|
function addQuickReplyBar() {
|
||||||
$('#quickReplyBar').remove();
|
$('#quickReplyBar').remove();
|
||||||
let quickReplyButtonHtml = '';
|
let quickReplyButtonHtml = '';
|
||||||
|
Reference in New Issue
Block a user