fix: tool update refresh

This commit is contained in:
zhaoying
2025-12-30 18:19:31 +08:00
parent 262952c022
commit 67d6286274
4 changed files with 21 additions and 16 deletions

View File

@@ -56,6 +56,8 @@ const Mcp: React.FC<{ getStatusTag: (status: string) => ReactNode }> = ({ getSta
testConnection(item.id)
.then(() => {
message.success(t('tool.testConnectionSuccess'));
})
.finally(() => {
getData()
})
};

View File

@@ -75,6 +75,9 @@ const InnerToolModal = forwardRef<InnerToolModalRef, InnerToolModalProps>(({
.then(() => {
message.success(t('tool.testConnectionSuccess'));
})
.finally(() => {
refreshTable()
})
};
// 暴露给父组件的方法

View File

@@ -115,10 +115,10 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
testConnection(res.tool_id || editVo?.id)
.then(() => {
handleClose();
refresh()
})
.finally(() => {
setLoading(false);
refresh()
})
})
.catch(() => {