| 6696 | 6696 | * @returns {Promise<void>} |
| 6697 | 6697 | */ |
| 6698 | 6698 | export 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 | 6704 | const metadata = { ...chat_metadata, ...(withMetadata || {}) }; |
| 6700 | 6705 | const fileName = chatName ?? characters[this_chid]?.chat; |
| 6701 | 6706 | |