fix: auto generate prompt result not show (#2678)

This commit is contained in:
Joel 2024-03-04 17:36:11 +08:00 committed by GitHub
parent 8523b34be7
commit 3c1825187a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,14 +74,14 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
const [res, setRes] = React.useState<AutomaticRes | null>(null)
const renderLoading = (
<div className='grow flex flex-col items-center justify-center h-full space-y-3'>
<div className='w-0 grow flex flex-col items-center justify-center h-full space-y-3'>
<Loading />
<div className='text-[13px] text-gray-400'>{t('appDebug.automatic.loading')}</div>
</div>
)
const renderNoData = (
<div className='grow flex flex-col items-center justify-center h-full space-y-3'>
<div className='w-0 grow flex flex-col items-center px-8 justify-center h-full space-y-3'>
{noDataIcon}
<div className='text-[13px] text-gray-400'>{t('appDebug.automatic.noData')}</div>
</div>
@ -142,7 +142,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
<div className='text-[13px] font-normal text-gray-500'>{t('appDebug.automatic.description')}</div>
</div>
{/* inputs */}
<div className='mt-12 space-y-5'>
<div className='mt-2 space-y-5'>
<div className='space-y-2'>
<div className='text-[13px] font-medium text-gray-900'>{t('appDebug.automatic.intendedAudience')}</div>
<input className="w-full h-8 px-3 text-[13px] font-normal bg-gray-50 rounded-lg" placeholder={t('appDebug.automatic.intendedAudiencePlaceHolder') as string} value={audiences} onChange={e => setAudiences(e.target.value)} />
@ -167,8 +167,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</div>}
{(!isLoading && res) && (
<div className='grow px-8 pt-6 h-full overflow-y-auto'>
<div className='mb-4 w-1/2 text-lg font-medium text-gray-900'>{t('appDebug.automatic.resTitle')}</div>
<div className='w-0 grow px-8 pt-6 h-full overflow-y-auto'>
<div className='mb-4 text-lg font-medium text-gray-900'>{t('appDebug.automatic.resTitle')}</div>
<ConfigPrompt
mode={mode}
@ -196,7 +196,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</div>
)}
<div className='sticky bottom-0 flex justify-end right-0 py-4'>
<div className='sticky bottom-0 flex justify-end right-0 py-4 bg-white'>
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
<Button type='primary' className='ml-2' onClick={() => {
setShowConfirmOverwrite(true)