🤯 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(agent-profile): include hidden builtin tools in system prompt @-mention list (#14823)
LiJian1a48642a2d2f
diff --git a/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx b/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsxindex 18fc0ec0d93..2f3f9be73e9 100644--- a/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx+++ b/src/routes/(main)/agent/profile/features/ProfileEditor/MentionList/useMentionItems.tsx@@ -112,7 +112,7 @@ const resolveApiDescription = (};const useMentionOptions = () => {- const installedTools = useToolStore(toolSelectors.metaList, isEqual);+ const installedTools = useToolStore(toolSelectors.discoverableMetaList, isEqual);const toggleAgentPlugin = useAgentStore((s) => s.toggleAgentPlugin);const baseItems = useMemo<MentionListOption[]>(() => {diff --git a/src/store/tool/selectors/tool.ts b/src/store/tool/selectors/tool.tsindex 4ae2fcb05f0..6931a03fc26 100644--- a/src/store/tool/selectors/tool.ts+++ b/src/store/tool/selectors/tool.ts@@ -23,6 +23,19 @@ const metaList = (s: ToolStoreState): LobeToolMeta[] => {return builtinToolSelectors.metaList(s).concat(pluginList).concat(lobehubSkillList);};+/**+ * All installed discoverable tools across every source (builtins, plugins, skills).+ * Excludes only tools with `discoverable: false` (pure infrastructure / internal).+ * Includes hidden and runtime-managed builtins (web-browsing, memory, cloud-sandbox, etc.)+ * that `metaList` hides from the chat toolbar.+ */+const discoverableMetaList = (s: ToolStoreState): LobeToolMeta[] => {+ const pluginList = pluginSelectors.installedPluginMetaList(s) as LobeToolMeta[];+ const lobehubSkillList = lobehubSkillStoreSelectors.metaList(s) as LobeToolMeta[];++ return builtinToolSelectors.discoverableMetaList(s).concat(pluginList).concat(lobehubSkillList);+};+const getMetaById =(id: string) =>(s: ToolStoreState): MetaData | undefined => {@@ -172,6 +185,7 @@ const availableToolsForDiscovery = (s: ToolStoreState): AvailableToolForDiscoverexport const toolSelectors = {availableToolsForDiscovery,+ discoverableMetaList,getManifestById,getManifestLoadingStatus,getMetaById,diff --git a/src/store/tool/slices/builtin/selectors.ts b/src/store/tool/slices/builtin/selectors.tsindex 2fd1ec9e9a6..45b81526065 100644--- a/src/store/tool/slices/builtin/selectors.ts+++ b/src/store/tool/slices/builtin/selectors.ts@@ -179,6 +179,36 @@ const allMetaList = (s: ToolStoreState): LobeToolMetaWithAvailability[] => {return [...skillMetas, ...agentSkillMetas, ...builtinMetas, ...getKlavisMetasWithAvailability(s)];};+/**+ * Get installed discoverable builtin tools and skills.+ * Excludes only tools with `discoverable: false` (pure infrastructure / internal).+ * Includes hidden and runtime-managed tools (web-browsing, memory, cloud-sandbox, etc.).+ */+const discoverableMetaList = (s: ToolStoreState): LobeToolMeta[] => {+ const { uninstalledBuiltinTools } = s;++ const skillMetas = (s.builtinSkills || [])+ .filter((skill) => {+ if (!isBuiltinSkillAvailableInCurrentEnv(skill.identifier)) return false;+ if (uninstalledBuiltinTools.includes(skill.identifier)) return false;+ return true;+ })+ .map(toSkillMeta);++ const agentSkillMetas = agentSkillsSelectors.agentSkillMetaList(s);++ const builtinMetas = s.builtinTools+ .filter((item) => {+ // Exclude pure infrastructure tools (never user-facing)+ if (item.discoverable === false) return false;+ if (uninstalledBuiltinTools.includes(item.identifier)) return false;+ return true;+ })+ .map(toBuiltinMeta);++ return [...skillMetas, ...agentSkillMetas, ...builtinMetas, ...getKlavisMetas(s)];+};+/*** Get installed builtin tools meta list (excludes uninstalled, includes hidden and platform-specific)* Used for agent profile tool configuration where only installed tools should be shown@@ -222,6 +252,7 @@ const isBuiltinToolInstalled = (identifier: string) => (s: ToolStoreState) =>export const builtinToolSelectors = {allMetaList,+ discoverableMetaList,installedAllMetaList,installedBuiltinSkills,isBuiltinToolInstalled,