Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created July 5, 2024 06:20
Show Gist options
  • Save elijahbenizzy/dc016ea946533f728baf67f66ee9c017 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/dc016ea946533f728baf67f66ee9c017 to your computer and use it in GitHub Desktop.
<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