From 321eeeaed7c5b165a4eabe69898f98463f932684 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Tue, 10 Dec 2024 18:19:46 -0800 Subject: [PATCH] Fix setting title of shared conversation, move shared button into the title pane --- .../sidePanel/chatHistorySidePanel.tsx | 94 +++++++++++-------- src/khoj/database/adapters/__init__.py | 2 +- 2 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx index c6533b96..498ec197 100644 --- a/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx +++ b/src/interface/web/app/components/sidePanel/chatHistorySidePanel.tsx @@ -105,7 +105,6 @@ import { ScrollAreaScrollbar } from "@radix-ui/react-scroll-area"; import { KhojLogoType } from "@/app/components/logo/khojLogo"; import NavMenu from "@/app/components/navMenu/navMenu"; import { getIconFromIconName } from "@/app/common/iconUtils"; -import AgentProfileCard from "../profileCard/profileCard"; // Define a fetcher function const fetcher = (url: string) => @@ -627,43 +626,56 @@ export function ChatSessionActionMenu(props: ChatSessionActionMenuProps) { const size = sizeClass(); return ( - setIsOpen(open)} open={isOpen}> - - - - - - - - - - - - - - - +
+ {(props.sizing === "lg" || props.sizing === "md") && ( + + )} + setIsOpen(open)} open={isOpen}> + + + + + + + + {props.sizing === "sm" && ( + + + + )} + + + + + +
); } @@ -685,7 +697,11 @@ function ChatSession(props: ChatHistory) { >

{title}

- + ); } diff --git a/src/khoj/database/adapters/__init__.py b/src/khoj/database/adapters/__init__.py index df4852bf..9dee6684 100644 --- a/src/khoj/database/adapters/__init__.py +++ b/src/khoj/database/adapters/__init__.py @@ -857,7 +857,7 @@ class ConversationAdapters: agent=conversation.agent, conversation_log=conversation.conversation_log, slug=conversation.slug, - title=conversation.title, + title=conversation.title if conversation.title else conversation.slug, ) @staticmethod