Skip to content

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

fix: fixed the issue where the greeting message could not be displayed when opening the debug window #918 (#1499)

balibabud9868d02297f
diff --git a/web/src/hooks/flow-hooks.ts b/web/src/hooks/flow-hooks.ts
index cfdc09be9e..8bf289d8e4 100644
--- a/web/src/hooks/flow-hooks.ts
+++ b/web/src/hooks/flow-hooks.ts
@@ -95,6 +95,7 @@ export const useFetchFlow = (): {
initialData: {} as IFlow,
refetchOnReconnect: false,
refetchOnMount: false,
+ refetchOnWindowFocus: false,
queryFn: async () => {
const { data } = await flowService.getCanvas({}, id);
diff --git a/web/src/pages/flow/hooks.ts b/web/src/pages/flow/hooks.ts
index 390844ea31..9269cae06c 100644
--- a/web/src/pages/flow/hooks.ts
+++ b/web/src/pages/flow/hooks.ts
@@ -374,12 +374,12 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => {
const resetRet = await resetFlow();
// After resetting, all previous messages will be cleared.
if (resetRet?.retcode === 0) {
- refetch();
// fetch prologue
const sendRet = await send({ id });
if (receiveMessageError(sendRet)) {
message.error(sendRet?.data?.retmsg);
} else {
+ refetch();
show();
}
}