Expand checkpoint tooltip to contain name
| @@ -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 titledata-tooltip="OpenClick to 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="[titledata-tooltip]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"> |
| @@ -2102,6 +2102,7 @@ function getMessageFromTemplate({ | ||
| 2102 | 2102 | tokenCount && mes.find('.tokenCounterDisplay').text(`${tokenCount}t`); |
| 2103 | 2103 | title && mes.attr('title', title); |
| 2104 | 2104 | timerValue && mes.find('.mes_timer').attr('title', timerTitle).text(timerValue); |
| 2105 | + bookmarkLink && mes.find('.mes_bookmark').attr('title', `Checkpoint\n${bookmarkLink}\n\n${mes.find('.mes_bookmark').data('tooltip')}`); | |
| 2105 | 2106 | |
| 2106 | 2107 | if (power_user.timestamp_model_icon && extra?.api) { |
| 2107 | 2108 | insertSVGIcon(mes, extra); |
| @@ -210,7 +210,10 @@ async function createNewBookmark(mesId) { | ||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | lastMes.extra['bookmark_link'] = name; |
| 213 | - $(`.mes[mesid="${mesId}"]`).attr('bookmark_link', name); | |
| 213 | + | |
| 214 | + const mes = $(`.mes[mesid="${mesId}"]`); | |
| 215 | + mes.attr('bookmark_link', name); | |
| 216 | + mes.find('.mes_bookmark').attr('title', `Checkpoint${name}\n\n${(mes.find('.mes_bookmark')).data('tooltip')}`); | |
| 214 | 217 | |
| 215 | 218 | await saveChatConditional(); |
| 216 | 219 | toastr.success('Click the flag icon next to the message to open the checkpoint chat.', 'Checkpoint created', { timeOut: 10000 }); |