🤯 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
♻️ refactor(channel): move the Agent profile panel to the direct Channel (#22677)
Arvin Xu7dfb746a9ac0
diff --git a/locales/en-US/channel.json b/locales/en-US/channel.jsonindex 6f96f014905..8a627186c6b 100644--- a/locales/en-US/channel.json+++ b/locales/en-US/channel.json@@ -143,6 +143,12 @@"people.noOthers": "No one else is in this workspace yet","people.searchMore": "Showing the first 50 members. Search to find more.","person": "Person",+ "profile.about": "About",+ "profile.hide": "Hide Agent profile",+ "profile.noDescription": "No description yet",+ "profile.show": "Show Agent profile",+ "profile.title": "Agent profile",+ "profile.view": "View profile","projectAgents": "Project members","receipt.errorReason": "Failure reason","receipt.errorUnavailable": "No detailed reason was recorded. Check the Agent’s model and device settings before sending again.",diff --git a/locales/en-US/chat.json b/locales/en-US/chat.jsonindex 5479c4f3570..4c03d5ef0b0 100644--- a/locales/en-US/chat.json+++ b/locales/en-US/chat.json@@ -3594,7 +3594,6 @@"workingPanel.overview.ports.revoked": "Sharing stopped","workingPanel.overview.ports.title": "Ports","workingPanel.overview.ports.unavailable": "Can't read this device's ports right now",- "workingPanel.overview.profile.view": "View profile","workingPanel.overview.subagents": "Subagents","workingPanel.overview.subtopics": "Subtopics","workingPanel.overview.sync.ahead_one": "{{count}} commit ahead",@@ -3705,11 +3704,6 @@"workingPanel.pr.status.ready": "Ready to merge","workingPanel.pr.status.unstable": "Some checks were not successful","workingPanel.pr.status.waiting": "Waiting for checks",- "workingPanel.profile.description": "About",- "workingPanel.profile.model": "Model",- "workingPanel.profile.noDescription": "No description yet",- "workingPanel.profile.tabs.detail": "Details",- "workingPanel.profile.tabs.workspace": "Workspace","workingPanel.progress": "Progress","workingPanel.progress.allCompleted": "All tasks completed","workingPanel.resources": "Resources",diff --git a/locales/zh-CN/channel.json b/locales/zh-CN/channel.jsonindex c71b04230ab..8e708b3335b 100644--- a/locales/zh-CN/channel.json+++ b/locales/zh-CN/channel.json@@ -143,6 +143,12 @@"people.noOthers": "工作区里还没有其他成员","people.searchMore": "当前显示前 50 位成员,可通过搜索查找更多。","person": "真人",+ "profile.about": "简介",+ "profile.hide": "收起 Agent 资料",+ "profile.noDescription": "暂无简介",+ "profile.show": "展开 Agent 资料",+ "profile.title": "Agent 资料",+ "profile.view": "查看资料","projectAgents": "项目成员","receipt.errorReason": "失败原因","receipt.errorUnavailable": "未记录具体原因,请检查 Agent 的模型与设备设置后重新发送。",diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.jsonindex 6e6fd5f4e70..cbb2e080ce6 100644--- a/locales/zh-CN/chat.json+++ b/locales/zh-CN/chat.json@@ -3594,7 +3594,6 @@"workingPanel.overview.ports.revoked": "已停止共享","workingPanel.overview.ports.title": "端口","workingPanel.overview.ports.unavailable": "暂时无法读取这台设备的端口",- "workingPanel.overview.profile.view": "查看资料","workingPanel.overview.subagents": "子代理","workingPanel.overview.subtopics": "子话题","workingPanel.overview.sync.ahead_one": "领先 {{count}} 个提交",@@ -3705,11 +3704,6 @@"workingPanel.pr.status.ready": "可以合并","workingPanel.pr.status.unstable": "部分检查未通过","workingPanel.pr.status.waiting": "等待检查完成",- "workingPanel.profile.description": "简介",- "workingPanel.profile.model": "模型",- "workingPanel.profile.noDescription": "暂无简介",- "workingPanel.profile.tabs.detail": "详情",- "workingPanel.profile.tabs.workspace": "工作区","workingPanel.progress": "进度","workingPanel.progress.allCompleted": "所有任务已完成","workingPanel.resources": "资源",diff --git a/packages/locales/src/default/channel.ts b/packages/locales/src/default/channel.tsindex 828cb01200e..ef245ecd8ab 100644--- a/packages/locales/src/default/channel.ts+++ b/packages/locales/src/default/channel.ts@@ -86,6 +86,12 @@ export default {'membersCount': 'Members · {{count}}','openAgent': 'Open Agent','openAgentNamed': 'Open {{name}}',+ 'profile.about': 'About',+ 'profile.hide': 'Hide Agent profile',+ 'profile.noDescription': 'No description yet',+ 'profile.show': 'Show Agent profile',+ 'profile.title': 'Agent profile',+ 'profile.view': 'View profile','copyId': 'Copy ID','copyIdSuccess': 'Channel ID copied','actionFailed': 'Something went wrong. Try again.',diff --git a/packages/locales/src/default/chat.ts b/packages/locales/src/default/chat.tsindex 85581a8aeda..1f7ba152971 100644--- a/packages/locales/src/default/chat.ts+++ b/packages/locales/src/default/chat.ts@@ -3786,12 +3786,6 @@ export default {'workingPanel.overview.empty':'Workspace activity and outputs will appear here as the agent works.','workingPanel.overview.emptyTitle': 'Ready to work',- 'workingPanel.overview.profile.view': 'View profile',- 'workingPanel.profile.description': 'About',- 'workingPanel.profile.model': 'Model',- 'workingPanel.profile.noDescription': 'No description yet',- 'workingPanel.profile.tabs.detail': 'Details',- 'workingPanel.profile.tabs.workspace': 'Workspace','workingPanel.overview.deviceError': 'Could not load the device status','workingPanel.overview.environmentError': 'Could not load the repository status','workingPanel.overview.execution.device': 'Connected device',diff --git a/src/features/Channels/AgentProfilePanel.tsx b/src/features/Channels/AgentProfilePanel.tsxnew file mode 100644index 00000000000..e665ff8fb2f--- /dev/null+++ b/src/features/Channels/AgentProfilePanel.tsx@@ -0,0 +1,121 @@+import type { ChannelPublicMember } from '@lobechat/types';+import { agentSecondaryDisplayName } from '@lobechat/types';+import { ActionIcon, Flexbox, Text } from '@lobehub/ui';+import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';+import * as stylex from '@stylexjs/stylex';+import { SquareArrowOutUpRightIcon } from 'lucide-react';+import { useTranslation } from 'react-i18next';++import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';+import { useAgentStore } from '@/store/agent';+import { agentSelectors } from '@/store/agent/selectors';++import { MemberAvatar } from './MemberAvatar';+import { memberName } from './memberName';+import { ChannelSidePanel } from './MemberPanel';++const styles = stylex.create({+ description: {+ fontSize: '13px',+ lineHeight: '20px',+ color: cssVar.colorTextSecondary,+ whiteSpace: 'pre-wrap',+ },+ detail: {+ paddingBlock: '16px',+ paddingInline: '16px',+ borderBlockStartWidth: '1px',+ borderBlockStartStyle: 'solid',+ borderBlockStartColor: cssVar.colorBorderSecondary,+ },+ hero: {+ paddingBlockStart: '28px',+ paddingBlockEnd: '16px',+ paddingInline: '40px',+ textAlign: 'center',+ },+ label: {+ fontSize: '12px',+ color: cssVar.colorTextTertiary,+ },+ placeholder: {+ fontSize: '13px',+ color: cssVar.colorTextQuaternary,+ },+ role: {+ overflow: 'hidden',+ fontSize: '12px',+ lineHeight: '18px',+ color: cssVar.colorTextTertiary,+ maxWidth: '100%',+ textOverflow: 'ellipsis',+ whiteSpace: 'nowrap',+ },+});++/** A direct conversation's side panel: the Agent's contact card, like an IM profile. */+export function AgentProfilePanel({+ agentId,+ availableWidth,+ id,+ member,+ onClose,+}: {+ agentId: string;+ availableWidth?: number;+ id: string;+ member: ChannelPublicMember;+ onClose: () => void;+}) {+ const { t } = useTranslation('channel');+ const navigate = useWorkspaceAwareNavigate();+ const useHydrateAgentConfig = useAgentStore((s) => s.useHydrateAgentConfig);+ // A Channel has no active Agent, so nothing else loads this one's config.+ useHydrateAgentConfig(true, agentId);+ const meta = useAgentStore(agentSelectors.getAgentMetaById(agentId));+ const slug = useAgentStore(agentSelectors.getAgentSlugById(agentId));+ const name = memberName(member, t('deletedMember'));+ const roleLine = [agentSecondaryDisplayName(meta), slug ? `@${slug}` : undefined]+ .filter(Boolean)+ .join(' · ');++ return (+ <ChannelSidePanel+ availableWidth={availableWidth}+ closeLabel={t('profile.hide')}+ id={id}+ label={t('profile.title')}+ title={t('profile.title')}+ actions={+ <ActionIcon+ aria-label={t('profile.view')}+ icon={SquareArrowOutUpRightIcon}+ size="small"+ title={t('profile.view')}+ onClick={() => navigate(`/agent/${agentId}/profile`)}+ />+ }+ onClose={onClose}+ >+ <Flexbox style={{ minHeight: 0, overflowY: 'auto' }}>+ <Flexbox align="center" gap={6} {...stylex.props(styles.hero)}>+ <MemberAvatar member={member} size={64} />+ <Text ellipsis fontSize={17} style={{ maxWidth: '100%' }} weight={600}>+ {name}+ </Text>+ {roleLine && <span {...stylex.props(styles.role)}>{roleLine}</span>}+ </Flexbox>+ <Flexbox gap={16} {...stylex.props(styles.detail)}>+ <Flexbox gap={6}>+ <span {...stylex.props(styles.label)}>{t('profile.about')}</span>+ {member.description ? (+ <span {...stylex.props(styles.description)}>{member.description}</span>+ ) : (+ <span {...stylex.props(styles.placeholder)}>{t('profile.noDescription')}</span>+ )}+ </Flexbox>+ </Flexbox>+ </Flexbox>+ </ChannelSidePanel>+ );+}diff --git a/src/features/Channels/MemberPanel.tsx b/src/features/Channels/MemberPanel.tsxindex 8c1fd7e108f..34453c011b5 100644--- a/src/features/Channels/MemberPanel.tsx+++ b/src/features/Channels/MemberPanel.tsx@@ -1,8 +1,10 @@import type { ChannelDetail } from '@lobechat/types';import { ActionIcon, Flexbox, Text } from '@lobehub/ui';import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';+import type { StyleXStyles } from '@stylexjs/stylex';import * as stylex from '@stylexjs/stylex';import { X } from 'lucide-react';+import type { ReactNode } from 'react';import { useTranslation } from 'react-i18next';import NavHeader from '@/features/NavHeader';@@ -20,20 +22,29 @@ const panelStyles = stylex.create({},});-/** Workspace roster: a single list, without online/offline groups. */-export function MemberPanel({+/** The Channel's right column: floats over a narrow conversation, sits beside a wide one. */+export function ChannelSidePanel({+ actions,availableWidth = 1000,- detail,+ children,+ closeLabel,id,+ label,onClose,+ title,+ xstyle,}: {+ /** Header actions, before the close button. */+ actions?: ReactNode;availableWidth?: number;- detail: ChannelDetail;+ children: ReactNode;+ closeLabel: string;id: string;+ label: string;onClose: () => void;+ title: string;+ xstyle?: StyleXStyles;}) {- const { t } = useTranslation('channel');- const entries = useMemberEntries(detail);const narrow = availableWidth < MEMBER_FLOAT_BREAKPOINT;const width = narrow ? availableWidth : MEMBER_PANEL_WIDTH;@@ -54,10 +65,10 @@ export function MemberPanel({}}><Flexbox- aria-label={t('membersTitle')}+ aria-label={label}id={id}role="complementary"- {...stylex.props(styles.body, panelStyles.panel)}+ {...stylex.props(styles.body, xstyle)}><NavHeaderpaddingBlock={6}@@ -65,23 +76,56 @@ export function MemberPanel({showTogglePanelButton={false}left={<Text fontSize={12} type="secondary" weight={500}>- {t('membersCount', { count: entries.length })}+ {title}</Text>}right={- <ActionIcon- aria-label={t('members.hide')}- icon={X}- size="small"- title={t('members.hide')}- onClick={onClose}- />+ <Flexbox horizontal align="center" gap={4}>+ {actions}+ <ActionIcon+ aria-label={closeLabel}+ icon={X}+ size="small"+ title={closeLabel}+ onClick={onClose}+ />+ </Flexbox>}/>- <Flexbox flex={1} padding={12} paddingBlock={4} style={{ minHeight: 0, overflowY: 'auto' }}>- <MemberList detail={detail} />- </Flexbox>+ {children}</Flexbox></RightPanel>);}++/** Workspace roster: a single list, without online/offline groups. */+export function MemberPanel({+ availableWidth,+ detail,+ id,+ onClose,+}: {+ availableWidth?: number;+ detail: ChannelDetail;+ id: string;+ onClose: () => void;+}) {+ const { t } = useTranslation('channel');+ const entries = useMemberEntries(detail);++ return (+ <ChannelSidePanel+ availableWidth={availableWidth}+ closeLabel={t('members.hide')}+ id={id}+ label={t('membersTitle')}+ title={t('membersCount', { count: entries.length })}+ xstyle={panelStyles.panel}+ onClose={onClose}+ >+ <Flexbox flex={1} padding={12} paddingBlock={4} style={{ minHeight: 0, overflowY: 'auto' }}>+ <MemberList detail={detail} />+ </Flexbox>+ </ChannelSidePanel>+ );+}diff --git a/src/features/Channels/MemberStatus.test.tsx b/src/features/Channels/MemberStatus.test.tsxindex 29eb96c69cf..010334a23f8 100644--- a/src/features/Channels/MemberStatus.test.tsx+++ b/src/features/Channels/MemberStatus.test.tsx@@ -89,6 +89,24 @@ describe('MemberStatus in a direct conversation', () => {});});+describe('MemberStatus profile toggle', () => {+ const memberPanel = { id: 'panel', onToggle: () => {}, open: false };++ it('opens the Agent profile from a direct conversation', () => {+ render(createElement(MemberStatus, { detail: detail(), memberPanel }));++ expect(screen.getByText('profile.show')).toBeTruthy();+ expect(screen.queryByText('members.show')).toBeNull();+ });++ it('keeps the roster toggle in a group Channel', () => {+ render(createElement(MemberStatus, { detail: detail({ agentId: null }), memberPanel }));++ expect(screen.getByText('members.show')).toBeTruthy();+ expect(screen.queryByText('profile.show')).toBeNull();+ });+});+describe('MemberStatus in a group Channel', () => {it('sends management to the settings page instead of offering delete', () => {render(createElement(MemberStatus, { detail: detail({ agentId: null }) }));diff --git a/src/features/Channels/MemberStatus.tsx b/src/features/Channels/MemberStatus.tsxindex c8858b5e97f..e04c49a6b0b 100644--- a/src/features/Channels/MemberStatus.tsx+++ b/src/features/Channels/MemberStatus.tsx@@ -2,7 +2,15 @@ import { CHANNEL_URL } from '@lobechat/const';import type { ChannelDetail } from '@lobechat/types';import { ActionIcon, Button, DropdownMenu, Flexbox, Popover, Text } from '@lobehub/ui';import * as stylex from '@stylexjs/stylex';-import { Bot, FolderCog, MoreHorizontal, Settings, UserPlus, Users } from 'lucide-react';+import {+ Bot,+ CircleUserRound,+ FolderCog,+ MoreHorizontal,+ Settings,+ UserPlus,+ Users,+} from 'lucide-react';import { useState } from 'react';import { useTranslation } from 'react-i18next';@@ -103,7 +111,20 @@ export function MemberStatus({return (<Flexbox horizontal align="center" gap={4}><FailureIndicator detail={detail} />- {direct ? null : memberPanel ? (+ {direct ? (+ memberPanel && (+ <ActionIcon+ active={memberPanel.open}+ aria-controls={memberPanel.open ? memberPanel.id : undefined}+ aria-expanded={memberPanel.open}+ aria-label={t(memberPanel.open ? 'profile.hide' : 'profile.show')}+ icon={CircleUserRound}+ size="small"+ title={t(memberPanel.open ? 'profile.hide' : 'profile.show')}+ onClick={memberPanel.onToggle}+ />+ )+ ) : memberPanel ? (<ActionIconactive={memberPanel.open}aria-controls={memberPanel.open ? memberPanel.id : undefined}diff --git a/src/features/Channels/index.tsx b/src/features/Channels/index.tsxindex 872b961cb4f..07bcc60db3d 100644--- a/src/features/Channels/index.tsx+++ b/src/features/Channels/index.tsx@@ -15,6 +15,7 @@ import { useChatStore } from '@/store/chat';import { serverConfigSelectors, useServerConfigStore } from '@/store/serverConfig';import { AcceptancePanel, CHANNEL_ENTITY_PORTAL_SCOPE } from './AcceptancePanel';+import { AgentProfilePanel } from './AgentProfilePanel';import { visibleChannelDetail } from './channelAccess';import { ChannelConversation } from './ChannelConversation';import { MEMBER_FLOAT_BREAKPOINT, MemberPanel } from './MemberPanel';@@ -49,8 +50,11 @@ function EnabledChannelPage() {// explicitly opening another panel closes the report.const threadId = acceptanceOpen ? null : panel.threadId;const threadDraft = acceptanceOpen ? null : panel.draft;+ // A direct conversation's side panel is its Agent's profile; a workspace group's is the roster.+ const hasMemberPanel =+ !!directAgent || (!!detail?.channel.workspaceId && !detail.channel.agentId);const membersOpen =- !!detail?.channel.workspaceId &&+ hasMemberPanel &&membersChannelId === channelId &&!threadId &&!threadDraft &&@@ -83,7 +87,7 @@ function EnabledChannelPage() {<MemberStatusdetail={detail}memberPanel={- detail.channel.workspaceId+ hasMemberPanel? {id: memberPanelId,open: membersOpen,@@ -132,14 +136,25 @@ function EnabledChannelPage() {panel.openDraft(draft);}}/>- {detail && membersOpen && (- <MemberPanel- availableWidth={conversationWidth}- detail={detail}- id={memberPanelId}- onClose={() => setMembersChannelId(null)}- />- )}+ {detail &&+ membersOpen &&+ (directAgent?.agentId ? (+ <AgentProfilePanel+ agentId={directAgent.agentId}+ availableWidth={conversationWidth}+ id={memberPanelId}+ key={directAgent.agentId}+ member={directAgent}+ onClose={() => setMembersChannelId(null)}+ />+ ) : (+ <MemberPanel+ availableWidth={conversationWidth}+ detail={detail}+ id={memberPanelId}+ onClose={() => setMembersChannelId(null)}+ />+ ))}<ReplyTopicPanelavailableWidth={conversationWidth}topic={openTopic}diff --git a/src/features/Conversation/WorkingSidebar/Overview/AgentProfilePanel.tsx b/src/features/Conversation/WorkingSidebar/Overview/AgentProfilePanel.tsxdeleted file mode 100644index cc9b2bcc510..00000000000--- a/src/features/Conversation/WorkingSidebar/Overview/AgentProfilePanel.tsx+++ /dev/null@@ -1,162 +0,0 @@-'use client';--import { agentDisplayName, agentSecondaryDisplayName } from '@lobechat/types';-import { ActionIcon, Flexbox, Segmented, Text } from '@lobehub/ui';-import { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';-import * as stylex from '@stylexjs/stylex';-import { SquareArrowOutUpRightIcon } from 'lucide-react';-import { memo, type ReactNode, useState } from 'react';-import { useTranslation } from 'react-i18next';--import AgentAvatar from '@/components/AgentAvatar';-import { ModelIcon } from '@/components/LobeIcons';-import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';-import { useAgentStore } from '@/store/agent';-import { agentSelectors } from '@/store/agent/selectors';--const styles = stylex.create({- description: {- fontSize: '13px',- lineHeight: '20px',- color: cssVar.colorTextSecondary,- whiteSpace: 'pre-wrap',- },- detail: {- paddingBlock: '16px',- paddingInline: '16px',- },- hero: {- position: 'relative',- paddingBlockStart: '28px',- paddingBlockEnd: '12px',- paddingInline: '40px',- textAlign: 'center',- },- role: {- overflow: 'hidden',- fontSize: '12px',- lineHeight: '18px',- color: cssVar.colorTextTertiary,- maxWidth: '100%',- textOverflow: 'ellipsis',- whiteSpace: 'nowrap',- },- label: {- fontSize: '12px',- color: cssVar.colorTextTertiary,- },- model: {- display: 'inline-flex',- gap: '6px',- alignItems: 'center',- maxWidth: '100%',- fontSize: '13px',- color: cssVar.colorText,- },- placeholder: {- fontSize: '13px',- color: cssVar.colorTextQuaternary,- },- tabs: {- paddingBlockEnd: '8px',- borderBlockEndWidth: '1px',- borderBlockEndStyle: 'solid',- borderBlockEndColor: cssVar.colorBorderSecondary,- },-});--type ProfileTab = 'detail' | 'workspace';--interface AgentProfilePanelProps {- agentId: string;- /** The existing working-panel overview (workspace, outputs, Portal entries). */- workspace: ReactNode;-}--/**- * The conversation's right panel opens as the agent's profile, like an IM- * contact card: centered avatar, title and role (profile link in the corner), then- * Details and the Workspace (the former overview, with Portal entries) as tabs.- */-const AgentProfilePanel = memo<AgentProfilePanelProps>(({ agentId, workspace }) => {- const { t } = useTranslation('chat');- const navigate = useWorkspaceAwareNavigate();- const meta = useAgentStore(agentSelectors.getAgentMetaById(agentId));- const model = useAgentStore(agentSelectors.currentAgentModel);- const [tab, setTab] = useState<ProfileTab>('detail');- const slug = useAgentStore((s) => s.agentMap[agentId]?.slug);- const title = agentDisplayName(meta, t('untitledAgent'));- // Same identity line as the profile page: role (when the agent has its own- // name) and the @handle.- const roleLine = [agentSecondaryDisplayName(meta), slug ? `@${slug}` : undefined]- .filter(Boolean)- .join(' · ');-- return (- <Flexbox>- <Flexbox align={'center'} gap={6} {...stylex.props(styles.hero)}>- {/* The profile entry sits in the header corner, not in the Details tab. */}- <ActionIcon- icon={SquareArrowOutUpRightIcon}- size={'small'}- style={{ insetBlockStart: 10, insetInlineEnd: 10, position: 'absolute' }}- title={t('workingPanel.overview.profile.view')}- onClick={() => navigate(`/agent/${agentId}/profile`)}- />- <AgentAvatar- agentId={agentId}- avatar={meta.avatar}- background={meta.backgroundColor || undefined}- name={title}- size={64}- />- <Text ellipsis fontSize={17} style={{ maxWidth: '100%' }} weight={600}>- {title}- </Text>- {roleLine && <span {...stylex.props(styles.role)}>{roleLine}</span>}- </Flexbox>- <Flexbox align={'center'} {...stylex.props(styles.tabs)}>- <Segmented- size={'small'}- // Segmented pins itself to the start; center it under the identity.- style={{ alignSelf: 'center' }}- value={tab}- options={[- { label: t('workingPanel.profile.tabs.detail'), value: 'detail' },- { label: t('workingPanel.profile.tabs.workspace'), value: 'workspace' },- ]}- onChange={(value) => setTab(value as ProfileTab)}- />- </Flexbox>- {tab === 'detail' ? (- <Flexbox gap={16} {...stylex.props(styles.detail)}>- <Flexbox gap={6}>- <span {...stylex.props(styles.label)}>{t('workingPanel.profile.description')}</span>- {meta.description ? (- <span {...stylex.props(styles.description)}>{meta.description}</span>- ) : (- <span {...stylex.props(styles.placeholder)}>- {t('workingPanel.profile.noDescription')}- </span>- )}- </Flexbox>- {model && (- <Flexbox gap={6}>- <span {...stylex.props(styles.label)}>{t('workingPanel.profile.model')}</span>- <span {...stylex.props(styles.model)}>- <ModelIcon model={model} size={14} />- <Text ellipsis>{model}</Text>- </span>- </Flexbox>- )}- </Flexbox>- ) : (- workspace- )}- </Flexbox>- );-});--AgentProfilePanel.displayName = 'AgentProfilePanel';--export default AgentProfilePanel;diff --git a/src/features/Conversation/WorkingSidebar/Overview/index.tsx b/src/features/Conversation/WorkingSidebar/Overview/index.tsxindex a9c93eceed9..9fe51d2481c 100644--- a/src/features/Conversation/WorkingSidebar/Overview/index.tsx+++ b/src/features/Conversation/WorkingSidebar/Overview/index.tsx@@ -41,7 +41,6 @@ import { TopicBackgroundActivity } from '@/features/BackgroundActivity/TopicSectimport BranchSwitcher from '@/features/ChatInput/ControlBar/BranchSwitcher';import WorktreeSwitcher from '@/features/ChatInput/ControlBar/WorktreeSwitcher';import { getAllWorkSummaries } from '@/features/Conversation/store/slices/data/workSummaries';-import { useImLayout } from '@/features/NavRail/useImLayout';import WorkSummaryCard from '@/features/Work/WorkSummaryCard';import { gitService } from '@/services/git';import { useAgentStore } from '@/store/agent';@@ -59,7 +58,6 @@ import { labPreferSelectors } from '@/store/user/selectors';import GoalSection from '../GoalSection';import ProgressSection from '../ProgressSection';-import AgentProfilePanel from './AgentProfilePanel';import DeviceStatusSection from './DeviceStatusSection';import {collectChangeStats,@@ -119,7 +117,6 @@ const Overview = memo<OverviewProps>(const { t: tDevice } = useTranslation('device');const { t: tCommon } = useTranslation('common');const isHetero = useAgentStore(agentSelectors.isCurrentAgentHeterogeneous);- const imLayout = useImLayout();const tunnelsEnabled = useUserStore(labPreferSelectors.enableDeviceTunnel);const topicId = useChatStore((s) => s.activeTopicId);const threadId = useChatStore((s) => s.activeThreadId);@@ -446,8 +443,8 @@ const Overview = memo<OverviewProps>()) : null;- const workspaceBody = (- <Flexbox>+ return (+ <Flexbox className={styles.body}>{hasWorkspace && (<><OverviewHeader@@ -559,18 +556,6 @@ const Overview = memo<OverviewProps>(</Flexbox></Flexbox>);-- // `im_layout`: with an agent, the panel opens as its profile and this- // overview becomes the profile's Workspace tab.- return (- <Flexbox className={styles.body}>- {imLayout && agentId ? (- <AgentProfilePanel agentId={agentId} key={agentId} workspace={workspaceBody} />- ) : (- workspaceBody- )}- </Flexbox>- );},);diff --git a/src/features/Conversation/WorkingSidebar/index.tsx b/src/features/Conversation/WorkingSidebar/index.tsxindex cc48660ee33..7c68128e811 100644--- a/src/features/Conversation/WorkingSidebar/index.tsx+++ b/src/features/Conversation/WorkingSidebar/index.tsx@@ -4,7 +4,6 @@ import {ActionIcon,createStaticStyles,cssVar,- cx,type DropdownItem,DropdownMenu,Flexbox,@@ -50,7 +49,6 @@ import {PR_STATE_VISUAL,} from '@/features/AgentSidebar/Topic/List/Item/metaCardData';import { useRepoType } from '@/features/ChatInput/ControlBar/useRepoType';-import { useImLayout } from '@/features/NavRail/useImLayout';import { getPortalViewWidth } from '@/features/Portal/portalWidth';import TopicCommentsSidebar from '@/features/Portal/TopicComments/Sidebar';import RightPanel from '@/features/RightPanel';@@ -153,18 +151,6 @@ const styles = createStaticStyles(({ css }) => ({background: ${cssVar.colorBgContainer};box-shadow: ${cssVar.boxShadowTertiary};`,- // `im_layout`: docked as a full-height right column (the agent's profile),- // not a floating card, so it reads as the conversation's side panel.- overviewPanelDocked: css`- max-height: none;- height: 100%;- margin: 0;- border: none;- border-inline-start: 1px solid ${cssVar.colorBorderSecondary};- border-radius: 0;-- box-shadow: none;- `,overviewSlot: css`overflow: hidden;display: flex;@@ -222,7 +208,6 @@ interface AgentWorkingSidebarProps {const AgentWorkingSidebar = memo<AgentWorkingSidebarProps>(({ availableWidth }) => {const { t } = useTranslation(['chat', 'setting']);- const imLayout = useImLayout();// Keep the panel frame + tabs on the navigation commit; the pane contents// mount in a deferred follow-up pass behind a skeleton.const contentReady = useDeferredMount();@@ -957,8 +942,8 @@ const AgentWorkingSidebar = memo<AgentWorkingSidebarProps>(({ availableWidth })toggleTerminalPanel,]);- // The floating card keeps a 16px margin on each side; the docked panel has none.- const overviewGutter = imLayout ? 0 : 32;+ // The floating card keeps a 16px margin on each side.+ const overviewGutter = 32;const overviewWidth = Math.min(OVERVIEW_PANEL_WIDTH, widthBudget - overviewGutter);const overviewPanel = (<OverviewSlot>@@ -973,7 +958,7 @@ const AgentWorkingSidebar = memo<AgentWorkingSidebarProps>(({ availableWidth })><m.divanimate={{ opacity: 1, x: 0 }}- className={cx(styles.overviewPanel, imLayout && styles.overviewPanelDocked)}+ className={styles.overviewPanel}exit={{ opacity: 0, transition: overviewExitTransition, x: 12 }}initial={{ opacity: 0, x: 12 }}role={'complementary'}