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

View File

@@ -146,6 +146,7 @@ interface ChatMessageProps {
isMobileWidth: boolean;
customClassName?: string;
borderLeftColor?: string;
isLastMessage?: boolean;
}
interface TrainOfThoughtProps {
@@ -349,7 +350,7 @@ export default function ChatMessage(props: ChatMessageProps) {
</div>
<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`}>