🤯 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(agent): compact back action and lift profile in the agent sidebar (#22679)
Arvin Xu957fba3c26c8
diff --git a/src/features/AgentProfileTabs/tabOptions.test.ts b/src/features/AgentProfileTabs/tabOptions.test.tsindex ec7d3d0892c..053c768de21 100644--- a/src/features/AgentProfileTabs/tabOptions.test.ts+++ b/src/features/AgentProfileTabs/tabOptions.test.ts@@ -183,13 +183,14 @@ describe('groupAgentProfileTabOptions', () => {value,});- it('puts the profile, mail and IM bots under identity', () => {+ it('keeps the profile on top and puts mail and IM bots under identity', () => {const groups = groupAgentProfileTabOptions((['profile', 'mail', 'channel', 'self-evolving', 'statistics', 'share'] as const).map(option),);expect(groups.map((group) => [group.key, group.options.map((item) => item.value)])).toEqual([- ['identity', ['profile', 'mail', 'channel']],+ ['profile', ['profile']],+ ['identity', ['mail', 'channel']],['general', ['self-evolving', 'statistics', 'share']],]);});diff --git a/src/features/AgentProfileTabs/tabOptions.ts b/src/features/AgentProfileTabs/tabOptions.tsindex 27d19ca1dc5..d2312c9dd1f 100644--- a/src/features/AgentProfileTabs/tabOptions.ts+++ b/src/features/AgentProfileTabs/tabOptions.ts@@ -8,7 +8,7 @@ export interface AgentProfileTabOption {value: AgentProfileTab;}-export type AgentProfileTabGroupKey = 'general' | 'identity';+export type AgentProfileTabGroupKey = 'general' | 'identity' | 'profile';export interface AgentProfileTabGroup {key: AgentProfileTabGroupKey;@@ -82,7 +82,8 @@ export const buildAgentProfileTabOptions = ({};const AGENT_PROFILE_TAB_GROUPS: { key: AgentProfileTabGroupKey; tabs: AgentProfileTab[] }[] = [- { key: 'identity', tabs: ['profile', 'mail', 'channel'] },+ { key: 'profile', tabs: ['profile'] },+ { key: 'identity', tabs: ['mail', 'channel'] },{ key: 'general', tabs: ['self-evolving', 'statistics', 'share'] },];diff --git a/src/features/AgentSidebar/ProfileNav.tsx b/src/features/AgentSidebar/ProfileNav.tsxindex d5b2ab5ee27..b15abdb8776 100644--- a/src/features/AgentSidebar/ProfileNav.tsx+++ b/src/features/AgentSidebar/ProfileNav.tsx@@ -1,15 +1,15 @@'use client';-import { Flexbox, Text } from '@lobehub/ui';+import { Button, Flexbox, Text } from '@lobehub/ui';import type { LucideIcon } from 'lucide-react';import {ChartColumnBigIcon,ChevronLeftIcon,DnaIcon,- FileUserIcon,MailIcon,RadioTowerIcon,Share2Icon,+ UserRoundIcon,} from 'lucide-react';import { useTranslation } from 'react-i18next';import urlJoin from 'url-join';@@ -31,7 +31,7 @@ import Agent from './Header/Agent';const TAB_ICONS: Record<AgentProfileTab, LucideIcon> = {'channel': RadioTowerIcon,'mail': MailIcon,- 'profile': FileUserIcon,+ 'profile': UserRoundIcon,'self-evolving': DnaIcon,'share': Share2Icon,'statistics': ChartColumnBigIcon,@@ -83,11 +83,14 @@ const ProfileNav = ({ active }: ProfileNavProps) => {<SideBarHeaderLayoutshowBack={false}left={- <NavItem+ <Buttonicon={ChevronLeftIcon}- title={t('tab.backToChat')}+ size={'small'}+ type={'text'}onClick={() => navigate(urlJoin('/agent', agentId))}- />+ >+ {t('tab.backToChat')}+ </Button>}/><Flexbox paddingBlock={'0 8px'} paddingInline={6}>