diff --git a/frontend/app/App.tsx b/frontend/app/App.tsx index 6f1c6eb96b9d..3ca446b9b808 100644 --- a/frontend/app/App.tsx +++ b/frontend/app/App.tsx @@ -3,11 +3,15 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { PropsWithChildren, useEffect } from "react"; +import { Menu } from "@/lib/components/Menu/Menu"; +import { NotificationBanner } from "@/lib/components/NotificationBanner"; import { BrainProvider } from "@/lib/context"; import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext"; +import { SideBarProvider } from "@/lib/context/SidebarProvider/sidebar-provider"; import { useSupabase } from "@/lib/context/SupabaseProvider"; import { UpdateMetadata } from "@/lib/helpers/updateMetadata"; import { usePageTracking } from "@/services/analytics/june/usePageTracking"; + import "../lib/config/LocaleConfig/i18n"; // This wrapper is used to make effect calls at a high level in app rendering. @@ -27,10 +31,14 @@ const App = ({ children }: PropsWithChildren): JSX.Element => { }, [session]); return ( - <> - {children} - - +
+ +
+ +
{children}
+ +
+
); }; @@ -40,7 +48,9 @@ const AppWithQueryClient = ({ children }: PropsWithChildren): JSX.Element => { return ( - {children} + + {children} + ); diff --git a/frontend/app/brains-management/layout.tsx b/frontend/app/brains-management/layout.tsx index 442770c05604..c90732a62c85 100644 --- a/frontend/app/brains-management/layout.tsx +++ b/frontend/app/brains-management/layout.tsx @@ -17,7 +17,7 @@ const Layout = ({ children }: LayoutProps): JSX.Element => { } return ( -
+
{children}
diff --git a/frontend/app/chat/[chatId]/__tests__/page.test.tsx b/frontend/app/chat/[chatId]/__tests__/page.test.tsx index be9cb7d48dbd..53e4a3d6a9ac 100644 --- a/frontend/app/chat/[chatId]/__tests__/page.test.tsx +++ b/frontend/app/chat/[chatId]/__tests__/page.test.tsx @@ -11,6 +11,7 @@ import { ChatProviderMock, } from "@/lib/context/ChatProvider/mocks/ChatProviderMock"; import { KnowledgeToFeedProvider } from "@/lib/context/KnowledgeToFeedProvider"; +import { SideBarProvider } from "@/lib/context/SidebarProvider/sidebar-provider"; import { SupabaseContextMock, SupabaseProviderMock, @@ -87,7 +88,9 @@ describe("Chat page", () => { - , + + , + diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx index dd952bf47ef7..dc7ed708bd6c 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/ActionsBar.tsx @@ -2,12 +2,14 @@ import { AnimatePresence, motion } from "framer-motion"; import { useTranslation } from "react-i18next"; import { AiOutlineLoading3Quarters } from "react-icons/ai"; +import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext"; + import { ChatInput, KnowledgeToFeed } from "./components"; import { useActionBar } from "./hooks/useActionBar"; export const ActionsBar = (): JSX.Element => { - const { hasPendingRequests, setHasPendingRequests, shouldDisplayFeedCard } = - useActionBar(); + const { hasPendingRequests, setHasPendingRequests } = useActionBar(); + const { shouldDisplayFeedCard } = useKnowledgeToFeedContext(); const { t } = useTranslation(["chat"]); @@ -39,9 +41,7 @@ export const ActionsBar = (): JSX.Element => { )} - {!shouldDisplayFeedCard && ( - - )} + {!shouldDisplayFeedCard && }
); diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/ActionsModal.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/ActionsModal.tsx index 8035b965a2ee..431f05c28ef1 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/ActionsModal.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/ActionsModal.tsx @@ -12,6 +12,7 @@ import { import { ChangeBrainButton } from "./components/ChangeBrainButton"; import { ChatHistoryButton } from "./components/ChatHistoryButton/ChatHistoryButton"; import { ConfigModal } from "./components/ConfigModal"; +import { FeedCardTrigger } from "./components/FeedCardTrigger"; import { NewDiscussionButton } from "./components/NewDiscussionButton"; import { SelectedBrainTag } from "./components/SelectedBrainTag"; @@ -40,6 +41,7 @@ export const ActionsModal = (): JSX.Element => { > + diff --git a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/components/FeedCardTrigger/FeedCardTrigger.tsx b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/components/FeedCardTrigger/FeedCardTrigger.tsx new file mode 100644 index 000000000000..a7935761cd14 --- /dev/null +++ b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/components/FeedCardTrigger/FeedCardTrigger.tsx @@ -0,0 +1,21 @@ +import { LuChevronRight } from "react-icons/lu"; + +import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext"; + +import { useFeedCardTrigger } from "./hooks/useFeedCardTrigger"; +import { Button } from "../Button"; + +export const FeedCardTrigger = (): JSX.Element => { + const { setShouldDisplayFeedCard } = useKnowledgeToFeedContext(); + const { label, Icon } = useFeedCardTrigger(); + + return ( + + ); +}; 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 4619e6eeb3a8..b44074a8ae31 100644 --- a/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx +++ b/frontend/app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx @@ -2,28 +2,18 @@ import { useTranslation } from "react-i18next"; import Button from "@/lib/components/ui/Button"; -import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext"; -import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext"; -import { getBrainIconFromBrainType } from "@/lib/helpers/getBrainIconFromBrainType"; import { OnboardingQuestions } from "./components"; import { ActionsModal } from "./components/ActionsModal/ActionsModal"; import { ChatEditor } from "./components/ChatEditor/ChatEditor"; +import { MenuControlButton } from "./components/MenuControlButton"; import { useChatInput } from "./hooks/useChatInput"; -type ChatInputProps = { - shouldDisplayFeedOrSecretsCard: boolean; -}; - -export const ChatInput = ({ - shouldDisplayFeedOrSecretsCard, -}: ChatInputProps): JSX.Element => { +export const ChatInput = (): JSX.Element => { const { setMessage, submitQuestion, generatingAnswer, message } = useChatInput(); const { t } = useTranslation(["chat"]); - const { currentBrainDetails } = useBrainContext(); - const { setShouldDisplayFeedCard } = useKnowledgeToFeedContext(); return ( <> @@ -37,18 +27,7 @@ export const ChatInput = ({ }} className="sticky bottom-0 bg-white dark:bg-black w-full flex items-center gap-2 z-20 p-2" > - {!shouldDisplayFeedOrSecretsCard && ( - - )} +
{ const [hasPendingRequests, setHasPendingRequests] = useState(false); const { notifications } = useChatContext(); - const { shouldDisplayFeedCard } = useKnowledgeToFeedContext(); - useEffect(() => { setHasPendingRequests(checkIfHasPendingRequest(notifications)); }, [notifications]); @@ -19,6 +16,5 @@ export const useActionBar = () => { return { hasPendingRequests, setHasPendingRequests, - shouldDisplayFeedCard, }; }; diff --git a/frontend/app/chat/components/ChatsList/__tests__/ChatsList.test.tsx b/frontend/app/chat/components/ChatsList/__tests__/ChatsList.test.tsx index fb4eeb29e480..9c369efcd0b6 100644 --- a/frontend/app/chat/components/ChatsList/__tests__/ChatsList.test.tsx +++ b/frontend/app/chat/components/ChatsList/__tests__/ChatsList.test.tsx @@ -12,6 +12,7 @@ import { ChatProviderMock, } from "@/lib/context/ChatProvider/mocks/ChatProviderMock"; import { KnowledgeToFeedProvider } from "@/lib/context/KnowledgeToFeedProvider"; +import { SideBarProvider } from "@/lib/context/SidebarProvider/sidebar-provider"; import { SupabaseContextMock } from "@/lib/context/SupabaseProvider/mocks/SupabaseProviderMock"; vi.mock("@/lib/context/SupabaseProvider/supabase-provider", () => ({ @@ -91,7 +92,9 @@ describe("ChatsList", () => { - + + + @@ -110,7 +113,9 @@ describe("ChatsList", () => { - + + + @@ -133,7 +138,9 @@ describe("ChatsList", () => { - + + + diff --git a/frontend/app/chat/components/index.ts b/frontend/app/chat/components/index.ts index 4c440dc61953..66c944f5cb4a 100644 --- a/frontend/app/chat/components/index.ts +++ b/frontend/app/chat/components/index.ts @@ -1,2 +1 @@ export * from "./ChatsList"; -export * from "./NotificationBanner"; diff --git a/frontend/app/chat/layout.tsx b/frontend/app/chat/layout.tsx index 1741dad9d853..ef5f4234a256 100644 --- a/frontend/app/chat/layout.tsx +++ b/frontend/app/chat/layout.tsx @@ -6,8 +6,6 @@ import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider"; import { useSupabase } from "@/lib/context/SupabaseProvider"; import { redirectToLogin } from "@/lib/router/redirectToLogin"; -import { ChatsList, NotificationBanner } from "./components"; - interface LayoutProps { children?: ReactNode; } @@ -23,9 +21,7 @@ const Layout = ({ children }: LayoutProps): JSX.Element => { -
- {children}
diff --git a/frontend/lib/components/Menu/Menu.tsx b/frontend/lib/components/Menu/Menu.tsx new file mode 100644 index 000000000000..fa6750774bea --- /dev/null +++ b/frontend/lib/components/Menu/Menu.tsx @@ -0,0 +1,51 @@ +import { MotionConfig } from "framer-motion"; +import { usePathname } from "next/navigation"; + +import { nonProtectedPaths } from "@/lib/config/routesConfig"; + +import { AnimatedDiv } from "./components/AnimationDiv"; +import { BrainsManagementButton } from "./components/BrainsManagementButton"; +import { DiscussionButton } from "./components/DiscussionButton"; +import { ExplorerButton } from "./components/ExplorerButton"; +import { MenuHeader } from "./components/MenuHeader"; +import { ParametersButton } from "./components/ParametersButton"; +import { ProfileButton } from "./components/ProfileButton"; +import { UpgradeToPlus } from "./components/UpgradeToPlus"; + +export const Menu = (): JSX.Element => { + const pathname = usePathname() ?? ""; + + if (nonProtectedPaths.includes(pathname)) { + return <>; + } + + const isChatPage = pathname.includes("/chat"); + + if (!isChatPage) { + return <>; + } + + return ( + +
+ +
+ +
+
+ + + + +
+
+
+ + +
+
+
+
+
+ ); +}; diff --git a/frontend/lib/components/Menu/components/AnimationDiv.tsx b/frontend/lib/components/Menu/components/AnimationDiv.tsx new file mode 100644 index 000000000000..80ac8fd376be --- /dev/null +++ b/frontend/lib/components/Menu/components/AnimationDiv.tsx @@ -0,0 +1,28 @@ +import { motion } from "framer-motion"; + +import { useSideBarContext } from "@/lib/context/SidebarProvider/hooks/useSideBarContext"; + +type AnimatedDivProps = { + children: React.ReactNode; +}; +export const AnimatedDiv = ({ children }: AnimatedDivProps): JSX.Element => { + const { isOpened } = useSideBarContext(); + + return ( + + {children} + + ); +}; diff --git a/frontend/lib/components/Menu/components/BrainsManagementButton.tsx b/frontend/lib/components/Menu/components/BrainsManagementButton.tsx new file mode 100644 index 000000000000..cfcf414d822b --- /dev/null +++ b/frontend/lib/components/Menu/components/BrainsManagementButton.tsx @@ -0,0 +1,28 @@ +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { useTranslation } from "react-i18next"; +import { LuBrain, LuChevronRight } from "react-icons/lu"; + +import { Button } from "@/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/components/Button"; +import { cn } from "@/lib/utils"; + +export const BrainsManagementButton = (): JSX.Element => { + const pathname = usePathname() ?? ""; + const isSelected = + pathname.includes("/brains-management") && !pathname.includes("/library"); + const { t } = useTranslation("chat"); + + return ( + +
+ } + endIcon={} + className="font-extrabold w-full hover:bg-secondary p-0" + /> + + ); +}; diff --git a/frontend/lib/components/Menu/components/UpgradeToPlus.tsx b/frontend/lib/components/Menu/components/UpgradeToPlus.tsx new file mode 100644 index 000000000000..d3fe08070b83 --- /dev/null +++ b/frontend/lib/components/Menu/components/UpgradeToPlus.tsx @@ -0,0 +1,35 @@ +import { useFeatureIsOn } from "@growthbook/growthbook-react"; +import { useTranslation } from "react-i18next"; +import { LuStar } from "react-icons/lu"; + +import { Button } from "@/app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ActionsModal/components/Button"; +import { StripePricingModal } from "@/lib/components/Stripe"; +import { useUserData } from "@/lib/hooks/useUserData"; + +export const UpgradeToPlus = (): JSX.Element => { + const { userData } = useUserData(); + const is_premium = userData?.is_premium; + const featureIsOn = useFeatureIsOn("monetization"); + const { t } = useTranslation("monetization"); + + if (!featureIsOn || is_premium === true) { + return <>; + } + + return ( + } + label={t("upgrade")} + endIcon={ + + {t("new")} + + } + className="my-4 bg-secondary" + /> + } + /> + ); +}; diff --git a/frontend/app/chat/components/NotificationBanner/NotificationBanner.tsx b/frontend/lib/components/NotificationBanner/NotificationBanner.tsx similarity index 81% rename from frontend/app/chat/components/NotificationBanner/NotificationBanner.tsx rename to frontend/lib/components/NotificationBanner/NotificationBanner.tsx index abadaabe1b2b..7ecd92fa14b2 100644 --- a/frontend/app/chat/components/NotificationBanner/NotificationBanner.tsx +++ b/frontend/lib/components/NotificationBanner/NotificationBanner.tsx @@ -1,17 +1,24 @@ +import { usePathname } from "next/navigation"; import { Fragment } from "react"; import { MdClose } from "react-icons/md"; import ReactMarkdown from "react-markdown"; import rehypeRaw from "rehype-raw"; import Button from "@/lib/components/ui/Button"; +import { nonProtectedPaths } from "@/lib/config/routesConfig"; import { useNotificationBanner } from "./hooks/useNotificationBanner"; export const NotificationBanner = (): JSX.Element => { const { notificationBanner, isDismissed, dismissNotification } = useNotificationBanner(); + const pathname = usePathname() ?? ""; - if (isDismissed || notificationBanner === undefined) { + if ( + isDismissed || + notificationBanner === undefined || + nonProtectedPaths.includes(pathname) + ) { return ; } diff --git a/frontend/app/chat/components/NotificationBanner/hooks/useNotificationBanner.tsx b/frontend/lib/components/NotificationBanner/hooks/useNotificationBanner.tsx similarity index 100% rename from frontend/app/chat/components/NotificationBanner/hooks/useNotificationBanner.tsx rename to frontend/lib/components/NotificationBanner/hooks/useNotificationBanner.tsx diff --git a/frontend/app/chat/components/NotificationBanner/index.ts b/frontend/lib/components/NotificationBanner/index.ts similarity index 100% rename from frontend/app/chat/components/NotificationBanner/index.ts rename to frontend/lib/components/NotificationBanner/index.ts diff --git a/frontend/app/chat/components/NotificationBanner/utils.ts b/frontend/lib/components/NotificationBanner/utils.ts similarity index 100% rename from frontend/app/chat/components/NotificationBanner/utils.ts rename to frontend/lib/components/NotificationBanner/utils.ts diff --git a/frontend/lib/components/Sidebar/Sidebar.tsx b/frontend/lib/components/Sidebar/Sidebar.tsx index 8616e45f42f5..7048ead4a2a6 100644 --- a/frontend/lib/components/Sidebar/Sidebar.tsx +++ b/frontend/lib/components/Sidebar/Sidebar.tsx @@ -1,10 +1,8 @@ import { motion, MotionConfig } from "framer-motion"; -import { usePathname } from "next/navigation"; -import { useEffect, useState } from "react"; import { LuPanelLeftOpen } from "react-icons/lu"; import { SidebarHeader } from "@/lib/components/Sidebar/components/SidebarHeader"; -import { useDevice } from "@/lib/hooks/useDevice"; +import { useSideBarContext } from "@/lib/context/SidebarProvider/hooks/useSideBarContext"; import { cn } from "@/lib/utils"; import { @@ -21,13 +19,7 @@ export const Sidebar = ({ children, showButtons, }: SidebarProps): JSX.Element => { - const { isMobile } = useDevice(); - const pathname = usePathname(); - const [open, setOpen] = useState(!isMobile); - - useEffect(() => { - setOpen(!isMobile); - }, [isMobile, pathname]); + const { isOpened, setIsOpened } = useSideBarContext(); return ( @@ -36,40 +28,40 @@ export const Sidebar = ({ dragConstraints={{ right: 0, left: 0 }} dragElastic={0.15} onDragEnd={(event, info) => { - if (info.offset.x > 100 && !open) { - setOpen(true); - } else if (info.offset.x < -100 && open) { - setOpen(false); + if (info.offset.x > 100 && !isOpened) { + setIsOpened(true); + } else if (info.offset.x < -100 && isOpened) { + setIsOpened(false); } }} className="flex flex-col fixed sm:sticky top-0 left-0 h-full overflow-visible z-30 border-r border-black/10 dark:border-white/25 bg-white dark:bg-black" > - {!open && ( + {!isOpened && ( )} - +
{children}
{showButtons && }
diff --git a/frontend/lib/components/Sidebar/__tests__/Sidebar.test.tsx b/frontend/lib/components/Sidebar/__tests__/Sidebar.test.tsx index 49add34037f9..1327cc4175bb 100644 --- a/frontend/lib/components/Sidebar/__tests__/Sidebar.test.tsx +++ b/frontend/lib/components/Sidebar/__tests__/Sidebar.test.tsx @@ -9,6 +9,7 @@ import { import { afterEach, describe, expect, it, vi } from "vitest"; import { Sidebar } from "@/lib/components/Sidebar/Sidebar"; +import { SideBarProvider } from "@/lib/context/SidebarProvider/sidebar-provider"; import { useDevice } from "@/lib/hooks/useDevice"; vi.mock("@/lib/hooks/useDevice"); @@ -16,9 +17,11 @@ vi.mock("@/lib/hooks/useDevice"); const renderSidebar = async () => { await act(() => render( - -
📦
-
+ + +
📦
+
+
) ); }; diff --git a/frontend/lib/components/Sidebar/components/SidebarHeader.tsx b/frontend/lib/components/Sidebar/components/SidebarHeader.tsx index 92b833aee7e6..f76a2657c9aa 100644 --- a/frontend/lib/components/Sidebar/components/SidebarHeader.tsx +++ b/frontend/lib/components/Sidebar/components/SidebarHeader.tsx @@ -1,13 +1,11 @@ -import { Dispatch, SetStateAction } from "react"; -import { LuPanelLeft } from "react-icons/lu"; +import { LuPanelLeftClose } from "react-icons/lu"; import { Logo } from "@/lib/components/Logo/Logo"; +import { useSideBarContext } from "@/lib/context/SidebarProvider/hooks/useSideBarContext"; -type SidebarProps = { - setOpen: Dispatch>; -}; +export const SidebarHeader = (): JSX.Element => { + const { setIsOpened } = useSideBarContext(); -export const SidebarHeader = ({ setOpen }: SidebarProps): JSX.Element => { return (
@@ -17,9 +15,9 @@ export const SidebarHeader = ({ setOpen }: SidebarProps): JSX.Element => { className="p-3 text-2xl bg:white dark:bg-black text-black dark:text-white hover:text-primary dark:hover:text-gray-200 transition-colors" type="button" data-testid="close-sidebar-button" - onClick={() => setOpen(false)} + onClick={() => setIsOpened(false)} > - +
diff --git a/frontend/lib/config/routesConfig.ts b/frontend/lib/config/routesConfig.ts new file mode 100644 index 000000000000..7f8834ffae68 --- /dev/null +++ b/frontend/lib/config/routesConfig.ts @@ -0,0 +1 @@ +export const nonProtectedPaths = ["/", "/login", "/signup"]; diff --git a/frontend/lib/context/SidebarProvider/hooks/useSideBarContext.ts b/frontend/lib/context/SidebarProvider/hooks/useSideBarContext.ts new file mode 100644 index 000000000000..912b31f56b48 --- /dev/null +++ b/frontend/lib/context/SidebarProvider/hooks/useSideBarContext.ts @@ -0,0 +1,13 @@ +import { useContext } from "react"; + +import { SideBarContext } from "../sidebar-provider"; + +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +export const useSideBarContext = () => { + const context = useContext(SideBarContext); + if (context === undefined) { + throw new Error("useSideBarContext must be used within a SideBarProvider"); + } + + return context; +}; diff --git a/frontend/lib/context/SidebarProvider/sidebar-provider.tsx b/frontend/lib/context/SidebarProvider/sidebar-provider.tsx new file mode 100644 index 000000000000..503a32f6dd4d --- /dev/null +++ b/frontend/lib/context/SidebarProvider/sidebar-provider.tsx @@ -0,0 +1,36 @@ +import { createContext, useEffect, useState } from "react"; + +import { useDevice } from "@/lib/hooks/useDevice"; + +type SideBarContextType = { + isOpened: boolean; + setIsOpened: React.Dispatch>; +}; + +export const SideBarContext = createContext( + undefined +); + +export const SideBarProvider = ({ + children, +}: { + children: React.ReactNode; +}): JSX.Element => { + const { isMobile } = useDevice(); + const [isOpened, setIsOpened] = useState(!isMobile); + + useEffect(() => { + setIsOpened(!isMobile); + }, [isMobile]); + + return ( + + {children} + + ); +}; diff --git a/frontend/lib/helpers/getBrainIconFromBrainType.tsx b/frontend/lib/helpers/getBrainIconFromBrainType.tsx index d815acdbc57c..6f5fcef622af 100644 --- a/frontend/lib/helpers/getBrainIconFromBrainType.tsx +++ b/frontend/lib/helpers/getBrainIconFromBrainType.tsx @@ -1,5 +1,5 @@ import { IconType } from "react-icons/lib"; -import { LuBrain } from "react-icons/lu"; +import { LuBot, LuBrain } from "react-icons/lu"; import { PiPaperclipFill } from "react-icons/pi"; import { TbWorld } from "react-icons/tb"; @@ -26,5 +26,9 @@ export const getBrainIconFromBrainType = ( return ; } + if (brainType === "composite") { + return ; + } + return ; }; diff --git a/frontend/public/locales/en/chat.json b/frontend/public/locales/en/chat.json index fed0def615ca..aebbc3aabd9b 100644 --- a/frontend/public/locales/en/chat.json +++ b/frontend/public/locales/en/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "Ask a question to a @brain and choose your #prompt", - "add_content_card_button_tooltip": "Add knowledge to a brain", + "add_document": "Add document", "ask": "Ask a question, or describe a task.", "back_to_chat": "Back to chat", "brain": "brain", @@ -21,6 +21,7 @@ "last30Days": "Previous 30 days", "last7Days": "Previous 7 days", "limit_reached": "You have reached the limit of requests, please try again later", + "menu": "Menu", "missing_brain": "Please select a brain to chat with", "new_discussion": "New discussion", "new_prompt": "Create new prompt", diff --git a/frontend/public/locales/es/chat.json b/frontend/public/locales/es/chat.json index c84eeb056fb1..02ff4d6aae13 100644 --- a/frontend/public/locales/es/chat.json +++ b/frontend/public/locales/es/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "Haz una pregunta a un @cerebro y elige tu #prompt", - "add_content_card_button_tooltip": "Agregar conocimiento a un cerebro", + "add_document": "Agregar documento", "ask": "Has una pregunta o describe un tarea.", "back_to_chat": "Volver al chat", "brain": "cerebro", @@ -21,6 +21,7 @@ "last30Days": "Últimos 30 días", "last7Days": "Últimos 7 días", "limit_reached": "Has alcanzado el límite de peticiones, intente de nuevo más tarde", + "menu": "Menú", "missing_brain": "No hay cerebro seleccionado", "new_discussion": "Nueva discusión", "new_prompt": "Crear nueva instrucción", diff --git a/frontend/public/locales/fr/chat.json b/frontend/public/locales/fr/chat.json index f81535a516ee..ba9c647047b6 100644 --- a/frontend/public/locales/fr/chat.json +++ b/frontend/public/locales/fr/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "Posez une question à un @cerveau et sélectionnez un #prompt ", - "add_content_card_button_tooltip": "Ajouter des connaissances à un cerveau", + "add_document": "Ajouter un document", "ask": "Posez une question ou décrivez une tâche.", "back_to_chat": "Retour au chat", "brain": "cerveau", @@ -21,6 +21,7 @@ "last30Days": "30 derniers jours", "last7Days": "7 derniers jours", "limit_reached": "Vous avez atteint la limite de requêtes, veuillez réessayer plus tard", + "menu": "Menu", "missing_brain": "Veuillez selectionner un cerveau pour discuter", "new_discussion": "Nouvelle discussion", "new_prompt": "Créer un nouveau prompt", diff --git a/frontend/public/locales/pt-br/chat.json b/frontend/public/locales/pt-br/chat.json index 062dc171331a..51f7c93ba0eb 100644 --- a/frontend/public/locales/pt-br/chat.json +++ b/frontend/public/locales/pt-br/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "Faça uma pergunta a um @cérebro e escolha sua #prompt", - "add_content_card_button_tooltip": "Adicionar conhecimento a um cérebro", + "add_document": "Adicionar documento", "ask": "Faça uma pergunta ou descreva uma tarefa.", "back_to_chat": "Voltar para o chat", "brain": "cérebro", @@ -21,6 +21,7 @@ "last30Days": "Últimos 30 dias", "last7Days": "Últimos 7 dias", "limit_reached": "Você atingiu o limite de solicitações, por favor, tente novamente mais tarde", + "menu": "Menu", "missing_brain": "Cérebro não encontrado", "new_discussion": "Nova discussão", "new_prompt": "Criar novo prompt", diff --git a/frontend/public/locales/ru/chat.json b/frontend/public/locales/ru/chat.json index 694b42e39885..950208c1ca2e 100644 --- a/frontend/public/locales/ru/chat.json +++ b/frontend/public/locales/ru/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "Задайте вопрос @мозгу и выберите свой #подсказка", - "add_content_card_button_tooltip": "Добавить знаний в мозг", + "add_document": "Добавить документ", "ask": "Задайте вопрос или опишите задачу.", "back_to_chat": "Вернуться к чату", "brain": "мозг", @@ -21,6 +21,7 @@ "last30Days": "Последние 30 дней", "last7Days": "Последние 7 дней", "limit_reached": "Вы достигли лимита запросов, пожалуйста, попробуйте позже", + "menu": "Меню", "missing_brain": "Мозг не найден", "new_discussion": "Новое обсуждение", "new_prompt": "Создать новый запрос", diff --git a/frontend/public/locales/zh-cn/chat.json b/frontend/public/locales/zh-cn/chat.json index 47bdcc601749..9918d79c8856 100644 --- a/frontend/public/locales/zh-cn/chat.json +++ b/frontend/public/locales/zh-cn/chat.json @@ -1,6 +1,6 @@ { "actions_bar_placeholder": "向 @大脑 提问,选择您的 #提示", - "add_content_card_button_tooltip": "向大脑添加知识", + "add_document": "添加文件", "ask": "提一个问题,或描述一个任务。", "back_to_chat": "返回聊天", "begin_conversation_placeholder": "在这里开始对话…", @@ -22,6 +22,7 @@ "last30Days": "过去30天", "last7Days": "过去7天", "limit_reached": "您已达到请求限制,请稍后再试", + "menu": "菜单", "missing_brain": "请选择一个大脑进行聊天", "new_discussion": "新讨论", "new_prompt": "新提示",