mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Save chat before reloading
This commit is contained in:
@@ -17,6 +17,8 @@ import {
|
|||||||
chat,
|
chat,
|
||||||
getFirstDisplayedMessageId,
|
getFirstDisplayedMessageId,
|
||||||
showMoreMessages,
|
showMoreMessages,
|
||||||
|
saveSettings,
|
||||||
|
saveChatConditional,
|
||||||
} from '../script.js';
|
} from '../script.js';
|
||||||
import { isMobile, initMovingUI, favsToHotswap } from './RossAscends-mods.js';
|
import { isMobile, initMovingUI, favsToHotswap } from './RossAscends-mods.js';
|
||||||
import {
|
import {
|
||||||
@@ -2889,10 +2891,12 @@ $(document).ready(() => {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#reload_chat').on('click', function () {
|
$('#reload_chat').on('click', async function () {
|
||||||
const currentChatId = getCurrentChatId();
|
const currentChatId = getCurrentChatId();
|
||||||
if (currentChatId !== undefined && currentChatId !== null) {
|
if (currentChatId !== undefined && currentChatId !== null) {
|
||||||
reloadCurrentChat();
|
await saveSettings();
|
||||||
|
await saveChatConditional();
|
||||||
|
await reloadCurrentChat();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user