🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
style: update agent back style
canisminor19903a59cf33e914
diff --git a/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/AddTopicButon.tsx b/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/AddTopicButon.tsxindex 18879648a53..29aaffcacdf 100644--- a/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/AddTopicButon.tsx+++ b/src/app/[variants]/(main)/chat/_layout/Sidebar/Header/AddTopicButon.tsx@@ -24,10 +24,7 @@ const AddTopicButon = memo(() => {const pathname = usePathname();const isProfileActive = pathname.includes('/profile');const router = useQueryRoute();- const [hasTopic, openNewTopicOrSaveTopic] = useChatStore((s) => [- !!s.activeTopicId,- s.openNewTopicOrSaveTopic,- ]);+ const [openNewTopicOrSaveTopic] = useChatStore((s) => [s.openNewTopicOrSaveTopic]);const { mutate, isValidating } = useActionSWR('openNewTopicOrSaveTopic', openNewTopicOrSaveTopic);const handleNewTopic = () => {@@ -38,8 +35,6 @@ const AddTopicButon = memo(() => {mutate();};- if (!hasTopic && !isProfileActive) return;-return (<ActionIconicon={MessageSquarePlusIcon}diff --git a/src/app/[variants]/(main)/group/_layout/Sidebar/Header/AddTopicButon.tsx b/src/app/[variants]/(main)/group/_layout/Sidebar/Header/AddTopicButon.tsxindex 408af8b5787..3f82c8104ed 100644--- a/src/app/[variants]/(main)/group/_layout/Sidebar/Header/AddTopicButon.tsx+++ b/src/app/[variants]/(main)/group/_layout/Sidebar/Header/AddTopicButon.tsx@@ -19,14 +19,12 @@ const AddTopicButon = memo(() => {const hotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.SaveTopic));const activeGroupId = useAgentGroupStore((s) => s.activeGroupId);const router = useQueryRoute();- const hasTopic = useChatStore((s) => !!s.activeTopicId);-- if (!hasTopic || !activeGroupId) return null;return (<ActionIconicon={MessageSquarePlusIcon}onClick={() => {+ if (!activeGroupId) return;useChatStore.setState({ activeTopicId: undefined });router.push(urlJoin('/group', activeGroupId), { query: { thread: null, topic: null } });}}diff --git a/src/features/NavPanel/SideBarHeaderLayout.tsx b/src/features/NavPanel/SideBarHeaderLayout.tsxindex 4f7d2e147c8..08a848174cc 100644--- a/src/features/NavPanel/SideBarHeaderLayout.tsx+++ b/src/features/NavPanel/SideBarHeaderLayout.tsx@@ -9,7 +9,7 @@ import { flushSync } from 'react-dom';import { useNavigate } from 'react-router-dom';import ToggleLeftPanelButton from './ToggleLeftPanelButton';-import BackButton, { BACK_BUTTON_ID } from './components/BackButton';+import BackButton from './components/BackButton';const useStyles = createStyles(({ css, token, prefixCls }) => ({breadcrumb: css`@@ -34,19 +34,6 @@ const useStyles = createStyles(({ css, token, prefixCls }) => ({container: css`overflow: hidden;margin-block-start: 8px;-- #${BACK_BUTTON_ID} {- width: 0 !important;- opacity: 0;- transition: all 0.2s ${token.motionEaseOut};- }-- &:hover {- #${BACK_BUTTON_ID} {- width: 24px !important;- opacity: 1;- }- }`,}));diff --git a/src/features/NavPanel/index.tsx b/src/features/NavPanel/index.tsxindex f50f4fbf077..7f6557be0be 100644--- a/src/features/NavPanel/index.tsx+++ b/src/features/NavPanel/index.tsx@@ -11,6 +11,7 @@ import { TOGGLE_BUTTON_ID } from '@/features/NavPanel/ToggleLeftPanelButton';import { isMacOS } from '@/utils/platform';import Sidebar from '../../app/[variants]/(main)/home/_layout/Sidebar';+import { BACK_BUTTON_ID } from './components/BackButton';import { useNavPanel } from './hooks/useNavPanel';export const NAV_PANEL_RIGHT_DRAWER_ID = 'nav-panel-drawer';@@ -61,6 +62,12 @@ export const useStyles = createStyles(({ css, token }) => ({width 0.2s ${token.motionEaseOut};}+ #${BACK_BUTTON_ID} {+ width: 0 !important;+ opacity: 0;+ transition: all 0.2s ${token.motionEaseOut};+ }+&:hover {#${TOGGLE_BUTTON_ID} {width: 32px !important;@@ -71,6 +78,13 @@ export const useStyles = createStyles(({ css, token }) => ({width: 14px !important;opacity: 1;}++ &:hover {+ #${BACK_BUTTON_ID} {+ width: 24px !important;+ opacity: 1;+ }+ }}`,}));