diff --git a/web/screens/Chat/index.tsx b/web/screens/Chat/index.tsx index 9dbe8cf2d..7c3aa2f28 100644 --- a/web/screens/Chat/index.tsx +++ b/web/screens/Chat/index.tsx @@ -6,6 +6,8 @@ import { Button, Badge, Textarea } from '@janhq/uikit' import { useAtom, useAtomValue } from 'jotai' import { Trash2Icon } from 'lucide-react' +import { twMerge } from 'tailwind-merge' + import { currentPromptAtom } from '@/containers/Providers/Jotai' import { MainViewState } from '@/constants/screens' @@ -116,31 +118,34 @@ const ChatScreen = () => {
{currentConvo?.name ?? ''} - {downloadedModels.find((x) => x.name === currentConvo?.name) || - activeModel?._id === currentConvo?.modelId ? ( - - {!stateModel.loading && ( - deleteConvo()} - /> - )} - - ) : ( -
+
x.name === currentConvo?.name + ).length === 0 && '-mt-1' + )} + > + {downloadedModels.filter((x) => x.name === currentConvo?.name) + .length === 0 && ( -
- )} + )} + {!stateModel.loading && ( + deleteConvo()} + /> + )} +
)}