|
|
|
@ -54,10 +54,10 @@ const TryLabel: FC<{
|
|
|
|
}> = ({ Icon, text, onClick }) => {
|
|
|
|
}> = ({ Icon, text, onClick }) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
className='mt-2 mr-1 shrink-0 flex h-7 items-center px-2 bg-gray-100 rounded-lg cursor-pointer'
|
|
|
|
className='mr-1 mt-2 flex h-7 shrink-0 cursor-pointer items-center rounded-lg bg-gray-100 px-2'
|
|
|
|
onClick={onClick}
|
|
|
|
onClick={onClick}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon className='w-4 h-4 text-gray-500'></Icon>
|
|
|
|
<Icon className='h-4 w-4 text-gray-500'></Icon>
|
|
|
|
<div className='ml-1 text-xs font-medium text-gray-700'>{text}</div>
|
|
|
|
<div className='ml-1 text-xs font-medium text-gray-700'>{text}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -138,16 +138,16 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
const [res, setRes] = React.useState<AutomaticRes | null>(null)
|
|
|
|
const [res, setRes] = React.useState<AutomaticRes | null>(null)
|
|
|
|
|
|
|
|
|
|
|
|
const renderLoading = (
|
|
|
|
const renderLoading = (
|
|
|
|
<div className='w-0 grow flex flex-col items-center justify-center h-full space-y-3'>
|
|
|
|
<div className='flex h-full w-0 grow flex-col items-center justify-center space-y-3'>
|
|
|
|
<Loading />
|
|
|
|
<Loading />
|
|
|
|
<div className='text-[13px] text-gray-400'>{t('appDebug.generate.loading')}</div>
|
|
|
|
<div className='text-[13px] text-gray-400'>{t('appDebug.generate.loading')}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const renderNoData = (
|
|
|
|
const renderNoData = (
|
|
|
|
<div className='w-0 grow flex flex-col items-center px-8 justify-center h-full space-y-3'>
|
|
|
|
<div className='flex h-full w-0 grow flex-col items-center justify-center space-y-3 px-8'>
|
|
|
|
<Generator className='w-14 h-14 text-gray-300' />
|
|
|
|
<Generator className='h-14 w-14 text-gray-300' />
|
|
|
|
<div className='leading-5 text-center text-[13px] font-normal text-gray-400'>
|
|
|
|
<div className='text-center text-[13px] font-normal leading-5 text-gray-400'>
|
|
|
|
<div>{t('appDebug.generate.noDataLine1')}</div>
|
|
|
|
<div>{t('appDebug.generate.noDataLine1')}</div>
|
|
|
|
<div>{t('appDebug.generate.noDataLine2')}</div>
|
|
|
|
<div>{t('appDebug.generate.noDataLine2')}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -189,18 +189,18 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
<Modal
|
|
|
|
<Modal
|
|
|
|
isShow={isShow}
|
|
|
|
isShow={isShow}
|
|
|
|
onClose={onClose}
|
|
|
|
onClose={onClose}
|
|
|
|
className='!p-0 min-w-[1140px]'
|
|
|
|
className='min-w-[1140px] !p-0'
|
|
|
|
closable
|
|
|
|
closable
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div className='flex h-[680px] flex-wrap'>
|
|
|
|
<div className='flex h-[680px] flex-wrap'>
|
|
|
|
<div className='w-[570px] shrink-0 p-6 h-full overflow-y-auto border-r border-gray-100'>
|
|
|
|
<div className='h-full w-[570px] shrink-0 overflow-y-auto border-r border-gray-100 p-6'>
|
|
|
|
<div className='mb-8'>
|
|
|
|
<div className='mb-8'>
|
|
|
|
<div className={`leading-[28px] text-lg font-bold ${s.textGradient}`}>{t('appDebug.generate.title')}</div>
|
|
|
|
<div className={`text-lg font-bold leading-[28px] ${s.textGradient}`}>{t('appDebug.generate.title')}</div>
|
|
|
|
<div className='mt-1 text-[13px] font-normal text-gray-500'>{t('appDebug.generate.description')}</div>
|
|
|
|
<div className='mt-1 text-[13px] font-normal text-gray-500'>{t('appDebug.generate.description')}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='flex items-center mb-8'>
|
|
|
|
<div className='mb-8 flex items-center'>
|
|
|
|
<ModelIcon
|
|
|
|
<ModelIcon
|
|
|
|
className='shrink-0 mr-1.5 '
|
|
|
|
className='mr-1.5 shrink-0 '
|
|
|
|
provider={currentProvider}
|
|
|
|
provider={currentProvider}
|
|
|
|
modelName={currentModel?.model}
|
|
|
|
modelName={currentModel?.model}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
@ -213,8 +213,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div >
|
|
|
|
<div >
|
|
|
|
<div className='flex items-center'>
|
|
|
|
<div className='flex items-center'>
|
|
|
|
<div className='mr-3 shrink-0 leading-[18px] text-xs font-semibold text-gray-500 uppercase'>{t('appDebug.generate.tryIt')}</div>
|
|
|
|
<div className='mr-3 shrink-0 text-xs font-semibold uppercase leading-[18px] text-gray-500'>{t('appDebug.generate.tryIt')}</div>
|
|
|
|
<div className='grow h-px' style={{
|
|
|
|
<div className='h-px grow' style={{
|
|
|
|
background: 'linear-gradient(to right, rgba(243, 244, 246, 1), rgba(243, 244, 246, 0))',
|
|
|
|
background: 'linear-gradient(to right, rgba(243, 244, 246, 1), rgba(243, 244, 246, 0))',
|
|
|
|
}}></div>
|
|
|
|
}}></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -232,7 +232,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
{/* inputs */}
|
|
|
|
{/* inputs */}
|
|
|
|
<div className='mt-6'>
|
|
|
|
<div className='mt-6'>
|
|
|
|
<div className='text-[0px]'>
|
|
|
|
<div className='text-[0px]'>
|
|
|
|
<div className='mb-2 leading-5 text-sm font-medium text-gray-900'>{t('appDebug.generate.instruction')}</div>
|
|
|
|
<div className='mb-2 text-sm font-medium leading-5 text-gray-900'>{t('appDebug.generate.instruction')}</div>
|
|
|
|
<Textarea
|
|
|
|
<Textarea
|
|
|
|
className="h-[200px] resize-none"
|
|
|
|
className="h-[200px] resize-none"
|
|
|
|
placeholder={t('appDebug.generate.instructionPlaceHolder') as string}
|
|
|
|
placeholder={t('appDebug.generate.instructionPlaceHolder') as string}
|
|
|
|
@ -247,7 +247,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
onClick={onGenerate}
|
|
|
|
onClick={onGenerate}
|
|
|
|
disabled={isLoading}
|
|
|
|
disabled={isLoading}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Generator className='w-4 h-4 text-white' />
|
|
|
|
<Generator className='h-4 w-4 text-white' />
|
|
|
|
<span className='text-xs font-semibold text-white'>{t('appDebug.generate.generate')}</span>
|
|
|
|
<span className='text-xs font-semibold text-white'>{t('appDebug.generate.generate')}</span>
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -255,8 +255,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{(!isLoading && res) && (
|
|
|
|
{(!isLoading && res) && (
|
|
|
|
<div className='w-0 grow p-6 pb-0 h-full'>
|
|
|
|
<div className='h-full w-0 grow p-6 pb-0'>
|
|
|
|
<div className='shrink-0 mb-3 leading-[160%] text-base font-semibold text-gray-800'>{t('appDebug.generate.resTitle')}</div>
|
|
|
|
<div className='mb-3 shrink-0 text-base font-semibold leading-[160%] text-gray-800'>{t('appDebug.generate.resTitle')}</div>
|
|
|
|
<div className={cn('max-h-[555px] overflow-y-auto', !isInLLMNode && 'pb-2')}>
|
|
|
|
<div className={cn('max-h-[555px] overflow-y-auto', !isInLLMNode && 'pb-2')}>
|
|
|
|
<ConfigPrompt
|
|
|
|
<ConfigPrompt
|
|
|
|
mode={mode}
|
|
|
|
mode={mode}
|
|
|
|
@ -283,17 +283,17 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
<div className='mt-7'>
|
|
|
|
<div className='mt-7'>
|
|
|
|
<GroupName name={t('appDebug.feature.groupChat.title')} />
|
|
|
|
<GroupName name={t('appDebug.feature.groupChat.title')} />
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
className='mb-1 p-3 border-t-[0.5px] border-l-[0.5px] border-effects-highlight rounded-xl bg-background-section-burn'
|
|
|
|
className='border-effects-highlight bg-background-section-burn mb-1 rounded-xl border-l-[0.5px] border-t-[0.5px] p-3'
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div className='mb-2 flex items-center gap-2'>
|
|
|
|
<div className='mb-2 flex items-center gap-2'>
|
|
|
|
<div className='shrink-0 p-1 rounded-lg border-[0.5px] border-divider-subtle shadow-xs bg-util-colors-blue-light-blue-light-500'>
|
|
|
|
<div className='border-divider-subtle shadow-xs bg-util-colors-blue-light-blue-light-500 shrink-0 rounded-lg border-[0.5px] p-1'>
|
|
|
|
<LoveMessage className='w-4 h-4 text-text-primary-on-surface' />
|
|
|
|
<LoveMessage className='text-text-primary-on-surface h-4 w-4' />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='grow flex items-center text-text-secondary system-sm-semibold'>
|
|
|
|
<div className='text-text-secondary system-sm-semibold flex grow items-center'>
|
|
|
|
{t('appDebug.feature.conversationOpener.title')}
|
|
|
|
{t('appDebug.feature.conversationOpener.title')}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='min-h-8 text-text-tertiary system-xs-regular'>{res.opening_statement}</div>
|
|
|
|
<div className='text-text-tertiary system-xs-regular min-h-8'>{res.opening_statement}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
@ -301,7 +301,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className='flex justify-end py-4 bg-white'>
|
|
|
|
<div className='flex justify-end bg-white py-4'>
|
|
|
|
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
|
|
|
|
<Button onClick={onClose}>{t('common.operation.cancel')}</Button>
|
|
|
|
<Button variant='primary' className='ml-2' onClick={() => {
|
|
|
|
<Button variant='primary' className='ml-2' onClick={() => {
|
|
|
|
setShowConfirmOverwrite(true)
|
|
|
|
setShowConfirmOverwrite(true)
|
|
|
|
|