diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx index 6af66ea6533bf5ec6e2ff6226cfdef2f75501dd5..87c90c80b43f008bca107f495412198b25951fe6 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx @@ -5,8 +5,10 @@ import { useManageWorkspaceModal } from "../../../Modals/MangeWorkspace"; import ManageWorkspace from "../../../Modals/MangeWorkspace"; import { ArrowDown } from "@phosphor-icons/react"; import debounce from "lodash.debounce"; +import useUser from "@/hooks/useUser"; export default function ChatHistory({ history = [], workspace, sendCommand }) { + const { user } = useUser(); const { showing, showModal, hideModal } = useManageWorkspaceModal(); const [isAtBottom, setIsAtBottom] = useState(true); const chatHistoryRef = useRef(null); @@ -56,16 +58,22 @@ export default function ChatHistory({ history = [], workspace, sendCommand }) { <p className="text-white/60 text-lg font-base py-4"> Welcome to your new workspace. </p> - <p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1"> - To get started either{" "} - <span - className="underline font-medium cursor-pointer" - onClick={showModal} - > - upload a document - </span> - or <b className="font-medium italic">send a chat.</b> - </p> + {!user || user.role !== "default" ? ( + <p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1"> + To get started either{" "} + <span + className="underline font-medium cursor-pointer" + onClick={showModal} + > + upload a document + </span> + or <b className="font-medium italic">send a chat.</b> + </p> + ) : ( + <p className="w-full items-center text-white/60 text-lg font-base flex flex-col md:flex-row gap-x-1"> + To get started <b className="font-medium italic">send a chat.</b> + </p> + )} <WorkspaceChatSuggestions suggestions={workspace?.suggestedMessages ?? []} sendSuggestion={handleSendSuggestedMessage}