Add migration of positional arguments

785cacbcb6800cd94ab7f49da7f3c43c8434a867

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +5 -0Ignore whitespace
public/script.js+5 -0
@@ -6696,6 +6696,11 @@ export function saveChatDebounced() {
66966696 * @returns {Promise<void>}
66976697 */
66986698export async function saveChat({ chatName, withMetadata, mesId, force = false } = {}) {
6699+ if (arguments.length > 1 && typeof arguments[0] !== 'object') {
6700+ console.trace('saveChat called with positional arguments. Please use an object instead.');
6701+ [chatName, withMetadata, mesId, force] = arguments;
6702+ }
6703+
66996704 const metadata = { ...chat_metadata, ...(withMetadata || {}) };
67006705 const fileName = chatName ?? characters[this_chid]?.chat;
67016706