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: agent version apply bad (#21555)
Wang Qi69a3e764e304
diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 9ee34c98ef..b8a43b6c3d 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -3455,7 +3455,7 @@ This delimiter is used to split the input text into several text pieces echo ofrestore: 'Restore as current',restoreConfirmTitle: 'Restore this version as the current agent?',restoreConfirmContent:- 'The current agent DSL will be replaced by this version. Publish again to save it as a new version.',+ 'The current agent DSL will be replaced by this version. Save again to create a new version.',missingContent:'The pinned pipeline version no longer exists, so this file cannot be parsed. Please choose a version (or the latest) to continue.',},diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex 7980a62550..3ef8c233a2 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -2488,7 +2488,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 Rrestore: '恢复为当前版本',restoreConfirmTitle: '恢复此版本为当前智能体?',restoreConfirmContent:- '当前智能体 DSL 将被此版本替换。再次发布会将其保存为新版本。',+ '当前智能体 DSL 将被此版本替换。再次保存会创建新版本。',missingContent:'所固定的流水线版本已不存在,该文件无法解析。请重新选择版本(或选择最新版本)后继续。',},diff --git a/web/src/pages/agent/version-dialog/index.tsx b/web/src/pages/agent/version-dialog/index.tsxindex 665059a2fa..5f29dbbb38 100644--- a/web/src/pages/agent/version-dialog/index.tsx+++ b/web/src/pages/agent/version-dialog/index.tsx@@ -28,7 +28,6 @@ import {useDeleteVersion,useFetchVersion,useFetchVersionList,- useSaveAgent,useUpdateVersion,} from '@/hooks/use-agent-request';import { IModalProps } from '@/interfaces/common';@@ -100,7 +99,6 @@ export function VersionDialog({const [pending, setPending] = useState<PendingAction>(null);const { deleteVersion, loading: deleting } = useDeleteVersion();- const { saveAgent, loading: restoring } = useSaveAgent(false);const { applyVersion, loading: applyRestoring } = useApplyVersion();const { updateVersion } = useUpdateVersion();@@ -144,12 +142,6 @@ export function VersionDialog({});if (ok && selectedId === pending.versionId) setSelectedId('');} else if (pending.kind === 'restore') {- await saveAgent({- id: canvasId,- dsl: agent?.dsl,- title: agent?.title,- });-const ok = await applyVersion({canvasId,versionId: pending.versionId,@@ -157,15 +149,7 @@ export function VersionDialog({if (ok) hideModal?.();}setPending(null);- }, [- pending,- canvasId,- deleteVersion,- selectedId,- saveAgent,- agent?.dsl,- agent?.title,- ]);+ }, [pending, canvasId, deleteVersion, selectedId, applyVersion, hideModal]);// Keep the current selection across list refreshes; only fall back to the// newest version when the selected one was pruned server-side.@@ -304,7 +288,6 @@ export function VersionDialog({disabled={selectedId === latestId ||!selectedId ||- restoring ||applyRestoring}>