diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte
index fb7540f94a..67b54148d3 100644
--- a/src/lib/components/chat/Navbar.svelte
+++ b/src/lib/components/chat/Navbar.svelte
@@ -1,5 +1,5 @@
@@ -122,11 +164,32 @@
>
{#if chat?.id}
-
- {title || chat?.chat?.title || $i18n.t('New Chat')}
-
+ {#if confirmEdit}
+
{
+ if (e.isComposing || e.keyCode === 229) return;
+
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ editChatTitle();
+ } else if (e.key === 'Escape') {
+ e.preventDefault();
+ confirmEdit = false;
+ }
+ }}
+ on:blur={editChatTitle}
+ />
+ {:else}
+
+ {title || chat?.chat?.title || $i18n.t('New Chat')}
+
+ {/if}
{#if shareEnabled && chat && (chat.id || $temporaryChatEnabled) && (scrollToTop || ($artifactContents ?? []).length > 0 || (!readOnly && !$temporaryChatEnabled) || $user?.role === 'admin' || ($user?.permissions?.chat?.export ?? true))}