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.

🐛 fix(skill): stop connected integrations duplicating in chat-input skill panel (#15869)

LiJian6f07089ea79e
diff --git a/src/features/ChatInput/ActionBar/Tools/useControls.tsx b/src/features/ChatInput/ActionBar/Tools/useControls.tsx
index 7b12226b31a..1ff7901a3c4 100644
--- a/src/features/ChatInput/ActionBar/Tools/useControls.tsx
+++ b/src/features/ChatInput/ActionBar/Tools/useControls.tsx
@@ -809,7 +809,8 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =
isComposioEnabledInEnv
? COMPOSIO_APP_TYPES.filter(
(type) =>
- installedComposioIds.has(type.identifier) || recommendedComposioIds.has(type.identifier),
+ installedComposioIds.has(type.identifier) ||
+ recommendedComposioIds.has(type.identifier),
).map((type) => {
const server = getServerByName(type.identifier);
const icon = (
@@ -1232,8 +1233,12 @@ export const useControls = ({ closeDropdown }: { closeDropdown?: () => void } =
});
}, [lobehubSkillItems, composioServerItems, installedLobehubIds, installedComposioIds]);
- // Distinguish community plugins and custom plugins
- const communityPlugins = list.filter((item) => item.type !== 'customPlugin');
+ // Distinguish community plugins and custom plugins.
+ // Whitelist `type === 'plugin'` (matching /settings/skill) so connected
+ // integrations (Composio/LobeHub Skill gateway plugins with other sources like
+ // 'self'/'builtin') don't leak in here and duplicate the brand-icon items
+ // already rendered under the LobeHub group.
+ const communityPlugins = list.filter((item) => item.type === 'plugin');
const customPlugins = list.filter((item) => item.type === 'customPlugin');
// Function to map plugins to list items