Feat: Allow users to select prompt word templates in agent operators. #9935 (#9936)

### What problem does this PR solve?

Feat: Allow users to select prompt word templates in agent operators.
#9935

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-05 15:48:57 +08:00
committed by GitHub
parent 6ff7cfe005
commit 79ca25ec7e
11 changed files with 108 additions and 18 deletions

View File

@ -39,6 +39,7 @@ import { Output } from '../components/output';
import { PromptEditor } from '../components/prompt-editor';
import { QueryVariable } from '../components/query-variable';
import { AgentTools, Agents } from './agent-tools';
import { useBuildPromptExtraPromptOptions } from './use-build-prompt-options';
import { useValues } from './use-values';
import { useWatchFormChange } from './use-watch-change';
@ -85,6 +86,9 @@ function AgentForm({ node }: INextOperatorForm) {
const defaultValues = useValues(node);
const { extraOptions } = useBuildPromptExtraPromptOptions();
console.log('🚀 ~ AgentForm ~ prompts:', extraOptions);
const ExceptionMethodOptions = Object.values(AgentExceptionMethod).map(
(x) => ({
label: t(`flow.${x}`),
@ -150,6 +154,7 @@ function AgentForm({ node }: INextOperatorForm) {
{...field}
placeholder={t('flow.messagePlaceholder')}
showToolbar={false}
extraOptions={extraOptions}
></PromptEditor>
</FormControl>
</FormItem>