Skip to content

Commit 0a0ed73

Browse files
committed
chore: support extract tool's secretInputConfig out of inputs
1 parent 3e8ef90 commit 0a0ed73

File tree

2 files changed

+8
-10
lines changed
  • packages/service/core/app/plugin
  • projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render

2 files changed

+8
-10
lines changed

packages/service/core/app/plugin/controller.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ export async function getChildAppPreviewNode({
174174
})
175175
: true;
176176

177-
if (item.type === AppTypeEnum.toolSet) {
177+
const node = version.nodes[0];
178+
if (item.type === AppTypeEnum.toolSet && node.toolConfig?.mcpToolSet) {
178179
// no url return, and rewrite the toolId
179-
const node = version.nodes[0];
180180
version.nodes[0].toolConfig = {
181181
mcpToolSet: {
182182
toolId: pluginId,
@@ -335,7 +335,7 @@ export async function getChildAppPreviewNode({
335335

336336
return {
337337
id: getNanoid(),
338-
pluginId: source === PluginSourceEnum.personal ? app.id : undefined,
338+
pluginId: app.id,
339339
templateType: app.templateType,
340340
flowNodeType,
341341
avatar: app.avatar,
@@ -553,9 +553,7 @@ export const getSystemTools = async (): Promise<SystemPluginTemplateItemType[]>
553553
versionList,
554554
inputs,
555555
outputs,
556-
inputList:
557-
inputs?.find((input) => input.key === NodeInputKeyEnum.systemInputConfig)?.inputList ??
558-
item?.inputConfig?.inputList,
556+
inputList: item?.secretInputConfig,
559557
hasSystemSecret: !!dbPluginConfig?.inputListVal
560558
};
561559
});

projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ const NodeCard = (props: Props) => {
115115
}, [nodeList, nodeId]);
116116
const isAppNode = node && AppNodeFlowNodeTypeMap[node?.flowNodeType];
117117
const showVersion = useMemo(() => {
118-
// 1. Team app/System commercial plugin
118+
// 1. MCP tool set do not have version
119+
if (isAppNode && node.toolConfig?.mcpToolSet) return false;
120+
// 2. Team app/System commercial plugin
119121
if (isAppNode && node?.pluginId && !node?.pluginData?.error) return true;
120-
// 2. System tool
122+
// 3. System tool
121123
if (isAppNode && node?.toolConfig?.systemTool) return true;
122-
// 3. MCP tool set do not have version
123-
if (isAppNode && node.toolConfig?.mcpToolSet) return false;
124124

125125
return false;
126126
}, [isAppNode, node]);

0 commit comments

Comments
 (0)