diff --git a/web/app/components/app/configuration/config/automatic/instruction-editor.tsx b/web/app/components/app/configuration/config/automatic/instruction-editor.tsx index aeb8399620..686e8a5dac 100644 --- a/web/app/components/app/configuration/config/automatic/instruction-editor.tsx +++ b/web/app/components/app/configuration/config/automatic/instruction-editor.tsx @@ -8,6 +8,8 @@ import type { Node, NodeOutPutVar, ValueSelector } from '@/app/components/workfl import { BlockEnum } from '@/app/components/workflow/types' import { useTranslation } from 'react-i18next' import { Type } from '@/app/components/workflow/nodes/llm/types' +import { PROMPT_EDITOR_INSERT_QUICKLY } from '@/app/components/base/prompt-editor/plugins/update-block' +import { useEventEmitterContextContext } from '@/context/event-emitter' type Props = { editorKey: string @@ -38,6 +40,8 @@ const InstructionEditor: FC = ({ isShowLastRunBlock, }) => { const { t } = useTranslation() + const { eventEmitter } = useEventEmitterContextContext() + const isBasicMode = !!getVarType // const [controlPromptEditorRerenderKey] = const isCode = generatorType === 'code' @@ -52,14 +56,19 @@ const InstructionEditor: FC = ({ ) + const handleInsertVariable = () => { + eventEmitter?.emit({ type: PROMPT_EDITOR_INSERT_QUICKLY, instanceId: editorKey } as any) + } + return ( -
+
= ({ editable isSupportFileVar={false} /> +
+ {t('appDebug.generate.press')} + / + {t('appDebug.generate.to')} + {t('appDebug.generate.insertContext')} +
) } diff --git a/web/i18n/en-US/app-debug.ts b/web/i18n/en-US/app-debug.ts index e9be6d2caf..1c782c061b 100644 --- a/web/i18n/en-US/app-debug.ts +++ b/web/i18n/en-US/app-debug.ts @@ -302,6 +302,9 @@ const translation = { instruction: 'Use advanced copyediting techniques to improve your writings', }, }, + press: 'Press', + to: 'to ', + insertContext: 'insert context', }, resetConfig: { title: 'Confirm reset?', diff --git a/web/i18n/zh-Hans/app-debug.ts b/web/i18n/zh-Hans/app-debug.ts index a818caabeb..5d562d4c16 100644 --- a/web/i18n/zh-Hans/app-debug.ts +++ b/web/i18n/zh-Hans/app-debug.ts @@ -301,6 +301,9 @@ const translation = { instruction: '用地道的编辑技巧改进我的文章', }, }, + press: '输入', + to: '来', + insertContext: '插入上下文', }, resetConfig: { title: '确认重置?',