Fix: Fixed the issue of errors when using agents created from templates. #10427 (#11035)

### What problem does this PR solve?

Fix: Fixed the issue of errors when using agents created from templates.
#10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-05 19:15:43 +08:00
committed by GitHub
parent 17ea5c1dee
commit e658beee38

View File

@ -105,7 +105,10 @@ const useGraphStore = create<RFState>()(
clickedToolId: '',
onNodesChange: (changes) => {
set({
nodes: applyNodeChanges(changes, get().nodes),
nodes: applyNodeChanges(
changes, // The issue of errors when using templates was resolved by using cloneDeep.
cloneDeep(get().nodes) as RAGFlowNodeType[], // Cannot assign to read only property 'width' of object '#<Object>'
),
});
},
onEdgesChange: (changes: EdgeChange[]) => {