🤯 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(working-panel): move deployment tab to the end of the tab strip (#17409)
Innei21c5d1798e8a
diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsxindex 5885d559af6..3cd27669f99 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsx+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsx@@ -44,6 +44,10 @@ const reviewState = vi.hoisted(() => ({workingDirectory: undefined as string | undefined,}));+const businessTabs = vi.hoisted(() => ({+ current: [] as { key: string; label: string; pane: ReactNode }[],+}));+const globalStore = vi.hoisted(() => ({updateSystemStatus: vi.fn(),toggleRightPanel: vi.fn(),@@ -104,7 +108,7 @@ vi.mock('@/store/electron', () => ({ useElectronStore: () => undefined }));vi.mock('@/store/chat', () => ({ useChatStore: () => undefined }));vi.mock('@/business/client/features/WorkingSidebarTabs', () => ({- useBusinessWorkingSidebarTabs: () => [],+ useBusinessWorkingSidebarTabs: () => businessTabs.current,}));vi.mock('@/features/ChatInput/ControlBar/useRepoType', async () => {@@ -153,6 +157,7 @@ vi.mock('antd-style', () => ({}));beforeEach(() => {+ businessTabs.current = [];agentStore.activeAgentId = undefined;agentStore.isHeterogeneous = false;agentStore.rawAgencyConfig = undefined;@@ -374,4 +379,23 @@ describe('AgentWorkingSidebar — tab strip', () => {expect(screen.getByRole('button', { name: 'workingPanel.review.title' })).toBeInTheDocument();expect(scrollIntoView).toHaveBeenCalledTimes(2);});++ it('renders business tabs after the built-in ones', () => {+ businessTabs.current = [+ { key: 'deployments', label: 'workingPanel.deployments.tab', pane: <div /> },+ ];++ render(<AgentWorkingSidebar />);+ const labels = screen+ .getAllByRole('button')+ .map((button) => button.textContent)+ .filter(Boolean);++ expect(labels).toEqual([+ 'workingPanel.space',+ 'workingPanel.works.title',+ 'settingModel.params.panel.tab',+ 'workingPanel.deployments.tab',+ ]);+ });});diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsxindex f75810d31e2..58e020d8af6 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx@@ -267,17 +267,6 @@ const AgentWorkingSidebar = memo(() => {paddingInline={4}><div className={styles.tabs} ref={tabsRef}>- {businessTabs.map((tab) => (- <button- aria-pressed={activeTab === tab.key}- className={`${styles.tab} ${activeTab === tab.key ? styles.tabActive : ''}`}- key={tab.key}- type="button"- onClick={() => setWorkingSidebarTab(tab.key)}- >- {tab.label}- </button>- ))}<buttonaria-pressed={activeTab === 'resources'}className={`${styles.tab} ${activeTab === 'resources' ? styles.tabActive : ''}`}@@ -334,6 +323,17 @@ const AgentWorkingSidebar = memo(() => {{t('settingModel.params.panel.tab', { ns: 'setting' })}</button>)}+ {businessTabs.map((tab) => (+ <button+ aria-pressed={activeTab === tab.key}+ className={`${styles.tab} ${activeTab === tab.key ? styles.tabActive : ''}`}+ key={tab.key}+ type="button"+ onClick={() => setWorkingSidebarTab(tab.key)}+ >+ {tab.label}+ </button>+ ))}</div><ActionIconclassName={styles.close}