Fix duplication of the last character on deletion. Delete tags from tag_map on deletion of character/groups

This commit is contained in:
Cohee
2023-06-04 21:23:25 +03:00
parent c5d51fcd3c
commit f7a82fb4b3
2 changed files with 8 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ import {
event_types,
getCurrentChatId,
} from "../script.js";
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.js';
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect, tag_map } from './tags.js';
export {
selected_group,
@@ -786,6 +786,7 @@ async function deleteGroup(id) {
if (response.ok) {
selected_group = null;
delete tag_map[id];
resetChatState();
clearChat();
printMessages();