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 @@
57775777 <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>
57785778 <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>
57795779 </div>
57805780 <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>
57815781 <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>
57825782 </div>
57835783 <div class="mes_edit_buttons">
public/script.js+8 -1
@@ -10563,7 +10563,14 @@ jQuery(async function () {
1056310563 await duplicateCharacter();
1056410564 });
1056510565
1056610566 $(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+
1056710574 let file_name = $(this).hasClass('mes_bookmark')
1056810575 ? $(this).closest('.mes').attr('bookmark_link')
1056910576 : $(this).attr('file_name').replace('.jsonl', '');
public/style.css+4 -0
@@ -3963,6 +3963,10 @@ input[type="range"]::-webkit-slider-thumb {
39633963 display: inline-block;
39643964}
39653965
3966+.mes:not([bookmark_link='']) .mes_create_bookmark {
3967+ display: none;
3968+}
3969+
39663970.mes_edit_buttons {
39673971 display: none;
39683972 flex-direction: row;