diff --git a/web/app/_components/ChatBody/index.tsx b/web/app/_components/ChatBody/index.tsx index 53ae4e26e..5ff75c3dd 100644 --- a/web/app/_components/ChatBody/index.tsx +++ b/web/app/_components/ChatBody/index.tsx @@ -4,10 +4,8 @@ import React, { useCallback, useRef, useState, useEffect } from "react"; import ChatItem from "../ChatItem"; import { ChatMessage } from "@/_models/ChatMessage"; import useChatMessages from "@/_hooks/useChatMessages"; -import { showingTyping } from "@/_helpers/JotaiWrapper"; import { useAtomValue } from "jotai"; import { selectAtom } from "jotai/utils"; -import LoadingIndicator from "../LoadingIndicator"; import { getActiveConvoIdAtom } from "@/_helpers/atoms/Conversation.atom"; import { chatMessages } from "@/_helpers/atoms/ChatMessage.atom"; @@ -21,7 +19,6 @@ const ChatBody: React.FC = () => { ); const [content, setContent] = useState([]); - const isTyping = useAtomValue(showingTyping); const [offset, setOffset] = useState(0); const { loading, hasMore } = useChatMessages(offset); const intersectObs = useRef(null); @@ -58,11 +55,6 @@ const ChatBody: React.FC = () => { return (
- {isTyping && ( -
- -
- )} {content}
); diff --git a/web/app/_components/InputToolbar/index.tsx b/web/app/_components/InputToolbar/index.tsx index c9558cded..99d362b19 100644 --- a/web/app/_components/InputToolbar/index.tsx +++ b/web/app/_components/InputToolbar/index.tsx @@ -9,11 +9,14 @@ import { Fragment } from "react"; import { PlusIcon } from "@heroicons/react/24/outline"; import useCreateConversation from "@/_hooks/useCreateConversation"; import { currentProductAtom } from "@/_helpers/atoms/Model.atom"; +import { showingTyping } from "@/_helpers/JotaiWrapper"; +import LoadingIndicator from "../LoadingIndicator"; const InputToolbar: React.FC = () => { const showingAdvancedPrompt = useAtomValue(showingAdvancedPromptAtom); const currentProduct = useAtomValue(currentProductAtom); const { requestCreateConvo } = useCreateConversation(); + const isTyping = useAtomValue(showingTyping); if (showingAdvancedPrompt) { return
; @@ -30,7 +33,15 @@ const InputToolbar: React.FC = () => { return ( -
+
+
+ {isTyping && ( +
+ +
+ )}{" "} +
+ {/* */} { - let circleCommonClasses = "h-1.5 w-1.5 bg-current rounded-full"; return ( - //
- //
- //
- //
- //
diff --git a/web/app/globals.css b/web/app/globals.css index d66627f8e..c6f40b69a 100644 --- a/web/app/globals.css +++ b/web/app/globals.css @@ -386,7 +386,7 @@ body { align-items: center; justify-content: center; width: 52px; - height: 34px; + height: 28px; margin: 0px 8px; background-color: #f0f1f1; border-radius: 12px;