Rename bookmarks to checkpoints

This commit is contained in:
Cohee 2023-12-03 03:11:14 +02:00
parent cf3bde3872
commit 4cb9cd128f
4 changed files with 16 additions and 16 deletions

2
.github/readme.md vendored
View File

@ -66,7 +66,7 @@ Get in touch with the developers directly:
* A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized)
* Swipes
* Group chats: multi-bot rooms for characters to talk to you or each other
* Chat bookmarks / branching (duplicates the dialogue in its current state)
* Chat checkpoints / branching
* Advanced KoboldAI / TextGen generation settings with a lot of community-made presets
* World Info support: create rich lore or save tokens on your character card
* [OpenRouter](https://openrouter.ai) connection for various APIs (Claude, GPT-4/3.5 and more)

View File

@ -3900,7 +3900,7 @@
<strong>Unique to this chat.</strong>
<span data-group="true">All group members will use the following scenario text instead of what is specified in their character cards.</span>
<span data-character="true">The following scenario text will be used instead of the value set in the character card.</span>
Bookmarks inherit the scenario override from their parent, and can be changed individually after that.
Checkpoints inherit the scenario override from their parent, and can be changed individually after that.
</div>
<div class="range-block-range wide100p">
<textarea class="wide100p chat_scenario" class="text_pole" rows="15" data-i18n="[placeholder]Type here..." placeholder="Type here..."></textarea>
@ -4296,11 +4296,11 @@
<div title="Exclude message from prompts" class="mes_hide fa-solid fa-eye" data-i18n="[title]Exclude message from prompts"></div>
<div title="Include message in prompts" class="mes_unhide fa-solid fa-eye-slash" data-i18n="[title]Include message in prompts"></div>
<div title="Embed file or image" class="mes_embed fa-solid fa-paperclip" data-i18n="[title]Embed file or image"></div>
<div title="Create bookmark" class="mes_create_bookmark fa-regular fa-solid fa-book-bookmark" data-i18n="[title]Create Bookmark"></div>
<div title="Create checkpoint" class="mes_create_bookmark fa-regular fa-solid fa-flag-checkered" data-i18n="[title]Create checkpoint"></div>
<div title="Create branch" class="mes_create_branch fa-regular fa-code-branch" data-i18n="[title]Create Branch"></div>
<div title="Copy" class="mes_copy fa-solid fa-copy " data-i18n="[title]Copy"></div>
</div>
<div title="Open bookmark chat" class="mes_bookmark fa-solid fa-bookmark" data-i18n="[title]Open bookmark chat"></div>
<div title="Open checkpoint chat" class="mes_bookmark fa-solid fa-flag" data-i18n="[title]Open checkpoint chat"></div>
<div title="Edit" class="mes_edit fa-solid fa-pencil " data-i18n="[title]Edit"></div>
</div>
<div class="mes_edit_buttons">
@ -4499,7 +4499,7 @@
<div class="inline-drawer-content">
<small>
<b>Unique to this chat</b>.<br>
Bookmarks inherit the Note from their parent, and can be changed individually after that.<br>
Checkpoints inherit the Note from their parent, and can be changed individually after that.<br>
</small>
<textarea id="extension_floating_prompt" class="text_pole" rows="8" maxlength="50000"></textarea>
<div class="extension_token_counter">
@ -4824,8 +4824,8 @@
<span data-i18n="Back to parent chat">Back to parent chat</span>
</a>
<a id="option_new_bookmark">
<i class="fa-lg fa-solid fa-bookmark"></i>
<span data-i18n="Save bookmark">Save bookmark</span>
<i class="fa-lg fa-solid fa-flag"></i>
<span data-i18n="Save checkpoint">Save checkpoint</span>
</a>
<a id="option_convert_to_group">
<i class="fa-lg fa-solid fa-people-arrows"></i>

View File

@ -492,7 +492,7 @@ function getSystemMessages() {
force_avatar: system_avatar,
is_user: false,
is_system: true,
mes: 'Bookmark created! Click here to open the bookmark chat: <a class="bookmark_link" file_name="{0}" href="javascript:void(null);">{1}</a>',
mes: 'Checkpoint created! Click here to open the checkpoint chat: <a class="bookmark_link" file_name="{0}" href="javascript:void(null);">{1}</a>',
},
bookmark_back: {
name: systemUserName,
@ -8018,7 +8018,7 @@ jQuery(async function () {
const popupText = `<h3>Enter the new name for the chat:<h3>
<small>!!Using an existing filename will produce an error!!<br>
This will break the link between bookmark chats.<br>
This will break the link between checkpoint chats.<br>
No need to add '.jsonl' at the end.<br>
</small>`;
const newName = await callPopup(popupText, 'input', old_filename);

View File

@ -35,7 +35,7 @@ export {
showBookmarksButtons,
};
const bookmarkNameToken = 'Bookmark #';
const bookmarkNameToken = 'Checkpoint #';
async function getExistingChatNames() {
if (selected_group) {
@ -57,7 +57,7 @@ async function getExistingChatNames() {
async function getBookmarkName() {
const chatNames = await getExistingChatNames();
const popupText = `<h3>Enter the bookmark name:<h3>
const popupText = `<h3>Enter the checkpoint name:<h3>
<small>Leave empty to auto-generate.</small>`;
let name = await callPopup(popupText, 'input');
@ -125,7 +125,7 @@ function showBookmarksButtons() {
async function saveBookmarkMenu() {
if (!chat.length) {
toastr.warning('The chat is empty.', 'Bookmark creation failed');
toastr.warning('The chat is empty.', 'Checkpoint creation failed');
return;
}
@ -167,12 +167,12 @@ export async function createBranch(mesId) {
async function createNewBookmark(mesId) {
if (!chat.length) {
toastr.warning('The chat is empty.', 'Bookmark creation failed');
toastr.warning('The chat is empty.', 'Checkpoint creation failed');
return;
}
if (mesId < 0 || mesId >= chat.length) {
toastr.warning('Invalid message ID.', 'Bookmark creation failed');
toastr.warning('Invalid message ID.', 'Checkpoint creation failed');
return;
}
@ -183,7 +183,7 @@ async function createNewBookmark(mesId) {
}
if (lastMes.extra.bookmark_link) {
const confirm = await callPopup('Bookmark checkpoint for the last message already exists. Would you like to replace it?', 'confirm');
const confirm = await callPopup('Checkpoint for the last message already exists. Would you like to replace it?', 'confirm');
if (!confirm) {
return;
@ -210,7 +210,7 @@ async function createNewBookmark(mesId) {
$(`.mes[mesid="${mesId}"]`).attr('bookmark_link', name);
await saveChatConditional();
toastr.success('Click the bookmark icon in the last message to open the checkpoint chat.', 'Bookmark created', { timeOut: 10000 });
toastr.success('Click the flag icon in the last message to open the checkpoint chat.', 'Checkpoint created', { timeOut: 10000 });
}
async function backToMainChat() {