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
Feat: Remove the execution restrictions imposed when an agent fails the checklist validation. (#21232)
balibabu30a6808d713c
diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex e613b68deb..d0e9e6cd71 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -3588,10 +3588,7 @@ This process aggregates variables from multiple branches into a single variableretrievalMemoryMissing: 'No memories selected, please choose them first',checklist: 'Checklist',checklistEmpty: 'No issues found',- checklistTitle:- 'Resolve the following issues before running or publishing',- checklistResolveBefore:- 'Please resolve the issues in the checklist first',+ checklistTitle: 'The following issues may affect running or publishing',issueNotConnected: 'This step is not connected to anything',issueVariableInvalid: 'Invalid variable: {{variable}}',memoryUnavailable:diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex 0092e7df72..f03c4f6b84 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -3107,8 +3107,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 RretrievalMemoryMissing: '未选择记忆,请先选择',checklist: '检查清单',checklistEmpty: '未发现问题',- checklistTitle: '请先解决以下问题再运行或发布',- checklistResolveBefore: '请先解决检查清单中的问题',+ checklistTitle: '以下问题可能影响运行或发布',issueNotConnected: '该步骤未与任何算子连接',issueVariableInvalid: '变量失效:{{variable}}',memoryUnavailable: '所选记忆不可用(已删除),请重新选择',diff --git a/web/src/pages/agent/components/publish-confirm-dialog.tsx b/web/src/pages/agent/components/publish-confirm-dialog.tsxindex 0254fefcf8..6f85c648e7 100644--- a/web/src/pages/agent/components/publish-confirm-dialog.tsx+++ b/web/src/pages/agent/components/publish-confirm-dialog.tsx@@ -20,9 +20,6 @@ interface PublishConfirmDialogProps {agentDetail: IFlow;loading: boolean;onPublish: () => void;- // Returning true blocks the dialog from opening (e.g. unresolved canvas- // checklist issues) — the caller is responsible for the user-facing notice.- onBeforeOpen?: () => boolean;}function AssociatedDataset({@@ -66,7 +63,6 @@ export function PublishConfirmDialog({agentDetail,loading,onPublish,- onBeforeOpen,}: PublishConfirmDialogProps) {const { t } = useTranslation();const [open, setOpen] = useState(false);@@ -89,14 +85,9 @@ export function PublishConfirmDialog({setOpen(false);}, [onPublish]);- // A plain button instead of DialogTrigger: Radix opens the dialog on click- // regardless of preventDefault, so the guard has to own `setOpen`.const handleTriggerClick = useCallback(() => {- if (onBeforeOpen?.()) {- return;- }setOpen(true);- }, [onBeforeOpen]);+ }, []);if (isPipeline) {return null;diff --git a/web/src/pages/agent/hooks/use-canvas-checklist.ts b/web/src/pages/agent/hooks/use-canvas-checklist.tsindex 61222debdb..03675dc005 100644--- a/web/src/pages/agent/hooks/use-canvas-checklist.ts+++ b/web/src/pages/agent/hooks/use-canvas-checklist.ts@@ -22,7 +22,7 @@ import { useModelValidIds } from '@/hooks/use-llm-request';import { useFetchAllMemoryList } from '@/hooks/use-memory-request';import { RAGFlowNodeType } from '@/interfaces/database/agent';import { useDebounce } from 'ahooks';-import { useCallback, useEffect, useMemo, useRef } from 'react';+import { useMemo } from 'react';import { Operator } from '../constant';import useGraphStore from '../store';import {@@ -58,11 +58,9 @@ function collectAllDatasetIds(nodes: RAGFlowNodeType[]): string[] {}/**- * Real-time canvas issues for the checklist panel (`issues`, debounced so- * dragging a node does not recompute every frame) plus a synchronous- * `getLatestIssues` for gating the Run/Publish/Embed/Explore entry points —- * a user who fixes the last issue and immediately clicks Run must not be- * blocked by a stale debounced value.+ * Real-time canvas issues for the checklist panel, debounced so dragging a+ * node does not recompute every frame. The checklist only reports issues to+ * the user; it does not gate any entry points.*/export function useCanvasChecklist({ownerTenantId,@@ -141,24 +139,5 @@ export function useCanvasChecklist({const issues = useMemo(() => collectCanvasIssues(inputs), [inputs]);const debouncedIssues = useDebounce(issues, { wait: 300 });- const inputsRef = useRef(inputs);- useEffect(() => {- inputsRef.current = inputs;- }, [inputs]);-- const getLatestIssues = useCallback(() => {- const {- nodes: currentNodes,- edges: currentEdges,- editedNodeFormIds: currentEditedNodeFormIds,- } = useGraphStore.getState();- return collectCanvasIssues({- ...inputsRef.current,- nodes: currentNodes,- edges: currentEdges,- editedNodeFormIds: currentEditedNodeFormIds,- });- }, []);-- return { issues: debouncedIssues, getLatestIssues };+ return { issues: debouncedIssues };}diff --git a/web/src/pages/agent/hooks/use-save-graph.ts b/web/src/pages/agent/hooks/use-save-graph.tsindex b6188839c9..6932b73f56 100644--- a/web/src/pages/agent/hooks/use-save-graph.ts+++ b/web/src/pages/agent/hooks/use-save-graph.ts@@ -23,9 +23,8 @@ export const useSaveGraph = (const { id } = useParams();const { buildDslData } = useBuildDslData();- // Saving is always allowed, even with unresolved canvas issues — those live- // in the canvas checklist (useCanvasChecklist) which gates the- // publish/run/embed/explore entry points instead.+ // Saving is always allowed, even with unresolved canvas issues — those are+ // only surfaced to the user by the canvas checklist (useCanvasChecklist).const saveGraph = useCallback(async (currentNodes?: RAGFlowNodeType[],diff --git a/web/src/pages/agent/index.tsx b/web/src/pages/agent/index.tsxindex dafc8aefec..c62d65872b 100644--- a/web/src/pages/agent/index.tsx+++ b/web/src/pages/agent/index.tsx@@ -115,23 +115,16 @@ export default function Agent() {const { handleExportJson } = useHandleExportJsonFile();const { saveGraph, loading } = useSaveGraph();- // Saving is always allowed — the canvas checklist flags issues and gates- // only the publish/run/embed/explore entry points.const handleSave = useCallback(() => {saveGraph();}, [saveGraph]);const { flowDetail: agentDetail } = useFetchDataOnMount();- const { issues, getLatestIssues } = useCanvasChecklist({+ // The canvas checklist only surfaces issues to the user; it never gates+ // the save/run/explore/publish/embed entry points.+ const { issues } = useCanvasChecklist({ownerTenantId: agentDetail?.tenant_id,canvasID: id,});- const hasBlockingIssues = useCallback(() => {- if (getLatestIssues().length > 0) {- message.warning(t('flow.checklistResolveBefore'));- return true;- }- return false;- }, [getLatestIssues, t]);const { buildDslData } = useBuildDslData();const { setAgent, loading: savingWidgetSettings } = useSetAgent(false);const { handleRun } = useSaveGraphBeforeOpeningDebugDrawer(showChatDrawer);@@ -222,9 +215,6 @@ export default function Agent() {});const handleButtonRunClick = useCallback(async () => {- if (hasBlockingIssues()) {- return;- }if (isWebhookMode) {if ((await saveGraph())?.code === 0) showWebhookTestSheet();} else if (isPipeline) {@@ -233,7 +223,6 @@ export default function Agent() {handleRun();}}, [- hasBlockingIssues,handleRun,handleRunPipeline,isPipeline,@@ -243,18 +232,12 @@ export default function Agent() {]);const handleExploreClick = useCallback(() => {- if (hasBlockingIssues()) {- return;- }navigateToAgentExplore(id as string)();- }, [hasBlockingIssues, id, navigateToAgentExplore]);+ }, [id, navigateToAgentExplore]);const handleEmbedClick = useCallback(() => {- if (hasBlockingIssues()) {- return;- }showEmbedModal();- }, [hasBlockingIssues, showEmbedModal]);+ }, [showEmbedModal]);// Single source for the Run button so the tooltip gating in the JSX below// doesn't duplicate it.@@ -351,7 +334,6 @@ export default function Agent() {agentDetail={agentDetail}loading={loading}onPublish={() => saveGraph(undefined, undefined, true)}- onBeforeOpen={hasBlockingIssues}/><CanvasChecklist issues={issues} /><DropdownMenu>