Remove double flags for bookmarks

- Remove the double flag if a checkpoint exists
- Add the "replace checkpoint" functionality as a Shift+Click option to the checkpoint flag
This commit is contained in:
Wolfsblvt
2024-09-07 23:55:34 +02:00
parent d5b9231157
commit f5d164302b
3 changed files with 13 additions and 2 deletions

View File

@ -10563,7 +10563,14 @@ jQuery(async function () {
await duplicateCharacter();
});
$(document).on('click', '.select_chat_block, .bookmark_link, .mes_bookmark', async function () {
$(document).on('click', '.select_chat_block, .bookmark_link, .mes_bookmark', async function (e) {
// If shift is held down, we are not following the bookmark, but creating a new one
if (e.shiftKey) {
var selectedMesId = $(this).closest('.mes').attr('mesid');
createNewBookmark(selectedMesId);
return;
}
let file_name = $(this).hasClass('mes_bookmark')
? $(this).closest('.mes').attr('bookmark_link')
: $(this).attr('file_name').replace('.jsonl', '');