Add /forcesave command

This commit is contained in:
Cohee 2023-12-03 00:53:45 +02:00
parent df05d55a73
commit c9ab85d8c9
1 changed files with 7 additions and 0 deletions

View File

@ -7598,12 +7598,19 @@ jQuery(async function () {
}
async function doForceSave() {
await saveSettings();
await saveChatConditional();
toastr.success('Chat and settings saved.');
}
registerSlashCommand('dupe', DupeChar, [], ' duplicates the currently selected character', true, true);
registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm)</span> connect to an API', true, true);
registerSlashCommand('impersonate', doImpersonate, ['imp'], ' calls an impersonation response', true, true);
registerSlashCommand('delchat', doDeleteChat, [], ' deletes the current chat', true, true);
registerSlashCommand('closechat', doCloseChat, [], ' closes the current chat', true, true);
registerSlashCommand('panels', doTogglePanels, ['togglepanels'], ' toggle UI panels on/off', true, true);
registerSlashCommand('forcesave', doForceSave, [], ' forces a save of the current chat and settings', true, true);
setTimeout(function () {
$('#groupControlsToggle').trigger('click');