Skip to content

🤯 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.

💄 style(home): drop the New chat action from the Home sidebar header (#23776)

Lobehub Codere3a09f88d420
diff --git a/locales/en-US/common.json b/locales/en-US/common.json
index 6c222ff6605..97b12db00b5 100644
--- a/locales/en-US/common.json
+++ b/locales/en-US/common.json
@@ -372,7 +372,6 @@
"navPanel.managePrivateFolders": "Manage private categories",
"navPanel.moveDown": "Move Down",
"navPanel.moveUp": "Move Up",
- "navPanel.newChat": "New chat",
"navPanel.openMenu": "Open menu",
"navPanel.pinned": "Pinned",
"navPanel.privateAgents": "Private",
diff --git a/locales/zh-CN/common.json b/locales/zh-CN/common.json
index fd0cef59254..f80ea1bd733 100644
--- a/locales/zh-CN/common.json
+++ b/locales/zh-CN/common.json
@@ -372,7 +372,6 @@
"navPanel.managePrivateFolders": "管理私人分组",
"navPanel.moveDown": "下移",
"navPanel.moveUp": "上移",
- "navPanel.newChat": "新对话",
"navPanel.openMenu": "打开菜单",
"navPanel.pinned": "已固定",
"navPanel.privateAgents": "私人",
diff --git a/packages/locales/src/default/common.ts b/packages/locales/src/default/common.ts
index f6424baa5eb..191fa1883a4 100644
--- a/packages/locales/src/default/common.ts
+++ b/packages/locales/src/default/common.ts
@@ -453,7 +453,6 @@ export default {
'navPanel.agent': 'Agents',
'navPanel.createPrivateFolder': 'New private category',
'navPanel.managePrivateFolders': 'Manage private categories',
- 'navPanel.newChat': 'New chat',
'navPanel.privateTooltip': 'Private · only you can see this',
'navPanel.customizeSidebar': 'Customize Sidebar',
'navPanel.openMenu': 'Open menu',
diff --git a/src/features/HomeSidebar/Header/components/HeaderActions.tsx b/src/features/HomeSidebar/Header/components/HeaderActions.tsx
index 9b5030e5b38..99b93ab9271 100644
--- a/src/features/HomeSidebar/Header/components/HeaderActions.tsx
+++ b/src/features/HomeSidebar/Header/components/HeaderActions.tsx
@@ -1,41 +1,31 @@
'use client';
import { ActionIcon } from '@lobehub/ui';
-import { SquarePenIcon } from 'lucide-react';
-import { useTranslation } from 'react-i18next';
-import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';
import { useNavLayout } from '@/hooks/useNavLayout';
import { useHeaderActionSize } from '@/styles/density';
import { resolveHeaderItems } from '../headerItems';
+// Home is not a chat surface, so its header carries no "New chat" action: with
+// only the workspace identity beside it, the button would not say what it
+// creates. Starting a conversation lives where the context is — the Home
+// composer, and the agent sidebar's "Start New Topic" once an agent is open.
const HeaderActions = () => {
const headerActionSize = useHeaderActionSize(true);
- const { t } = useTranslation('common');
- const navigate = useWorkspaceAwareNavigate();
const { topNavItems } = useNavLayout();
const { search } = resolveHeaderItems(topNavItems);
+ if (!search) return null;
+
return (
- <>
- {search && (
- <ActionIcon
- aria-label={search.title}
- icon={search.icon}
- size={headerActionSize}
- title={search.title}
- onClick={search.onClick}
- />
- )}
- <ActionIcon
- aria-label={t('navPanel.newChat')}
- icon={SquarePenIcon}
- size={headerActionSize}
- title={t('navPanel.newChat')}
- onClick={() => navigate('/')}
- />
- </>
+ <ActionIcon
+ aria-label={search.title}
+ icon={search.icon}
+ size={headerActionSize}
+ title={search.title}
+ onClick={search.onClick}
+ />
);
};