feat: user message support generate prompt (#25689)

This commit is contained in:
Joel
2025-09-15 10:17:19 +08:00
committed by GitHub
parent 67a686cf98
commit 9bb7bcf52e
4 changed files with 13 additions and 3 deletions

View File

@@ -136,7 +136,8 @@ const ConfigPromptItem: FC<Props> = ({
nodesOutputVars={availableVars}
availableNodes={availableNodes}
nodeId={nodeId}
isSupportPromptGenerator={payload.role === PromptRole.system}
editorId={id}
isSupportPromptGenerator
onGenerated={handleGenerated}
modelConfig={modelConfig}
isSupportJinja

View File

@@ -16,6 +16,7 @@ type Props = {
onGenerated?: (prompt: string) => void
modelConfig?: ModelConfig
nodeId: string
editorId?: string
currentPrompt?: string
}
@@ -23,6 +24,7 @@ const PromptGeneratorBtn: FC<Props> = ({
className,
onGenerated,
nodeId,
editorId,
currentPrompt,
}) => {
const [showAutomatic, { setTrue: showAutomaticTrue, setFalse: showAutomaticFalse }] = useBoolean(false)
@@ -46,6 +48,7 @@ const PromptGeneratorBtn: FC<Props> = ({
onFinished={handleAutomaticRes}
flowId={configsMap?.flowId || ''}
nodeId={nodeId}
editorId={editorId}
currentPrompt={currentPrompt}
/>
)}