Expand checkpoint tooltip to contain name

6c94297724cf3fdd82f852735916d8a6214fabd8

Wolfsblvt <wolfsblvt@gmail.com>

3 files changed, +6 -2Showing whitespace changes
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&#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>5780 <div data-tooltip="Click to open checkpoint chat&#13;Shift+Click to replace the existing checkpoint with a new one" class="mes_button mes_bookmark fa-solid fa-flag" data-i18n="[data-tooltip]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+1 -0
@@ -2102,6 +2102,7 @@ function getMessageFromTemplate({
2102 tokenCount && mes.find('.tokenCounterDisplay').text(`${tokenCount}t`);2102 tokenCount && mes.find('.tokenCounterDisplay').text(`${tokenCount}t`);
2103 title && mes.attr('title', title);2103 title && mes.attr('title', title);
2104 timerValue && mes.find('.mes_timer').attr('title', timerTitle).text(timerValue);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')}`);
21052106
2106 if (power_user.timestamp_model_icon && extra?.api) {2107 if (power_user.timestamp_model_icon && extra?.api) {
2107 insertSVGIcon(mes, extra);2108 insertSVGIcon(mes, extra);
public/scripts/bookmarks.js+4 -1
@@ -210,7 +210,10 @@ async function createNewBookmark(mesId) {
210 }210 }
211211
212 lastMes.extra['bookmark_link'] = name;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')}`);
214217
215 await saveChatConditional();218 await saveChatConditional();
216 toastr.success('Click the flag icon next to the message to open the checkpoint chat.', 'Checkpoint created', { timeOut: 10000 });219 toastr.success('Click the flag icon next to the message to open the checkpoint chat.', 'Checkpoint created', { timeOut: 10000 });