From 124b7e9154d7f3ca8a16f2b90621209ac8d6b8c1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 1 Apr 2026 07:35:38 -0500 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index c3864bc74..fd9dce96c 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2647,7 +2647,7 @@ const MAX_DRAFT_LENGTH = 5000; let saveDraftTimeout: ReturnType | null = null; - const saveDraft = async (draft, chatId = null) => { + const saveDraft = async (draft: any, chatId: string | null = null) => { if (saveDraftTimeout) { clearTimeout(saveDraftTimeout); } @@ -2664,7 +2664,7 @@ } }; - const clearDraft = async (chatId = null) => { + const clearDraft = async (chatId: string | null = null) => { if (saveDraftTimeout) { clearTimeout(saveDraftTimeout); } @@ -2937,7 +2937,7 @@ } }} on:submit={async (e) => { - clearDraft(); + clearDraft($chatId); if (e.detail || files.length > 0) { await tick();