Fix delete all chats issue
This commit is contained in:
parent
6315fc329e
commit
6eea4a98fb
|
@ -62,11 +62,12 @@
|
|||
let lastSubmitRecorded = false
|
||||
|
||||
$: chat = $chatsStorage.find((chat) => chat.id === chatId) as Chat
|
||||
$: chatSettings = chat.settings
|
||||
$: chatSettings = chat?.settings
|
||||
let showSettingsModal
|
||||
|
||||
let scDelay
|
||||
const onStateChange = (...args:any) => {
|
||||
if (!chat) return
|
||||
clearTimeout(scDelay)
|
||||
setTimeout(() => {
|
||||
if (chat.startSession) {
|
||||
|
@ -109,6 +110,7 @@
|
|||
})
|
||||
|
||||
onMount(async () => {
|
||||
if (!chat) return
|
||||
// Focus the input on mount
|
||||
focusInput()
|
||||
|
||||
|
@ -585,7 +587,7 @@
|
|||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if chat}
|
||||
<ChatSettingsModal chatId={chatId} bind:show={showSettingsModal} />
|
||||
|
||||
<div class="chat-content">
|
||||
|
@ -674,3 +676,4 @@
|
|||
{/each}
|
||||
</div>
|
||||
</Footer>
|
||||
{/if}
|
|
@ -81,6 +81,7 @@
|
|||
confirmButtonClass: 'is-danger',
|
||||
confirmButton: 'Delete ALL',
|
||||
onConfirm: () => {
|
||||
replace('/').then(() => { deleteChat(chatId) })
|
||||
clearChats()
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue