Feat: Add VariablePickerMenuPlugin to select variables in the prompt text box by menu #4764 (#4765)

### What problem does this PR solve?

Feat: Add VariablePickerMenuPlugin to select variables in the prompt
text box by menu #4764

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-08 18:09:13 +08:00
committed by GitHub
parent f64ae9dc33
commit bfcc2abe47
19 changed files with 1058 additions and 126 deletions

View File

@ -1,11 +1,11 @@
import LLMSelect from '@/components/llm-select';
import MessageHistoryWindowSizeItem from '@/components/message-history-window-size-item';
import { PromptEditor } from '@/components/prompt-editor';
import { useTranslate } from '@/hooks/common-hooks';
import { Form, Input, Switch } from 'antd';
import { Form, Switch } from 'antd';
import { IOperatorForm } from '../../interface';
import DynamicParameters from './dynamic-parameters';
const GenerateForm = ({ onValuesChange, form, node }: IOperatorForm) => {
const GenerateForm = ({ onValuesChange, form }: IOperatorForm) => {
const { t } = useTranslate('flow');
return (
@ -35,7 +35,7 @@ const GenerateForm = ({ onValuesChange, form, node }: IOperatorForm) => {
},
]}
>
<Input.TextArea rows={8} />
<PromptEditor></PromptEditor>
</Form.Item>
<Form.Item
name={['cite']}
@ -49,7 +49,6 @@ const GenerateForm = ({ onValuesChange, form, node }: IOperatorForm) => {
<MessageHistoryWindowSizeItem
initialValue={12}
></MessageHistoryWindowSizeItem>
<DynamicParameters node={node}></DynamicParameters>
</Form>
);
};