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: dataflow log sheet shows the previous run's log in Go mode (#17790)
euvree9dd0314f0e4
diff --git a/web/src/pages/agent/hooks/use-run-dataflow.ts b/web/src/pages/agent/hooks/use-run-dataflow.tsindex da74fc8865..217bfc6679 100644--- a/web/src/pages/agent/hooks/use-run-dataflow.ts+++ b/web/src/pages/agent/hooks/use-run-dataflow.ts@@ -1,5 +1,6 @@import message from '@/components/ui/message';import { useSendMessageBySSE } from '@/hooks/use-send-message';+import i18n from '@/locales/config';import api from '@/utils/api';import { get } from 'lodash';import { useCallback, useState } from 'react';@@ -25,6 +26,13 @@ export function useRunDataflow({const success = saveRet?.code === 0;if (!success) return;+ // The Go backend runs the dataflow debug synchronously, so the new+ // message_id only arrives with the run response (seconds later).+ // Clear the previous polling key first so the log sheet renders the+ // loading state instead of replaying the previous run's log, which is+ // still within its Redis TTL and would otherwise look like the current+ // result.+ setMessageId('');showLogSheet();const res = await send({agent_id: id,@@ -34,7 +42,14 @@ export function useRunDataflow({files: [fileResponseData.file],});- if (res && res?.response.status === 200 && get(res, 'data.code') === 0) {+ if (!res) {+ // send() swallowed a network/parse failure; without a new message_id+ // the sheet would stay on the previous run's log, so surface it.+ message.error(i18n.t('message.requestError'));+ return;+ }++ if (res?.response.status === 200 && get(res, 'data.code') === 0) {// fetch canvassetUploadedFileData(fileResponseData.file[0]);const msgId = get(res, 'data.data.message_id');