mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix ESLint
This commit is contained in:
@ -6,10 +6,10 @@ import {
|
|||||||
deleteCharacter,
|
deleteCharacter,
|
||||||
event_types,
|
event_types,
|
||||||
eventSource,
|
eventSource,
|
||||||
getCharacters, getPastCharacterChats,
|
getCharacters,
|
||||||
|
getPastCharacterChats,
|
||||||
getRequestHeaders,
|
getRequestHeaders,
|
||||||
printCharacters,
|
printCharacters,
|
||||||
this_chid,
|
|
||||||
} from '../script.js';
|
} from '../script.js';
|
||||||
|
|
||||||
import { favsToHotswap } from './RossAscends-mods.js';
|
import { favsToHotswap } from './RossAscends-mods.js';
|
||||||
@ -119,12 +119,12 @@ class CharacterContextMenu {
|
|||||||
return fetch('/api/characters/delete', {
|
return fetch('/api/characters/delete', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: getRequestHeaders(),
|
headers: getRequestHeaders(),
|
||||||
body: JSON.stringify({avatar_url: character.avatar, delete_chats: deleteChats}),
|
body: JSON.stringify({ avatar_url: character.avatar, delete_chats: deleteChats }),
|
||||||
cache: 'no-cache',
|
cache: 'no-cache',
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return deleteCharacter(character.name, character.avatar, false).then(() => {
|
return deleteCharacter(character.name, character.avatar, false).then(() => {
|
||||||
eventSource.emit('characterDeleted', {id: characterId, character: characters[characterId]});
|
eventSource.emit('characterDeleted', { id: characterId, character: characters[characterId] });
|
||||||
if (deleteChats) getPastCharacterChats(characterId).then(pastChats => {
|
if (deleteChats) getPastCharacterChats(characterId).then(pastChats => {
|
||||||
for (const chat of pastChats) {
|
for (const chat of pastChats) {
|
||||||
const name = chat.file_name.replace('.jsonl', '');
|
const name = chat.file_name.replace('.jsonl', '');
|
||||||
|
Reference in New Issue
Block a user