diff --git a/web/screens/Chat/ThreadList/index.tsx b/web/screens/Chat/ThreadList/index.tsx index d82951a3fc..0a98e91d29 100644 --- a/web/screens/Chat/ThreadList/index.tsx +++ b/web/screens/Chat/ThreadList/index.tsx @@ -6,6 +6,7 @@ import { ModalTrigger, ModalClose, ModalFooter, + ModalPortal, ModalContent, ModalHeader, ModalTitle, @@ -34,7 +35,6 @@ import useThreads from '@/hooks/useThreads' import { displayDate } from '@/utils/datetime' -import { getCurrentChatMessagesAtom } from '@/helpers/atoms/ChatMessage.atom' import { activeThreadAtom, threadStatesAtom, @@ -50,7 +50,6 @@ export default function ThreadList() { const activeThread = useAtomValue(activeThreadAtom) const { deleteThread, cleanThread } = useDeleteThread() const { downloadedModels } = useGetDownloadedModels() - const messages = useAtomValue(getCurrentChatMessagesAtom) const { activeThreadId, setActiveThread: onThreadClick } = useSetActiveThread() @@ -93,12 +92,8 @@ export default function ThreadList() { `group/message relative mb-1 flex cursor-pointer flex-col transition-all hover:rounded-lg hover:bg-gray-100 hover:dark:bg-secondary/50` )} onClick={() => { - if ( - messages[messages.length - 1]?.status !== - MessageStatus.Pending - ) { - onThreadClick(thread) - } + console.log('a') + onThreadClick(thread) }} >
Are you sure you want to clean this thread?