Feat/attachments (#9526)

Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
zxhlyh
2024-10-21 10:32:37 +08:00
committed by GitHub
parent 4fd2743efa
commit 7a1d6fe509
445 changed files with 11759 additions and 6922 deletions

View File

@@ -27,13 +27,13 @@ const MetaData: FC<Props> = ({
return (
<div className='relative'>
<div className='h-6 leading-6 text-gray-500 text-xs font-medium'>{t('runLog.meta.title')}</div>
<div className='h-6 py-1 text-text-tertiary system-xs-medium-uppercase'>{t('runLog.meta.title')}</div>
<div className='py-1'>
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.status')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.status')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-16 h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-16 h-2 rounded-sm bg-text-quaternary'/>
)}
{status === 'succeeded' && (
<span>SUCCESS</span>
@@ -47,10 +47,10 @@ const MetaData: FC<Props> = ({
</div>
</div>
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.executor')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.executor')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-[88px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-[88px] h-2 rounded-sm bg-text-quaternary'/>
)}
{status !== 'running' && (
<span>{executor || 'N/A'}</span>
@@ -58,10 +58,10 @@ const MetaData: FC<Props> = ({
</div>
</div>
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.startTime')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.startTime')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-[72px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-[72px] h-2 rounded-sm bg-text-quaternary'/>
)}
{status !== 'running' && (
<span>{startTime ? formatTime(startTime, t('appLog.dateTimeFormat') as string) : '-'}</span>
@@ -69,10 +69,10 @@ const MetaData: FC<Props> = ({
</div>
</div>
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.time')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.time')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-[72px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-[72px] h-2 rounded-sm bg-text-quaternary'/>
)}
{status !== 'running' && (
<span>{time ? `${time.toFixed(3)}s` : '-'}</span>
@@ -80,10 +80,10 @@ const MetaData: FC<Props> = ({
</div>
</div>
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.tokens')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.tokens')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-[48px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-[48px] h-2 rounded-sm bg-text-quaternary'/>
)}
{status !== 'running' && (
<span>{`${tokens || 0} Tokens`}</span>
@@ -92,10 +92,10 @@ const MetaData: FC<Props> = ({
</div>
{showSteps && (
<div className='flex'>
<div className='shrink-0 w-[104px] px-2 py-[5px] text-gray-500 text-xs leading-[18px] truncate'>{t('runLog.meta.steps')}</div>
<div className='grow px-2 py-[5px] text-gray-900 text-xs leading-[18px]'>
<div className='shrink-0 w-[104px] px-2 py-1.5 text-text-tertiary system-xs-regular truncate'>{t('runLog.meta.steps')}</div>
<div className='grow px-2 py-1.5 text-text-secondary system-xs-regular'>
{status === 'running' && (
<div className='my-[5px] w-[24px] h-2 rounded-sm bg-[rgba(0,0,0,0.05)]'/>
<div className='my-1 w-[24px] h-2 rounded-sm bg-text-quaternary'/>
)}
{status !== 'running' && (
<span>{steps}</span>