🧰 refactor: Decouple MCP Tools from System Tools (#9748)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run

This commit is contained in:
Danny Avila 2025-09-21 07:56:40 -04:00 committed by GitHub
parent 9d2aba5df5
commit 386900fb4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1032 additions and 1195 deletions

View file

@ -48,12 +48,12 @@ export default function AgentConfig({ createMutation }: Pick<AgentPanelProps, 'c
const {
actions,
setAction,
regularTools,
agentsConfig,
startupConfig,
mcpServersMap,
setActivePanel,
endpointsConfig,
groupedTools: allTools,
} = useAgentPanelContext();
const {
@ -177,7 +177,7 @@ export default function AgentConfig({ createMutation }: Pick<AgentPanelProps, 'c
Icon = icons[iconKey];
}
const { toolIds, mcpServerNames } = useVisibleTools(tools, allTools, mcpServersMap);
const { toolIds, mcpServerNames } = useVisibleTools(tools, regularTools, mcpServersMap);
return (
<>
@ -326,16 +326,15 @@ export default function AgentConfig({ createMutation }: Pick<AgentPanelProps, 'c
</label>
<div>
<div className="mb-1">
{/* Render all visible IDs (including groups with subtools selected) */}
{/* Render all visible IDs */}
{toolIds.map((toolId, i) => {
if (!allTools) return null;
const tool = allTools[toolId];
const tool = regularTools?.find((t) => t.pluginKey === toolId);
if (!tool) return null;
return (
<AgentTool
key={`${toolId}-${i}-${agent_id}`}
tool={toolId}
allTools={allTools}
regularTools={regularTools}
agent_id={agent_id}
/>
);