From 13c73a3de14a6ddc55faf35d96c253b369ddf5ff Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Fri, 19 Jul 2024 15:39:49 +0800 Subject: [PATCH] fix: use activeAssistant's id for fetching assistant and model data --- src/renderer/src/pages/home/components/Navigation.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/components/Navigation.tsx b/src/renderer/src/pages/home/components/Navigation.tsx index 3f2533a9..7c5dd086 100644 --- a/src/renderer/src/pages/home/components/Navigation.tsx +++ b/src/renderer/src/pages/home/components/Navigation.tsx @@ -13,8 +13,9 @@ interface Props { } const Navigation: FC = ({ activeAssistant }) => { - const { providers } = useProviders() + const { assistant } = useAssistant(activeAssistant.id) const { model, setModel } = useAssistant(activeAssistant.id) + const { providers } = useProviders() const { t } = useTranslation() const items: MenuProps['items'] = providers @@ -33,7 +34,7 @@ const Navigation: FC = ({ activeAssistant }) => { return ( - {activeAssistant?.name} + {assistant?.name}