From 785cacbcb6800cd94ab7f49da7f3c43c8434a867 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Tue, 18 Mar 2025 01:39:23 +0200 Subject: [PATCH] Add migration of positional arguments --- public/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/script.js b/public/script.js index f5849a076..15cb9a80c 100644 --- a/public/script.js +++ b/public/script.js @@ -6696,6 +6696,11 @@ export function saveChatDebounced() { * @returns {Promise} */ 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;