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) => {
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 133133 </div >
134134 <div
135135 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"
139137 >
140138 <template v-for =" (item , index ) in chat_data .mcp_tool_ids " :key =" index " >
141139 <div class =" flex-between border border-r-6 white-bg mb-4" style =" padding : 5px 8px "
168166 </el-button >
169167 </div >
170168 </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 >
172186 <!-- 工具 -->
173187 <div class =" flex-between mb-16" >
174188 <div class =" lighter" >{{ $t('views.tool.title') }}</div >
You can’t perform that action at this time.
0 commit comments