Fix runtime session check and standardize workflow edge handles in editor

This commit is contained in:
2026-06-15 15:29:33 +02:00
parent 8a0d825274
commit f562fd5c01
2 changed files with 7 additions and 1 deletions

View File

@@ -63,7 +63,11 @@ export default function WorkflowEditor({ apiBase, model, onChanged, tools, workf
React.useEffect(() => {
const graph = workflow?.graph || {}
setNodes((graph.nodes || []).map(toCanvasNode))
setEdges(graph.edges || [])
setEdges((graph.edges || []).map(edge => ({
...edge,
sourceHandle: edge.sourceHandle || edge.source_handle || 'output',
targetHandle: edge.targetHandle || edge.target_handle || 'input',
})))
setInputsText(JSON.stringify(graph.inputs || {}, null, 2))
setOutputsText(JSON.stringify(graph.outputs || {}, null, 2))
setLimits(graph.limits || {})