Add migration of positional arguments

This commit is contained in:
Cohee
2025-03-18 01:39:23 +02:00
parent fa641e9946
commit 785cacbcb6

View File

@ -6696,6 +6696,11 @@ export function saveChatDebounced() {
* @returns {Promise<void>}
*/
export async function saveChat({ chatName, withMetadata, mesId, force = false } = {}) {
if (arguments.length > 1 && typeof arguments[0] !== 'object') {
console.trace('saveChat called with positional arguments. Please use an object instead.');
[chatName, withMetadata, mesId, force] = arguments;
}
const metadata = { ...chat_metadata, ...(withMetadata || {}) };
const fileName = chatName ?? characters[this_chid]?.chat;