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

f5d164302b6f2a2adf6f0fd10db12ca849df3a6f

Wolfsblvt <wolfsblvt@gmail.com>

3 files changed, +13 -2Ignore whitespace
public/index.html+1 -1
@@ -5777,7 +5777,7 @@
5777 <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>5777 <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>
5778 <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>5778 <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>
5779 </div>5779 </div>
5780 <div title="Open checkpoint chat" class="mes_button mes_bookmark fa-solid fa-flag" data-i18n="[title]Open checkpoint chat"></div>5780 <div title="Open checkpoint chat&#13;&#13;Shift+Click to replace the existing checkpoint with a new one" class="mes_button mes_bookmark fa-solid fa-flag" data-i18n="[title]Open checkpoint chat&#13;&#13;Shift+Click to replace the existing checkpoint with a new one"></div>
5781 <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>5781 <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>
5782 </div>5782 </div>
5783 <div class="mes_edit_buttons">5783 <div class="mes_edit_buttons">
public/script.js+8 -1
@@ -10563,7 +10563,14 @@ jQuery(async function () {
10563 await duplicateCharacter();10563 await duplicateCharacter();
10564 });10564 });
1056510565
10566 $(document).on('click', '.select_chat_block, .bookmark_link, .mes_bookmark', async function () {10566 $(document).on('click', '.select_chat_block, .bookmark_link, .mes_bookmark', async function (e) {
10567 // If shift is held down, we are not following the bookmark, but creating a new one
10568 if (e.shiftKey) {
10569 var selectedMesId = $(this).closest('.mes').attr('mesid');
10570 createNewBookmark(selectedMesId);
10571 return;
10572 }
10573
10567 let file_name = $(this).hasClass('mes_bookmark')10574 let file_name = $(this).hasClass('mes_bookmark')
10568 ? $(this).closest('.mes').attr('bookmark_link')10575 ? $(this).closest('.mes').attr('bookmark_link')
10569 : $(this).attr('file_name').replace('.jsonl', '');10576 : $(this).attr('file_name').replace('.jsonl', '');
public/style.css+4 -0
@@ -3963,6 +3963,10 @@ input[type="range"]::-webkit-slider-thumb {
3963 display: inline-block;3963 display: inline-block;
3964}3964}
39653965
3966.mes:not([bookmark_link='']) .mes_create_bookmark {
3967 display: none;
3968}
3969
3966.mes_edit_buttons {3970.mes_edit_buttons {
3967 display: none;3971 display: none;
3968 flex-direction: row;3972 flex-direction: row;