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>
) )
} }
<div className={cn(s.answerWrapWrap, 'chat-answer-container group')}> <div className={cn(s.answerWrapWrap, 'chat-answer-container')}>
<div className={s.answerWrap}> <div className={cn(s.answerWrap, 'group')}>
<div className={`${s.answer} relative text-sm text-gray-900`}> <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'}> <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)) {(isResponding && (isAgentMode ? (!content && (agent_thoughts || []).filter(item => !!item.thought || !!item.tool).length === 0) : !content))
@ -311,7 +311,7 @@ const Answer: FC<IAnswerProps> = ({
) )
} }
</div> </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 && ( {!item.isOpeningStatement && (
<CopyBtn <CopyBtn
value={content} value={content}
@ -319,7 +319,7 @@ const Answer: FC<IAnswerProps> = ({
/> />
)} )}
{((isShowPromptLog && !isResponding) || (!item.isOpeningStatement && isShowTextToSpeech)) && ( {((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 && ( {isShowPromptLog && !isResponding && (
<Log logItem={item} /> <Log logItem={item} />
)} )}

View File

@ -16,7 +16,7 @@ const Log: FC<LogProps> = ({
return ( return (
<div <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) => { onClick={(e) => {
e.stopPropagation() e.stopPropagation()
e.nativeEvent.stopImmediatePropagation() e.nativeEvent.stopImmediatePropagation()
@ -27,8 +27,8 @@ const Log: FC<LogProps> = ({
setShowPromptLogModal(true) setShowPromptLogModal(true)
}} }}
> >
<File02 className='mr-1 w-4 h-4 text-gray-500' /> <File02 className='mr-1 w-4 h-4' />
<div className='text-xs leading-4 text-gray-500'>{runID ? t('appLog.viewLog') : t('appLog.promptLog')}</div> <div className='text-xs leading-4'>{runID ? t('appLog.viewLog') : t('appLog.promptLog')}</div>
</div> </div>
) )
} }

View File

@ -69,7 +69,7 @@ const Answer: FC<AnswerProps> = ({
) )
} }
</div> </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'> <div className='relative pr-10'>
<AnswerTriangle className='absolute -left-2 top-0 w-2 h-3 text-gray-100' /> <AnswerTriangle className='absolute -left-2 top-0 w-2 h-3 text-gray-100' />
<div <div

View File

@ -67,7 +67,7 @@ const Operation: FC<OperationProps> = ({
} }
return ( 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 && ( {!isOpeningStatement && (
<CopyBtn <CopyBtn
value={content} value={content}
@ -76,7 +76,7 @@ const Operation: FC<OperationProps> = ({
)} )}
{!isOpeningStatement && ( {!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 && ( {showPromptLog && (
<Log logItem={item} /> <Log logItem={item} />
)} )}