🤯 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
🐛 fix(marketplace): show installed custom-only connector lists (#23533)
AmAzing-370392fecd20
diff --git a/src/features/Settings/skill/features/SkillList.tsx b/src/features/Settings/skill/features/SkillList.tsxindex f40d5a9ca0a..9eeecb07df8 100644--- a/src/features/Settings/skill/features/SkillList.tsx+++ b/src/features/Settings/skill/features/SkillList.tsx@@ -44,6 +44,7 @@ import ComposioSkillItem from './ComposioSkillItem';import { AccountsNeedReauth, countAccountsNeedingReauth } from './ConnectorRowFeedback';import {buildIntegrationItems,+ countConnectorTabItems,getVisibleSectionItems,type IntegrationItem,isIntegrationConnected,@@ -271,12 +272,16 @@ const SkillList = memo<SkillListProps>(: installedPluginList.filter((plugin) => plugin.type === 'customPlugin');const agentBoundConnectors = isPrivateTab ? [] : allAgentBoundConnectors;+ const connectorTabCount = countConnectorTabItems({+ customConnectors,+ integrations,+ marketplaceConnectors,+ });const hasAnySkills =viewMode === 'skill'? marketAgentSkills.length > 0 || userAgentSkills.length > 0- : integrations.length > 0 ||+ : connectorTabCount > 0 ||communityMCPs.length > 0 ||- marketplaceConnectors.length > 0 ||customMCPs.length > 0 ||agentBoundConnectors.length > 0;@@ -299,7 +304,7 @@ const SkillList = memo<SkillListProps>(const privateState = isPrivateTab? privateTabState({- count: customConnectors.length + marketplaceConnectors.length + integrations.length,+ count: connectorTabCount,error: connectorsSWR.error,isConnectorsInit,})diff --git a/src/features/Settings/skill/features/connectorSections.test.ts b/src/features/Settings/skill/features/connectorSections.test.tsindex 83fd49aaa61..162cc75325a 100644--- a/src/features/Settings/skill/features/connectorSections.test.ts+++ b/src/features/Settings/skill/features/connectorSections.test.ts@@ -5,6 +5,7 @@ import { describe, expect, it } from 'vitest';import zhSetting from '../../../../../locales/zh-CN/setting.json';import {buildIntegrationItems,+ countConnectorTabItems,getVisibleSectionItems,isSectionExpandable,matchesConnectorKeyword,@@ -15,6 +16,18 @@ import {const noConnectors = { composio: false, lobehub: false };+describe('countConnectorTabItems', () => {+ it('counts an installed custom MCP connector when the other sources are empty', () => {+ expect(+ countConnectorTabItems({+ customConnectors: [{ identifier: 'private-mcp' }],+ integrations: [],+ marketplaceConnectors: [],+ }),+ ).toBe(1);+ });+});+describe('buildIntegrationItems', () => {it('omits builtin recommendations from the connector catalog', () => {const fixtures = {diff --git a/src/features/Settings/skill/features/connectorSections.ts b/src/features/Settings/skill/features/connectorSections.tsindex 5824384d9a9..613acccad4c 100644--- a/src/features/Settings/skill/features/connectorSections.ts+++ b/src/features/Settings/skill/features/connectorSections.ts@@ -6,6 +6,13 @@ export type IntegrationItem =| { provider: LobehubSkillProviderType; type: 'lobehub' }| { serverType: ComposioAppType; type: 'composio' };+export const countConnectorTabItems = (items: {+ customConnectors: readonly unknown[];+ integrations: readonly IntegrationItem[];+ marketplaceConnectors: readonly unknown[];+}) =>+ items.customConnectors.length + items.marketplaceConnectors.length + items.integrations.length;+/** A page group shows this many rows before "Show all" (the first screen stays scannable). */export const SECTION_PREVIEW_LIMIT = 6;