|
@@ -5,11 +5,15 @@ import { useTranslation } from 'react-i18next'
|
|
|
import type { MessageMore } from '../type'
|
|
|
import { formatNumber } from '@/utils/format'
|
|
|
|
|
|
-export type IMoreInfoProps = { more: MessageMore; isQuestion: boolean }
|
|
|
+export type IMoreInfoProps = {
|
|
|
+ more: MessageMore
|
|
|
+ isQuestion: boolean
|
|
|
+ className?: string
|
|
|
+}
|
|
|
|
|
|
-const MoreInfo: FC<IMoreInfoProps> = ({ more, isQuestion }) => {
|
|
|
+const MoreInfo: FC<IMoreInfoProps> = ({ more, isQuestion, className }) => {
|
|
|
const { t } = useTranslation()
|
|
|
- return (<div className={`mt-1 w-full text-xs text-gray-400 !text-right ${isQuestion ? 'mr-2 text-right ' : 'ml-2 text-left float-right'}`}>
|
|
|
+ return (<div className={`mt-1 w-full text-xs text-gray-400 ${isQuestion ? 'mr-2 text-right ' : 'pl-2 text-left float-right'} ${className}`}>
|
|
|
<span>{`${t('appLog.detail.timeConsuming')} ${more.latency}${t('appLog.detail.second')}`}</span>
|
|
|
<span>{`${t('appLog.detail.tokenCost')} ${formatNumber(more.tokens)}`}</span>
|
|
|
<span>· </span>
|