Save parent bookmark reference to chat metadata

This commit is contained in:
SillyLossy
2023-04-14 22:43:02 +03:00
parent 0d09967485
commit c0eb8190c7
4 changed files with 48 additions and 23 deletions

View File

@@ -2254,7 +2254,8 @@ function resultCheckStatusNovel() {
$("#api_button_novel").css("display", "inline-block");
}
async function saveChat(chat_name) {
async function saveChat(chat_name, withMetadata) {
const metadata = { ...chat_metadata, ...(withMetadata || {}) };
let file_name = chat_name ?? characters[this_chid].chat;
chat.forEach(function (item, i) {
if (item["is_group"]) {
@@ -2275,7 +2276,7 @@ async function saveChat(chat_name) {
user_name: default_user_name,
character_name: name2,
create_date: chat_create_date,
chat_metadata: chat_metadata,
chat_metadata: metadata,
},
...chat,
];