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: Highlight the edges after running #9538 (#9994)
balibabufcdde26a7f4a
diff --git a/web/src/components/llm-setting-items/next.tsx b/web/src/components/llm-setting-items/next.tsxindex c3fb3e3bba..14e6e532c9 100644--- a/web/src/components/llm-setting-items/next.tsx+++ b/web/src/components/llm-setting-items/next.tsx@@ -134,6 +134,7 @@ export function LlmSettingFieldItems({label="temperature"max={1}step={0.01}+ min={0}></SliderInputSwitchFormField><SliderInputSwitchFormFieldname={getFieldWithPrefix('top_p')}@@ -141,6 +142,7 @@ export function LlmSettingFieldItems({label="topP"max={1}step={0.01}+ min={0}></SliderInputSwitchFormField><SliderInputSwitchFormFieldname={getFieldWithPrefix('presence_penalty')}@@ -148,6 +150,7 @@ export function LlmSettingFieldItems({label="presencePenalty"max={1}step={0.01}+ min={0}></SliderInputSwitchFormField><SliderInputSwitchFormFieldname={getFieldWithPrefix('frequency_penalty')}@@ -155,12 +158,14 @@ export function LlmSettingFieldItems({label="frequencyPenalty"max={1}step={0.01}+ min={0}></SliderInputSwitchFormField><SliderInputSwitchFormFieldname={getFieldWithPrefix('max_tokens')}checkName="maxTokensEnabled"label="maxTokens"max={128000}+ min={0}></SliderInputSwitchFormField></div>);diff --git a/web/src/interfaces/database/agent.ts b/web/src/interfaces/database/agent.tsindex 39a44225f1..4fd36de2f0 100644--- a/web/src/interfaces/database/agent.ts+++ b/web/src/interfaces/database/agent.ts@@ -38,7 +38,7 @@ export type DSLComponents = Record<string, IOperator>;export interface DSL {components: DSLComponents;history: any[];- path?: string[][];+ path?: string[];answer?: any[];graph?: IGraph;messages: Message[];diff --git a/web/src/pages/agent/canvas/edge/index.tsx b/web/src/pages/agent/canvas/edge/index.tsxindex 3e1b57e856..0fa23b3b96 100644--- a/web/src/pages/agent/canvas/edge/index.tsx+++ b/web/src/pages/agent/canvas/edge/index.tsx@@ -39,7 +39,7 @@ function InnerButtonEdge({targetPosition,});const selectedStyle = useMemo(() => {- return selected ? { strokeWidth: 1, stroke: 'rgba(76, 164, 231, 1)' } : {};+ return selected ? { strokeWidth: 1, stroke: 'var(--accent-primary)' } : {};}, [selected]);const onEdgeClick = () => {@@ -49,31 +49,21 @@ function InnerButtonEdge({// highlight the nodes that the workflow passes throughconst { data: flowDetail } = useFetchAgent();- const graphPath = useMemo(() => {- // TODO: this will be called multiple times+ const showHighlight = useMemo(() => {const path = flowDetail?.dsl?.path ?? [];- // The second to last- const previousGraphPath: string[] = path.at(-2) ?? [];- let graphPath: string[] = path.at(-1) ?? [];- // The last of the second to last article- const previousLatestElement = previousGraphPath.at(-1);- if (previousGraphPath.length > 0 && previousLatestElement) {- graphPath = [previousLatestElement, ...graphPath];- }- return Array.isArray(graphPath) ? graphPath : [];- }, [flowDetail.dsl?.path]);-- const highlightStyle = useMemo(() => {- const idx = graphPath.findIndex((x) => x === source);+ const idx = path.findIndex((x) => x === target);if (idx !== -1) {- // The set of elements following source- const slicedGraphPath = graphPath.slice(idx + 1);- if (slicedGraphPath.some((x) => x === target)) {- return { strokeWidth: 1, stroke: 'red' };+ let index = idx - 1;+ while (index >= 0) {+ if (path[index] === source) {+ return { strokeWidth: 1, stroke: 'var(--accent-primary)' };+ }+ index--;}+ return {};}return {};- }, [source, target, graphPath]);+ }, [flowDetail?.dsl?.path, source, target]);const visible = useMemo(() => {return (@@ -89,8 +79,8 @@ function InnerButtonEdge({<BaseEdgepath={edgePath}markerEnd={markerEnd}- style={{ ...style, ...selectedStyle, ...highlightStyle }}- className="text-text-secondary"+ style={{ ...style, ...selectedStyle, ...showHighlight }}+ className={cn('text-text-secondary')}/><EdgeLabelRenderer>diff --git a/web/src/pages/agent/share/index.tsx b/web/src/pages/agent/share/index.tsxindex 9246d9bcf3..b33c1b3cec 100644--- a/web/src/pages/agent/share/index.tsx+++ b/web/src/pages/agent/share/index.tsx@@ -107,9 +107,7 @@ const ChatContainer = () => {const handleReset = () => {resetSession();clearEventList();- if (isTaskMode) {- showBeginParameterDialog();- }+ showBeginParameterDialog();};if (!conversationId) {return <div>empty</div>;diff --git a/web/src/pages/next-search/search-setting-aisummery-config.tsx b/web/src/pages/next-search/search-setting-aisummery-config.tsxindex 6f30de26a3..8764c3014a 100644--- a/web/src/pages/next-search/search-setting-aisummery-config.tsx+++ b/web/src/pages/next-search/search-setting-aisummery-config.tsx@@ -186,6 +186,7 @@ export function LlmSettingFieldItems({checkName={getFieldWithPrefix('temperatureEnabled')}label="temperature"max={1}+ min={0}step={0.01}onChange={() => {checkParameterIsEquel();@@ -197,6 +198,7 @@ export function LlmSettingFieldItems({label="topP"max={1}step={0.01}+ min={0}onChange={() => {checkParameterIsEquel();}}@@ -207,6 +209,7 @@ export function LlmSettingFieldItems({label="presencePenalty"max={1}step={0.01}+ min={0}onChange={() => {checkParameterIsEquel();}}@@ -217,6 +220,7 @@ export function LlmSettingFieldItems({label="frequencyPenalty"max={1}step={0.01}+ min={0}onChange={() => {checkParameterIsEquel();}}