From 551b03ff90bddaa2bbdac49d76d2bab61367e895 Mon Sep 17 00:00:00 2001
From: G30 <50341825+silentoplayz@users.noreply.github.com>
Date: Sun, 25 Oct 2026 15:02:00 -0400
Subject: [PATCH] feat: rename a chat from the menu next to its title (#33177)
---
src/lib/components/chat/Navbar.svelte | 76 +++++++++++++++++--
src/lib/components/layout/Navbar/Menu.svelte | 17 +++++
.../components/layout/Sidebar/ChatItem.svelte | 2 +-
3 files changed, 88 insertions(+), 7 deletions(-)
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))}