RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: When re-entering the agent page, the data from the previous session flashes briefly. (#16251)
balibabud8ee1ffaadc7
diff --git a/web/src/hooks/use-agent-request.ts b/web/src/hooks/use-agent-request.tsindex 3afc46f9f9..c219302841 100644--- a/web/src/hooks/use-agent-request.ts+++ b/web/src/hooks/use-agent-request.ts@@ -336,7 +336,7 @@ export const useFetchAgent = (): {isFetching: loading,refetch,} = useQuery({- queryKey: [AgentApiAction.FetchAgentDetail],+ queryKey: [AgentApiAction.FetchAgentDetail, sharedId || id],initialData: {} as IFlow,refetchOnReconnect: false,refetchOnMount: false,@@ -426,7 +426,7 @@ export const useSetAgent = (showMessage: boolean = true) => {});if (agentId) {queryClient.invalidateQueries({- queryKey: [AgentApiAction.FetchAgentDetail],+ queryKey: [AgentApiAction.FetchAgentDetail, agentId],});}}diff --git a/web/src/pages/agent/hooks/use-set-graph.ts b/web/src/pages/agent/hooks/use-set-graph.tsindex df5c111da3..72994aedc7 100644--- a/web/src/pages/agent/hooks/use-set-graph.ts+++ b/web/src/pages/agent/hooks/use-set-graph.ts@@ -6,10 +6,8 @@ export const useSetGraphInfo = () => {const { setEdges, setNodes } = useGraphStore((state) => state);const setGraphInfo = useCallback(({ nodes = [], edges = [] }: IGraph) => {- if (nodes.length || edges.length) {- setNodes(nodes);- setEdges(edges);- }+ setNodes(nodes);+ setEdges(edges);},[setEdges, setNodes],);