diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx index 14258d1326e..c55c2b12472 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx @@ -6,15 +6,16 @@ import ManageWorkspace, { useManageWorkspaceModal, } from "../../Modals/ManageWorkspace"; import paths from "@/utils/paths"; -import { useParams } from "react-router-dom"; +import { useParams, useNavigate } from "react-router-dom"; import { GearSix, UploadSimple, DotsSixVertical } from "@phosphor-icons/react"; import useUser from "@/hooks/useUser"; import ThreadContainer from "./ThreadContainer"; -import { Link, useMatch } from "react-router-dom"; +import { useMatch } from "react-router-dom"; import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; import showToast from "@/utils/toast"; export default function ActiveWorkspaces() { + const navigate = useNavigate(); const { slug } = useParams(); const [loading, setLoading] = useState(true); const [workspaces, setWorkspaces] = useState([]); @@ -154,19 +155,20 @@ export default function ActiveWorkspaces() { }} className="border-none rounded-md flex items-center justify-center ml-auto p-[2px] hover:bg-[#646768] text-[#A7A8A9] hover:text-white" > - + - { + e.preventDefault(); + e.stopPropagation(); + navigate( + isInWorkspaceSettings + ? paths.workspace.chat(workspace.slug) + : paths.workspace.settings.generalAppearance( + workspace.slug + ) + ); + }} className="rounded-md flex items-center justify-center text-[#A7A8A9] hover:text-white ml-auto p-[2px] hover:bg-[#646768]" aria-label="General appearance settings" > @@ -177,10 +179,9 @@ export default function ActiveWorkspaces() { ? "#46C8FF" : undefined } - // weight="bold" className="h-[20px] w-[20px]" /> - + )} diff --git a/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/index.jsx b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/index.jsx index cfc0f451b0c..e6b54fe5323 100644 --- a/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/index.jsx +++ b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/index.jsx @@ -1,4 +1,4 @@ -import { useEffect, useState, useRef } from "react"; +import { useEffect, useState, useRef, Fragment } from "react"; import { chatPrompt } from "@/utils/chat"; import { useTranslation } from "react-i18next"; import SystemPromptVariable from "@/models/systemPromptVariable"; @@ -52,15 +52,12 @@ export default function ChatPromptSettings({ workspace, setHasChanges }) { {" "} like:{" "} {availableVariables.slice(0, 3).map((v, i) => ( - <> - + + {`{${v.key}}`} {i < availableVariables.length - 1 && ", "} - + ))} {availableVariables.length > 3 && ( {t("general.message.description")}

-

+

-

+
); return ( diff --git a/frontend/src/pages/WorkspaceSettings/VectorDatabase/VectorCount/index.jsx b/frontend/src/pages/WorkspaceSettings/VectorDatabase/VectorCount/index.jsx index b8ea84c5a4a..8a7dceefcd2 100644 --- a/frontend/src/pages/WorkspaceSettings/VectorDatabase/VectorCount/index.jsx +++ b/frontend/src/pages/WorkspaceSettings/VectorDatabase/VectorCount/index.jsx @@ -22,9 +22,9 @@ export default function VectorCount({ reload, workspace }) {

{t("general.vector.description")}

-

+

-

+
); return (