Merge #90 into develop_web from feature/20251219_zy

fix(web): workflow save function

* feature/20251219_zy: (1 commits)
  fix(web): workflow save function

Signed-off-by: zhaoying <zhaoying@redbearai.com>
Merged-by: zhaoying <zhaoying@redbearai.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/90
This commit is contained in:
赵莹
2025-12-30 20:07:24 +08:00
2 changed files with 6 additions and 7 deletions

View File

@@ -113,11 +113,9 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
request.then((res: any) => {
message.success(t('common.saveSuccess'));
testConnection(res.tool_id || editVo?.id)
.then(() => {
handleClose();
})
.finally(() => {
setLoading(false);
handleClose();
refresh()
})
})

View File

@@ -783,20 +783,21 @@ export const useWorkflowGraph = ({
}),
edges: edges.map((edge: Edge) => {
const sourceCell = graphRef.current?.getCellById(edge.getSourceCellId());
const targetCell = graphRef.current?.getCellById(edge.getTargetCellId());
const sourcePortId = edge.getSourcePortId();
// 如果是if-else节点的右侧端口连线添加label
if (sourceCell?.getData()?.type === 'if-else' && sourcePortId?.startsWith('CASE')) {
return {
source: edge.getSourceCellId(),
target: edge.getTargetCellId(),
source: sourceCell.getData().id,
target: targetCell?.getData().id,
label: sourcePortId,
};
}
return {
source: edge.getSourceCellId(),
target: edge.getTargetCellId(),
source: sourceCell?.getData().id,
target: targetCell?.getData().id,
};
}),
}