Show action bar on last chat message without hover

This commit is contained in:
Debanjum Singh Solanky
2024-07-14 10:29:28 +05:30
parent a0f38e079f
commit dbbd4b9777
2 changed files with 7 additions and 2 deletions

View File

@@ -251,6 +251,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
chatMessage={chatMessage} chatMessage={chatMessage}
customClassName='fullHistory' customClassName='fullHistory'
borderLeftColor='orange-500' borderLeftColor='orange-500'
isLastMessage={index === data.chat.length - 1}
/> />
))} ))}
{ {
@@ -271,7 +272,8 @@ export default function ChatHistory(props: ChatHistoryProps) {
} }
} }
customClassName='fullHistory' customClassName='fullHistory'
borderLeftColor='orange-500' /> borderLeftColor='orange-500'
/>
{ {
message.trainOfThought && message.trainOfThought &&
constructTrainOfThought( constructTrainOfThought(
@@ -295,6 +297,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
} }
customClassName='fullHistory' customClassName='fullHistory'
borderLeftColor='orange-500' borderLeftColor='orange-500'
isLastMessage={true}
/> />
</> </>
) )
@@ -317,6 +320,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
} }
customClassName='fullHistory' customClassName='fullHistory'
borderLeftColor='orange-500' borderLeftColor='orange-500'
isLastMessage={true}
/> />
} }
<div className={`${styles.agentIndicator}`}> <div className={`${styles.agentIndicator}`}>

View File

@@ -146,6 +146,7 @@ interface ChatMessageProps {
isMobileWidth: boolean; isMobileWidth: boolean;
customClassName?: string; customClassName?: string;
borderLeftColor?: string; borderLeftColor?: string;
isLastMessage?: boolean;
} }
interface TrainOfThoughtProps { interface TrainOfThoughtProps {
@@ -349,7 +350,7 @@ export default function ChatMessage(props: ChatMessageProps) {
</div> </div>
<div className={styles.chatFooter}> <div className={styles.chatFooter}>
{ {
(isHovering || props.isMobileWidth) && (isHovering || props.isMobileWidth || props.isLastMessage) &&
( (
<> <>
<div title={formatDate(props.chatMessage.created)} className={`text-gray-400 relative top-0 left-4`}> <div title={formatDate(props.chatMessage.created)} className={`text-gray-400 relative top-0 left-4`}>