feat: a chat of the assistant is deleted at once, without asking
This commit is contained in:
1 parent
77322e8644
commit
e0b3999d0c
1 file changed
-1
@@ -204,7 +204,6 @@
|
||||
row.querySelector('.ai-chatopen').onclick = () => { openChat(c.id); toggleChats(false); };
|
||||
row.querySelector('.ai-chatdel').onclick = async ev => {
|
||||
ev.stopPropagation();
|
||||
if (!await UI.confirm('Удалить чат «' + c.title + '»?', {ok: 'Удалить', danger: true})) return;
|
||||
await fetch('/api/panel/ai/chats/' + c.id + '/delete', {method: 'POST', credentials: 'same-origin'});
|
||||
if (c.id === chatId) openChat(0);
|
||||
loadChats();
|
||||
|
||||
Reference in new issue
Block a user