Feat: Delete MCP server #3221 (#8772)

### What problem does this PR solve?

Feat: Delete MCP server #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-10 14:28:27 +08:00
committed by GitHub
parent 2e0905d06a
commit 9f94d88acd
7 changed files with 56 additions and 19 deletions

View File

@ -56,6 +56,12 @@ import {
getNodeDragHandle,
} from '../utils';
function isBottomSubAgent(type: string, position: Position) {
return (
(type === Operator.Agent && position === Position.Bottom) ||
type === Operator.Tool
);
}
export const useInitializeOperatorParams = () => {
const llmId = useFetchModelId();
@ -114,8 +120,17 @@ export const useInitializeOperatorParams = () => {
}, [llmId]);
const initializeOperatorParams = useCallback(
(operatorName: Operator) => {
return initialFormValuesMap[operatorName];
(operatorName: Operator, position: Position) => {
const initialValues = initialFormValuesMap[operatorName];
if (isBottomSubAgent(operatorName, position)) {
return {
...initialValues,
description: 'This is an agent for a specific task.',
user_prompt: 'This is the order you need to send to the agent.',
};
}
return initialValues;
},
[initialFormValuesMap],
);
@ -235,13 +250,6 @@ function useAddToolNode() {
return { addToolNode };
}
function isBottomSubAgent(type: string, position: Position) {
return (
(type === Operator.Agent && position === Position.Bottom) ||
type === Operator.Tool
);
}
function useResizeIterationNode() {
const { getNode, nodes, updateNode } = useGraphStore((state) => state);
@ -324,7 +332,7 @@ export function useAddNode(reactFlowInstance?: ReactFlowInstance<any, any>) {
getNodeName(type),
nodes,
),
form: initializeOperatorParams(type as Operator),
form: initializeOperatorParams(type as Operator, params.position),
},
sourcePosition: Position.Right,
targetPosition: Position.Left,