mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Wait for current chat to finish saving before allowing to switch
This commit is contained in:
@ -7299,6 +7299,7 @@ function getFirstMessage() {
|
||||
}
|
||||
|
||||
export async function openCharacterChat(file_name) {
|
||||
await waitUntilCondition(() => !isChatSaving, debounce_timeout.extended, 10);
|
||||
await clearChat();
|
||||
characters[this_chid]['chat'] = file_name;
|
||||
chat.length = 0;
|
||||
|
@ -16,6 +16,7 @@ import {
|
||||
localizePagination,
|
||||
renderPaginationDropdown,
|
||||
paginationDropdownChangeHandler,
|
||||
waitUntilCondition,
|
||||
} from './utils.js';
|
||||
import { RA_CountCharTokens, humanizedDateTime, dragElement, favsToHotswap, getMessageTimeStamp } from './RossAscends-mods.js';
|
||||
import { power_user, loadMovingUIState, sortEntitiesList } from './power-user.js';
|
||||
@ -1912,6 +1913,7 @@ export async function getGroupPastChats(groupId) {
|
||||
}
|
||||
|
||||
export async function openGroupChat(groupId, chatId) {
|
||||
await waitUntilCondition(() => !isChatSaving, debounce_timeout.extended, 10);
|
||||
const group = groups.find(x => x.id === groupId);
|
||||
|
||||
if (!group || !group.chats.includes(chatId)) {
|
||||
|
Reference in New Issue
Block a user