We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4764dd5 commit 124b7e9Copy full SHA for 124b7e9
1 file changed
src/lib/components/chat/Chat.svelte
@@ -2647,7 +2647,7 @@
2647
const MAX_DRAFT_LENGTH = 5000;
2648
let saveDraftTimeout: ReturnType<typeof setTimeout> | null = null;
2649
2650
- const saveDraft = async (draft, chatId = null) => {
+ const saveDraft = async (draft: any, chatId: string | null = null) => {
2651
if (saveDraftTimeout) {
2652
clearTimeout(saveDraftTimeout);
2653
}
@@ -2664,7 +2664,7 @@
2664
2665
};
2666
2667
- const clearDraft = async (chatId = null) => {
+ const clearDraft = async (chatId: string | null = null) => {
2668
2669
2670
@@ -2937,7 +2937,7 @@
2937
2938
}}
2939
on:submit={async (e) => {
2940
- clearDraft();
+ clearDraft($chatId);
2941
if (e.detail || files.length > 0) {
2942
await tick();
2943
0 commit comments