import React, { useContext, useMemo } from "react" import { HistoryContext } from "@/components/Layouts/Layout.tsx" import { PanelLeftIcon } from "lucide-react" import { Button, Tooltip } from "antd" import { PlusOutlined } from "@ant-design/icons" import { useMessageOption } from "@/hooks/useMessageOption.tsx" import { useTranslation } from "react-i18next" import { NavLink, useLocation } from "react-router-dom" import logo from "@/assets/logo.png" interface SettingIconProps {} const SettingIcon: React.FC = () => { return ( ) } type Props = { setOpenModelSettings: (open: boolean) => void } export const Header: React.FC = ({ setOpenModelSettings }) => { const location = useLocation() const { show, setShow } = useContext(HistoryContext) const showLeft = useMemo(() => { console.log(location.pathname) if (location.pathname.includes("/settings")) { return true } return show }, [location.pathname, show]) const { t } = useTranslation(["option", "common", "settings"]) const { clearChat } = useMessageOption() return (
{/*控制侧边栏显示隐藏与新建对话*/} {!showLeft && (
)} {location.pathname.includes("/settings") && (

数联网科创智能体

)} {/* 项目标题 */}

logo

数联网科创智能体

{/*设置框*/}
) }