'use client' import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import { RiQuestionLine, } from '@remixicon/react' import MemoryConfig from '../../_base/components/memory-config' import Editor from '@/app/components/workflow/nodes/_base/components/prompt/editor' import type { Memory, Node, NodeOutPutVar } from '@/app/components/workflow/types' import TooltipPlus from '@/app/components/base/tooltip-plus' const i18nPrefix = 'workflow.nodes.questionClassifiers' type Props = { instruction: string onInstructionChange: (instruction: string) => void hideMemorySetting: boolean memory?: Memory onMemoryChange: (memory?: Memory) => void readonly?: boolean isChatModel: boolean isChatApp: boolean hasSetBlockStatus?: { context: boolean history: boolean query: boolean } nodesOutputVars: NodeOutPutVar[] availableNodes: Node[] } const AdvancedSetting: FC = ({ instruction, onInstructionChange, hideMemorySetting, memory, onMemoryChange, readonly, isChatModel, isChatApp, hasSetBlockStatus, nodesOutputVars, availableNodes, }) => { const { t } = useTranslation() return ( <> {t(`${i18nPrefix}.instruction`)} {t(`${i18nPrefix}.instructionTip`)} }> } value={instruction} onChange={onInstructionChange} readOnly={readonly} isChatModel={isChatModel} isChatApp={isChatApp} isShowContext={false} hasSetBlockStatus={hasSetBlockStatus} nodesOutputVars={nodesOutputVars} availableNodes={availableNodes} /> {!hideMemorySetting && ( )} ) } export default React.memo(AdvancedSetting)