diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx index fab2ac8d4cba..512e13f66e05 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx @@ -29,6 +29,7 @@ export const ActionsBar = (): JSX.Element => { shouldDisplayUploadCard={shouldDisplayUploadCard} setShouldDisplayUploadCard={setShouldDisplayUploadCard} feedBrain={() => void feedBrain()} + hasContentToFeedBrain={contents.length > 0} /> diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx index e951b1777807..c7ac005b8f6e 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx @@ -1,5 +1,5 @@ +/* eslint-disable max-lines */ "use client"; -import { useFeature } from "@growthbook/growthbook-react"; import { useTranslation } from "react-i18next"; import { MdAddCircle, MdSend } from "react-icons/md"; @@ -15,17 +15,18 @@ type ChatInputProps = { shouldDisplayUploadCard: boolean; feedBrain: () => void; setShouldDisplayUploadCard: (shouldDisplayUploadCard: boolean) => void; + hasContentToFeedBrain: boolean; }; export const ChatInput = ({ shouldDisplayUploadCard, feedBrain, setShouldDisplayUploadCard, + hasContentToFeedBrain, }: ChatInputProps): JSX.Element => { const { setMessage, submitQuestion, chatId, generatingAnswer, message } = useChatInput(); const { t } = useTranslation(["chat"]); - const shouldDisplayUploadButton = useFeature("ux-upload").on; const { currentBrainId } = useBrainContext(); return ( @@ -37,7 +38,7 @@ export const ChatInput = ({ }} className="sticky flex items-star bottom-0 bg-white dark:bg-black w-full flex justify-center gap-2 z-20" > - {!shouldDisplayUploadCard && shouldDisplayUploadButton && ( + {!shouldDisplayUploadCard && (