Created
July 5, 2024 06:20
-
-
Save elijahbenizzy/dc016ea946533f728baf67f66ee9c017 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div className="flex-1 overflow-y-auto p-4 hide-scrollbar" id={VIEW_END_ID}> | |
{displayedChatHistory.map((message, i) => ( | |
<ChatMessage | |
message={message} | |
key={i} | |
/> | |
))} | |
{isChatWaiting && ( | |
<ChatMessage | |
message={{ | |
role: ChatItem.role.USER, | |
content: currentPrompt, | |
type: ChatItem.type.TEXT | |
}} | |
/> | |
)} | |
{isChatWaiting && ( | |
<ChatMessage | |
message={{ | |
content: currentResponse, | |
type: ChatItem.type.TEXT, | |
role: ChatItem.role.ASSISTANT | |
}} | |
/> | |
)} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment