(feature)(chat-sdk) add time display above card (#1667)

This commit is contained in:
williamhliu
2024-09-13 15:11:00 +08:00
committed by GitHub
parent 579394af40
commit 4c9f16728a
3 changed files with 14 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ import Tools from '../Tools';
import SqlItem from './SqlItem';
import SimilarQuestionItem from './SimilarQuestionItem';
import dayjs, { Dayjs } from 'dayjs';
type Props = {
msg: string;
conversationId?: number;
@@ -326,6 +327,11 @@ const ChatItem: React.FC<Props> = ({
<div className={prefixCls}>
{!isMobile && <IconFont type="icon-zhinengsuanfa" className={`${prefixCls}-avatar`} />}
<div className={isMobile ? `${prefixCls}-mobile-msg-card` : ''}>
<div className={`${prefixCls}-time`}>
{parseTimeCost?.parseStartTime
? dayjs(parseTimeCost.parseStartTime).format('M月D日 HH:mm')
: ''}
</div>
<div className={contentClass}>
<ParseTip
isSimpleMode={isSimpleMode}