chore(flow): 移除调试日志和冗余配置

master
钟良源 3 months ago
parent aaa568f9a5
commit 03976ab0cc

@ -480,7 +480,6 @@ export const useFlowCallbacks = (
}; };
localStorage.setItem('copiedNode', JSON.stringify(nodeData)); localStorage.setItem('copiedNode', JSON.stringify(nodeData));
console.log('复制节点:', node);
}, [initialData?.appId]); }, [initialData?.appId]);
// 粘贴节点 // 粘贴节点

@ -206,8 +206,6 @@ const FlowEditorMain: React.FC<FlowEditorMainProps> = (props) => {
return !isRunning; // 运行时禁止删除节点 return !isRunning; // 运行时禁止删除节点
}} }}
onNodesDelete={(deleted) => { onNodesDelete={(deleted) => {
console.log('deleted:', deleted);
// 检查是否有循环节点 // 检查是否有循环节点
const loopNodes = deleted.filter(node => const loopNodes = deleted.filter(node =>
node.data?.type === 'LOOP_START' || node.data?.type === 'LOOP_END' node.data?.type === 'LOOP_START' || node.data?.type === 'LOOP_END'
@ -298,10 +296,6 @@ const FlowEditorMain: React.FC<FlowEditorMainProps> = (props) => {
fitView fitView
selectionOnDrag={!isRunning} // 运行时禁用拖拽选择 selectionOnDrag={!isRunning} // 运行时禁用拖拽选择
selectionMode={!isRunning ? SelectionMode.Partial : undefined} // 运行时禁用选择模式 selectionMode={!isRunning ? SelectionMode.Partial : undefined} // 运行时禁用选择模式
panOnDrag={!isRunning ? [0, 1, 2] : []} // 运行时禁用拖拽平移
zoomOnScroll={!isRunning} // 运行时禁用滚轮缩放
zoomOnPinch={!isRunning} // 运行时禁用捏合缩放
panOnScrollSpeed={!isRunning ? 0.5 : 0} // 运行时禁用滚动平移
> >
<Background /> <Background />
<Panel position="top-left"> <Panel position="top-left">

@ -75,8 +75,7 @@ function IDEContainer() {
console.error('WebSocket错误:', event); console.error('WebSocket错误:', event);
}, },
onMessage: (event) => { onMessage: (event) => {
console.log('收到WebSocket消息:', event.data); // console.log('收到WebSocket消息:', event.data);
// 这里可以处理从后端收到的消息,例如日志更新等
const socketMessage = JSON.parse(event.data); const socketMessage = JSON.parse(event.data);
if (socketMessage?.socketId) dispatch(updateSocketId(socketMessage.socketId)); if (socketMessage?.socketId) dispatch(updateSocketId(socketMessage.socketId));

Loading…
Cancel
Save