diff --git a/frontend/src/components/ChatBubble/index.jsx b/frontend/src/components/ChatBubble/index.jsx index c5a1f19076f..96a47ffea47 100644 --- a/frontend/src/components/ChatBubble/index.jsx +++ b/frontend/src/components/ChatBubble/index.jsx @@ -1,14 +1,12 @@ import React from "react"; import UserIcon from "../UserIcon"; import { userFromStorage } from "@/utils/request"; -import { AI_BACKGROUND_COLOR, USER_BACKGROUND_COLOR } from "@/utils/constants"; export default function ChatBubble({ message, type, popMsg }) { const isUser = type === "user"; - const backgroundColor = isUser ? USER_BACKGROUND_COLOR : AI_BACKGROUND_COLOR; return ( -
+
-
-
-
- - - - {t("welcomeMessage.part1")} - -
-
-
+ + + + {t("welcomeMessage.part1")} + + , -
-
-
- - - - {t("welcomeMessage.part2")} - -
-
-
+ + + + {t("welcomeMessage.part2")} + +
, -
-
-
- -
- - {t("welcomeMessage.part3")} - - - -

{t("welcomeMessage.githubIssue")}

-
-
+ + + +
+ {t("welcomeMessage.part3")} + + +

{t("welcomeMessage.githubIssue")}

+
-
-
+ + , -
-
-
- - - - {t("welcomeMessage.user1")} - -
-
-
+ + + + {t("welcomeMessage.user1")} + +
, -
-
-
- -
- - {t("welcomeMessage.part4")} - + + + +
+ {t("welcomeMessage.part4")} - {(!user || user?.role !== "default") && ( - - )} -
+ {(!user || user?.role !== "default") && ( + + )}
-
-
+ + , -
-
-
- - - - {t("welcomeMessage.user2")} - -
-
-
+ + + + {t("welcomeMessage.user2")} + +
, -
-
-
- - - - , - br:
, - }} - /> -
-
-
-
+ + + + + , + br:
, + }} + /> +
+
+
, -
-
-
- - - - {t("welcomeMessage.user3")} - -
-
-
+ + + + {t("welcomeMessage.user3")} + +
, -
-
- + + , ]; @@ -305,7 +210,7 @@ export default function DefaultChatContainer() { return (
{isMobile && } {fetchedMessages.length === 0 @@ -331,3 +236,25 @@ export default function DefaultChatContainer() {
); } + +function MessageContainer({ children }) { + return ( +
+
+ {children} +
+
+ ); +} + +function MessageContent({ children }) { + return
{children}
; +} + +function MessageText({ children }) { + return ( + + {children} + + ); +} \ No newline at end of file diff --git a/frontend/src/components/Sidebar/index.jsx b/frontend/src/components/Sidebar/index.jsx index 5eeb66414a4..724fb8e1d8d 100644 --- a/frontend/src/components/Sidebar/index.jsx +++ b/frontend/src/components/Sidebar/index.jsx @@ -4,7 +4,6 @@ import NewWorkspaceModal, { useNewWorkspaceModal, } from "../Modals/NewWorkspace"; import ActiveWorkspaces from "./ActiveWorkspaces"; -import { USER_BACKGROUND_COLOR } from "@/utils/constants"; import useLogo from "@/hooks/useLogo"; import useUser from "@/hooks/useUser"; import Footer from "../Footer"; @@ -133,7 +132,7 @@ export function SidebarMobileHeader() { showBgOverlay ? "transition-all opacity-1" : "transition-none opacity-0" - } duration-500 fixed top-0 left-0 ${USER_BACKGROUND_COLOR} bg-opacity-75 w-screen h-screen`} + } duration-500 fixed top-0 left-0 bg-theme-bg-secondary bg-opacity-75 w-screen h-screen`} onClick={() => setShowSidebar(false)} />
diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index 8b9c75629e9..9a0d26bc5ff 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -7,8 +7,6 @@ export const COMPLETE_QUESTIONNAIRE = "anythingllm_completed_questionnaire"; export const SEEN_DOC_PIN_ALERT = "anythingllm_pinned_document_alert"; export const SEEN_WATCH_ALERT = "anythingllm_watched_document_alert"; -export const USER_BACKGROUND_COLOR = "bg-historical-msg-user"; -export const AI_BACKGROUND_COLOR = "bg-historical-msg-system"; export const APPEARANCE_SETTINGS = "anythingllm_appearance_settings"; export const OLLAMA_COMMON_URLS = [