mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Revert export removal
This commit is contained in:
@@ -8454,7 +8454,7 @@ function doCloseChat() {
|
|||||||
* @param {string} this_chid - The character ID to be deleted.
|
* @param {string} this_chid - The character ID to be deleted.
|
||||||
* @param {boolean} delete_chats - Whether to delete chats or not.
|
* @param {boolean} delete_chats - Whether to delete chats or not.
|
||||||
*/
|
*/
|
||||||
async function handleDeleteCharacter(popup_type, this_chid, delete_chats) {
|
export async function handleDeleteCharacter(popup_type, this_chid, delete_chats) {
|
||||||
if (popup_type !== 'del_ch' ||
|
if (popup_type !== 'del_ch' ||
|
||||||
!characters[this_chid]) {
|
!characters[this_chid]) {
|
||||||
return;
|
return;
|
||||||
@@ -8472,7 +8472,7 @@ async function handleDeleteCharacter(popup_type, this_chid, delete_chats) {
|
|||||||
* @return {Promise<void>} - A promise that resolves when the character is successfully deleted
|
* @return {Promise<void>} - A promise that resolves when the character is successfully deleted
|
||||||
*/
|
*/
|
||||||
export async function deleteCharacter(characterKey, { deleteChats = true } = {}) {
|
export async function deleteCharacter(characterKey, { deleteChats = true } = {}) {
|
||||||
const character = characters.find(x => x.avatar == characterKey);;
|
const character = characters.find(x => x.avatar == characterKey);
|
||||||
if (!character) {
|
if (!character) {
|
||||||
toastr.warning(`Character ${characterKey} not found. Cannot be deleted.`);
|
toastr.warning(`Character ${characterKey} not found. Cannot be deleted.`);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user