Remove unnecessary double popup for replace
| @@ -57,10 +57,10 @@ async function getExistingChatNames() { | ||
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | async function getBookmarkName({ isReplace = false, forceName = null } = {}) { |
| 61 | 61 | const chatNames = await getExistingChatNames(); |
| 62 | 62 | |
| 63 | 63 | const body = await renderTemplateAsync('createCheckpoint', { isReplace: isReplace }); |
| 64 | 64 | let name = forceName || await Popup.show.input('Create Checkpoint', body); |
| 65 | 65 | if (name === null) { |
| 66 | 66 | return null; |
| @@ -195,14 +195,9 @@ export async function createNewBookmark(mesId, { forceName = null } = {}) { | ||
| 195 | 195 | lastMes.extra = {}; |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - if (lastMes.extra.bookmark_link && !forceName) { | |
| 198 | + const isReplace = lastMes.extra.bookmark_link; | |
| 199 | - const confirm = await Popup.show.confirm('Replace Checkpoint', 'Checkpoint for the last message already exists.<br />Would you like to replace it?'); | |
| 200 | - if (!confirm) { | |
| 201 | - return null; | |
| 202 | - } | |
| 203 | - } | |
| 204 | 199 | |
| 205 | 200 | let name = await getBookmarkName({ isReplace: isReplace, forceName: forceName }); |
| 206 | 201 | if (!name) { |
| 207 | 202 | return null; |
| 208 | 203 | } |
| @@ -1 +1,8 @@ | ||
| 1 | +<div> | |
| 1 | 2 | <span class="margin-right-10px">Enter Checkpoint Name:</span><small>(Leave empty to auto-generate)</small> |
| 3 | +</div> | |
| 4 | +{{#if isReplace}} | |
| 5 | +<div class="m-t-1"> | |
| 6 | + <small>The currently existing checkpoint will be unlinked and replaced with the new checkpoint, but can still be found in the Chat Management.</small> | |
| 7 | +</div> | |
| 8 | +{{/if}} | |