From dc05ccb73f31476fc703eba2e8c8d541a271d401 Mon Sep 17 00:00:00 2001 From: ayana Date: Tue, 3 Jun 2025 19:27:28 -0700 Subject: [PATCH 1/2] fix: error message on chat title edit --- src/lib/components/layout/Sidebar/ChatItem.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index 74787d3c5d..07d50bfbf7 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -204,9 +204,10 @@ const chatTitleInputKeydownHandler = (e) => { if (e.key === 'Enter') { e.preventDefault(); - editChatTitle(id, chatTitle); - confirmEdit = false; - chatTitle = ''; + setTimeout(() => { + const input = document.getElementById(`chat-title-input-${id}`); + if (input) input.blur(); + }, 0); } else if (e.key === 'Escape') { e.preventDefault(); confirmEdit = false; From fd53c737f6000364b9ae02c6b2a3c2e44f89612a Mon Sep 17 00:00:00 2001 From: Ayana H <96905125+ayanahye@users.noreply.github.com> Date: Tue, 3 Jun 2025 19:49:52 -0700 Subject: [PATCH 2/2] update spacing --- src/lib/components/layout/Sidebar/ChatItem.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index 07d50bfbf7..3a5330dbdb 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -204,10 +204,10 @@ const chatTitleInputKeydownHandler = (e) => { if (e.key === 'Enter') { e.preventDefault(); - setTimeout(() => { - const input = document.getElementById(`chat-title-input-${id}`); - if (input) input.blur(); - }, 0); + setTimeout(() => { + const input = document.getElementById(`chat-title-input-${id}`); + if (input) input.blur(); + }, 0); } else if (e.key === 'Escape') { e.preventDefault(); confirmEdit = false;