Skip to content

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

Feat: Limit the iteration start node to only be the source node #4242 (#4260)

balibabu146e8bb79313
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index d6ccbdcf3e..040bcbd56a 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -1093,6 +1093,9 @@ This delimiter is used to split the input text into several text pieces echo of
minus: 'Minus',
semicolon: 'Semicolon',
},
+ addVariable: 'Add variable',
+ variableSettings: 'Variable settings',
+ globalVariables: 'Global variables',
},
footer: {
profile: 'All rights reserved @ React',
diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts
index 77af023e06..f47e102f2b 100644
--- a/web/src/locales/zh-traditional.ts
+++ b/web/src/locales/zh-traditional.ts
@@ -1030,6 +1030,8 @@ export default {
minus: '減號',
semicolon: '分號',
},
+ addVariable: '新增變數',
+ variableSettings: '變數設定',
},
footer: {
profile: '“保留所有權利 @ react”',
diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts
index 116654d103..2d12f43dab 100644
--- a/web/src/locales/zh.ts
+++ b/web/src/locales/zh.ts
@@ -1074,6 +1074,8 @@ export default {
minus: '减号',
semicolon: '分号',
},
+ addVariable: '新增变量',
+ variableSettings: '变量设置',
},
footer: {
profile: 'All rights reserved @ React',
diff --git a/web/src/pages/flow/canvas/edge/index.tsx b/web/src/pages/flow/canvas/edge/index.tsx
index a1e5fbca3d..112ff1b308 100644
--- a/web/src/pages/flow/canvas/edge/index.tsx
+++ b/web/src/pages/flow/canvas/edge/index.tsx
@@ -44,8 +44,6 @@ export function ButtonEdge({
};
// highlight the nodes that the workflow passes through
- // const queryClient = useQueryClient();
- // const flowDetail = queryClient.getQueryData<IFlow>(['flowDetail']);
const { data: flowDetail } = useFetchFlow();
const graphPath = useMemo(() => {
diff --git a/web/src/pages/flow/canvas/node/iteration-node.tsx b/web/src/pages/flow/canvas/node/iteration-node.tsx
index 4a81d79424..7524c6744d 100644
--- a/web/src/pages/flow/canvas/node/iteration-node.tsx
+++ b/web/src/pages/flow/canvas/node/iteration-node.tsx
@@ -109,6 +109,7 @@ export function IterationStartNode({
isConnectable={isConnectable}
className={styles.handle}
style={RightHandleStyle}
+ isConnectableEnd={false}
></Handle>
<div>
<ListRestart className="size-7" />
diff --git a/web/src/pages/flow/form/begin-form/paramater-modal.tsx b/web/src/pages/flow/form/begin-form/paramater-modal.tsx
index 5f07d25280..7d689601b1 100644
--- a/web/src/pages/flow/form/begin-form/paramater-modal.tsx
+++ b/web/src/pages/flow/form/begin-form/paramater-modal.tsx
@@ -3,6 +3,7 @@ import { IModalProps } from '@/interfaces/common';
import { Form, Input, Modal, Select, Switch } from 'antd';
import { DefaultOptionType } from 'antd/es/select';
import { useEffect, useMemo } from 'react';
+import { useTranslation } from 'react-i18next';
import { BeginQueryType, BeginQueryTypeIconMap } from '../../constant';
import { BeginQuery } from '../../interface';
import BeginDynamicOptions from './begin-dynamic-options';
@@ -16,6 +17,7 @@ export const ModalForm = ({
initialValue: BeginQuery;
otherThanCurrentQuery: BeginQuery[];
}) => {
+ const { t } = useTranslation();
const [form] = Form.useForm();
const options = useMemo(() => {
return Object.values(BeginQueryType).reduce<DefaultOptionType[]>(
@@ -56,7 +58,7 @@ export const ModalForm = ({
return (
<Modal
- title="Begin query"
+ title={t('flow.variableSettings')}
open={visible}
onOk={onOk}
onCancel={hideModal}
diff --git a/web/src/pages/flow/form/components/dynamic-input-variable.tsx b/web/src/pages/flow/form/components/dynamic-input-variable.tsx
index 8cc8cc3d4c..9ad47b7744 100644
--- a/web/src/pages/flow/form/components/dynamic-input-variable.tsx
+++ b/web/src/pages/flow/form/components/dynamic-input-variable.tsx
@@ -91,7 +91,7 @@ const DynamicVariableForm = ({ node }: IProps) => {
icon={<PlusOutlined />}
className={styles.addButton}
>
- {t('flow.addItem')}
+ {t('flow.addVariable')}
</Button>
</Form.Item>
</>