fix style of message log operation

This commit is contained in:
JzoNg 2024-03-21 17:47:01 +08:00
parent 9295739dc0
commit a1ec45fdd1
4 changed files with 10 additions and 10 deletions

View File

@ -248,8 +248,8 @@ const Answer: FC<IAnswerProps> = ({
</div>
)
}
<div className={cn(s.answerWrapWrap, 'chat-answer-container group')}>
<div className={s.answerWrap}>
<div className={cn(s.answerWrapWrap, 'chat-answer-container')}>
<div className={cn(s.answerWrap, 'group')}>
<div className={`${s.answer} relative text-sm text-gray-900`}>
<div className={'ml-2 py-3 px-4 bg-gray-100 rounded-tr-2xl rounded-b-2xl'}>
{(isResponding && (isAgentMode ? (!content && (agent_thoughts || []).filter(item => !!item.thought || !!item.tool).length === 0) : !content))
@ -311,7 +311,7 @@ const Answer: FC<IAnswerProps> = ({
)
}
</div>
<div className='absolute top-[-14px] right-[-14px] flex flex-row justify-end gap-1'>
<div className='absolute top-[-14px] left-[-6px] flex flex-row justify-end gap-1'>
{!item.isOpeningStatement && (
<CopyBtn
value={content}
@ -319,7 +319,7 @@ const Answer: FC<IAnswerProps> = ({
/>
)}
{((isShowPromptLog && !isResponding) || (!item.isOpeningStatement && isShowTextToSpeech)) && (
<div className='hidden group-hover:flex items-center h-[28px] p-0.5 rounded-lg bg-white border-[0.5px] border-gray-100 shadow-md'>
<div className='hidden group-hover:flex items-center w-max h-[28px] p-0.5 rounded-lg bg-white border-[0.5px] border-gray-100 shadow-md'>
{isShowPromptLog && !isResponding && (
<Log logItem={item} />
)}

View File

@ -16,7 +16,7 @@ const Log: FC<LogProps> = ({
return (
<div
className='p-1 flex items-center justify-center rounded-[6px] hover:bg-gray-50 cursor-pointer'
className='shrink-0 p-1 flex items-center justify-center rounded-[6px] font-medium text-gray-500 hover:bg-gray-50 cursor-pointer hover:text-gray-700'
onClick={(e) => {
e.stopPropagation()
e.nativeEvent.stopImmediatePropagation()
@ -27,8 +27,8 @@ const Log: FC<LogProps> = ({
setShowPromptLogModal(true)
}}
>
<File02 className='mr-1 w-4 h-4 text-gray-500' />
<div className='text-xs leading-4 text-gray-500'>{runID ? t('appLog.viewLog') : t('appLog.promptLog')}</div>
<File02 className='mr-1 w-4 h-4' />
<div className='text-xs leading-4'>{runID ? t('appLog.viewLog') : t('appLog.promptLog')}</div>
</div>
)
}

View File

@ -69,7 +69,7 @@ const Answer: FC<AnswerProps> = ({
)
}
</div>
<div className='chat-answer-container grow w-0 group ml-4'>
<div className='chat-answer-container grow w-0 ml-4'>
<div className='relative pr-10'>
<AnswerTriangle className='absolute -left-2 top-0 w-2 h-3 text-gray-100' />
<div

View File

@ -67,7 +67,7 @@ const Operation: FC<OperationProps> = ({
}
return (
<div className='absolute top-[-14px] right-[-14px] flex justify-end gap-1'>
<div className='absolute top-[-14px] left-[-14px] flex justify-end gap-1'>
{!isOpeningStatement && (
<CopyBtn
value={content}
@ -76,7 +76,7 @@ const Operation: FC<OperationProps> = ({
)}
{!isOpeningStatement && (
<div className='hidden group-hover:flex items-center h-[28px] p-0.5 rounded-lg bg-white border-[0.5px] border-gray-100 shadow-md'>
<div className='hidden group-hover:flex items-center w-max h-[28px] p-0.5 rounded-lg bg-white border-[0.5px] border-gray-100 shadow-md'>
{showPromptLog && (
<Log logItem={item} />
)}