File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
views/application/component
workflow/nodes/ai-chat-node Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ watch(dialogVisible, (bool) => {
135135 if (! bool ) {
136136 form .value = {
137137 mcp_servers: ' ' ,
138- mcp_tool_ids: ' ' ,
138+ mcp_tool_ids: [] ,
139139 mcp_source: ' referencing' ,
140140 }
141141 paramFormRef .value ?.clearValidate ()
@@ -146,7 +146,7 @@ function mcpSourceChange() {
146146 if (form .value .mcp_source === ' referencing' ) {
147147 form .value .mcp_servers = ' '
148148 } else {
149- form .value .mcp_tool_ids = ' '
149+ form .value .mcp_tool_ids = []
150150 }
151151}
152152
Original file line number Diff line number Diff line change 146146 </div >
147147 <div
148148 class =" w-full mb-16"
149- v-if ="
150- chat_data.mcp_tool_ids?.length > 0 ||
151- (chat_data.mcp_servers && chat_data.mcp_servers.length > 0)
152- "
149+ v-if =" chat_data.mcp_tool_ids?.length > 0"
153150 >
154151 <template v-for =" (item , index ) in chat_data .mcp_tool_ids " :key =" index " >
155152 <div
188185 </div >
189186 </template >
190187 </div >
188+ <div v-if =" chat_data.mcp_servers && chat_data.mcp_servers.length > 0"
189+ class =" flex-between border border-r-6 white-bg mb-4"
190+ style =" padding : 5px 8px "
191+ >
192+ <div class =" flex align-center" style =" line-height : 20px " >
193+ <ToolIcon type =" MCP" class =" mr-8" :size =" 20" />
194+ <div class =" ellipsis" >
195+ {{
196+ $t('common.custom') + ' MCP'
197+ }}
198+ </div >
199+ </div >
200+ <el-button text @click =" chat_data.mcp_servers = ''" >
201+ <el-icon ><Close /></el-icon >
202+ </el-button >
203+ </div >
191204 <!-- 工具 -->
192205 <div class =" flex-between mb-16" >
193206 <div class =" lighter" >{{ $t('views.tool.title') }}</div >
You can’t perform that action at this time.
0 commit comments