From aec8c15e7e3c34306f7bd7c1a6cd7e3057b98556 Mon Sep 17 00:00:00 2001 From: buua436 <66937541+buua436@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:05:38 +0800 Subject: [PATCH] fix: reset chat state when creating new dialog (#10380) ### What problem does this PR solve? issue: [Question]: New Chat Creation Renames Edited Chat Instead of Creating a New One #10373 change: reset chat state when creating new dialog ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/pages/next-chats/hooks/use-rename-chat.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/pages/next-chats/hooks/use-rename-chat.ts b/web/src/pages/next-chats/hooks/use-rename-chat.ts index 0f240169a..41f81232d 100644 --- a/web/src/pages/next-chats/hooks/use-rename-chat.ts +++ b/web/src/pages/next-chats/hooks/use-rename-chat.ts @@ -68,6 +68,8 @@ export const useRenameChat = () => { (record?: IDialog) => { if (record) { setChat(record); + } else { + setChat({} as IDialog); } showChatRenameModal(); },