Skip to content

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

Fix: The nodes on the canvas were not updated in time after the operator name was modified. #10866 (#10911)

balibabue9debfd74d38
diff --git a/web/src/pages/agent/store.ts b/web/src/pages/agent/store.ts
index dbfbf1eb08..50046bde6d 100644
--- a/web/src/pages/agent/store.ts
+++ b/web/src/pages/agent/store.ts
@@ -476,14 +476,13 @@ const useGraphStore = create<RFState>()(
},
updateNodeName: (id, name) => {
if (id) {
- set({
- nodes: get().nodes.map((node) => {
+ set((state) => {
+ for (const node of state.nodes) {
if (node.id === id) {
node.data.name = name;
+ break;
}
-
- return node;
- }),
+ }
});
}
},