@ -71,7 +71,7 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
defaultModel ,
} = useModelListAndDefaultModelAndCurrentProviderAndModel ( ModelTypeEnum . textGeneration )
const [ instruction , setInstruction ] = useState < string > ( '' )
const [ ideaOutput , setIdeaOutput ] = useState < string > ( ' Write comment in Janpanese ')
const [ ideaOutput , setIdeaOutput ] = useState < string > ( ' ')
const [ isLoading , { setTrue : setLoadingTrue , setFalse : setLoadingFalse } ] = useBoolean ( false )
const storageKey = ` ${ flowId } - ${ nodeId } } `
@ -79,15 +79,6 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
storageKey ,
} )
// useEffect(() => {
// if (!versions?.length) {
// addVersion({
// modified: `def main(num1: float, num2: float) -> dict:
// return {'result': num1 + num2}`,
// })
// }
// }, [])
const isValid = ( ) = > {
if ( instruction . trim ( ) === '' ) {
Toast . notify ( {
@ -247,7 +238,7 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
onClick = { onGenerate }
disabled = { isLoading }
>
< Generator className = 'h-4 w-4 ' / >
< Generator className = 'h-4 w-4 ' / >
< span className = 'text-xs font-semibold ' > { t ( 'appDebug.codegen.generate' ) } < / span >
< / Button >
< / div >
@ -255,7 +246,7 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
< / div >
{ isLoading && renderLoading }
{ ! isLoading && ! current && renderNoData }
{ /* {(!isLoading && res) && ( */ }
{ ( ! isLoading && current ) && (
< div className = 'h-full w-0 grow p-6 pb-0' >
< Result
current = { current ! }
@ -266,7 +257,7 @@ export const GetCodeGeneratorResModal: FC<IGetCodeGeneratorResProps> = (
generatorType = { GeneratorType . prompt }
/ >
< / div >
{/* )} */ }
)}
< / div >
{ isShowConfirmOverwrite && (
< Confirm