diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx index 68c08efb10..2fb081366f 100644 --- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx +++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx @@ -27,7 +27,6 @@ import { PROMPT_EDITOR_UPDATE_VALUE_BY_EVENT_EMITTER } from '@/app/components/ba import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import { useFeaturesStore } from '@/app/components/base/features/hooks' import { noop } from 'lodash-es' -import { GeneratorType } from '../config/automatic/types' export type ISimplePromptInput = { mode: AppType @@ -278,7 +277,6 @@ const Prompt: FC = ({ onClose={showAutomaticFalse} onFinished={handleAutomaticRes} isBasicMode - generatorType={GeneratorType.prompt} /> )} diff --git a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx index 7e4cf634b9..e14939b935 100644 --- a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx +++ b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx @@ -14,11 +14,9 @@ import { RiTranslate, RiUser2Line, } from '@remixicon/react' -import cn from 'classnames' import s from './style.module.css' import Modal from '@/app/components/base/modal' import Button from '@/app/components/base/button' -import Textarea from '@/app/components/base/textarea' import Toast from '@/app/components/base/toast' import { generateBasicAppFistTimeRule, generateRule } from '@/service/debug' import type { CompletionParams, Model } from '@/types/app' @@ -35,13 +33,13 @@ import { ModelTypeEnum } from '@/app/components/header/account-setting/model-pro import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks' import type { ModelModeType } from '@/types/app' import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations' -import InstructionEditor from './instruction-editor' -import type { Node, NodeOutPutVar } from '@/app/components/workflow/types' -import type { GeneratorType } from './types' -import { ArrowDownRoundFill } from '@/app/components/base/icons/src/vender/solid/general' +import InstructionEditorInWorkflow from './instruction-editor-in-workflow' +import InstructionEditorInBasic from './instruction-editor' +import { GeneratorType } from './types' import Link from 'next/link' import Result from './result' import useGenData from './use-gen-data' +import IdeaOutput from './idea-output' const i18nPrefix = 'appDebug.generate' export type IGetAutomaticResProps = { @@ -49,9 +47,6 @@ export type IGetAutomaticResProps = { isShow: boolean onClose: () => void onFinished: (res: GenRes) => void - nodesOutputVars?: NodeOutPutVar[] - availableNodes?: Node[] - generatorType: GeneratorType flowId?: string nodeId?: string currentPrompt?: string @@ -78,9 +73,6 @@ const GetAutomaticRes: FC = ({ mode, isShow, onClose, - nodesOutputVars, - availableNodes, - generatorType, flowId, nodeId, currentPrompt, @@ -141,9 +133,6 @@ const GetAutomaticRes: FC = ({ const [instruction, setInstruction] = useState('The travel plan to Anshun of Guizhou Province in China') // TODO: test value const [ideaOutput, setIdeaOutput] = useState('use json format to output the result. Content in result uses Chinese. Format: {"summary: "summary content", "result": "result content"}') - const [isFoldIdeaOutput, { - toggle: toggleFoldIdeaOutput, - }] = useBoolean(true) const handleChooseTemplate = useCallback((key: string) => { return () => { @@ -341,32 +330,27 @@ const GetAutomaticRes: FC = ({
{t('appDebug.generate.instruction')}
- -
-
-
-
{t(`${i18nPrefix}.ideaOutput`)}
-
({t(`${i18nPrefix}.optional`)})
- -
- {!isFoldIdeaOutput && ( -