|
190 | 190 | <el-icon class="mr-8 arrow-icon" :class="collapseData.MCP ? 'rotate-90' : ''"> |
191 | 191 | <CaretRight /> </el-icon |
192 | 192 | >MCP |
193 | | - <span class="ml-4" v-if="chat_data.mcp_tool_ids?.length"> |
194 | | - ({{ chat_data.mcp_tool_ids?.length }})</span |
195 | | - > |
| 193 | + <span class="ml-4" v-if="chat_data.mcp_tool_ids?.filter((id: any) => relatedObject(mcpToolSelectOptions, id, 'id'))?.length"> |
| 194 | + ({{ chat_data.mcp_tool_ids?.filter((id: any) => relatedObject(mcpToolSelectOptions, id, 'id'))?.length }}) |
| 195 | + </span> |
196 | 196 | </div> |
197 | 197 | <div class="flex"> |
198 | 198 | <el-button |
|
268 | 268 | <CaretRight /> |
269 | 269 | </el-icon> |
270 | 270 | {{ $t('views.tool.title') }} |
271 | | - <span class="ml-4" v-if="chat_data.tool_ids?.length"> |
272 | | - ({{ chat_data.tool_ids?.length }})</span |
273 | | - > |
| 271 | + <span class="ml-4" v-if="chat_data.tool_ids?.filter((id: any) => relatedObject(toolSelectOptions, id, 'id'))?.length"> |
| 272 | + ({{ chat_data.tool_ids?.filter((id: any) => relatedObject(toolSelectOptions, id, 'id'))?.length }}) |
| 273 | + </span> |
274 | 274 | </div> |
275 | 275 | <div class="flex"> |
276 | 276 | <el-button type="primary" link @click="openToolDialog" @refreshForm="refreshParam"> |
|
280 | 280 | </div> |
281 | 281 | <div class="w-full mb-16" v-if="chat_data.tool_ids?.length > 0 && collapseData.tool"> |
282 | 282 | <template v-for="(item, index) in chat_data.tool_ids" :key="index"> |
283 | | - <div class="flex-between border border-r-6 white-bg mb-4" style="padding: 5px 8px"> |
| 283 | + <div |
| 284 | + class="flex-between border border-r-6 white-bg mb-4" |
| 285 | + style="padding: 5px 8px" |
| 286 | + v-if="relatedObject(toolSelectOptions, item, 'id')" |
| 287 | + > |
284 | 288 | <div class="flex align-center" style="line-height: 20px"> |
285 | 289 | <el-avatar |
286 | 290 | v-if="relatedObject(toolSelectOptions, item, 'id')?.icon" |
|
319 | 323 | <CaretRight /> |
320 | 324 | </el-icon> |
321 | 325 | Skills |
322 | | - <span class="ml-4" v-if="chat_data.skill_tool_ids?.length"> |
323 | | - ({{ chat_data.skill_tool_ids?.length }})</span |
324 | | - > |
| 326 | + <span class="ml-4" v-if="chat_data.skill_tool_ids?.filter((id: any) => relatedObject(skillToolSelectOptions, id, 'id'))?.length"> |
| 327 | + ({{ chat_data.skill_tool_ids?.filter((id: any) => relatedObject(skillToolSelectOptions, id, 'id'))?.length }}) |
| 328 | + </span> |
325 | 329 | </div> |
326 | 330 | <div class="flex"> |
327 | 331 | <el-button |
|
0 commit comments