Add migration of positional arguments

785cacbcb6800cd94ab7f49da7f3c43c8434a867

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

1 files changed, +5 -0Showing whitespace changes
public/script.js+5 -0
@@ -6696,6 +6696,11 @@ export function saveChatDebounced() {
6696 * @returns {Promise<void>}6696 * @returns {Promise<void>}
6697 */6697 */
6698export async function saveChat({ chatName, withMetadata, mesId, force = false } = {}) {6698export 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
6699 const metadata = { ...chat_metadata, ...(withMetadata || {}) };6704 const metadata = { ...chat_metadata, ...(withMetadata || {}) };
6700 const fileName = chatName ?? characters[this_chid]?.chat;6705 const fileName = chatName ?? characters[this_chid]?.chat;
67016706