@@ -464,9 +464,13 @@
on:select={() => {
selectedChatId = chat.id;
}}
- on:delete={() => {
- deleteChat = chat;
- showDeleteConfirm = true;
+ on:delete={(e) => {
+ if ((e?.detail ?? '') === 'shift') {
+ deleteChatHandler(chat.id);
+ } else {
+ deleteChat = chat;
+ showDeleteConfirm = true;
+ }
/>
{/each}
@@ -201,7 +201,7 @@
<button
class=" self-center dark:hover:text-white transition"
on:click={() => {
- deleteChat(chat.id);
+ dispatch('delete', 'shift');
type="button"
>