Feat: Fixed an issue where dragged operators within an iteration were not associated with the iteration. #10866 (#10969)

### What problem does this PR solve?

Feat: Fixed an issue where dragged operators within an iteration were
not associated with the iteration. #10866

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-03 19:19:26 +08:00
committed by GitHub
parent ac465ba2a6
commit ee9ac15174
10 changed files with 40 additions and 241 deletions

View File

@ -7,6 +7,7 @@ import { cn } from '@/lib/utils';
import { get, isEmpty, isPlainObject } from 'lodash';
import { ChevronRight } from 'lucide-react';
import { PropsWithChildren, ReactNode, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { JsonSchemaDataType, VariableType } from '../../constant';
import { useGetStructuredOutputByValue } from '../../hooks/use-build-structured-output';
import {
@ -27,6 +28,7 @@ export function StructuredOutputSecondaryMenu({
click,
type,
}: StructuredOutputSecondaryMenuProps) {
const { t } = useTranslation();
const filterStructuredOutput = useGetStructuredOutputByValue();
const structuredOutput = filterStructuredOutput(data.value);
@ -113,7 +115,9 @@ export function StructuredOutputSecondaryMenu({
)}
>
<section className="p-2">
<div className="p-1">{data?.parentLabel} structured output:</div>
<div className="p-1">
{t('flow.structuredOutput.structuredOutput')}
</div>
{renderAgentStructuredOutput(structuredOutput, data)}
</section>
</HoverCardContent>

View File

@ -9,7 +9,6 @@ import {
FormMessage,
} from '@/components/ui/form';
import { Switch } from '@/components/ui/switch';
import { Textarea } from '@/components/ui/textarea';
import { FormTooltip } from '@/components/ui/tooltip';
import { zodResolver } from '@hookform/resolvers/zod';
import { Plus } from 'lucide-react';
@ -22,6 +21,7 @@ import { ParameterDialog } from '../begin-form/parameter-dialog';
import { QueryTable } from '../begin-form/query-table';
import { useEditQueryRecord } from '../begin-form/use-edit-query';
import { Output } from '../components/output';
import { PromptEditor } from '../components/prompt-editor';
import { useValues } from './use-values';
import { useWatchFormChange } from './use-watch-change';
@ -108,11 +108,7 @@ function UserFillUpForm({ node }: INextOperatorForm) {
{t('flow.msg')}
</FormLabel>
<FormControl>
<Textarea
rows={5}
{...field}
placeholder={t('common.pleaseInput')}
></Textarea>
<PromptEditor value={field.value} onChange={field.onChange} />
</FormControl>
<FormMessage />
</FormItem>