#2308 Preserve itemized prompts for branches and checkpoints

This commit is contained in:
Cohee 2024-05-25 00:07:36 +03:00
parent da4f0f53be
commit 439ef0dc5e
2 changed files with 3 additions and 0 deletions

View File

@ -7828,6 +7828,7 @@ function swipe_left() { // when we swipe left..but no generation.
*/
async function branchChat(mesId) {
const fileName = await createBranch(mesId);
await saveItemizedPrompts(fileName);
if (selected_group) {
await openGroupChat(selected_group, fileName);

View File

@ -12,6 +12,7 @@ import {
getCharacters,
chat,
saveChatConditional,
saveItemizedPrompts,
} from '../script.js';
import { humanizedDateTime } from './RossAscends-mods.js';
import {
@ -199,6 +200,7 @@ async function createNewBookmark(mesId) {
const mainChat = selected_group ? groups?.find(x => x.id == selected_group)?.chat_id : characters[this_chid].chat;
const newMetadata = { main_chat: mainChat };
await saveItemizedPrompts(name);
if (selected_group) {
await saveGroupBookmarkChat(selected_group, name, newMetadata, mesId);