From f38c072f070681f2794c7fa23646919babae5ace Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 4 Aug 2024 04:03:52 +0530 Subject: [PATCH] Update chat session title in side pane to new title after rename Previously the rename wasn't updating the chat session title. We'd have to refresh the page or side pane to get latest chat session names after rename action. --- .../web/app/components/sidePanel/chatHistorySidePanel.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx index 3c542e32..f4a57607 100644 --- a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx +++ b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx @@ -369,6 +369,7 @@ function SessionsAndFiles(props: SessionsAndFilesProps) { interface ChatSessionActionMenuProps { conversationId: string; + setTitle: (title: string) => void; } function ChatSessionActionMenu(props: ChatSessionActionMenuProps) { @@ -409,6 +410,7 @@ function ChatSessionActionMenu(props: ChatSessionActionMenuProps) { @@ -529,6 +531,7 @@ function ChatSessionActionMenu(props: ChatSessionActionMenuProps) { function ChatSession(props: ChatHistory) { const [isHovered, setIsHovered] = useState(false); + const [title, setTitle] = useState(props.slug || "New Conversation 🌱"); var currConversationId = parseInt(new URLSearchParams(window.location.search).get('conversationId') || "-1"); return (
props.showSidePanel(false)}> -

{props.slug || "New Conversation 🌱"}

+

{title}

- +
); }