mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #487 from breathingmanually/edit-done-keyboard
Add keyboard shortcut to accept message edits
This commit is contained in:
@ -831,9 +831,12 @@ $("document").ready(function () {
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// Ctrl+Enter for Regeneration Last Response
|
||||
// Ctrl+Enter for Regeneration Last Response. If editing, accept the edits instead
|
||||
if (event.ctrlKey && event.key == "Enter") {
|
||||
if (is_send_press == false) {
|
||||
const editMesDone = document.querySelector(".mes_edit_buttons[style='display: inline-flex;'] > .mes_edit_done") ;
|
||||
if (editMesDone !== null) {
|
||||
$(editMesDone).click();
|
||||
} else if (is_send_press == false) {
|
||||
$('#option_regenerate').click();
|
||||
$('#options').hide();
|
||||
}
|
||||
|
Reference in New Issue
Block a user