File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
views/application/component
workflow/nodes/ai-chat-node Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ watch(dialogVisible, (bool) => {
135
135
if (! bool ) {
136
136
form .value = {
137
137
mcp_servers: ' ' ,
138
- mcp_tool_ids: ' ' ,
138
+ mcp_tool_ids: [] ,
139
139
mcp_source: ' referencing' ,
140
140
}
141
141
paramFormRef .value ?.clearValidate ()
@@ -146,7 +146,7 @@ function mcpSourceChange() {
146
146
if (form .value .mcp_source === ' referencing' ) {
147
147
form .value .mcp_servers = ' '
148
148
} else {
149
- form .value .mcp_tool_ids = ' '
149
+ form .value .mcp_tool_ids = []
150
150
}
151
151
}
152
152
Original file line number Diff line number Diff line change 133
133
</div >
134
134
<div
135
135
class =" w-full mb-16"
136
- v-if ="
137
- chat_data.mcp_tool_ids?.length > 0 || (chat_data.mcp_servers && chat_data.mcp_servers.length > 0)
138
- "
136
+ v-if =" chat_data.mcp_tool_ids?.length > 0"
139
137
>
140
138
<template v-for =" (item , index ) in chat_data .mcp_tool_ids " :key =" index " >
141
139
<div class =" flex-between border border-r-6 white-bg mb-4" style =" padding : 5px 8px "
168
166
</el-button >
169
167
</div >
170
168
</template >
171
- </div >
169
+ </div >
170
+ <div v-if =" chat_data.mcp_servers && chat_data.mcp_servers.length > 0"
171
+ class =" flex-between border border-r-6 white-bg mb-4"
172
+ style =" padding : 5px 8px "
173
+ >
174
+ <div class =" flex align-center" style =" line-height : 20px " >
175
+ <ToolIcon type =" MCP" class =" mr-8" :size =" 20" />
176
+ <div class =" ellipsis" >
177
+ {{
178
+ $t('common.custom') + ' MCP'
179
+ }}
180
+ </div >
181
+ </div >
182
+ <el-button text @click =" chat_data.mcp_servers = ''" >
183
+ <el-icon ><Close /></el-icon >
184
+ </el-button >
185
+ </div >
172
186
<!-- 工具 -->
173
187
<div class =" flex-between mb-16" >
174
188
<div class =" lighter" >{{ $t('views.tool.title') }}</div >
You can’t perform that action at this time.
0 commit comments