Feat: Add IterationNode component #3221 (#8461)

### What problem does this PR solve?

Feat: Add IterationNode component #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-24 18:01:30 +08:00
committed by GitHub
parent bc1b837616
commit 1c68c9ebd6
10 changed files with 191 additions and 169 deletions

View File

@ -10,7 +10,9 @@ import { useFormContext } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import { useBuildQueryVariableOptions } from '../../hooks/use-get-begin-query';
export function QueryVariable() {
type QueryVariableProps = { name?: string };
export function QueryVariable({ name = 'query' }: QueryVariableProps) {
const { t } = useTranslation();
const form = useFormContext();
@ -19,7 +21,7 @@ export function QueryVariable() {
return (
<FormField
control={form.control}
name="query"
name={name}
render={({ field }) => (
<FormItem>
<FormLabel tooltip={t('chat.modelTip')}>{t('flow.query')}</FormLabel>