mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 23:16:58 +08:00
### What problem does this PR solve? Feat: Convert the inputs parameter of the begin operator #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -15,17 +15,16 @@ import { FormTooltip } from '@/components/ui/tooltip';
|
||||
import { buildSelectOptions } from '@/utils/component-util';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useCallback } from 'react';
|
||||
import { useForm, useWatch } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { z } from 'zod';
|
||||
import { AgentDialogueMode } from '../../constant';
|
||||
import { useWatchFormChange } from '../../hooks/use-watch-form-change';
|
||||
import { INextOperatorForm } from '../../interface';
|
||||
import { ParameterDialog } from './parameter-dialog';
|
||||
import { QueryTable } from './query-table';
|
||||
import { useEditQueryRecord } from './use-edit-query';
|
||||
import { useValues } from './use-values';
|
||||
import { useWatchFormChange } from './use-watch-change';
|
||||
|
||||
const ModeOptions = buildSelectOptions([
|
||||
AgentDialogueMode.Conversational,
|
||||
@ -83,13 +82,6 @@ const BeginForm = ({ node }: INextOperatorForm) => {
|
||||
node,
|
||||
});
|
||||
|
||||
const handleParameterDialogSubmit = useCallback(
|
||||
(values: any) => {
|
||||
ok(values);
|
||||
},
|
||||
[ok],
|
||||
);
|
||||
|
||||
return (
|
||||
<section className="px-5 space-y-5">
|
||||
<Form {...form}>
|
||||
@ -187,9 +179,8 @@ const BeginForm = ({ node }: INextOperatorForm) => {
|
||||
<ParameterDialog
|
||||
hideModal={hideModal}
|
||||
initialValue={currentRecord}
|
||||
onOk={ok}
|
||||
otherThanCurrentQuery={otherThanCurrentQuery}
|
||||
submit={handleParameterDialogSubmit}
|
||||
submit={ok}
|
||||
></ParameterDialog>
|
||||
)}
|
||||
</Form>
|
||||
|
||||
Reference in New Issue
Block a user