Fix chat backups saving with incorrect file extension

This commit is contained in:
Cohee 2023-11-15 01:06:27 +02:00
parent 22161c2264
commit 5b5e42361a
2 changed files with 2 additions and 2 deletions

View File

@ -718,7 +718,7 @@ function onTagListHintClick() {
$(this).siblings(".innerActionable").toggleClass('hidden');
}
$(document).ready(() => {
jQuery(() => {
createTagInput('#tagInput', '#tagList');
createTagInput('#groupTagInput', '#groupTagList');

View File

@ -3640,7 +3640,7 @@ function backupChat(name, chat) {
// replace non-alphanumeric characters with underscores
name = sanitize(name).replace(/[^a-z0-9]/gi, '_').toLowerCase();
const backupFile = path.join(DIRECTORIES.backups, `chat_${name}_${generateTimestamp()}.json`);
const backupFile = path.join(DIRECTORIES.backups, `chat_${name}_${generateTimestamp()}.jsonl`);
writeFileAtomicSync(backupFile, chat, 'utf-8');
removeOldBackups(`chat_${name}_`);