chore: change currentprompt

feat/enchance-prompt-and-code-fe
Joel 7 months ago
parent f14678a0d8
commit 677716346a

@ -53,6 +53,7 @@ export type IGetAutomaticResProps = {
generatorType: GeneratorType
flowId: string
nodeId?: string
currentPrompt?: string
isBasicMode?: boolean
}
@ -81,6 +82,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
generatorType,
flowId,
nodeId,
currentPrompt,
isBasicMode,
onFinished,
}) => {
@ -138,7 +140,6 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
const [instruction, setInstruction] = useState<string>('The travel plan to Anshun of Guizhou Province in China') // TODO: test value
const [ideaOutput, setIdeaOutput] = useState<string>('use json format to output the result. Content in result uses Chinese. Format: {"summary: "summary content", "result": "result content"}')
const [currentPrompt, setCurrentPrompt] = useState<string>('')
const [isFoldIdeaOutput, {
toggle: toggleFoldIdeaOutput,
}] = useBoolean(true)

@ -168,6 +168,7 @@ const Editor: FC<Props> = ({
modelConfig={modelConfig}
nodesOutputVars={nodesOutputVars}
availableNodes={availableNodes}
currentPrompt={value}
/>
)}

@ -19,6 +19,7 @@ type Props = {
nodeId: string
nodesOutputVars?: NodeOutPutVar[]
availableNodes?: Node[]
currentPrompt?: string
}
const PromptGeneratorBtn: FC<Props> = ({
@ -27,6 +28,7 @@ const PromptGeneratorBtn: FC<Props> = ({
nodeId,
nodesOutputVars,
availableNodes,
currentPrompt,
}) => {
const [showAutomatic, { setTrue: showAutomaticTrue, setFalse: showAutomaticFalse }] = useBoolean(false)
const handleAutomaticRes = useCallback((res: AutomaticRes) => {
@ -52,6 +54,7 @@ const PromptGeneratorBtn: FC<Props> = ({
availableNodes={availableNodes}
flowId={configsMap?.flowId || ''}
nodeId={nodeId}
currentPrompt={currentPrompt}
/>
)}
</div>

Loading…
Cancel
Save