mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add character deleted event to the list
This commit is contained in:
@@ -124,7 +124,7 @@ class CharacterContextMenu {
|
||||
}).then(response => {
|
||||
if (response.ok) {
|
||||
return deleteCharacter(character.name, character.avatar, false).then(() => {
|
||||
eventSource.emit('characterDeleted', { id: characterId, character: characters[characterId] });
|
||||
eventSource.emit(event_types.CHARACTER_DELETED, { id: characterId, character: characters[characterId] });
|
||||
if (deleteChats) getPastCharacterChats(characterId).then(pastChats => {
|
||||
for (const chat of pastChats) {
|
||||
const name = chat.file_name.replace('.jsonl', '');
|
||||
|
@@ -606,7 +606,7 @@ class PromptManager {
|
||||
});
|
||||
|
||||
// Sanitize settings after character has been deleted.
|
||||
eventSource.on('characterDeleted', (event) => {
|
||||
eventSource.on(event_types.CHARACTER_DELETED, (event) => {
|
||||
this.handleCharacterDeleted(event);
|
||||
this.saveServiceSettings().then(() => this.renderDebounced());
|
||||
});
|
||||
|
Reference in New Issue
Block a user