From ac04f554f1bbdc9b314718c3e931076edd20a65a Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Thu, 18 Apr 2024 13:56:14 -0700 Subject: [PATCH] Improve chat list: show bot name --- frontend/src/App.tsx | 1 + frontend/src/components/ChatList.tsx | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 514d3588..e864008f 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -134,6 +134,7 @@ function App(props: { edit?: boolean }) { sidebar={ void; deleteChat: (id: string) => void; enterConfig: (id: string | null) => void; @@ -76,15 +78,17 @@ export function ChatList(props: { {props.chats?.map((chat) => (
  • props.enterChat(chat.thread_id)} className={cn( - chat.thread_id === currentChat?.thread_id - ? "bg-gray-50 text-indigo-600" - : "text-gray-700 hover:text-indigo-600 hover:bg-gray-50", - "group flex gap-x-3 rounded-md p-2 leading-6 cursor-pointer flex-grow min-w-0", + "group flex items-center gap-x-3 rounded-md px-2 leading-6 cursor-pointer flex-grow min-w-0", )} > {chat.name?.[0] ?? " "} - {chat.name} +
    + {chat.name} + + { + props.configs?.find( + (config) => config.assistant_id === chat.assistant_id, + )?.name + } + +
    {/* Ellipsis Button */}