Fix chat backups saving with incorrect file extension
This commit is contained in:
parent
22161c2264
commit
5b5e42361a
|
@ -718,7 +718,7 @@ function onTagListHintClick() {
|
||||||
$(this).siblings(".innerActionable").toggleClass('hidden');
|
$(this).siblings(".innerActionable").toggleClass('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(() => {
|
jQuery(() => {
|
||||||
createTagInput('#tagInput', '#tagList');
|
createTagInput('#tagInput', '#tagList');
|
||||||
createTagInput('#groupTagInput', '#groupTagList');
|
createTagInput('#groupTagInput', '#groupTagList');
|
||||||
|
|
||||||
|
|
|
@ -3640,7 +3640,7 @@ function backupChat(name, chat) {
|
||||||
// replace non-alphanumeric characters with underscores
|
// replace non-alphanumeric characters with underscores
|
||||||
name = sanitize(name).replace(/[^a-z0-9]/gi, '_').toLowerCase();
|
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');
|
writeFileAtomicSync(backupFile, chat, 'utf-8');
|
||||||
|
|
||||||
removeOldBackups(`chat_${name}_`);
|
removeOldBackups(`chat_${name}_`);
|
||||||
|
|
Loading…
Reference in New Issue