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
| @@ -5777,7 +5777,7 @@ | ||
| 5777 | 5777 | <div title="Create branch" class="mes_button mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div> |
| 5778 | 5778 | <div title="Copy" class="mes_button mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div> |
| 5779 | 5779 | </div> |
| 5780 | 5780 | <div title="Open checkpoint chat 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 Shift+Click to replace the existing checkpoint with a new one"></div> |
| 5781 | 5781 | <div title="Edit" class="mes_button mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div> |
| 5782 | 5782 | </div> |
| 5783 | 5783 | <div class="mes_edit_buttons"> |
| @@ -10563,7 +10563,14 @@ jQuery(async function () { | ||
| 10563 | 10563 | await duplicateCharacter(); |
| 10564 | 10564 | }); |
| 10565 | 10565 | |
| 10566 | 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 | 10574 | let file_name = $(this).hasClass('mes_bookmark') |
| 10568 | 10575 | ? $(this).closest('.mes').attr('bookmark_link') |
| 10569 | 10576 | : $(this).attr('file_name').replace('.jsonl', ''); |
| @@ -3963,6 +3963,10 @@ input[type="range"]::-webkit-slider-thumb { | ||
| 3963 | 3963 | display: inline-block; |
| 3964 | 3964 | } |
| 3965 | 3965 | |
| 3966 | +.mes:not([bookmark_link='']) .mes_create_bookmark { | |
| 3967 | + display: none; | |
| 3968 | +} | |
| 3969 | + | |
| 3966 | 3970 | .mes_edit_buttons { |
| 3967 | 3971 | display: none; |
| 3968 | 3972 | flex-direction: row; |