π€― 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(thread): indent subagent rows and drop SUBAGENT badge (#14845)
Arvin Xud91132c15589
diff --git a/src/locales/default/chat.ts b/src/locales/default/chat.tsindex be1de967bd5..1fa5f5f75ec 100644--- a/src/locales/default/chat.ts+++ b/src/locales/default/chat.ts@@ -749,7 +749,6 @@ export default {'thread.closeSubagentThread': 'Collapse SubAgent conversation','thread.divider': 'Subtopic','thread.openSubagentThread': 'View full SubAgent conversation',- 'thread.subagentBadge': 'SubAgent','thread.subagentReadOnlyHint':'SubAgent conversations are read-only β execution is driven by the parent agent.','thread.threadMessageCount': '{{messageCount}} messages',diff --git a/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx b/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsxindex 408a221abf6..2a83051b934 100644--- a/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx+++ b/src/routes/(main)/agent/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx@@ -1,8 +1,7 @@-import { Flexbox, Icon, Tag } from '@lobehub/ui';-import { TreeDownRightIcon } from '@lobehub/ui/icons';+import { Icon } from '@lobehub/ui';import { cssVar } from 'antd-style';+import { CornerDownRight } from 'lucide-react';import { memo, useCallback } from 'react';-import { useTranslation } from 'react-i18next';import NavItem from '@/features/NavPanel/components/NavItem';import { useChatStore } from '@/store/chat';@@ -19,8 +18,12 @@ export interface ThreadItemProps {title: string;}+// Indent applied INSIDE the NavItem's Block (overrides default paddingInline=4+// on the start side), so the icon + title shift right by one icon-slot width+// while the row background/highlight stays full-width.+const SUBAGENT_PADDING_INLINE_START = 32;+const ThreadItem = memo<ThreadItemProps>(({ title, id, isSubagent }) => {- const { t } = useTranslation('chat');const [editing, activeThreadId] = useChatStore((s) => [s.threadRenamingId === id,s.activeThreadId,@@ -47,9 +50,6 @@ const ThreadItem = memo<ThreadItemProps>(({ title, id, isSubagent }) => {const active = id === activeThreadId;- // Subagent threads (spawned by an external agent's subagent tool call)- // only get a plain "Subagent" badge β the specific template name is- // surfaced on the Thread header instead, where there's room for it.return (<><NavItem@@ -57,24 +57,9 @@ const ThreadItem = memo<ThreadItemProps>(({ title, id, isSubagent }) => {active={active && !isInAgentSubRoute}contextMenuItems={dropdownMenu}disabled={editing}- icon={<Icon color={cssVar.colorTextDescription} icon={TreeDownRightIcon} size={'small'} />}- title={- isSubagent ? (- <Flexbox horizontal align={'center'} flex={1} gap={6}>- <span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>- {title}- </span>- <Tag- size={'small'}- style={{ color: cssVar.colorTextDescription, flexShrink: 0, fontSize: 10 }}- >- {t('thread.subagentBadge')}- </Tag>- </Flexbox>- ) : (- title- )- }+ icon={<Icon color={cssVar.colorTextDescription} icon={CornerDownRight} size={'small'} />}+ style={isSubagent ? { paddingInlineStart: SUBAGENT_PADDING_INLINE_START } : undefined}+ title={title}onClick={handleClick}/><Editing id={id} title={title} toggleEditing={toggleEditing} />diff --git a/src/routes/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx b/src/routes/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsxindex c4f2710125f..93f18958ff4 100644--- a/src/routes/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx+++ b/src/routes/(main)/group/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx@@ -1,8 +1,7 @@-import { Flexbox, Icon, Tag } from '@lobehub/ui';-import { TreeDownRightIcon } from '@lobehub/ui/icons';+import { Icon } from '@lobehub/ui';import { cssVar } from 'antd-style';+import { CornerDownRight } from 'lucide-react';import { memo, useCallback } from 'react';-import { useTranslation } from 'react-i18next';import NavItem from '@/features/NavPanel/components/NavItem';import { useChatStore } from '@/store/chat';@@ -19,8 +18,9 @@ export interface ThreadItemProps {title: string;}+const SUBAGENT_PADDING_INLINE_START = 32;+const ThreadItem = memo<ThreadItemProps>(({ title, id, isSubagent }) => {- const { t } = useTranslation('chat');const [editing, activeThreadId] = useChatStore((s) => [s.threadRenamingId === id,s.activeThreadId,@@ -54,24 +54,9 @@ const ThreadItem = memo<ThreadItemProps>(({ title, id, isSubagent }) => {active={active && !isInAgentSubRoute}contextMenuItems={dropdownMenu}disabled={editing}- icon={<Icon color={cssVar.colorTextDescription} icon={TreeDownRightIcon} size={'small'} />}- title={- isSubagent ? (- <Flexbox horizontal align={'center'} flex={1} gap={6}>- <span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>- {title}- </span>- <Tag- size={'small'}- style={{ color: cssVar.colorTextDescription, flexShrink: 0, fontSize: 10 }}- >- {t('thread.subagentBadge')}- </Tag>- </Flexbox>- ) : (- title- )- }+ icon={<Icon color={cssVar.colorTextDescription} icon={CornerDownRight} size={'small'} />}+ style={isSubagent ? { paddingInlineStart: SUBAGENT_PADDING_INLINE_START } : undefined}+ title={title}onClick={handleClick}/><Editing id={id} title={title} toggleEditing={toggleEditing} />