Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

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

balibabue658beee3891
diff --git a/web/src/pages/agent/store.ts b/web/src/pages/agent/store.ts
index 75fc06f482..d71bf68c29 100644
--- a/web/src/pages/agent/store.ts
+++ b/web/src/pages/agent/store.ts
@@ -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[]) => {